diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 3769a0e6..e61fc73b 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node_version: [14.x, 15.x, 16.x, 17.x] + node_version: [14.x, 15.x, 16.x, 17.x, 18.x] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..2124bd64 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '33 18 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/README.md b/README.md index 740fad1e..429925fa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Extract main article, main image and meta data from URL. [![NPM](https://badge.fury.io/js/article-parser.svg)](https://badge.fury.io/js/article-parser) ![CI test](https://github.com/ndaidong/article-parser/workflows/ci-test/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/ndaidong/article-parser/badge.svg)](https://coveralls.io/github/ndaidong/article-parser) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ndaidong_article-parser&metric=alert_status)](https://sonarcloud.io/dashboard?id=ndaidong_article-parser) +![CodeQL](https://github.com/ndaidong/article-parser/workflows/CodeQL/badge.svg) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) diff --git a/dist/article-parser.browser.js b/dist/article-parser.browser.js index cd59c724..f5974f0d 100644 --- a/dist/article-parser.browser.js +++ b/dist/article-parser.browser.js @@ -1,75 +1,75 @@ -// article-parser@6.0.0, by @ndaidong - built with esbuild at 2022-04-08T04:07:40.586Z - published under MIT license -var nh=Object.create;var Ir=Object.defineProperty,sh=Object.defineProperties,ah=Object.getOwnPropertyDescriptor,oh=Object.getOwnPropertyDescriptors,lh=Object.getOwnPropertyNames,Lr=Object.getOwnPropertySymbols,uh=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable;var Gi=(t,e,r)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P=(t,e)=>{for(var r in e||(e={}))Vi.call(e,r)&&Gi(t,r,e[r]);if(Lr)for(var r of Lr(e))Ys.call(e,r)&&Gi(t,r,e[r]);return t},et=(t,e)=>sh(t,oh(e));var Ji=(t,e)=>{var r={};for(var i in t)Vi.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&Lr)for(var i of Lr(t))e.indexOf(i)<0&&Ys.call(t,i)&&(r[i]=t[i]);return r};var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ch=(t,e)=>{for(var r in e)Ir(t,r,{get:e[r],enumerable:!0})},fh=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lh(e))!Vi.call(t,n)&&n!==r&&Ir(t,n,{get:()=>e[n],enumerable:!(i=ah(e,n))||i.enumerable});return t};var tt=(t,e,r)=>(r=t!=null?nh(uh(t)):{},fh(e||!t||!t.__esModule?Ir(r,"default",{value:t,enumerable:!0}):r,t));var Xi=(t,e,r)=>(Gi(t,typeof e!="symbol"?e+"":e,r),r);var Zi=v((Dw,ea)=>{"use strict";ea.exports=function(e,r){return function(){for(var n=new Array(arguments.length),s=0;s{"use strict";var gh=Zi(),$e=Object.prototype.toString;function rn(t){return Array.isArray(t)}function en(t){return typeof t>"u"}function mh(t){return t!==null&&!en(t)&&t.constructor!==null&&!en(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ta(t){return $e.call(t)==="[object ArrayBuffer]"}function yh(t){return $e.call(t)==="[object FormData]"}function bh(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ta(t.buffer),e}function vh(t){return typeof t=="string"}function wh(t){return typeof t=="number"}function ra(t){return t!==null&&typeof t=="object"}function Mr(t){if($e.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function _h(t){return $e.call(t)==="[object Date]"}function Th(t){return $e.call(t)==="[object File]"}function xh(t){return $e.call(t)==="[object Blob]"}function ia(t){return $e.call(t)==="[object Function]"}function Sh(t){return ra(t)&&ia(t.pipe)}function Eh(t){return $e.call(t)==="[object URLSearchParams]"}function Ah(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ch(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function nn(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),rn(t))for(var r=0,i=t.length;r{"use strict";var bt=ue();function sa(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}aa.exports=function(e,r,i){if(!r)return e;var n;if(i)n=i(r);else if(bt.isURLSearchParams(r))n=r.toString();else{var s=[];bt.forEach(r,function(u,l){u===null||typeof u>"u"||(bt.isArray(u)?l=l+"[]":u=[u],bt.forEach(u,function(h){bt.isDate(h)?h=h.toISOString():bt.isObject(h)&&(h=JSON.stringify(h)),s.push(sa(l)+"="+sa(h))}))}),n=s.join("&")}if(n){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var la=v((Mw,oa)=>{"use strict";var Lh=ue();function jr(){this.handlers=[]}jr.prototype.use=function(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};jr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};jr.prototype.forEach=function(e){Lh.forEach(this.handlers,function(i){i!==null&&e(i)})};oa.exports=jr});var ca=v((jw,ua)=>{"use strict";var Ih=ue();ua.exports=function(e,r){Ih.forEach(e,function(n,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[s])})}});var an=v((Bw,fa)=>{"use strict";fa.exports=function(e,r,i,n,s){return e.config=r,i&&(e.code=i),e.request=n,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}});var on=v((Fw,ha)=>{"use strict";ha.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var ln=v((Hw,pa)=>{"use strict";var Rh=an();pa.exports=function(e,r,i,n,s){var a=new Error(e);return Rh(a,r,i,n,s)}});var ga=v((Uw,da)=>{"use strict";var Ph=ln();da.exports=function(e,r,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):r(Ph("Request failed with status code "+i.status,i.config,null,i.request,i))}});var ya=v(($w,ma)=>{"use strict";var Br=ue();ma.exports=Br.isStandardBrowserEnv()?function(){return{write:function(r,i,n,s,a,o){var u=[];u.push(r+"="+encodeURIComponent(i)),Br.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),Br.isString(s)&&u.push("path="+s),Br.isString(a)&&u.push("domain="+a),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var va=v((Ww,ba)=>{"use strict";ba.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}});var _a=v((zw,wa)=>{"use strict";wa.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var xa=v((Gw,Ta)=>{"use strict";var Dh=va(),qh=_a();Ta.exports=function(e,r){return e&&!Dh(r)?qh(e,r):r}});var Ea=v((Vw,Sa)=>{"use strict";var un=ue(),kh=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];Sa.exports=function(e){var r={},i,n,s;return e&&un.forEach(e.split(` -`),function(o){if(s=o.indexOf(":"),i=un.trim(o.substr(0,s)).toLowerCase(),n=un.trim(o.substr(s+1)),i){if(r[i]&&kh.indexOf(i)>=0)return;i==="set-cookie"?r[i]=(r[i]?r[i]:[]).concat([n]):r[i]=r[i]?r[i]+", "+n:n}}),r}});var Oa=v((Jw,Ca)=>{"use strict";var Aa=ue();Ca.exports=Aa.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(s){var a=s;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(a){var o=Aa.isString(a)?n(a):a;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}()});var Jt=v((Xw,Na)=>{"use strict";function cn(t){this.message=t}cn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};cn.prototype.__CANCEL__=!0;Na.exports=cn});var hn=v((Yw,La)=>{"use strict";var Fr=ue(),Mh=ga(),jh=ya(),Bh=sn(),Fh=xa(),Hh=Ea(),Uh=Oa(),fn=ln(),$h=on(),Wh=Jt();La.exports=function(e){return new Promise(function(i,n){var s=e.data,a=e.headers,o=e.responseType,u;function l(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}Fr.isFormData(s)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(h+":"+p)}var d=Fh(e.baseURL,e.url);c.open(e.method.toUpperCase(),Bh(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(!!c){var m="getAllResponseHeaders"in c?Hh(c.getAllResponseHeaders()):null,y=!o||o==="text"||o==="json"?c.responseText:c.response,b={data:y,status:c.status,statusText:c.statusText,headers:m,config:e,request:c};Mh(function(w){i(w),l()},function(w){n(w),l()},b),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){!c||(n(fn("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(fn("Network Error",e,null,c)),c=null},c.ontimeout=function(){var y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||$h;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(fn(y,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Fr.isStandardBrowserEnv()){var S=(e.withCredentials||Uh(d))&&e.xsrfCookieName?jh.read(e.xsrfCookieName):void 0;S&&(a[e.xsrfHeaderName]=S)}"setRequestHeader"in c&&Fr.forEach(a,function(y,b){typeof s>"u"&&b.toLowerCase()==="content-type"?delete a[b]:c.setRequestHeader(b,y)}),Fr.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(m){!c||(n(!m||m&&m.type?new Wh("canceled"):m),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),c.send(s)})}});var Ur=v((Kw,Pa)=>{"use strict";var ae=ue(),Ia=ca(),zh=an(),Gh=on(),Vh={"Content-Type":"application/x-www-form-urlencoded"};function Ra(t,e){!ae.isUndefined(t)&&ae.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Jh(){var t;return typeof XMLHttpRequest<"u"?t=hn():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=hn()),t}function Xh(t,e,r){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}var Hr={transitional:Gh,adapter:Jh(),transformRequest:[function(e,r){return Ia(r,"Accept"),Ia(r,"Content-Type"),ae.isFormData(e)||ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e)?e:ae.isArrayBufferView(e)?e.buffer:ae.isURLSearchParams(e)?(Ra(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ae.isObject(e)||r&&r["Content-Type"]==="application/json"?(Ra(r,"application/json"),Xh(e)):e}],transformResponse:[function(e){var r=this.transitional||Hr.transitional,i=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?zh(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ae.forEach(["delete","get","head"],function(e){Hr.headers[e]={}});ae.forEach(["post","put","patch"],function(e){Hr.headers[e]=ae.merge(Vh)});Pa.exports=Hr});var qa=v((Qw,Da)=>{"use strict";var Yh=ue(),Kh=Ur();Da.exports=function(e,r,i){var n=this||Kh;return Yh.forEach(i,function(a){e=a.call(n,e,r)}),e}});var pn=v((Zw,ka)=>{"use strict";ka.exports=function(e){return!!(e&&e.__CANCEL__)}});var Ba=v((e_,ja)=>{"use strict";var Ma=ue(),dn=qa(),Qh=pn(),Zh=Ur(),ep=Jt();function gn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ep("canceled")}ja.exports=function(e){gn(e),e.headers=e.headers||{},e.data=dn.call(e,e.data,e.headers,e.transformRequest),e.headers=Ma.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Ma.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||Zh.adapter;return r(e).then(function(n){return gn(e),n.data=dn.call(e,n.data,n.headers,e.transformResponse),n},function(n){return Qh(n)||(gn(e),n&&n.response&&(n.response.data=dn.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var mn=v((t_,Fa)=>{"use strict";var ye=ue();Fa.exports=function(e,r){r=r||{};var i={};function n(c,h){return ye.isPlainObject(c)&&ye.isPlainObject(h)?ye.merge(c,h):ye.isPlainObject(h)?ye.merge({},h):ye.isArray(h)?h.slice():h}function s(c){if(ye.isUndefined(r[c])){if(!ye.isUndefined(e[c]))return n(void 0,e[c])}else return n(e[c],r[c])}function a(c){if(!ye.isUndefined(r[c]))return n(void 0,r[c])}function o(c){if(ye.isUndefined(r[c])){if(!ye.isUndefined(e[c]))return n(void 0,e[c])}else return n(void 0,r[c])}function u(c){if(c in r)return n(e[c],r[c]);if(c in e)return n(void 0,e[c])}var l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return ye.forEach(Object.keys(e).concat(Object.keys(r)),function(h){var p=l[h]||s,d=p(h);ye.isUndefined(d)&&p!==u||(i[h]=d)}),i}});var yn=v((r_,Ha)=>{Ha.exports={version:"0.26.1"}});var Wa=v((i_,$a)=>{"use strict";var tp=yn().version,bn={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){bn[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var Ua={};bn.transitional=function(e,r,i){function n(s,a){return"[Axios v"+tp+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return function(s,a,o){if(e===!1)throw new Error(n(a," has been removed"+(r?" in "+r:"")));return r&&!Ua[a]&&(Ua[a]=!0,console.warn(n(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,o):!0}};function rp(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var i=Object.keys(t),n=i.length;n-- >0;){var s=i[n],a=e[s];if(a){var o=t[s],u=o===void 0||a(o,s,t);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+s)}}$a.exports={assertOptions:rp,validators:bn}});var Ya=v((n_,Xa)=>{"use strict";var Va=ue(),ip=sn(),za=la(),Ga=Ba(),$r=mn(),Ja=Wa(),vt=Ja.validators;function Xt(t){this.defaults=t,this.interceptors={request:new za,response:new za}}Xt.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=$r(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&Ja.assertOptions(i,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(r)===!1||(s=s&&d.synchronous,n.unshift(d.fulfilled,d.rejected))});var a=[];this.interceptors.response.forEach(function(d){a.push(d.fulfilled,d.rejected)});var o;if(!s){var u=[Ga,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(r);u.length;)o=o.then(u.shift(),u.shift());return o}for(var l=r;n.length;){var c=n.shift(),h=n.shift();try{l=c(l)}catch(p){h(p);break}}try{o=Ga(l)}catch(p){return Promise.reject(p)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Xt.prototype.getUri=function(e){return e=$r(this.defaults,e),ip(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Va.forEach(["delete","get","head","options"],function(e){Xt.prototype[e]=function(r,i){return this.request($r(i||{},{method:e,url:r,data:(i||{}).data}))}});Va.forEach(["post","put","patch"],function(e){Xt.prototype[e]=function(r,i,n){return this.request($r(n||{},{method:e,url:r,data:i}))}});Xa.exports=Xt});var Qa=v((s_,Ka)=>{"use strict";var np=Jt();function wt(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var r=this;this.promise.then(function(i){if(!!r._listeners){var n,s=r._listeners.length;for(n=0;n{"use strict";Za.exports=function(e){return function(i){return e.apply(null,i)}}});var ro=v((o_,to)=>{"use strict";var sp=ue();to.exports=function(e){return sp.isObject(e)&&e.isAxiosError===!0}});var so=v((l_,vn)=>{"use strict";var io=ue(),ap=Zi(),Wr=Ya(),op=mn(),lp=Ur();function no(t){var e=new Wr(t),r=ap(Wr.prototype.request,e);return io.extend(r,Wr.prototype,e),io.extend(r,e),r.create=function(n){return no(op(t,n))},r}var Ne=no(lp);Ne.Axios=Wr;Ne.Cancel=Jt();Ne.CancelToken=Qa();Ne.isCancel=pn();Ne.VERSION=yn().version;Ne.all=function(e){return Promise.all(e)};Ne.spread=eo();Ne.isAxiosError=ro();vn.exports=Ne;vn.exports.default=Ne});var oo=v((u_,ao)=>{ao.exports=so()});var uo=v((c_,lo)=>{var _t=1e3,Tt=_t*60,xt=Tt*60,rt=xt*24,up=rt*7,cp=rt*365.25;lo.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return fp(t);if(r==="number"&&isFinite(t))return e.long?pp(t):hp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function fp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!!e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*cp;case"weeks":case"week":case"w":return r*up;case"days":case"day":case"d":return r*rt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Tt;case"seconds":case"second":case"secs":case"sec":case"s":return r*_t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function hp(t){var e=Math.abs(t);return e>=rt?Math.round(t/rt)+"d":e>=xt?Math.round(t/xt)+"h":e>=Tt?Math.round(t/Tt)+"m":e>=_t?Math.round(t/_t)+"s":t+"ms"}function pp(t){var e=Math.abs(t);return e>=rt?zr(t,e,rt,"day"):e>=xt?zr(t,e,xt,"hour"):e>=Tt?zr(t,e,Tt,"minute"):e>=_t?zr(t,e,_t,"second"):t+" ms"}function zr(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var fo=v((f_,co)=>{function dp(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=n,r.enabled=a,r.humanize=uo(),r.destroy=l,Object.keys(t).forEach(c=>{r[c]=t[c]}),r.names=[],r.skips=[],r.formatters={};function e(c){let h=0;for(let p=0;p{if(C==="%%")return"%";w++;let j=r.formatters[D];if(typeof j=="function"){let H=m[w];C=j.call(y,H),m.splice(w,1),w--}return C}),r.formatArgs.call(y,m),(y.log||r.log).apply(y,m)}return S.namespace=c,S.useColors=r.useColors(),S.color=r.selectColor(c),S.extend=i,S.destroy=r.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,g=r.enabled(c)),g),set:m=>{p=m}}),typeof r.init=="function"&&r.init(S),S}function i(c,h){let p=r(this.namespace+(typeof h>"u"?":":h)+c);return p.log=this.log,p}function n(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let h,p=(typeof c=="string"?c:"").split(/[\s,]+/),d=p.length;for(h=0;h"-"+h)].join(",");return r.enable(""),c}function a(c){if(c[c.length-1]==="*")return!0;let h,p;for(h=0,p=r.skips.length;h{be.formatArgs=mp;be.save=yp;be.load=bp;be.useColors=gp;be.storage=vp();be.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();be.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function gp(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function mp(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Gr.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}be.log=console.debug||console.log||(()=>{});function yp(t){try{t?be.storage.setItem("debug",t):be.storage.removeItem("debug")}catch{}}function bp(){let t;try{t=be.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function vp(){try{return localStorage}catch{}}Gr.exports=fo()(be);var{formatters:wp}=Gr.exports;wp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var So=v((N_,_p)=>{_p.exports={"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}});var Tn=v(Yt=>{"use strict";var Tp=Yt&&Yt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yt,"__esModule",{value:!0});var Eo=Tp(So()),xp=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Sp(t){return t>=55296&&t<=57343||t>1114111?"�":(t in Eo.default&&(t=Eo.default[t]),xp(t))}Yt.default=Sp});var Vr=v((I_,Ep)=>{Ep.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` -`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var xn=v((R_,Ap)=>{Ap.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}});var Jr=v((P_,Cp)=>{Cp.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}});var En=v(Kt=>{"use strict";var Xr=Kt&&Kt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kt,"__esModule",{value:!0});var Op=Xr(Tn()),Np=Xr(Vr()),Sn=Xr(xn()),Lp=Xr(Jr());function ve(t){return t===" "||t===` -`||t===" "||t==="\f"||t==="\r"}function Ao(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function ie(t,e,r){var i=t.toLowerCase();return t===i?function(n,s){s===i?n._state=e:(n._state=r,n._index--)}:function(n,s){s===i||s===t?n._state=e:(n._state=r,n._index--)}}function Ae(t,e){var r=t.toLowerCase();return function(i,n){n===r||n===t?i._state=e:(i._state=3,i._index--)}}var Ip=ie("C",24,16),Rp=ie("D",25,16),Pp=ie("A",26,16),Dp=ie("T",27,16),qp=ie("A",28,16),kp=Ae("R",35),Mp=Ae("I",36),jp=Ae("P",37),Bp=Ae("T",38),Fp=ie("R",40,1),Hp=ie("I",41,1),Up=ie("P",42,1),$p=ie("T",43,1),Wp=Ae("Y",45),zp=Ae("L",46),Gp=Ae("E",47),Vp=ie("Y",49,1),Jp=ie("L",50,1),Xp=ie("E",51,1),Yp=Ae("I",54),Kp=Ae("T",55),Qp=Ae("L",56),Zp=Ae("E",57),ed=ie("I",58,1),td=ie("T",59,1),rd=ie("L",60,1),id=ie("E",61,1),nd=ie("#",63,64),sd=ie("X",66,65),ad=function(){function t(e,r){var i;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=r,this.xmlMode=!!(e!=null&&e.xmlMode),this.decodeEntities=(i=e==null?void 0:e.decodeEntities)!==null&&i!==void 0?i:!0}return t.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},t.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},t.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},t.prototype.pause=function(){this.running=!1},t.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):this.decodeEntities&&e==="&"&&(this.special===1||this.special===4)&&(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},t.prototype.isTagStartChar=function(e){return Ao(e)||this.xmlMode&&!ve(e)&&e!=="/"&&e!==">"},t.prototype.stateBeforeTagName=function(e){e==="/"?this._state=5:e==="<"?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):e===">"||this.special!==1||ve(e)?this._state=1:e==="!"?(this._state=15,this.sectionStart=this._index+1):e==="?"?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=!this.xmlMode&&(e==="s"||e==="S")?32:!this.xmlMode&&(e==="t"||e==="T")?52:3,this.sectionStart=this._index):this._state=1},t.prototype.stateInTagName=function(e){(e==="/"||e===">"||ve(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},t.prototype.stateBeforeClosingTagName=function(e){ve(e)||(e===">"?this._state=1:this.special!==1?this.special!==4&&(e==="s"||e==="S")?this._state=33:this.special===4&&(e==="t"||e==="T")?this._state=53:(this._state=1,this._index--):this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},t.prototype.stateInClosingTagName=function(e){(e===">"||ve(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},t.prototype.stateAfterClosingTagName=function(e){e===">"&&(this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeAttributeName=function(e){e===">"?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):e==="/"?this._state=4:ve(e)||(this._state=9,this.sectionStart=this._index)},t.prototype.stateInSelfClosingTag=function(e){e===">"?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):ve(e)||(this._state=8,this._index--)},t.prototype.stateInAttributeName=function(e){(e==="="||e==="/"||e===">"||ve(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},t.prototype.stateAfterAttributeName=function(e){e==="="?this._state=11:e==="/"||e===">"?(this.cbs.onattribend(void 0),this._state=8,this._index--):ve(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},t.prototype.stateBeforeAttributeValue=function(e){e==='"'?(this._state=12,this.sectionStart=this._index+1):e==="'"?(this._state=13,this.sectionStart=this._index+1):ve(e)||(this._state=14,this.sectionStart=this._index,this._index--)},t.prototype.handleInAttributeValue=function(e,r){e===r?(this.emitToken("onattribdata"),this.cbs.onattribend(r),this._state=8):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},t.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},t.prototype.stateInAttributeValueNoQuotes=function(e){ve(e)||e===">"?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateBeforeDeclaration=function(e){this._state=e==="["?23:e==="-"?18:16},t.prototype.stateInDeclaration=function(e){e===">"&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateInProcessingInstruction=function(e){e===">"&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeComment=function(e){e==="-"?(this._state=19,this.sectionStart=this._index+1):this._state=16},t.prototype.stateInComment=function(e){e==="-"&&(this._state=21)},t.prototype.stateInSpecialComment=function(e){e===">"&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateAfterComment1=function(e){e==="-"?this._state=22:this._state=19},t.prototype.stateAfterComment2=function(e){e===">"?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="-"&&(this._state=19)},t.prototype.stateBeforeCdata6=function(e){e==="["?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},t.prototype.stateInCdata=function(e){e==="]"&&(this._state=30)},t.prototype.stateAfterCdata1=function(e){e==="]"?this._state=31:this._state=29},t.prototype.stateAfterCdata2=function(e){e===">"?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="]"&&(this._state=29)},t.prototype.stateBeforeSpecialS=function(e){e==="c"||e==="C"?this._state=34:e==="t"||e==="T"?this._state=44:(this._state=3,this._index--)},t.prototype.stateBeforeSpecialSEnd=function(e){this.special===2&&(e==="c"||e==="C")?this._state=39:this.special===3&&(e==="t"||e==="T")?this._state=48:this._state=1},t.prototype.stateBeforeSpecialLast=function(e,r){(e==="/"||e===">"||ve(e))&&(this.special=r),this._state=3,this._index--},t.prototype.stateAfterSpecialLast=function(e,r){e===">"||ve(e)?(this.special=1,this._state=6,this.sectionStart=this._index-r,this._index--):this._state=1},t.prototype.parseFixedEntity=function(e){if(e===void 0&&(e=this.xmlMode?Lp.default:Np.default),this.sectionStart+1=2;){var i=this.buffer.substr(e,r);if(Object.prototype.hasOwnProperty.call(Sn.default,i)){this.emitPartial(Sn.default[i]),this.sectionStart+=r+1;return}r--}},t.prototype.stateInNamedEntity=function(e){e===";"?(this.parseFixedEntity(),this.baseState===1&&this.sectionStart+1"9")&&!Ao(e)&&(this.xmlMode||this.sectionStart+1===this._index||(this.baseState!==1?e!=="="&&this.parseFixedEntity(Sn.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},t.prototype.decodeNumericEntity=function(e,r,i){var n=this.sectionStart+e;if(n!==this._index){var s=this.buffer.substring(n,this._index),a=parseInt(s,r);this.emitPartial(Op.default(a)),this.sectionStart=i?this._index+1:this._index}this._state=this.baseState},t.prototype.stateInNumericEntity=function(e){e===";"?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},t.prototype.stateInHexEntity=function(e){e===";"?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},t.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(this._state===1?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},t.prototype.parse=function(){for(;this._index{"use strict";var od=Ct&&Ct.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.Parser=void 0;var ld=od(En()),At=new Set(["input","option","optgroup","select","button","datalist","textarea"]),$=new Set(["p"]),Co={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:$,h1:$,h2:$,h3:$,h4:$,h5:$,h6:$,select:At,input:At,output:At,button:At,datalist:At,textarea:At,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:$,article:$,aside:$,blockquote:$,details:$,div:$,dl:$,fieldset:$,figcaption:$,figure:$,footer:$,form:$,header:$,hr:$,main:$,nav:$,ol:$,pre:$,section:$,table:$,ul:$,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},An=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Oo=new Set(["math","svg"]),No=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),ud=/\s|\//,cd=function(){function t(e,r){r===void 0&&(r={});var i,n,s,a,o;this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=r,this.cbs=e??{},this.lowerCaseTagNames=(i=r.lowerCaseTags)!==null&&i!==void 0?i:!r.xmlMode,this.lowerCaseAttributeNames=(n=r.lowerCaseAttributeNames)!==null&&n!==void 0?n:!r.xmlMode,this.tokenizer=new((s=r.Tokenizer)!==null&&s!==void 0?s:ld.default)(this.options,this),(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}return t.prototype.updatePosition=function(e){this.endIndex===null?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},t.prototype.ontext=function(e){var r,i;this.updatePosition(1),this.endIndex--,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,e)},t.prototype.onopentagname=function(e){var r,i;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(Co,e))for(var n=void 0;this.stack.length>0&&Co[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);(this.options.xmlMode||!An.has(e))&&(this.stack.push(e),Oo.has(e)?this.foreignContext.push(!0):No.has(e)&&this.foreignContext.push(!1)),(i=(r=this.cbs).onopentagname)===null||i===void 0||i.call(r,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.onopentagend=function(){var e,r;this.updatePosition(1),this.attribs&&((r=(e=this.cbs).onopentag)===null||r===void 0||r.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&An.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},t.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(Oo.has(e)||No.has(e))&&this.foreignContext.pop(),this.stack.length&&(this.options.xmlMode||!An.has(e))){var r=this.stack.lastIndexOf(e);if(r!==-1)if(this.cbs.onclosetag)for(r=this.stack.length-r;r--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=r;else e==="p"&&!this.options.xmlMode&&(this.onopentagname(e),this.closeCurrentTag())}else!this.options.xmlMode&&(e==="br"||e==="p")&&(this.onopentagname(e),this.closeCurrentTag())},t.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},t.prototype.closeCurrentTag=function(){var e,r,i=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===i&&((r=(e=this.cbs).onclosetag)===null||r===void 0||r.call(e,i),this.stack.pop())},t.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},t.prototype.onattribdata=function(e){this.attribvalue+=e},t.prototype.onattribend=function(e){var r,i;(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(ud),i=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i},t.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+r,"!"+e)}},t.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+r,"?"+e)}},t.prototype.oncomment=function(e){var r,i,n,s;this.updatePosition(4),(i=(r=this.cbs).oncomment)===null||i===void 0||i.call(r,e),(s=(n=this.cbs).oncommentend)===null||s===void 0||s.call(n)},t.prototype.oncdata=function(e){var r,i,n,s,a,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?((i=(r=this.cbs).oncdatastart)===null||i===void 0||i.call(r),(s=(n=this.cbs).ontext)===null||s===void 0||s.call(n,e),(o=(a=this.cbs).oncdataend)===null||o===void 0||o.call(a)):this.oncomment("[CDATA["+e+"]]")},t.prototype.onerror=function(e){var r,i;(i=(r=this.cbs).onerror)===null||i===void 0||i.call(r,e)},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag)for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i]));(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,i,n;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this)},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.write=function(e){this.tokenizer.write(e)},t.prototype.end=function(e){this.tokenizer.end(e)},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){this.tokenizer.resume()},t.prototype.parseChunk=function(e){this.write(e)},t.prototype.done=function(e){this.end(e)},t}();Ct.Parser=cd});var Ot=v(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.Doctype=G.CDATA=G.Tag=G.Style=G.Script=G.Comment=G.Directive=G.Text=G.Root=G.isTag=G.ElementType=void 0;var we;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(we=G.ElementType||(G.ElementType={}));function fd(t){return t.type===we.Tag||t.type===we.Script||t.type===we.Style}G.isTag=fd;G.Root=we.Root;G.Text=we.Text;G.Directive=we.Directive;G.Comment=we.Comment;G.Script=we.Script;G.Style=we.Style;G.Tag=we.Tag;G.CDATA=we.CDATA;G.Doctype=we.Doctype});var In=v(q=>{"use strict";var nt=q&&q.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),Qt=q&&q.__assign||function(){return Qt=Object.assign||function(t){for(var e,r=1,i=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(Nn);q.NodeWithChildren=Kr;var Po=function(t){nt(e,t);function e(r){return t.call(this,K.ElementType.Root,r)||this}return e}(Kr);q.Document=Po;var Do=function(t){nt(e,t);function e(r,i,n,s){n===void 0&&(n=[]),s===void 0&&(s=r==="script"?K.ElementType.Script:r==="style"?K.ElementType.Style:K.ElementType.Tag);var a=t.call(this,s,n)||this;return a.name=r,a.attribs=i,a}return Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(i){var n,s;return{name:i,value:r.attribs[i],namespace:(n=r["x-attribsNamespace"])===null||n===void 0?void 0:n[i],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[i]}})},enumerable:!1,configurable:!0}),e}(Kr);q.Element=Do;function qo(t){return(0,K.isTag)(t)}q.isTag=qo;function ko(t){return t.type===K.ElementType.CDATA}q.isCDATA=ko;function Mo(t){return t.type===K.ElementType.Text}q.isText=Mo;function jo(t){return t.type===K.ElementType.Comment}q.isComment=jo;function Bo(t){return t.type===K.ElementType.Directive}q.isDirective=Bo;function Fo(t){return t.type===K.ElementType.Root}q.isDocument=Fo;function pd(t){return Object.prototype.hasOwnProperty.call(t,"children")}q.hasChildren=pd;function Ln(t,e){e===void 0&&(e=!1);var r;if(Mo(t))r=new Lo(t.data);else if(jo(t))r=new Io(t.data);else if(qo(t)){var i=e?On(t.children):[],n=new Do(t.name,Qt({},t.attribs),i);i.forEach(function(u){return u.parent=n}),t.namespace!=null&&(n.namespace=t.namespace),t["x-attribsNamespace"]&&(n["x-attribsNamespace"]=Qt({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(n["x-attribsPrefix"]=Qt({},t["x-attribsPrefix"])),r=n}else if(ko(t)){var i=e?On(t.children):[],s=new Kr(K.ElementType.CDATA,i);i.forEach(function(l){return l.parent=s}),r=s}else if(Fo(t)){var i=e?On(t.children):[],a=new Po(i);i.forEach(function(l){return l.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(Bo(t)){var o=new Ro(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}q.cloneNode=Ln;function On(t){for(var e=t.map(function(i){return Ln(i,!0)}),r=1;r{"use strict";var dd=Le&&Le.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),gd=Le&&Le.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dd(e,t,r)};Object.defineProperty(Le,"__esModule",{value:!0});Le.DomHandler=void 0;var Qr=Ot(),We=In();gd(In(),Le);var Ho=/\s+/g,Uo={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},$o=function(){function t(e,r,i){this.dom=[],this.root=new We.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(i=r,r=Uo),typeof e=="object"&&(r=e,e=void 0),this.callback=e??null,this.options=r??Uo,this.elementCB=i??null}return t.prototype.onparserinit=function(e){this.parser=e},t.prototype.onreset=function(){this.dom=[],this.root=new We.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(e){this.handleCallback(e)},t.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},t.prototype.onopentag=function(e,r){var i=this.options.xmlMode?Qr.ElementType.Tag:void 0,n=new We.Element(e,r,void 0,i);this.addNode(n),this.tagStack.push(n)},t.prototype.ontext=function(e){var r=this.options.normalizeWhitespace,i=this.lastNode;if(i&&i.type===Qr.ElementType.Text)r?i.data=(i.data+e).replace(Ho," "):i.data+=e,this.options.withEndIndices&&(i.endIndex=this.parser.endIndex);else{r&&(e=e.replace(Ho," "));var n=new We.Text(e);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===Qr.ElementType.Comment){this.lastNode.data+=e;return}var r=new We.Comment(e);this.addNode(r),this.lastNode=r},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var e=new We.Text(""),r=new We.NodeWithChildren(Qr.ElementType.CDATA,[e]);this.addNode(r),e.parent=r,this.lastNode=e},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(e,r){var i=new We.ProcessingInstruction(e,r);this.addNode(i)},t.prototype.handleCallback=function(e){if(typeof this.callback=="function")this.callback(e,this.dom);else if(e)throw e},t.prototype.addNode=function(e){var r=this.tagStack[this.tagStack.length-1],i=r.children[r.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),r.children.push(e),i&&(e.prev=i,i.next=e),e.parent=r,this.lastNode=null},t}();Le.DomHandler=$o;Le.default=$o});var Pn=v(Ie=>{"use strict";var Zr=Ie&&Ie.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.decodeHTML=Ie.decodeHTMLStrict=Ie.decodeXML=void 0;var Rn=Zr(Vr()),md=Zr(xn()),yd=Zr(Jr()),Wo=Zr(Tn()),bd=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Ie.decodeXML=Go(yd.default);Ie.decodeHTMLStrict=Go(Rn.default);function Go(t){var e=Vo(t);return function(r){return String(r).replace(bd,e)}}var zo=function(t,e){return t{"use strict";var Jo=fe&&fe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fe,"__esModule",{value:!0});fe.escapeUTF8=fe.escape=fe.encodeNonAsciiHTML=fe.encodeHTML=fe.encodeXML=void 0;var vd=Jo(Jr()),Xo=Ko(vd.default),Yo=Qo(Xo);fe.encodeXML=tl(Xo);var wd=Jo(Vr()),Dn=Ko(wd.default),_d=Qo(Dn);fe.encodeHTML=xd(Dn,_d);fe.encodeNonAsciiHTML=tl(Dn);function Ko(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function Qo(t){for(var e=[],r=[],i=0,n=Object.keys(t);i1?Td(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function xd(t,e){return function(r){return r.replace(e,function(i){return t[i]}).replace(Zo,ei)}}var el=new RegExp(Yo.source+"|"+Zo.source,"g");function Sd(t){return t.replace(el,ei)}fe.escape=Sd;function Ed(t){return t.replace(Yo,ei)}fe.escapeUTF8=Ed;function tl(t){return function(e){return e.replace(el,function(r){return t[r]||ei(r)})}}});var il=v(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.decodeXMLStrict=k.decodeHTML5Strict=k.decodeHTML4Strict=k.decodeHTML5=k.decodeHTML4=k.decodeHTMLStrict=k.decodeHTML=k.decodeXML=k.encodeHTML5=k.encodeHTML4=k.escapeUTF8=k.escape=k.encodeNonAsciiHTML=k.encodeHTML=k.encodeXML=k.encode=k.decodeStrict=k.decode=void 0;var ti=Pn(),rl=qn();function Ad(t,e){return(!e||e<=0?ti.decodeXML:ti.decodeHTML)(t)}k.decode=Ad;function Cd(t,e){return(!e||e<=0?ti.decodeXML:ti.decodeHTMLStrict)(t)}k.decodeStrict=Cd;function Od(t,e){return(!e||e<=0?rl.encodeXML:rl.encodeHTML)(t)}k.encode=Od;var st=qn();Object.defineProperty(k,"encodeXML",{enumerable:!0,get:function(){return st.encodeXML}});Object.defineProperty(k,"encodeHTML",{enumerable:!0,get:function(){return st.encodeHTML}});Object.defineProperty(k,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return st.encodeNonAsciiHTML}});Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return st.escape}});Object.defineProperty(k,"escapeUTF8",{enumerable:!0,get:function(){return st.escapeUTF8}});Object.defineProperty(k,"encodeHTML4",{enumerable:!0,get:function(){return st.encodeHTML}});Object.defineProperty(k,"encodeHTML5",{enumerable:!0,get:function(){return st.encodeHTML}});var ze=Pn();Object.defineProperty(k,"decodeXML",{enumerable:!0,get:function(){return ze.decodeXML}});Object.defineProperty(k,"decodeHTML",{enumerable:!0,get:function(){return ze.decodeHTML}});Object.defineProperty(k,"decodeHTMLStrict",{enumerable:!0,get:function(){return ze.decodeHTMLStrict}});Object.defineProperty(k,"decodeHTML4",{enumerable:!0,get:function(){return ze.decodeHTML}});Object.defineProperty(k,"decodeHTML5",{enumerable:!0,get:function(){return ze.decodeHTML}});Object.defineProperty(k,"decodeHTML4Strict",{enumerable:!0,get:function(){return ze.decodeHTMLStrict}});Object.defineProperty(k,"decodeHTML5Strict",{enumerable:!0,get:function(){return ze.decodeHTMLStrict}});Object.defineProperty(k,"decodeXMLStrict",{enumerable:!0,get:function(){return ze.decodeXML}})});var nl=v(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.attributeNames=Nt.elementNames=void 0;Nt.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);Nt.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])});var ll=v(Ce=>{"use strict";var Lt=Ce&&Ce.__assign||function(){return Lt=Object.assign||function(t){for(var e,r=1,i=arguments.length;r0&&(i+=kn(t.children,e)),(e.xmlMode||!sl.has(t.name))&&(i+="")),i}function jd(t){return"<"+t.data+">"}function Bd(t,e){var r=t.data||"";return e.decodeEntities!==!1&&!(!e.xmlMode&&t.parent&&Rd.has(t.parent.name))&&(r=al.encodeXML(r)),r}function Fd(t){return""}function Hd(t){return""}});var Bn=v(he=>{"use strict";var Ud=he&&he.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(he,"__esModule",{value:!0});he.innerText=he.textContent=he.getText=he.getInnerHTML=he.getOuterHTML=void 0;var Re=ke(),$d=Ud(ll()),Wd=Ot();function ul(t,e){return(0,$d.default)(t,e)}he.getOuterHTML=ul;function zd(t,e){return(0,Re.hasChildren)(t)?t.children.map(function(r){return ul(r,e)}).join(""):""}he.getInnerHTML=zd;function ri(t){return Array.isArray(t)?t.map(ri).join(""):(0,Re.isTag)(t)?t.name==="br"?` -`:ri(t.children):(0,Re.isCDATA)(t)?ri(t.children):(0,Re.isText)(t)?t.data:""}he.getText=ri;function Mn(t){return Array.isArray(t)?t.map(Mn).join(""):(0,Re.hasChildren)(t)&&!(0,Re.isComment)(t)?Mn(t.children):(0,Re.isText)(t)?t.data:""}he.textContent=Mn;function jn(t){return Array.isArray(t)?t.map(jn).join(""):(0,Re.hasChildren)(t)&&(t.type===Wd.ElementType.Tag||(0,Re.isCDATA)(t))?jn(t.children):(0,Re.isText)(t)?t.data:""}he.innerText=jn});var pl=v(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.prevElementSibling=ne.nextElementSibling=ne.getName=ne.hasAttrib=ne.getAttributeValue=ne.getSiblings=ne.getParent=ne.getChildren=void 0;var cl=ke(),Gd=[];function fl(t){var e;return(e=t.children)!==null&&e!==void 0?e:Gd}ne.getChildren=fl;function hl(t){return t.parent||null}ne.getParent=hl;function Vd(t){var e,r,i=hl(t);if(i!=null)return fl(i);for(var n=[t],s=t.prev,a=t.next;s!=null;)n.unshift(s),e=s,s=e.prev;for(;a!=null;)n.push(a),r=a,a=r.next;return n}ne.getSiblings=Vd;function Jd(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}ne.getAttributeValue=Jd;function Xd(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}ne.hasAttrib=Xd;function Yd(t){return t.name}ne.getName=Yd;function Kd(t){for(var e,r=t.next;r!==null&&!(0,cl.isTag)(r);)e=r,r=e.next;return r}ne.nextElementSibling=Kd;function Qd(t){for(var e,r=t.prev;r!==null&&!(0,cl.isTag)(r);)e=r,r=e.prev;return r}ne.prevElementSibling=Qd});var dl=v(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.prepend=pe.prependChild=pe.append=pe.appendChild=pe.replaceElement=pe.removeElement=void 0;function Zt(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}}pe.removeElement=Zt;function Zd(t,e){var r=e.prev=t.prev;r&&(r.next=e);var i=e.next=t.next;i&&(i.prev=e);var n=e.parent=t.parent;if(n){var s=n.children;s[s.lastIndexOf(t)]=e}}pe.replaceElement=Zd;function eg(t,e){if(Zt(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}pe.appendChild=eg;function tg(t,e){Zt(e);var r=t.parent,i=t.next;if(e.next=i,e.prev=t,t.next=e,e.parent=r,i){if(i.prev=e,r){var n=r.children;n.splice(n.lastIndexOf(i),0,e)}}else r&&r.children.push(e)}pe.append=tg;function rg(t,e){if(Zt(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var r=t.children[1];r.prev=e,e.next=r}else e.next=null}pe.prependChild=rg;function ig(t,e){Zt(e);var r=t.parent;if(r){var i=r.children;i.splice(i.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}pe.prepend=ig});var Hn=v(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.findAll=de.existsOne=de.findOne=de.findOneChild=de.find=de.filter=void 0;var er=ke();function ng(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),Array.isArray(e)||(e=[e]),Fn(t,e,r,i)}de.filter=ng;function Fn(t,e,r,i){for(var n=[],s=0,a=e;s0){var u=Fn(t,o.children,r,i);if(n.push.apply(n,u),i-=u.length,i<=0)break}}return n}de.find=Fn;function sg(t,e){return e.find(t)}de.findOneChild=sg;function gl(t,e,r){r===void 0&&(r=!0);for(var i=null,n=0;n0&&(i=gl(t,s.children));else continue}return i}de.findOne=gl;function ml(t,e){return e.some(function(r){return(0,er.isTag)(r)&&(t(r)||r.children.length>0&&ml(t,r.children))})}de.existsOne=ml;function ag(t,e){for(var r,i=[],n=e.filter(er.isTag),s;s=n.shift();){var a=(r=s.children)===null||r===void 0?void 0:r.filter(er.isTag);a&&a.length>0&&n.unshift.apply(n,a),t(s)&&i.push(s)}return i}de.findAll=ag});var Un=v(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.getElementsByTagType=Te.getElementsByTagName=Te.getElementById=Te.getElements=Te.testElement=void 0;var at=ke(),ni=Hn(),ii={tag_name:function(t){return typeof t=="function"?function(e){return(0,at.isTag)(e)&&t(e.name)}:t==="*"?at.isTag:function(e){return(0,at.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,at.isText)(e)&&t(e.data)}:function(e){return(0,at.isText)(e)&&e.data===t}}};function yl(t,e){return typeof e=="function"?function(r){return(0,at.isTag)(r)&&e(r.attribs[t])}:function(r){return(0,at.isTag)(r)&&r.attribs[t]===e}}function og(t,e){return function(r){return t(r)||e(r)}}function bl(t){var e=Object.keys(t).map(function(r){var i=t[r];return Object.prototype.hasOwnProperty.call(ii,r)?ii[r](i):yl(r,i)});return e.length===0?null:e.reduce(og)}function lg(t,e){var r=bl(t);return r?r(e):!0}Te.testElement=lg;function ug(t,e,r,i){i===void 0&&(i=1/0);var n=bl(t);return n?(0,ni.filter)(n,e,r,i):[]}Te.getElements=ug;function cg(t,e,r){return r===void 0&&(r=!0),Array.isArray(e)||(e=[e]),(0,ni.findOne)(yl("id",t),e,r)}Te.getElementById=cg;function fg(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),(0,ni.filter)(ii.tag_name(t),e,r,i)}Te.getElementsByTagName=fg;function hg(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),(0,ni.filter)(ii.tag_type(t),e,r,i)}Te.getElementsByTagType=hg});var _l=v(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.uniqueSort=Ge.compareDocumentPosition=Ge.removeSubsets=void 0;var vl=ke();function pg(t){for(var e=t.length;--e>=0;){var r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(var i=r.parent;i;i=i.parent)if(t.includes(i)){t.splice(e,1);break}}return t}Ge.removeSubsets=pg;function wl(t,e){var r=[],i=[];if(t===e)return 0;for(var n=(0,vl.hasChildren)(t)?t:t.parent;n;)r.unshift(n),n=n.parent;for(n=(0,vl.hasChildren)(e)?e:e.parent;n;)i.unshift(n),n=n.parent;for(var s=Math.min(r.length,i.length),a=0;au.indexOf(c)?o===e?20:4:o===t?10:2}Ge.compareDocumentPosition=wl;function dg(t){return t=t.filter(function(e,r,i){return!i.includes(e,r+1)}),t.sort(function(e,r){var i=wl(e,r);return i&2?-1:i&4?1:0}),t}Ge.uniqueSort=dg});var xl=v(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.getFeed=void 0;var gg=Bn(),tr=Un();function mg(t){var e=si(_g,t);return e?e.name==="feed"?yg(e):bg(e):null}ai.getFeed=mg;function yg(t){var e,r=t.children,i={type:"atom",items:(0,tr.getElementsByTagName)("entry",r).map(function(a){var o,u=a.children,l={media:Tl(u)};ge(l,"id","id",u),ge(l,"title","title",u);var c=(o=si("link",u))===null||o===void 0?void 0:o.attribs.href;c&&(l.link=c);var h=ot("summary",u)||ot("content",u);h&&(l.description=h);var p=ot("updated",u);return p&&(l.pubDate=new Date(p)),l})};ge(i,"id","id",r),ge(i,"title","title",r);var n=(e=si("link",r))===null||e===void 0?void 0:e.attribs.href;n&&(i.link=n),ge(i,"description","subtitle",r);var s=ot("updated",r);return s&&(i.updated=new Date(s)),ge(i,"author","email",r,!0),i}function bg(t){var e,r,i=(r=(e=si("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&r!==void 0?r:[],n={type:t.name.substr(0,3),id:"",items:(0,tr.getElementsByTagName)("item",t.children).map(function(a){var o=a.children,u={media:Tl(o)};ge(u,"id","guid",o),ge(u,"title","title",o),ge(u,"link","link",o),ge(u,"description","description",o);var l=ot("pubDate",o);return l&&(u.pubDate=new Date(l)),u})};ge(n,"title","title",i),ge(n,"link","link",i),ge(n,"description","description",i);var s=ot("lastBuildDate",i);return s&&(n.updated=new Date(s)),ge(n,"author","managingEditor",i,!0),n}var vg=["url","type","lang"],wg=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Tl(t){return(0,tr.getElementsByTagName)("media:content",t).map(function(e){for(var r=e.attribs,i={medium:r.medium,isDefault:!!r.isDefault},n=0,s=vg;n{"use strict";var Tg=V&&V.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),lt=V&&V.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tg(e,t,r)};Object.defineProperty(V,"__esModule",{value:!0});V.hasChildren=V.isDocument=V.isComment=V.isText=V.isCDATA=V.isTag=void 0;lt(Bn(),V);lt(pl(),V);lt(dl(),V);lt(Hn(),V);lt(Un(),V);lt(_l(),V);lt(xl(),V);var It=ke();Object.defineProperty(V,"isTag",{enumerable:!0,get:function(){return It.isTag}});Object.defineProperty(V,"isCDATA",{enumerable:!0,get:function(){return It.isCDATA}});Object.defineProperty(V,"isText",{enumerable:!0,get:function(){return It.isText}});Object.defineProperty(V,"isComment",{enumerable:!0,get:function(){return It.isComment}});Object.defineProperty(V,"isDocument",{enumerable:!0,get:function(){return It.isDocument}});Object.defineProperty(V,"hasChildren",{enumerable:!0,get:function(){return It.hasChildren}})});var zn=v(le=>{"use strict";var xg=le&&le.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),Sg=le&&le.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Eg=le&&le.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ag=le&&le.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Sg(e,t,r);return Eg(e,t),e},Cg=le&&le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(le,"__esModule",{value:!0});le.parseFeed=le.FeedHandler=void 0;var Og=Cg(ke()),li=Ag($n()),Ng=Cn(),Sl;(function(t){t[t.image=0]="image",t[t.audio=1]="audio",t[t.video=2]="video",t[t.document=3]="document",t[t.executable=4]="executable"})(Sl||(Sl={}));var El;(function(t){t[t.sample=0]="sample",t[t.full=1]="full",t[t.nonstop=2]="nonstop"})(El||(El={}));var Ol=function(t){xg(e,t);function e(r,i){var n=this;return typeof r=="object"&&(r=void 0,i=r),n=t.call(this,r,i)||this,n}return e.prototype.onend=function(){var r,i,n=oi(Lg,this.dom);if(!n){this.handleCallback(new Error("couldn't find root of feed"));return}var s={};if(n.name==="feed"){var a=n.children;s.type="atom",me(s,"id","id",a),me(s,"title","title",a);var o=Cl("href",oi("link",a));o&&(s.link=o),me(s,"description","subtitle",a);var u=ut("updated",a);u&&(s.updated=new Date(u)),me(s,"author","email",a,!0),s.items=Wn("entry",a).map(function(l){var c={},h=l.children;me(c,"id","id",h),me(c,"title","title",h);var p=Cl("href",oi("link",h));p&&(c.link=p);var d=ut("summary",h)||ut("content",h);d&&(c.description=d);var g=ut("updated",h);return g&&(c.pubDate=new Date(g)),c.media=Al(h),c})}else{var a=(i=(r=oi("channel",n.children))===null||r===void 0?void 0:r.children)!==null&&i!==void 0?i:[];s.type=n.name.substr(0,3),s.id="",me(s,"title","title",a),me(s,"link","link",a),me(s,"description","description",a);var u=ut("lastBuildDate",a);u&&(s.updated=new Date(u)),me(s,"author","managingEditor",a,!0),s.items=Wn("item",n.children).map(function(h){var p={},d=h.children;me(p,"id","guid",d),me(p,"title","title",d),me(p,"link","link",d),me(p,"description","description",d);var g=ut("pubDate",d);return g&&(p.pubDate=new Date(g)),p.media=Al(d),p})}this.feed=s,this.handleCallback(null)},e}(Og.default);le.FeedHandler=Ol;function Al(t){return Wn("media:content",t).map(function(e){var r={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(r.url=e.attribs.url),e.attribs.fileSize&&(r.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(r.type=e.attribs.type),e.attribs.expression&&(r.expression=e.attribs.expression),e.attribs.bitrate&&(r.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(r.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(r.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(r.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(r.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(r.height=parseInt(e.attribs.height,10)),e.attribs.width&&(r.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(r.lang=e.attribs.lang),r})}function Wn(t,e){return li.getElementsByTagName(t,e,!0)}function oi(t,e){return li.getElementsByTagName(t,e,!0,1)[0]}function ut(t,e,r){return r===void 0&&(r=!1),li.getText(li.getElementsByTagName(t,e,r,1)).trim()}function Cl(t,e){if(!e)return null;var r=e.attribs;return r[t]}function me(t,e,r,i,n){n===void 0&&(n=!1);var s=ut(r,i,n);s&&(t[e]=s)}function Lg(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}function Ig(t,e){e===void 0&&(e={xmlMode:!0});var r=new Ol(e);return new Ng.Parser(r,e).end(t),r.feed}le.parseFeed=Ig});var Rl=v(B=>{"use strict";var Nl=B&&B.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Rg=B&&B.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ll=B&&B.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Nl(e,t,r);return Rg(e,t),e},Pg=B&&B.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Nl(e,t,r)},Dg=B&&B.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(B,"__esModule",{value:!0});B.RssHandler=B.DefaultHandler=B.DomUtils=B.ElementType=B.Tokenizer=B.createDomStream=B.parseDOM=B.parseDocument=B.DomHandler=B.Parser=void 0;var Gn=Cn();Object.defineProperty(B,"Parser",{enumerable:!0,get:function(){return Gn.Parser}});var ui=ke();Object.defineProperty(B,"DomHandler",{enumerable:!0,get:function(){return ui.DomHandler}});Object.defineProperty(B,"DefaultHandler",{enumerable:!0,get:function(){return ui.DomHandler}});function Il(t,e){var r=new ui.DomHandler(void 0,e);return new Gn.Parser(r,e).end(t),r.root}B.parseDocument=Il;function qg(t,e){return Il(t,e).children}B.parseDOM=qg;function kg(t,e,r){var i=new ui.DomHandler(t,e,r);return new Gn.Parser(i,e)}B.createDomStream=kg;var Mg=En();Object.defineProperty(B,"Tokenizer",{enumerable:!0,get:function(){return Dg(Mg).default}});var jg=Ll(Ot());B.ElementType=jg;Pg(zn(),B);B.DomUtils=Ll($n());var Bg=zn();Object.defineProperty(B,"RssHandler",{enumerable:!0,get:function(){return Bg.FeedHandler}})});var Dl=v((eT,Pl)=>{"use strict";Pl.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var kl=v(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});function ql(t){return Object.prototype.toString.call(t)==="[object Object]"}function Fg(t){var e,r;return ql(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ql(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}Vn.isPlainObject=Fg});var Fl=v((rT,Bl)=>{"use strict";var Hg=function(e){return Ug(e)&&!$g(e)};function Ug(t){return!!t&&typeof t=="object"}function $g(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Gg(t)}var Wg=typeof Symbol=="function"&&Symbol.for,zg=Wg?Symbol.for("react.element"):60103;function Gg(t){return t.$$typeof===zg}function Vg(t){return Array.isArray(t)?[]:{}}function rr(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Rt(Vg(t),t,e):t}function Jg(t,e,r){return t.concat(e).map(function(i){return rr(i,r)})}function Xg(t,e){if(!e.customMerge)return Rt;var r=e.customMerge(t);return typeof r=="function"?r:Rt}function Yg(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return t.propertyIsEnumerable(e)}):[]}function Ml(t){return Object.keys(t).concat(Yg(t))}function jl(t,e){try{return e in t}catch{return!1}}function Kg(t,e){return jl(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Qg(t,e,r){var i={};return r.isMergeableObject(t)&&Ml(t).forEach(function(n){i[n]=rr(t[n],r)}),Ml(e).forEach(function(n){Kg(t,n)||(jl(t,n)&&r.isMergeableObject(e[n])?i[n]=Xg(n,r)(t[n],e[n],r):i[n]=rr(e[n],r))}),i}function Rt(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Jg,r.isMergeableObject=r.isMergeableObject||Hg,r.cloneUnlessOtherwiseSpecified=rr;var i=Array.isArray(e),n=Array.isArray(t),s=i===n;return s?i?r.arrayMerge(t,e,r):Qg(t,e,r):rr(e,r)}Rt.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(i,n){return Rt(i,n,r)},{})};var Zg=Rt;Bl.exports=Zg});var Ul=v((Hl,ci)=>{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof ci=="object"&&ci.exports?ci.exports=e():t.parseSrcset=e()})(Hl,function(){return function(t){function e(E){return E===" "||E===" "||E===` -`||E==="\f"||E==="\r"}function r(E){var w,O=E.exec(t.substring(S));if(O)return w=O[0],S+=w.length,w}for(var i=t.length,n=/^[ \t\n\r\u000c]+/,s=/^[, \t\n\r\u000c]+/,a=/^[^ \t\n\r\u000c]+/,o=/[,]+$/,u=/^\d+$/,l=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,c,h,p,d,g,S=0,m=[];;){if(r(s),S>=i)return m;c=r(a),h=[],c.slice(-1)===","?(c=c.replace(o,""),b()):y()}function y(){for(r(n),p="",d="in descriptor";;){if(g=t.charAt(S),d==="in descriptor")if(e(g))p&&(h.push(p),p="",d="after descriptor");else if(g===","){S+=1,p&&h.push(p),b();return}else if(g==="(")p=p+g,d="in parens";else if(g===""){p&&h.push(p),b();return}else p=p+g;else if(d==="in parens")if(g===")")p=p+g,d="in descriptor";else if(g===""){h.push(p),b();return}else p=p+g;else if(d==="after descriptor"&&!e(g))if(g===""){b();return}else d="in descriptor",S-=1;S+=1}}function b(){var E=!1,w,O,C,D,j={},H,te,se,re,_;for(D=0;D{var J=String,$l=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J}};Jn.exports=$l();Jn.exports.createColors=$l});var Xn=v(()=>{});var fi=v((aT,Vl)=>{"use strict";var zl=Wl(),Gl=Xn(),ct=class extends Error{constructor(e,r,i,n,s,a){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),a&&(this.plugin=a),typeof r<"u"&&typeof i<"u"&&(typeof r=="number"?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ct)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=zl.isColorSupported),Gl&&e&&(r=Gl(r));let i=r.split(/\r?\n/),n=Math.max(this.line-3,0),s=Math.min(this.line+2,i.length),a=String(s).length,o,u;if(e){let{bold:l,red:c,gray:h}=zl.createColors(!0);o=p=>l(c(p)),u=p=>h(p)}else o=u=l=>l;return i.slice(n,s).map((l,c)=>{let h=n+1+c,p=" "+(" "+h).slice(-a)+" | ";if(h===this.line){let d=u(p.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(p)+l+` +// article-parser@6.0.1, by @ndaidong - built with esbuild at 2022-05-28T06:59:28.509Z - published under MIT license +var vh=Object.create;var kr=Object.defineProperty,wh=Object.defineProperties,_h=Object.getOwnPropertyDescriptor,Th=Object.getOwnPropertyDescriptors,xh=Object.getOwnPropertyNames,Mr=Object.getOwnPropertySymbols,Sh=Object.getPrototypeOf,en=Object.prototype.hasOwnProperty,na=Object.prototype.propertyIsEnumerable;var Zi=(t,e,r)=>e in t?kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P=(t,e)=>{for(var r in e||(e={}))en.call(e,r)&&Zi(t,r,e[r]);if(Mr)for(var r of Mr(e))na.call(e,r)&&Zi(t,r,e[r]);return t},rt=(t,e)=>wh(t,Th(e));var tn=(t,e)=>{var r={};for(var i in t)en.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&Mr)for(var i of Mr(t))e.indexOf(i)<0&&na.call(t,i)&&(r[i]=t[i]);return r};var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Eh=(t,e)=>{for(var r in e)kr(t,r,{get:e[r],enumerable:!0})},Ah=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xh(e))!en.call(t,n)&&n!==r&&kr(t,n,{get:()=>e[n],enumerable:!(i=_h(e,n))||i.enumerable});return t};var it=(t,e,r)=>(r=t!=null?vh(Sh(t)):{},Ah(e||!t||!t.__esModule?kr(r,"default",{value:t,enumerable:!0}):r,t));var rn=(t,e,r)=>(Zi(t,typeof e!="symbol"?e+"":e,r),r);var on=b((i_,la)=>{"use strict";la.exports=function(e,r){return function(){for(var n=new Array(arguments.length),s=0;s{"use strict";var Lh=on(),un=Object.prototype.toString,cn=function(t){return function(e){var r=un.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function nt(t){return t=t.toLowerCase(),function(r){return cn(r)===t}}function fn(t){return Array.isArray(t)}function Wr(t){return typeof t>"u"}function Rh(t){return t!==null&&!Wr(t)&&t.constructor!==null&&!Wr(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var ua=nt("ArrayBuffer");function Ih(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ua(t.buffer),e}function Ph(t){return typeof t=="string"}function Dh(t){return typeof t=="number"}function ca(t){return t!==null&&typeof t=="object"}function $r(t){if(cn(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}var qh=nt("Date"),Mh=nt("File"),kh=nt("Blob"),jh=nt("FileList");function hn(t){return un.call(t)==="[object Function]"}function Bh(t){return ca(t)&&hn(t.pipe)}function Fh(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||un.call(t)===e||hn(t.toString)&&t.toString()===e)}var Hh=nt("URLSearchParams");function Uh(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function $h(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function pn(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),fn(t))for(var r=0,i=t.length;r0;)s=i[n],a[s]||(e[s]=t[s],a[s]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function Jh(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var i=t.indexOf(e,r);return i!==-1&&i===r}function Xh(t){if(!t)return null;var e=t.length;if(Wr(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var Yh=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));fa.exports={isArray:fn,isArrayBuffer:ua,isBuffer:Rh,isFormData:Fh,isArrayBufferView:Ih,isString:Ph,isNumber:Dh,isObject:ca,isPlainObject:$r,isUndefined:Wr,isDate:qh,isFile:Mh,isBlob:kh,isFunction:hn,isStream:Bh,isURLSearchParams:Hh,isStandardBrowserEnv:$h,forEach:pn,merge:ln,extend:Wh,trim:Uh,stripBOM:zh,inherits:Vh,toFlatObject:Gh,kindOf:cn,kindOfTest:nt,endsWith:Jh,toArray:Xh,isTypedArray:Yh,isFileList:jh}});var dn=b((s_,pa)=>{"use strict";var Tt=ie();function ha(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}pa.exports=function(e,r,i){if(!r)return e;var n;if(i)n=i(r);else if(Tt.isURLSearchParams(r))n=r.toString();else{var s=[];Tt.forEach(r,function(u,l){u===null||typeof u>"u"||(Tt.isArray(u)?l=l+"[]":u=[u],Tt.forEach(u,function(h){Tt.isDate(h)?h=h.toISOString():Tt.isObject(h)&&(h=JSON.stringify(h)),s.push(ha(l)+"="+ha(h))}))}),n=s.join("&")}if(n){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var ga=b((a_,da)=>{"use strict";var Kh=ie();function zr(){this.handlers=[]}zr.prototype.use=function(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};zr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};zr.prototype.forEach=function(e){Kh.forEach(this.handlers,function(i){i!==null&&e(i)})};da.exports=zr});var ya=b((o_,ma)=>{"use strict";var Qh=ie();ma.exports=function(e,r){Qh.forEach(e,function(n,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[s])})}});var st=b((l_,_a)=>{"use strict";var ba=ie();function xt(t,e,r,i,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}ba.inherits(xt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var va=xt.prototype,wa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(t){wa[t]={value:t}});Object.defineProperties(xt,wa);Object.defineProperty(va,"isAxiosError",{value:!0});xt.from=function(t,e,r,i,n,s){var a=Object.create(va);return ba.toFlatObject(t,a,function(u){return u!==Error.prototype}),xt.call(a,t.message,e,r,i,n),a.name=t.name,s&&Object.assign(a,s),a};_a.exports=xt});var gn=b((u_,Ta)=>{"use strict";Ta.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var mn=b((c_,xa)=>{"use strict";var Ce=ie();function Zh(t,e){e=e||new FormData;var r=[];function i(s){return s===null?"":Ce.isDate(s)?s.toISOString():Ce.isArrayBuffer(s)||Ce.isTypedArray(s)?typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function n(s,a){if(Ce.isPlainObject(s)||Ce.isArray(s)){if(r.indexOf(s)!==-1)throw Error("Circular reference detected in "+a);r.push(s),Ce.forEach(s,function(u,l){if(!Ce.isUndefined(u)){var c=a?a+"."+l:l,h;if(u&&!a&&typeof u=="object"){if(Ce.endsWith(l,"{}"))u=JSON.stringify(u);else if(Ce.endsWith(l,"[]")&&(h=Ce.toArray(u))){h.forEach(function(p){!Ce.isUndefined(p)&&e.append(c,i(p))});return}}n(u,c)}}),r.pop()}else e.append(a,i(s))}return n(t),e}xa.exports=Zh});var Ea=b((f_,Sa)=>{"use strict";var yn=st();Sa.exports=function(e,r,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):r(new yn("Request failed with status code "+i.status,[yn.ERR_BAD_REQUEST,yn.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}});var Ca=b((h_,Aa)=>{"use strict";var Vr=ie();Aa.exports=Vr.isStandardBrowserEnv()?function(){return{write:function(r,i,n,s,a,o){var u=[];u.push(r+"="+encodeURIComponent(i)),Vr.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),Vr.isString(s)&&u.push("path="+s),Vr.isString(a)&&u.push("domain="+a),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var Na=b((p_,Oa)=>{"use strict";Oa.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}});var Ra=b((d_,La)=>{"use strict";La.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var bn=b((g_,Ia)=>{"use strict";var ep=Na(),tp=Ra();Ia.exports=function(e,r){return e&&!ep(r)?tp(e,r):r}});var Da=b((m_,Pa)=>{"use strict";var vn=ie(),rp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];Pa.exports=function(e){var r={},i,n,s;return e&&vn.forEach(e.split(` +`),function(o){if(s=o.indexOf(":"),i=vn.trim(o.substr(0,s)).toLowerCase(),n=vn.trim(o.substr(s+1)),i){if(r[i]&&rp.indexOf(i)>=0)return;i==="set-cookie"?r[i]=(r[i]?r[i]:[]).concat([n]):r[i]=r[i]?r[i]+", "+n:n}}),r}});var ka=b((y_,Ma)=>{"use strict";var qa=ie();Ma.exports=qa.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(s){var a=s;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(a){var o=qa.isString(a)?n(a):a;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}()});var er=b((b_,Ba)=>{"use strict";var wn=st(),ip=ie();function ja(t){wn.call(this,t??"canceled",wn.ERR_CANCELED),this.name="CanceledError"}ip.inherits(ja,wn,{__CANCEL__:!0});Ba.exports=ja});var Ha=b((v_,Fa)=>{"use strict";Fa.exports=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}});var _n=b((w_,Ua)=>{"use strict";var tr=ie(),np=Ea(),sp=Ca(),ap=dn(),op=bn(),lp=Da(),up=ka(),cp=gn(),ke=st(),fp=er(),hp=Ha();Ua.exports=function(e){return new Promise(function(i,n){var s=e.data,a=e.headers,o=e.responseType,u;function l(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}tr.isFormData(s)&&tr.isStandardBrowserEnv()&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(h+":"+p)}var d=op(e.baseURL,e.url);c.open(e.method.toUpperCase(),ap(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(!!c){var y="getAllResponseHeaders"in c?lp(c.getAllResponseHeaders()):null,v=!o||o==="text"||o==="json"?c.responseText:c.response,x={data:v,status:c.status,statusText:c.statusText,headers:y,config:e,request:c};np(function(O){i(O),l()},function(O){n(O),l()},x),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){!c||(n(new ke("Request aborted",ke.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,c,c)),c=null},c.ontimeout=function(){var v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",x=e.transitional||cp;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),n(new ke(v,x.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,c)),c=null},tr.isStandardBrowserEnv()){var E=(e.withCredentials||up(d))&&e.xsrfCookieName?sp.read(e.xsrfCookieName):void 0;E&&(a[e.xsrfHeaderName]=E)}"setRequestHeader"in c&&tr.forEach(a,function(v,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete a[x]:c.setRequestHeader(x,v)}),tr.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(y){!c||(n(!y||y&&y.type?new fp:y),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null);var m=hp(d);if(m&&["http","https","file"].indexOf(m)===-1){n(new ke("Unsupported protocol "+m+":",ke.ERR_BAD_REQUEST,e));return}c.send(s)})}});var Wa=b((__,$a)=>{$a.exports=null});var Jr=b((T_,Ja)=>{"use strict";var ne=ie(),za=ya(),Va=st(),pp=gn(),dp=mn(),gp={"Content-Type":"application/x-www-form-urlencoded"};function Ga(t,e){!ne.isUndefined(t)&&ne.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function mp(){var t;return typeof XMLHttpRequest<"u"?t=_n():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=_n()),t}function yp(t,e,r){if(ne.isString(t))try{return(e||JSON.parse)(t),ne.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}var Gr={transitional:pp,adapter:mp(),transformRequest:[function(e,r){if(za(r,"Accept"),za(r,"Content-Type"),ne.isFormData(e)||ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return Ga(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i=ne.isObject(e),n=r&&r["Content-Type"],s;if((s=ne.isFileList(e))||i&&n==="multipart/form-data"){var a=this.env&&this.env.FormData;return dp(s?{"files[]":e}:e,a&&new a)}else if(i||n==="application/json")return Ga(r,"application/json"),yp(e);return e}],transformResponse:[function(e){var r=this.transitional||Gr.transitional,i=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&ne.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Va.from(a,Va.ERR_BAD_RESPONSE,this,null,this.response):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wa()},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ne.forEach(["delete","get","head"],function(e){Gr.headers[e]={}});ne.forEach(["post","put","patch"],function(e){Gr.headers[e]=ne.merge(gp)});Ja.exports=Gr});var Ya=b((x_,Xa)=>{"use strict";var bp=ie(),vp=Jr();Xa.exports=function(e,r,i){var n=this||vp;return bp.forEach(i,function(a){e=a.call(n,e,r)}),e}});var Tn=b((S_,Ka)=>{"use strict";Ka.exports=function(e){return!!(e&&e.__CANCEL__)}});var eo=b((E_,Za)=>{"use strict";var Qa=ie(),xn=Ya(),wp=Tn(),_p=Jr(),Tp=er();function Sn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Tp}Za.exports=function(e){Sn(e),e.headers=e.headers||{},e.data=xn.call(e,e.data,e.headers,e.transformRequest),e.headers=Qa.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Qa.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||_p.adapter;return r(e).then(function(n){return Sn(e),n.data=xn.call(e,n.data,n.headers,e.transformResponse),n},function(n){return wp(n)||(Sn(e),n&&n.response&&(n.response.data=xn.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var En=b((A_,to)=>{"use strict";var be=ie();to.exports=function(e,r){r=r||{};var i={};function n(c,h){return be.isPlainObject(c)&&be.isPlainObject(h)?be.merge(c,h):be.isPlainObject(h)?be.merge({},h):be.isArray(h)?h.slice():h}function s(c){if(be.isUndefined(r[c])){if(!be.isUndefined(e[c]))return n(void 0,e[c])}else return n(e[c],r[c])}function a(c){if(!be.isUndefined(r[c]))return n(void 0,r[c])}function o(c){if(be.isUndefined(r[c])){if(!be.isUndefined(e[c]))return n(void 0,e[c])}else return n(void 0,r[c])}function u(c){if(c in r)return n(e[c],r[c]);if(c in e)return n(void 0,e[c])}var l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return be.forEach(Object.keys(e).concat(Object.keys(r)),function(h){var p=l[h]||s,d=p(h);be.isUndefined(d)&&p!==u||(i[h]=d)}),i}});var An=b((C_,ro)=>{ro.exports={version:"0.27.2"}});var so=b((O_,no)=>{"use strict";var xp=An().version,ze=st(),Cn={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Cn[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var io={};Cn.transitional=function(e,r,i){function n(s,a){return"[Axios v"+xp+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return function(s,a,o){if(e===!1)throw new ze(n(a," has been removed"+(r?" in "+r:"")),ze.ERR_DEPRECATED);return r&&!io[a]&&(io[a]=!0,console.warn(n(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,o):!0}};function Sp(t,e,r){if(typeof t!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(t),n=i.length;n-- >0;){var s=i[n],a=e[s];if(a){var o=t[s],u=o===void 0||a(o,s,t);if(u!==!0)throw new ze("option "+s+" must be "+u,ze.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ze("Unknown option "+s,ze.ERR_BAD_OPTION)}}no.exports={assertOptions:Sp,validators:Cn}});var fo=b((N_,co)=>{"use strict";var lo=ie(),Ep=dn(),ao=ga(),oo=eo(),Xr=En(),Ap=bn(),uo=so(),St=uo.validators;function Et(t){this.defaults=t,this.interceptors={request:new ao,response:new ao}}Et.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Xr(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&uo.assertOptions(i,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(r)===!1||(s=s&&d.synchronous,n.unshift(d.fulfilled,d.rejected))});var a=[];this.interceptors.response.forEach(function(d){a.push(d.fulfilled,d.rejected)});var o;if(!s){var u=[oo,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),o=Promise.resolve(r);u.length;)o=o.then(u.shift(),u.shift());return o}for(var l=r;n.length;){var c=n.shift(),h=n.shift();try{l=c(l)}catch(p){h(p);break}}try{o=oo(l)}catch(p){return Promise.reject(p)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Et.prototype.getUri=function(e){e=Xr(this.defaults,e);var r=Ap(e.baseURL,e.url);return Ep(r,e.params,e.paramsSerializer)};lo.forEach(["delete","get","head","options"],function(e){Et.prototype[e]=function(r,i){return this.request(Xr(i||{},{method:e,url:r,data:(i||{}).data}))}});lo.forEach(["post","put","patch"],function(e){function r(i){return function(s,a,o){return this.request(Xr(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Et.prototype[e]=r(),Et.prototype[e+"Form"]=r(!0)});co.exports=Et});var po=b((L_,ho)=>{"use strict";var Cp=er();function At(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var r=this;this.promise.then(function(i){if(!!r._listeners){var n,s=r._listeners.length;for(n=0;n{"use strict";go.exports=function(e){return function(i){return e.apply(null,i)}}});var bo=b((I_,yo)=>{"use strict";var Op=ie();yo.exports=function(e){return Op.isObject(e)&&e.isAxiosError===!0}});var _o=b((P_,On)=>{"use strict";var vo=ie(),Np=on(),Yr=fo(),Lp=En(),Rp=Jr();function wo(t){var e=new Yr(t),r=Np(Yr.prototype.request,e);return vo.extend(r,Yr.prototype,e),vo.extend(r,e),r.create=function(n){return wo(Lp(t,n))},r}var fe=wo(Rp);fe.Axios=Yr;fe.CanceledError=er();fe.CancelToken=po();fe.isCancel=Tn();fe.VERSION=An().version;fe.toFormData=mn();fe.AxiosError=st();fe.Cancel=fe.CanceledError;fe.all=function(e){return Promise.all(e)};fe.spread=mo();fe.isAxiosError=bo();On.exports=fe;On.exports.default=fe});var xo=b((D_,To)=>{To.exports=_o()});var Eo=b((q_,So)=>{var Ct=1e3,Ot=Ct*60,Nt=Ot*60,at=Nt*24,Ip=at*7,Pp=at*365.25;So.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Dp(t);if(r==="number"&&isFinite(t))return e.long?Mp(t):qp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Dp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!!e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Pp;case"weeks":case"week":case"w":return r*Ip;case"days":case"day":case"d":return r*at;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Nt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ot;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ct;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function qp(t){var e=Math.abs(t);return e>=at?Math.round(t/at)+"d":e>=Nt?Math.round(t/Nt)+"h":e>=Ot?Math.round(t/Ot)+"m":e>=Ct?Math.round(t/Ct)+"s":t+"ms"}function Mp(t){var e=Math.abs(t);return e>=at?Kr(t,e,at,"day"):e>=Nt?Kr(t,e,Nt,"hour"):e>=Ot?Kr(t,e,Ot,"minute"):e>=Ct?Kr(t,e,Ct,"second"):t+" ms"}function Kr(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var Co=b((M_,Ao)=>{function kp(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=n,r.enabled=a,r.humanize=Eo(),r.destroy=l,Object.keys(t).forEach(c=>{r[c]=t[c]}),r.names=[],r.skips=[],r.formatters={};function e(c){let h=0;for(let p=0;p{if(C==="%%")return"%";_++;let j=r.formatters[D];if(typeof j=="function"){let H=m[_];C=j.call(y,H),m.splice(_,1),_--}return C}),r.formatArgs.call(y,m),(y.log||r.log).apply(y,m)}return E.namespace=c,E.useColors=r.useColors(),E.color=r.selectColor(c),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,g=r.enabled(c)),g),set:m=>{p=m}}),typeof r.init=="function"&&r.init(E),E}function i(c,h){let p=r(this.namespace+(typeof h>"u"?":":h)+c);return p.log=this.log,p}function n(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let h,p=(typeof c=="string"?c:"").split(/[\s,]+/),d=p.length;for(h=0;h"-"+h)].join(",");return r.enable(""),c}function a(c){if(c[c.length-1]==="*")return!0;let h,p;for(h=0,p=r.skips.length;h{ve.formatArgs=Bp;ve.save=Fp;ve.load=Hp;ve.useColors=jp;ve.storage=Up();ve.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ve.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function jp(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Bp(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Qr.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}ve.log=console.debug||console.log||(()=>{});function Fp(t){try{t?ve.storage.setItem("debug",t):ve.storage.removeItem("debug")}catch{}}function Hp(){let t;try{t=ve.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Up(){try{return localStorage}catch{}}Qr.exports=Co()(ve);var{formatters:$p}=Qr.exports;$p.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Bo=b((eT,Wp)=>{Wp.exports={"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}});var Rn=b(rr=>{"use strict";var zp=rr&&rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rr,"__esModule",{value:!0});var Fo=zp(Bo()),Vp=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Gp(t){return t>=55296&&t<=57343||t>1114111?"�":(t in Fo.default&&(t=Fo.default[t]),Vp(t))}rr.default=Gp});var Zr=b((rT,Jp)=>{Jp.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var In=b((iT,Xp)=>{Xp.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}});var ei=b((nT,Yp)=>{Yp.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}});var Dn=b(ir=>{"use strict";var ti=ir&&ir.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ir,"__esModule",{value:!0});var Kp=ti(Rn()),Qp=ti(Zr()),Pn=ti(In()),Zp=ti(ei());function we(t){return t===" "||t===` +`||t===" "||t==="\f"||t==="\r"}function Ho(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function se(t,e,r){var i=t.toLowerCase();return t===i?function(n,s){s===i?n._state=e:(n._state=r,n._index--)}:function(n,s){s===i||s===t?n._state=e:(n._state=r,n._index--)}}function Oe(t,e){var r=t.toLowerCase();return function(i,n){n===r||n===t?i._state=e:(i._state=3,i._index--)}}var ed=se("C",24,16),td=se("D",25,16),rd=se("A",26,16),id=se("T",27,16),nd=se("A",28,16),sd=Oe("R",35),ad=Oe("I",36),od=Oe("P",37),ld=Oe("T",38),ud=se("R",40,1),cd=se("I",41,1),fd=se("P",42,1),hd=se("T",43,1),pd=Oe("Y",45),dd=Oe("L",46),gd=Oe("E",47),md=se("Y",49,1),yd=se("L",50,1),bd=se("E",51,1),vd=Oe("I",54),wd=Oe("T",55),_d=Oe("L",56),Td=Oe("E",57),xd=se("I",58,1),Sd=se("T",59,1),Ed=se("L",60,1),Ad=se("E",61,1),Cd=se("#",63,64),Od=se("X",66,65),Nd=function(){function t(e,r){var i;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=r,this.xmlMode=!!(e!=null&&e.xmlMode),this.decodeEntities=(i=e==null?void 0:e.decodeEntities)!==null&&i!==void 0?i:!0}return t.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},t.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},t.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},t.prototype.pause=function(){this.running=!1},t.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):this.decodeEntities&&e==="&"&&(this.special===1||this.special===4)&&(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},t.prototype.isTagStartChar=function(e){return Ho(e)||this.xmlMode&&!we(e)&&e!=="/"&&e!==">"},t.prototype.stateBeforeTagName=function(e){e==="/"?this._state=5:e==="<"?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):e===">"||this.special!==1||we(e)?this._state=1:e==="!"?(this._state=15,this.sectionStart=this._index+1):e==="?"?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=!this.xmlMode&&(e==="s"||e==="S")?32:!this.xmlMode&&(e==="t"||e==="T")?52:3,this.sectionStart=this._index):this._state=1},t.prototype.stateInTagName=function(e){(e==="/"||e===">"||we(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},t.prototype.stateBeforeClosingTagName=function(e){we(e)||(e===">"?this._state=1:this.special!==1?this.special!==4&&(e==="s"||e==="S")?this._state=33:this.special===4&&(e==="t"||e==="T")?this._state=53:(this._state=1,this._index--):this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},t.prototype.stateInClosingTagName=function(e){(e===">"||we(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},t.prototype.stateAfterClosingTagName=function(e){e===">"&&(this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeAttributeName=function(e){e===">"?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):e==="/"?this._state=4:we(e)||(this._state=9,this.sectionStart=this._index)},t.prototype.stateInSelfClosingTag=function(e){e===">"?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):we(e)||(this._state=8,this._index--)},t.prototype.stateInAttributeName=function(e){(e==="="||e==="/"||e===">"||we(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},t.prototype.stateAfterAttributeName=function(e){e==="="?this._state=11:e==="/"||e===">"?(this.cbs.onattribend(void 0),this._state=8,this._index--):we(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},t.prototype.stateBeforeAttributeValue=function(e){e==='"'?(this._state=12,this.sectionStart=this._index+1):e==="'"?(this._state=13,this.sectionStart=this._index+1):we(e)||(this._state=14,this.sectionStart=this._index,this._index--)},t.prototype.handleInAttributeValue=function(e,r){e===r?(this.emitToken("onattribdata"),this.cbs.onattribend(r),this._state=8):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},t.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},t.prototype.stateInAttributeValueNoQuotes=function(e){we(e)||e===">"?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateBeforeDeclaration=function(e){this._state=e==="["?23:e==="-"?18:16},t.prototype.stateInDeclaration=function(e){e===">"&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateInProcessingInstruction=function(e){e===">"&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeComment=function(e){e==="-"?(this._state=19,this.sectionStart=this._index+1):this._state=16},t.prototype.stateInComment=function(e){e==="-"&&(this._state=21)},t.prototype.stateInSpecialComment=function(e){e===">"&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateAfterComment1=function(e){e==="-"?this._state=22:this._state=19},t.prototype.stateAfterComment2=function(e){e===">"?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="-"&&(this._state=19)},t.prototype.stateBeforeCdata6=function(e){e==="["?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},t.prototype.stateInCdata=function(e){e==="]"&&(this._state=30)},t.prototype.stateAfterCdata1=function(e){e==="]"?this._state=31:this._state=29},t.prototype.stateAfterCdata2=function(e){e===">"?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="]"&&(this._state=29)},t.prototype.stateBeforeSpecialS=function(e){e==="c"||e==="C"?this._state=34:e==="t"||e==="T"?this._state=44:(this._state=3,this._index--)},t.prototype.stateBeforeSpecialSEnd=function(e){this.special===2&&(e==="c"||e==="C")?this._state=39:this.special===3&&(e==="t"||e==="T")?this._state=48:this._state=1},t.prototype.stateBeforeSpecialLast=function(e,r){(e==="/"||e===">"||we(e))&&(this.special=r),this._state=3,this._index--},t.prototype.stateAfterSpecialLast=function(e,r){e===">"||we(e)?(this.special=1,this._state=6,this.sectionStart=this._index-r,this._index--):this._state=1},t.prototype.parseFixedEntity=function(e){if(e===void 0&&(e=this.xmlMode?Zp.default:Qp.default),this.sectionStart+1=2;){var i=this.buffer.substr(e,r);if(Object.prototype.hasOwnProperty.call(Pn.default,i)){this.emitPartial(Pn.default[i]),this.sectionStart+=r+1;return}r--}},t.prototype.stateInNamedEntity=function(e){e===";"?(this.parseFixedEntity(),this.baseState===1&&this.sectionStart+1"9")&&!Ho(e)&&(this.xmlMode||this.sectionStart+1===this._index||(this.baseState!==1?e!=="="&&this.parseFixedEntity(Pn.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},t.prototype.decodeNumericEntity=function(e,r,i){var n=this.sectionStart+e;if(n!==this._index){var s=this.buffer.substring(n,this._index),a=parseInt(s,r);this.emitPartial(Kp.default(a)),this.sectionStart=i?this._index+1:this._index}this._state=this.baseState},t.prototype.stateInNumericEntity=function(e){e===";"?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},t.prototype.stateInHexEntity=function(e){e===";"?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},t.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(this._state===1?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},t.prototype.parse=function(){for(;this._index{"use strict";var Ld=Pt&&Pt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.Parser=void 0;var Rd=Ld(Dn()),It=new Set(["input","option","optgroup","select","button","datalist","textarea"]),$=new Set(["p"]),Uo={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:$,h1:$,h2:$,h3:$,h4:$,h5:$,h6:$,select:It,input:It,output:It,button:It,datalist:It,textarea:It,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:$,article:$,aside:$,blockquote:$,details:$,div:$,dl:$,fieldset:$,figcaption:$,figure:$,footer:$,form:$,header:$,hr:$,main:$,nav:$,ol:$,pre:$,section:$,table:$,ul:$,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},qn=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),$o=new Set(["math","svg"]),Wo=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Id=/\s|\//,Pd=function(){function t(e,r){r===void 0&&(r={});var i,n,s,a,o;this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=r,this.cbs=e??{},this.lowerCaseTagNames=(i=r.lowerCaseTags)!==null&&i!==void 0?i:!r.xmlMode,this.lowerCaseAttributeNames=(n=r.lowerCaseAttributeNames)!==null&&n!==void 0?n:!r.xmlMode,this.tokenizer=new((s=r.Tokenizer)!==null&&s!==void 0?s:Rd.default)(this.options,this),(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}return t.prototype.updatePosition=function(e){this.endIndex===null?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},t.prototype.ontext=function(e){var r,i;this.updatePosition(1),this.endIndex--,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,e)},t.prototype.onopentagname=function(e){var r,i;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(Uo,e))for(var n=void 0;this.stack.length>0&&Uo[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);(this.options.xmlMode||!qn.has(e))&&(this.stack.push(e),$o.has(e)?this.foreignContext.push(!0):Wo.has(e)&&this.foreignContext.push(!1)),(i=(r=this.cbs).onopentagname)===null||i===void 0||i.call(r,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.onopentagend=function(){var e,r;this.updatePosition(1),this.attribs&&((r=(e=this.cbs).onopentag)===null||r===void 0||r.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&qn.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},t.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),($o.has(e)||Wo.has(e))&&this.foreignContext.pop(),this.stack.length&&(this.options.xmlMode||!qn.has(e))){var r=this.stack.lastIndexOf(e);if(r!==-1)if(this.cbs.onclosetag)for(r=this.stack.length-r;r--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=r;else e==="p"&&!this.options.xmlMode&&(this.onopentagname(e),this.closeCurrentTag())}else!this.options.xmlMode&&(e==="br"||e==="p")&&(this.onopentagname(e),this.closeCurrentTag())},t.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},t.prototype.closeCurrentTag=function(){var e,r,i=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===i&&((r=(e=this.cbs).onclosetag)===null||r===void 0||r.call(e,i),this.stack.pop())},t.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},t.prototype.onattribdata=function(e){this.attribvalue+=e},t.prototype.onattribend=function(e){var r,i;(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(Id),i=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i},t.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+r,"!"+e)}},t.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+r,"?"+e)}},t.prototype.oncomment=function(e){var r,i,n,s;this.updatePosition(4),(i=(r=this.cbs).oncomment)===null||i===void 0||i.call(r,e),(s=(n=this.cbs).oncommentend)===null||s===void 0||s.call(n)},t.prototype.oncdata=function(e){var r,i,n,s,a,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?((i=(r=this.cbs).oncdatastart)===null||i===void 0||i.call(r),(s=(n=this.cbs).ontext)===null||s===void 0||s.call(n,e),(o=(a=this.cbs).oncdataend)===null||o===void 0||o.call(a)):this.oncomment("[CDATA["+e+"]]")},t.prototype.onerror=function(e){var r,i;(i=(r=this.cbs).onerror)===null||i===void 0||i.call(r,e)},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag)for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i]));(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,i,n;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this)},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.write=function(e){this.tokenizer.write(e)},t.prototype.end=function(e){this.tokenizer.end(e)},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){this.tokenizer.resume()},t.prototype.parseChunk=function(e){this.write(e)},t.prototype.done=function(e){this.end(e)},t}();Pt.Parser=Pd});var Dt=b(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.Doctype=V.CDATA=V.Tag=V.Style=V.Script=V.Comment=V.Directive=V.Text=V.Root=V.isTag=V.ElementType=void 0;var _e;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(_e=V.ElementType||(V.ElementType={}));function Dd(t){return t.type===_e.Tag||t.type===_e.Script||t.type===_e.Style}V.isTag=Dd;V.Root=_e.Root;V.Text=_e.Text;V.Directive=_e.Directive;V.Comment=_e.Comment;V.Script=_e.Script;V.Style=_e.Style;V.Tag=_e.Tag;V.CDATA=_e.CDATA;V.Doctype=_e.Doctype});var Fn=b(q=>{"use strict";var lt=q&&q.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),nr=q&&q.__assign||function(){return nr=Object.assign||function(t){for(var e,r=1,i=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(jn);q.NodeWithChildren=ii;var Jo=function(t){lt(e,t);function e(r){return t.call(this,K.ElementType.Root,r)||this}return e}(ii);q.Document=Jo;var Xo=function(t){lt(e,t);function e(r,i,n,s){n===void 0&&(n=[]),s===void 0&&(s=r==="script"?K.ElementType.Script:r==="style"?K.ElementType.Style:K.ElementType.Tag);var a=t.call(this,s,n)||this;return a.name=r,a.attribs=i,a}return Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(i){var n,s;return{name:i,value:r.attribs[i],namespace:(n=r["x-attribsNamespace"])===null||n===void 0?void 0:n[i],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[i]}})},enumerable:!1,configurable:!0}),e}(ii);q.Element=Xo;function Yo(t){return(0,K.isTag)(t)}q.isTag=Yo;function Ko(t){return t.type===K.ElementType.CDATA}q.isCDATA=Ko;function Qo(t){return t.type===K.ElementType.Text}q.isText=Qo;function Zo(t){return t.type===K.ElementType.Comment}q.isComment=Zo;function el(t){return t.type===K.ElementType.Directive}q.isDirective=el;function tl(t){return t.type===K.ElementType.Root}q.isDocument=tl;function Md(t){return Object.prototype.hasOwnProperty.call(t,"children")}q.hasChildren=Md;function Bn(t,e){e===void 0&&(e=!1);var r;if(Qo(t))r=new zo(t.data);else if(Zo(t))r=new Vo(t.data);else if(Yo(t)){var i=e?kn(t.children):[],n=new Xo(t.name,nr({},t.attribs),i);i.forEach(function(u){return u.parent=n}),t.namespace!=null&&(n.namespace=t.namespace),t["x-attribsNamespace"]&&(n["x-attribsNamespace"]=nr({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(n["x-attribsPrefix"]=nr({},t["x-attribsPrefix"])),r=n}else if(Ko(t)){var i=e?kn(t.children):[],s=new ii(K.ElementType.CDATA,i);i.forEach(function(l){return l.parent=s}),r=s}else if(tl(t)){var i=e?kn(t.children):[],a=new Jo(i);i.forEach(function(l){return l.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(el(t)){var o=new Go(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}q.cloneNode=Bn;function kn(t){for(var e=t.map(function(i){return Bn(i,!0)}),r=1;r{"use strict";var kd=Re&&Re.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),jd=Re&&Re.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kd(e,t,r)};Object.defineProperty(Re,"__esModule",{value:!0});Re.DomHandler=void 0;var ni=Dt(),Ve=Fn();jd(Fn(),Re);var rl=/\s+/g,il={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},nl=function(){function t(e,r,i){this.dom=[],this.root=new Ve.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(i=r,r=il),typeof e=="object"&&(r=e,e=void 0),this.callback=e??null,this.options=r??il,this.elementCB=i??null}return t.prototype.onparserinit=function(e){this.parser=e},t.prototype.onreset=function(){this.dom=[],this.root=new Ve.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(e){this.handleCallback(e)},t.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},t.prototype.onopentag=function(e,r){var i=this.options.xmlMode?ni.ElementType.Tag:void 0,n=new Ve.Element(e,r,void 0,i);this.addNode(n),this.tagStack.push(n)},t.prototype.ontext=function(e){var r=this.options.normalizeWhitespace,i=this.lastNode;if(i&&i.type===ni.ElementType.Text)r?i.data=(i.data+e).replace(rl," "):i.data+=e,this.options.withEndIndices&&(i.endIndex=this.parser.endIndex);else{r&&(e=e.replace(rl," "));var n=new Ve.Text(e);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===ni.ElementType.Comment){this.lastNode.data+=e;return}var r=new Ve.Comment(e);this.addNode(r),this.lastNode=r},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var e=new Ve.Text(""),r=new Ve.NodeWithChildren(ni.ElementType.CDATA,[e]);this.addNode(r),e.parent=r,this.lastNode=e},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(e,r){var i=new Ve.ProcessingInstruction(e,r);this.addNode(i)},t.prototype.handleCallback=function(e){if(typeof this.callback=="function")this.callback(e,this.dom);else if(e)throw e},t.prototype.addNode=function(e){var r=this.tagStack[this.tagStack.length-1],i=r.children[r.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),r.children.push(e),i&&(e.prev=i,i.next=e),e.parent=r,this.lastNode=null},t}();Re.DomHandler=nl;Re.default=nl});var Un=b(Ie=>{"use strict";var si=Ie&&Ie.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.decodeHTML=Ie.decodeHTMLStrict=Ie.decodeXML=void 0;var Hn=si(Zr()),Bd=si(In()),Fd=si(ei()),sl=si(Rn()),Hd=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Ie.decodeXML=ol(Fd.default);Ie.decodeHTMLStrict=ol(Hn.default);function ol(t){var e=ll(t);return function(r){return String(r).replace(Hd,e)}}var al=function(t,e){return t{"use strict";var ul=he&&he.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(he,"__esModule",{value:!0});he.escapeUTF8=he.escape=he.encodeNonAsciiHTML=he.encodeHTML=he.encodeXML=void 0;var Ud=ul(ei()),cl=hl(Ud.default),fl=pl(cl);he.encodeXML=ml(cl);var $d=ul(Zr()),$n=hl($d.default),Wd=pl($n);he.encodeHTML=Vd($n,Wd);he.encodeNonAsciiHTML=ml($n);function hl(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function pl(t){for(var e=[],r=[],i=0,n=Object.keys(t);i1?zd(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function Vd(t,e){return function(r){return r.replace(e,function(i){return t[i]}).replace(dl,ai)}}var gl=new RegExp(fl.source+"|"+dl.source,"g");function Gd(t){return t.replace(gl,ai)}he.escape=Gd;function Jd(t){return t.replace(fl,ai)}he.escapeUTF8=Jd;function ml(t){return function(e){return e.replace(gl,function(r){return t[r]||ai(r)})}}});var bl=b(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.decodeXMLStrict=M.decodeHTML5Strict=M.decodeHTML4Strict=M.decodeHTML5=M.decodeHTML4=M.decodeHTMLStrict=M.decodeHTML=M.decodeXML=M.encodeHTML5=M.encodeHTML4=M.escapeUTF8=M.escape=M.encodeNonAsciiHTML=M.encodeHTML=M.encodeXML=M.encode=M.decodeStrict=M.decode=void 0;var oi=Un(),yl=Wn();function Xd(t,e){return(!e||e<=0?oi.decodeXML:oi.decodeHTML)(t)}M.decode=Xd;function Yd(t,e){return(!e||e<=0?oi.decodeXML:oi.decodeHTMLStrict)(t)}M.decodeStrict=Yd;function Kd(t,e){return(!e||e<=0?yl.encodeXML:yl.encodeHTML)(t)}M.encode=Kd;var ut=Wn();Object.defineProperty(M,"encodeXML",{enumerable:!0,get:function(){return ut.encodeXML}});Object.defineProperty(M,"encodeHTML",{enumerable:!0,get:function(){return ut.encodeHTML}});Object.defineProperty(M,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return ut.encodeNonAsciiHTML}});Object.defineProperty(M,"escape",{enumerable:!0,get:function(){return ut.escape}});Object.defineProperty(M,"escapeUTF8",{enumerable:!0,get:function(){return ut.escapeUTF8}});Object.defineProperty(M,"encodeHTML4",{enumerable:!0,get:function(){return ut.encodeHTML}});Object.defineProperty(M,"encodeHTML5",{enumerable:!0,get:function(){return ut.encodeHTML}});var Ge=Un();Object.defineProperty(M,"decodeXML",{enumerable:!0,get:function(){return Ge.decodeXML}});Object.defineProperty(M,"decodeHTML",{enumerable:!0,get:function(){return Ge.decodeHTML}});Object.defineProperty(M,"decodeHTMLStrict",{enumerable:!0,get:function(){return Ge.decodeHTMLStrict}});Object.defineProperty(M,"decodeHTML4",{enumerable:!0,get:function(){return Ge.decodeHTML}});Object.defineProperty(M,"decodeHTML5",{enumerable:!0,get:function(){return Ge.decodeHTML}});Object.defineProperty(M,"decodeHTML4Strict",{enumerable:!0,get:function(){return Ge.decodeHTMLStrict}});Object.defineProperty(M,"decodeHTML5Strict",{enumerable:!0,get:function(){return Ge.decodeHTMLStrict}});Object.defineProperty(M,"decodeXMLStrict",{enumerable:!0,get:function(){return Ge.decodeXML}})});var vl=b(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.attributeNames=qt.elementNames=void 0;qt.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);qt.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])});var xl=b(Ne=>{"use strict";var Mt=Ne&&Ne.__assign||function(){return Mt=Object.assign||function(t){for(var e,r=1,i=arguments.length;r0&&(i+=zn(t.children,e)),(e.xmlMode||!wl.has(t.name))&&(i+="")),i}function og(t){return"<"+t.data+">"}function lg(t,e){var r=t.data||"";return e.decodeEntities!==!1&&!(!e.xmlMode&&t.parent&&tg.has(t.parent.name))&&(r=_l.encodeXML(r)),r}function ug(t){return""}function cg(t){return""}});var Jn=b(pe=>{"use strict";var fg=pe&&pe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pe,"__esModule",{value:!0});pe.innerText=pe.textContent=pe.getText=pe.getInnerHTML=pe.getOuterHTML=void 0;var Pe=je(),hg=fg(xl()),pg=Dt();function Sl(t,e){return(0,hg.default)(t,e)}pe.getOuterHTML=Sl;function dg(t,e){return(0,Pe.hasChildren)(t)?t.children.map(function(r){return Sl(r,e)}).join(""):""}pe.getInnerHTML=dg;function li(t){return Array.isArray(t)?t.map(li).join(""):(0,Pe.isTag)(t)?t.name==="br"?` +`:li(t.children):(0,Pe.isCDATA)(t)?li(t.children):(0,Pe.isText)(t)?t.data:""}pe.getText=li;function Vn(t){return Array.isArray(t)?t.map(Vn).join(""):(0,Pe.hasChildren)(t)&&!(0,Pe.isComment)(t)?Vn(t.children):(0,Pe.isText)(t)?t.data:""}pe.textContent=Vn;function Gn(t){return Array.isArray(t)?t.map(Gn).join(""):(0,Pe.hasChildren)(t)&&(t.type===pg.ElementType.Tag||(0,Pe.isCDATA)(t))?Gn(t.children):(0,Pe.isText)(t)?t.data:""}pe.innerText=Gn});var Ol=b(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.prevElementSibling=ae.nextElementSibling=ae.getName=ae.hasAttrib=ae.getAttributeValue=ae.getSiblings=ae.getParent=ae.getChildren=void 0;var El=je(),gg=[];function Al(t){var e;return(e=t.children)!==null&&e!==void 0?e:gg}ae.getChildren=Al;function Cl(t){return t.parent||null}ae.getParent=Cl;function mg(t){var e,r,i=Cl(t);if(i!=null)return Al(i);for(var n=[t],s=t.prev,a=t.next;s!=null;)n.unshift(s),e=s,s=e.prev;for(;a!=null;)n.push(a),r=a,a=r.next;return n}ae.getSiblings=mg;function yg(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}ae.getAttributeValue=yg;function bg(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}ae.hasAttrib=bg;function vg(t){return t.name}ae.getName=vg;function wg(t){for(var e,r=t.next;r!==null&&!(0,El.isTag)(r);)e=r,r=e.next;return r}ae.nextElementSibling=wg;function _g(t){for(var e,r=t.prev;r!==null&&!(0,El.isTag)(r);)e=r,r=e.prev;return r}ae.prevElementSibling=_g});var Nl=b(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.prepend=de.prependChild=de.append=de.appendChild=de.replaceElement=de.removeElement=void 0;function sr(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}}de.removeElement=sr;function Tg(t,e){var r=e.prev=t.prev;r&&(r.next=e);var i=e.next=t.next;i&&(i.prev=e);var n=e.parent=t.parent;if(n){var s=n.children;s[s.lastIndexOf(t)]=e}}de.replaceElement=Tg;function xg(t,e){if(sr(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}de.appendChild=xg;function Sg(t,e){sr(e);var r=t.parent,i=t.next;if(e.next=i,e.prev=t,t.next=e,e.parent=r,i){if(i.prev=e,r){var n=r.children;n.splice(n.lastIndexOf(i),0,e)}}else r&&r.children.push(e)}de.append=Sg;function Eg(t,e){if(sr(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var r=t.children[1];r.prev=e,e.next=r}else e.next=null}de.prependChild=Eg;function Ag(t,e){sr(e);var r=t.parent;if(r){var i=r.children;i.splice(i.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}de.prepend=Ag});var Yn=b(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.findAll=ge.existsOne=ge.findOne=ge.findOneChild=ge.find=ge.filter=void 0;var ar=je();function Cg(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),Array.isArray(e)||(e=[e]),Xn(t,e,r,i)}ge.filter=Cg;function Xn(t,e,r,i){for(var n=[],s=0,a=e;s0){var u=Xn(t,o.children,r,i);if(n.push.apply(n,u),i-=u.length,i<=0)break}}return n}ge.find=Xn;function Og(t,e){return e.find(t)}ge.findOneChild=Og;function Ll(t,e,r){r===void 0&&(r=!0);for(var i=null,n=0;n0&&(i=Ll(t,s.children));else continue}return i}ge.findOne=Ll;function Rl(t,e){return e.some(function(r){return(0,ar.isTag)(r)&&(t(r)||r.children.length>0&&Rl(t,r.children))})}ge.existsOne=Rl;function Ng(t,e){for(var r,i=[],n=e.filter(ar.isTag),s;s=n.shift();){var a=(r=s.children)===null||r===void 0?void 0:r.filter(ar.isTag);a&&a.length>0&&n.unshift.apply(n,a),t(s)&&i.push(s)}return i}ge.findAll=Ng});var Kn=b(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.getElementsByTagType=xe.getElementsByTagName=xe.getElementById=xe.getElements=xe.testElement=void 0;var ct=je(),ci=Yn(),ui={tag_name:function(t){return typeof t=="function"?function(e){return(0,ct.isTag)(e)&&t(e.name)}:t==="*"?ct.isTag:function(e){return(0,ct.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,ct.isText)(e)&&t(e.data)}:function(e){return(0,ct.isText)(e)&&e.data===t}}};function Il(t,e){return typeof e=="function"?function(r){return(0,ct.isTag)(r)&&e(r.attribs[t])}:function(r){return(0,ct.isTag)(r)&&r.attribs[t]===e}}function Lg(t,e){return function(r){return t(r)||e(r)}}function Pl(t){var e=Object.keys(t).map(function(r){var i=t[r];return Object.prototype.hasOwnProperty.call(ui,r)?ui[r](i):Il(r,i)});return e.length===0?null:e.reduce(Lg)}function Rg(t,e){var r=Pl(t);return r?r(e):!0}xe.testElement=Rg;function Ig(t,e,r,i){i===void 0&&(i=1/0);var n=Pl(t);return n?(0,ci.filter)(n,e,r,i):[]}xe.getElements=Ig;function Pg(t,e,r){return r===void 0&&(r=!0),Array.isArray(e)||(e=[e]),(0,ci.findOne)(Il("id",t),e,r)}xe.getElementById=Pg;function Dg(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),(0,ci.filter)(ui.tag_name(t),e,r,i)}xe.getElementsByTagName=Dg;function qg(t,e,r,i){return r===void 0&&(r=!0),i===void 0&&(i=1/0),(0,ci.filter)(ui.tag_type(t),e,r,i)}xe.getElementsByTagType=qg});var Ml=b(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.uniqueSort=Je.compareDocumentPosition=Je.removeSubsets=void 0;var Dl=je();function Mg(t){for(var e=t.length;--e>=0;){var r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(var i=r.parent;i;i=i.parent)if(t.includes(i)){t.splice(e,1);break}}return t}Je.removeSubsets=Mg;function ql(t,e){var r=[],i=[];if(t===e)return 0;for(var n=(0,Dl.hasChildren)(t)?t:t.parent;n;)r.unshift(n),n=n.parent;for(n=(0,Dl.hasChildren)(e)?e:e.parent;n;)i.unshift(n),n=n.parent;for(var s=Math.min(r.length,i.length),a=0;au.indexOf(c)?o===e?20:4:o===t?10:2}Je.compareDocumentPosition=ql;function kg(t){return t=t.filter(function(e,r,i){return!i.includes(e,r+1)}),t.sort(function(e,r){var i=ql(e,r);return i&2?-1:i&4?1:0}),t}Je.uniqueSort=kg});var jl=b(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.getFeed=void 0;var jg=Jn(),or=Kn();function Bg(t){var e=fi(Wg,t);return e?e.name==="feed"?Fg(e):Hg(e):null}hi.getFeed=Bg;function Fg(t){var e,r=t.children,i={type:"atom",items:(0,or.getElementsByTagName)("entry",r).map(function(a){var o,u=a.children,l={media:kl(u)};me(l,"id","id",u),me(l,"title","title",u);var c=(o=fi("link",u))===null||o===void 0?void 0:o.attribs.href;c&&(l.link=c);var h=ft("summary",u)||ft("content",u);h&&(l.description=h);var p=ft("updated",u);return p&&(l.pubDate=new Date(p)),l})};me(i,"id","id",r),me(i,"title","title",r);var n=(e=fi("link",r))===null||e===void 0?void 0:e.attribs.href;n&&(i.link=n),me(i,"description","subtitle",r);var s=ft("updated",r);return s&&(i.updated=new Date(s)),me(i,"author","email",r,!0),i}function Hg(t){var e,r,i=(r=(e=fi("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&r!==void 0?r:[],n={type:t.name.substr(0,3),id:"",items:(0,or.getElementsByTagName)("item",t.children).map(function(a){var o=a.children,u={media:kl(o)};me(u,"id","guid",o),me(u,"title","title",o),me(u,"link","link",o),me(u,"description","description",o);var l=ft("pubDate",o);return l&&(u.pubDate=new Date(l)),u})};me(n,"title","title",i),me(n,"link","link",i),me(n,"description","description",i);var s=ft("lastBuildDate",i);return s&&(n.updated=new Date(s)),me(n,"author","managingEditor",i,!0),n}var Ug=["url","type","lang"],$g=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function kl(t){return(0,or.getElementsByTagName)("media:content",t).map(function(e){for(var r=e.attribs,i={medium:r.medium,isDefault:!!r.isDefault},n=0,s=Ug;n{"use strict";var zg=G&&G.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),ht=G&&G.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&zg(e,t,r)};Object.defineProperty(G,"__esModule",{value:!0});G.hasChildren=G.isDocument=G.isComment=G.isText=G.isCDATA=G.isTag=void 0;ht(Jn(),G);ht(Ol(),G);ht(Nl(),G);ht(Yn(),G);ht(Kn(),G);ht(Ml(),G);ht(jl(),G);var kt=je();Object.defineProperty(G,"isTag",{enumerable:!0,get:function(){return kt.isTag}});Object.defineProperty(G,"isCDATA",{enumerable:!0,get:function(){return kt.isCDATA}});Object.defineProperty(G,"isText",{enumerable:!0,get:function(){return kt.isText}});Object.defineProperty(G,"isComment",{enumerable:!0,get:function(){return kt.isComment}});Object.defineProperty(G,"isDocument",{enumerable:!0,get:function(){return kt.isDocument}});Object.defineProperty(G,"hasChildren",{enumerable:!0,get:function(){return kt.hasChildren}})});var es=b(ue=>{"use strict";var Vg=ue&&ue.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),Gg=ue&&ue.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Jg=ue&&ue.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Xg=ue&&ue.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Gg(e,t,r);return Jg(e,t),e},Yg=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ue,"__esModule",{value:!0});ue.parseFeed=ue.FeedHandler=void 0;var Kg=Yg(je()),di=Xg(Qn()),Qg=Mn(),Bl;(function(t){t[t.image=0]="image",t[t.audio=1]="audio",t[t.video=2]="video",t[t.document=3]="document",t[t.executable=4]="executable"})(Bl||(Bl={}));var Fl;(function(t){t[t.sample=0]="sample",t[t.full=1]="full",t[t.nonstop=2]="nonstop"})(Fl||(Fl={}));var $l=function(t){Vg(e,t);function e(r,i){var n=this;return typeof r=="object"&&(r=void 0,i=r),n=t.call(this,r,i)||this,n}return e.prototype.onend=function(){var r,i,n=pi(Zg,this.dom);if(!n){this.handleCallback(new Error("couldn't find root of feed"));return}var s={};if(n.name==="feed"){var a=n.children;s.type="atom",ye(s,"id","id",a),ye(s,"title","title",a);var o=Ul("href",pi("link",a));o&&(s.link=o),ye(s,"description","subtitle",a);var u=pt("updated",a);u&&(s.updated=new Date(u)),ye(s,"author","email",a,!0),s.items=Zn("entry",a).map(function(l){var c={},h=l.children;ye(c,"id","id",h),ye(c,"title","title",h);var p=Ul("href",pi("link",h));p&&(c.link=p);var d=pt("summary",h)||pt("content",h);d&&(c.description=d);var g=pt("updated",h);return g&&(c.pubDate=new Date(g)),c.media=Hl(h),c})}else{var a=(i=(r=pi("channel",n.children))===null||r===void 0?void 0:r.children)!==null&&i!==void 0?i:[];s.type=n.name.substr(0,3),s.id="",ye(s,"title","title",a),ye(s,"link","link",a),ye(s,"description","description",a);var u=pt("lastBuildDate",a);u&&(s.updated=new Date(u)),ye(s,"author","managingEditor",a,!0),s.items=Zn("item",n.children).map(function(h){var p={},d=h.children;ye(p,"id","guid",d),ye(p,"title","title",d),ye(p,"link","link",d),ye(p,"description","description",d);var g=pt("pubDate",d);return g&&(p.pubDate=new Date(g)),p.media=Hl(d),p})}this.feed=s,this.handleCallback(null)},e}(Kg.default);ue.FeedHandler=$l;function Hl(t){return Zn("media:content",t).map(function(e){var r={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(r.url=e.attribs.url),e.attribs.fileSize&&(r.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(r.type=e.attribs.type),e.attribs.expression&&(r.expression=e.attribs.expression),e.attribs.bitrate&&(r.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(r.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(r.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(r.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(r.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(r.height=parseInt(e.attribs.height,10)),e.attribs.width&&(r.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(r.lang=e.attribs.lang),r})}function Zn(t,e){return di.getElementsByTagName(t,e,!0)}function pi(t,e){return di.getElementsByTagName(t,e,!0,1)[0]}function pt(t,e,r){return r===void 0&&(r=!1),di.getText(di.getElementsByTagName(t,e,r,1)).trim()}function Ul(t,e){if(!e)return null;var r=e.attribs;return r[t]}function ye(t,e,r,i,n){n===void 0&&(n=!1);var s=pt(r,i,n);s&&(t[e]=s)}function Zg(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}function em(t,e){e===void 0&&(e={xmlMode:!0});var r=new $l(e);return new Qg.Parser(r,e).end(t),r.feed}ue.parseFeed=em});var Gl=b(B=>{"use strict";var Wl=B&&B.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),tm=B&&B.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zl=B&&B.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wl(e,t,r);return tm(e,t),e},rm=B&&B.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wl(e,t,r)},im=B&&B.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(B,"__esModule",{value:!0});B.RssHandler=B.DefaultHandler=B.DomUtils=B.ElementType=B.Tokenizer=B.createDomStream=B.parseDOM=B.parseDocument=B.DomHandler=B.Parser=void 0;var ts=Mn();Object.defineProperty(B,"Parser",{enumerable:!0,get:function(){return ts.Parser}});var gi=je();Object.defineProperty(B,"DomHandler",{enumerable:!0,get:function(){return gi.DomHandler}});Object.defineProperty(B,"DefaultHandler",{enumerable:!0,get:function(){return gi.DomHandler}});function Vl(t,e){var r=new gi.DomHandler(void 0,e);return new ts.Parser(r,e).end(t),r.root}B.parseDocument=Vl;function nm(t,e){return Vl(t,e).children}B.parseDOM=nm;function sm(t,e,r){var i=new gi.DomHandler(t,e,r);return new ts.Parser(i,e)}B.createDomStream=sm;var am=Dn();Object.defineProperty(B,"Tokenizer",{enumerable:!0,get:function(){return im(am).default}});var om=zl(Dt());B.ElementType=om;rm(es(),B);B.DomUtils=zl(Qn());var lm=es();Object.defineProperty(B,"RssHandler",{enumerable:!0,get:function(){return lm.FeedHandler}})});var Xl=b((ET,Jl)=>{"use strict";Jl.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var Kl=b(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});function Yl(t){return Object.prototype.toString.call(t)==="[object Object]"}function um(t){var e,r;return Yl(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(Yl(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}rs.isPlainObject=um});var tu=b((CT,eu)=>{"use strict";var cm=function(e){return fm(e)&&!hm(e)};function fm(t){return!!t&&typeof t=="object"}function hm(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||gm(t)}var pm=typeof Symbol=="function"&&Symbol.for,dm=pm?Symbol.for("react.element"):60103;function gm(t){return t.$$typeof===dm}function mm(t){return Array.isArray(t)?[]:{}}function lr(t,e){return e.clone!==!1&&e.isMergeableObject(t)?jt(mm(t),t,e):t}function ym(t,e,r){return t.concat(e).map(function(i){return lr(i,r)})}function bm(t,e){if(!e.customMerge)return jt;var r=e.customMerge(t);return typeof r=="function"?r:jt}function vm(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return t.propertyIsEnumerable(e)}):[]}function Ql(t){return Object.keys(t).concat(vm(t))}function Zl(t,e){try{return e in t}catch{return!1}}function wm(t,e){return Zl(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function _m(t,e,r){var i={};return r.isMergeableObject(t)&&Ql(t).forEach(function(n){i[n]=lr(t[n],r)}),Ql(e).forEach(function(n){wm(t,n)||(Zl(t,n)&&r.isMergeableObject(e[n])?i[n]=bm(n,r)(t[n],e[n],r):i[n]=lr(e[n],r))}),i}function jt(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||ym,r.isMergeableObject=r.isMergeableObject||cm,r.cloneUnlessOtherwiseSpecified=lr;var i=Array.isArray(e),n=Array.isArray(t),s=i===n;return s?i?r.arrayMerge(t,e,r):_m(t,e,r):lr(e,r)}jt.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(i,n){return jt(i,n,r)},{})};var Tm=jt;eu.exports=Tm});var iu=b((ru,mi)=>{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof mi=="object"&&mi.exports?mi.exports=e():t.parseSrcset=e()})(ru,function(){return function(t){function e(x){return x===" "||x===" "||x===` +`||x==="\f"||x==="\r"}function r(x){var _,O=x.exec(t.substring(E));if(O)return _=O[0],E+=_.length,_}for(var i=t.length,n=/^[ \t\n\r\u000c]+/,s=/^[, \t\n\r\u000c]+/,a=/^[^ \t\n\r\u000c]+/,o=/[,]+$/,u=/^\d+$/,l=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,c,h,p,d,g,E=0,m=[];;){if(r(s),E>=i)return m;c=r(a),h=[],c.slice(-1)===","?(c=c.replace(o,""),v()):y()}function y(){for(r(n),p="",d="in descriptor";;){if(g=t.charAt(E),d==="in descriptor")if(e(g))p&&(h.push(p),p="",d="after descriptor");else if(g===","){E+=1,p&&h.push(p),v();return}else if(g==="(")p=p+g,d="in parens";else if(g===""){p&&h.push(p),v();return}else p=p+g;else if(d==="in parens")if(g===")")p=p+g,d="in descriptor";else if(g===""){h.push(p),v();return}else p=p+g;else if(d==="after descriptor"&&!e(g))if(g===""){v();return}else d="in descriptor",E-=1;E+=1}}function v(){var x=!1,_,O,C,D,j={},H,te,oe,re,w;for(D=0;D{var J=String,nu=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J}};is.exports=nu();is.exports.createColors=nu});var ns=b(()=>{});var yi=b((RT,lu)=>{"use strict";var au=su(),ou=ns(),dt=class extends Error{constructor(e,r,i,n,s,a){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),a&&(this.plugin=a),typeof r<"u"&&typeof i<"u"&&(typeof r=="number"?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,dt)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=au.isColorSupported),ou&&e&&(r=ou(r));let i=r.split(/\r?\n/),n=Math.max(this.line-3,0),s=Math.min(this.line+2,i.length),a=String(s).length,o,u;if(e){let{bold:l,red:c,gray:h}=au.createColors(!0);o=p=>l(c(p)),u=p=>h(p)}else o=u=l=>l;return i.slice(n,s).map((l,c)=>{let h=n+1+c,p=" "+(" "+h).slice(-a)+" | ";if(h===this.line){let d=u(p.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(p)+l+` `+d+o("^")}return" "+u(p)+l}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` -`),this.name+": "+this.message+e}};Vl.exports=ct;ct.default=ct});var hi=v((oT,Yn)=>{"use strict";Yn.exports.isClean=Symbol("isClean");Yn.exports.my=Symbol("my")});var Kn=v((lT,Xl)=>{"use strict";var Jl={colon:": ",indent:" ",beforeDecl:` +`),this.name+": "+this.message+e}};lu.exports=dt;dt.default=dt});var bi=b((IT,ss)=>{"use strict";ss.exports.isClean=Symbol("isClean");ss.exports.my=Symbol("my")});var as=b((PT,cu)=>{"use strict";var uu={colon:": ",indent:" ",beforeDecl:` `,beforeRule:` `,beforeOpen:" ",beforeClose:` `,beforeComment:` `,after:` -`,emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};function em(t){return t[0].toUpperCase()+t.slice(1)}var ir=class{constructor(e){this.builder=e}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+i+"*/",e)}decl(e,r){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),r&&(n+=";"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,r){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(r?";":"");this.builder(i+n+s,e)}}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let i=this.raw(e,"semicolon");for(let n=0;n{if(n=u.raws[r],typeof n<"u")return!1})}return typeof n>"u"&&(n=Jl[i]),a.rawCache[i]=n,n}rawSemicolon(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(r=i.raws.semicolon,typeof r<"u"))return!1}),r}rawEmptyBody(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(r=i.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before<"u"){let s=i.raws.before.split(` +`,emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};function xm(t){return t[0].toUpperCase()+t.slice(1)}var ur=class{constructor(e){this.builder=e}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+i+"*/",e)}decl(e,r){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),r&&(n+=";"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,r){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(r?";":"");this.builder(i+n+s,e)}}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let i=this.raw(e,"semicolon");for(let n=0;n{if(n=u.raws[r],typeof n<"u")return!1})}return typeof n>"u"&&(n=uu[i]),a.rawCache[i]=n,n}rawSemicolon(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(r=i.raws.semicolon,typeof r<"u"))return!1}),r}rawEmptyBody(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(r=i.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before<"u"){let s=i.raws.before.split(` `);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawBeforeComment(e,r){let i;return e.walkComments(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(` `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,r){let i;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(` `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeRule(e){let r;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return r=i.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeClose(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return r=i.raws.after,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let r;return e.walk(i=>{if(i.type!=="decl"&&(r=i.raws.between,typeof r<"u"))return!1}),r}rawColon(e){let r;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return r=i.raws.between.replace(/[^\s:]/g,""),!1}),r}beforeAfter(e,r){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):r==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&n.type!=="root";)s+=1,n=n.parent;if(i.includes(` -`)){let a=this.raw(e,null,"indent");if(a.length)for(let o=0;o{"use strict";var tm=Kn();function Qn(t,e){new tm(e).stringify(t)}Yl.exports=Qn;Qn.default=Qn});var ar=v((cT,Kl)=>{"use strict";var{isClean:pi,my:rm}=hi(),im=fi(),nm=Kn(),sm=nr();function Zn(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],s=typeof n;i==="parent"&&s==="object"?e&&(r[i]=e):i==="source"?r[i]=n:Array.isArray(n)?r[i]=n.map(a=>Zn(a,r)):(s==="object"&&n!==null&&(n=Zn(n)),r[i]=n)}return r}var sr=class{constructor(e={}){this.raws={},this[pi]=!1,this[rm]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[r]=e[r]}error(e,r={}){if(this.source){let{start:i,end:n}=this.rangeBy(r);return this.source.input.error(e,{line:i.line,column:i.column},{line:n.line,column:n.column},r)}return new im(e)}warn(e,r,i){let n={node:this};for(let s in i)n[s]=i[s];return e.warn(r,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=sm){e.stringify&&(e=e.stringify);let r="";return e(this,i=>{r+=i}),r}assign(e={}){for(let r in e)this[r]=e[r];return this}clone(e={}){let r=Zn(this);for(let i in e)r[i]=e[i];return r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let n of e)n===this?i=!0:i?(this.parent.insertAfter(r,n),r=n):this.parent.insertBefore(r,n);i||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}raw(e,r){return new nm().raw(this,e,r)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,r){let i={},n=r==null;r=r||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let o=this[a];if(Array.isArray(o))i[a]=o.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,r):u);else if(typeof o=="object"&&o.toJSON)i[a]=o.toJSON(null,r);else if(a==="source"){let u=r.get(o.input);u==null&&(u=s,r.set(o.input,s),s++),i[a]={inputId:u,start:o.start,end:o.end}}else i[a]=o}return n&&(i.inputs=[...r.keys()].map(a=>a.toJSON())),i}positionInside(e){let r=this.toString(),i=this.source.start.column,n=this.source.start.line;for(let s=0;se.root().toProxy():e[r]}}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}markDirty(){if(this[pi]){this[pi]=!1;let e=this;for(;e=e.parent;)e[pi]=!1}}get proxyOf(){return this}};Kl.exports=sr;sr.default=sr});var lr=v((fT,Ql)=>{"use strict";var am=ar(),or=class extends am{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=et(P({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};Ql.exports=or;or.default=or});var di=v(()=>{});var gi=v(()=>{});var es=v(()=>{});var eu=v((bT,Zl)=>{var om="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",lm=(t,e=21)=>(r=e)=>{let i="",n=r;for(;n--;)i+=t[Math.random()*t.length|0];return i},um=(t=21)=>{let e="",r=t;for(;r--;)e+=om[Math.random()*64|0];return e};Zl.exports={nanoid:um,customAlphabet:lm}});var tu=v(()=>{});var rs=v((_T,nu)=>{"use strict";var{SourceMapConsumer:ru,SourceMapGenerator:iu}=di(),{existsSync:cm,readFileSync:fm}=tu(),{dirname:ts,join:hm}=gi();function pm(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}var ur=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,n=this.loadMap(r.from,i);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=ts(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new ru(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,r){return e?e.substr(0,r.length)===r:!1}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let i=e.lastIndexOf(r.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(n.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||i.test(e))return pm(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}loadFile(e){if(this.root=ts(e),cm(e))return this.mapFile=e,fm(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let i=r(e);if(i){let n=this.loadFile(i);if(!n)throw new Error("Unable to load previous source map: "+i.toString());return n}}else{if(r instanceof ru)return iu.fromSourceMap(r).toString();if(r instanceof iu)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=hm(ts(e),i)),this.loadFile(i)}}}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}};nu.exports=ur;ur.default=ur});var cr=v((TT,lu)=>{"use strict";var{SourceMapConsumer:dm,SourceMapGenerator:gm}=di(),{fileURLToPath:su,pathToFileURL:mi}=es(),{resolve:ss,isAbsolute:as}=gi(),{nanoid:mm}=eu(),is=Xn(),au=fi(),ym=rs(),ns=Symbol("fromOffsetCache"),bm=Boolean(dm&&gm),ou=Boolean(ss&&as),Pt=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!ou||/^\w+:\/\//.test(r.from)||as(r.from)?this.file=r.from:this.file=ss(r.from)),ou&&bm){let i=new ym(this.css,r);if(i.text){this.map=i;let n=i.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}fromOffset(e){let r,i;if(this[ns])i=this[ns];else{let s=this.css.split(` -`);i=new Array(s.length);let a=0;for(let o=0,u=s.length;o=r)n=i.length-1;else{let s=i.length-2,a;for(;n>1),e=i[a+1])n=a+1;else{n=a;break}}return{line:n+1,col:e-i[n]+1}}error(e,r,i,n={}){let s,a,o;if(r&&typeof r=="object"){let l=r,c=i;if(typeof r.offset=="number"){let h=this.fromOffset(l.offset);r=h.line,i=h.col}else r=l.line,i=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);a=h.line,o=h.col}else a=c.line,o=c.column}else if(!i){let l=this.fromOffset(r);r=l.line,i=l.col}let u=this.origin(r,i,a,o);return u?s=new au(e,u.endLine===void 0?u.line:{line:u.line,column:u.column},u.endLine===void 0?u.column:{line:u.endLine,column:u.endColumn},u.source,u.file,n.plugin):s=new au(e,a===void 0?r:{line:r,column:i},a===void 0?i:{line:a,column:o},this.css,this.file,n.plugin),s.input={line:r,column:i,endLine:a,endColumn:o,source:this.css},this.file&&(mi&&(s.input.url=mi(this.file).toString()),s.input.file=this.file),s}origin(e,r,i,n){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({line:e,column:r});if(!a.source)return!1;let o;typeof i=="number"&&(o=s.originalPositionFor({line:i,column:n}));let u;as(a.source)?u=mi(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||mi(this.map.mapFile));let l={url:u.toString(),line:a.line,column:a.column,endLine:o&&o.line,endColumn:o&&o.column};if(u.protocol==="file:")if(su)l.file=su(u);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(a.source);return c&&(l.source=c),l}mapResolve(e){return/^\w+:\/\//.test(e)?e:ss(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map=P({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};lu.exports=Pt;Pt.default=Pt;is&&is.registerInput&&is.registerInput(Pt)});var ls=v((xT,du)=>{"use strict";var{SourceMapConsumer:cu,SourceMapGenerator:yi}=di(),{dirname:bi,resolve:fu,relative:hu,sep:pu}=gi(),{pathToFileURL:uu}=es(),vm=cr(),wm=Boolean(cu&&yi),_m=Boolean(bi&&fu&&hu&&pu),os=class{constructor(e,r,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=n}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new vm(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let i=r.source.input.from;i&&!e[i]&&(e[i]=!0,this.map.setSourceContent(this.toUrl(this.path(i)),r.source.input.css))}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||bi(e.file),n;this.mapOpts.sourcesContent===!1?(n=new cu(e.text),n.sourcesContent&&(n.sourcesContent=n.sourcesContent.map(()=>null))):n=e.consumer(),this.map.applySourceMap(n,r,this.toUrl(this.path(i)))}}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` +`)){let a=this.raw(e,null,"indent");if(a.length)for(let o=0;o{"use strict";var Sm=as();function os(t,e){new Sm(e).stringify(t)}fu.exports=os;os.default=os});var hr=b((qT,hu)=>{"use strict";var{isClean:vi,my:Em}=bi(),Am=yi(),Cm=as(),Om=cr();function ls(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],s=typeof n;i==="parent"&&s==="object"?e&&(r[i]=e):i==="source"?r[i]=n:Array.isArray(n)?r[i]=n.map(a=>ls(a,r)):(s==="object"&&n!==null&&(n=ls(n)),r[i]=n)}return r}var fr=class{constructor(e={}){this.raws={},this[vi]=!1,this[Em]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[r]=e[r]}error(e,r={}){if(this.source){let{start:i,end:n}=this.rangeBy(r);return this.source.input.error(e,{line:i.line,column:i.column},{line:n.line,column:n.column},r)}return new Am(e)}warn(e,r,i){let n={node:this};for(let s in i)n[s]=i[s];return e.warn(r,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=Om){e.stringify&&(e=e.stringify);let r="";return e(this,i=>{r+=i}),r}assign(e={}){for(let r in e)this[r]=e[r];return this}clone(e={}){let r=ls(this);for(let i in e)r[i]=e[i];return r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let n of e)n===this?i=!0:i?(this.parent.insertAfter(r,n),r=n):this.parent.insertBefore(r,n);i||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}raw(e,r){return new Cm().raw(this,e,r)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,r){let i={},n=r==null;r=r||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let o=this[a];if(Array.isArray(o))i[a]=o.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,r):u);else if(typeof o=="object"&&o.toJSON)i[a]=o.toJSON(null,r);else if(a==="source"){let u=r.get(o.input);u==null&&(u=s,r.set(o.input,s),s++),i[a]={inputId:u,start:o.start,end:o.end}}else i[a]=o}return n&&(i.inputs=[...r.keys()].map(a=>a.toJSON())),i}positionInside(e){let r=this.toString(),i=this.source.start.column,n=this.source.start.line;for(let s=0;se.root().toProxy():e[r]}}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}markDirty(){if(this[vi]){this[vi]=!1;let e=this;for(;e=e.parent;)e[vi]=!1}}get proxyOf(){return this}};hu.exports=fr;fr.default=fr});var dr=b((MT,pu)=>{"use strict";var Nm=hr(),pr=class extends Nm{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=rt(P({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};pu.exports=pr;pr.default=pr});var wi=b(()=>{});var _i=b(()=>{});var us=b(()=>{});var gu=b(($T,du)=>{var Lm="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Rm=(t,e=21)=>(r=e)=>{let i="",n=r;for(;n--;)i+=t[Math.random()*t.length|0];return i},Im=(t=21)=>{let e="",r=t;for(;r--;)e+=Lm[Math.random()*64|0];return e};du.exports={nanoid:Im,customAlphabet:Rm}});var mu=b(()=>{});var fs=b((VT,vu)=>{"use strict";var{SourceMapConsumer:yu,SourceMapGenerator:bu}=wi(),{existsSync:Pm,readFileSync:Dm}=mu(),{dirname:cs,join:qm}=_i();function Mm(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}var gr=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,n=this.loadMap(r.from,i);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=cs(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new yu(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,r){return e?e.substr(0,r.length)===r:!1}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let i=e.lastIndexOf(r.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(n.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||i.test(e))return Mm(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}loadFile(e){if(this.root=cs(e),Pm(e))return this.mapFile=e,Dm(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let i=r(e);if(i){let n=this.loadFile(i);if(!n)throw new Error("Unable to load previous source map: "+i.toString());return n}}else{if(r instanceof yu)return bu.fromSourceMap(r).toString();if(r instanceof bu)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=qm(cs(e),i)),this.loadFile(i)}}}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}};vu.exports=gr;gr.default=gr});var mr=b((GT,xu)=>{"use strict";var{SourceMapConsumer:km,SourceMapGenerator:jm}=wi(),{fileURLToPath:wu,pathToFileURL:Ti}=us(),{resolve:ds,isAbsolute:gs}=_i(),{nanoid:Bm}=gu(),hs=ns(),_u=yi(),Fm=fs(),ps=Symbol("fromOffsetCache"),Hm=Boolean(km&&jm),Tu=Boolean(ds&&gs),Bt=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!Tu||/^\w+:\/\//.test(r.from)||gs(r.from)?this.file=r.from:this.file=ds(r.from)),Tu&&Hm){let i=new Fm(this.css,r);if(i.text){this.map=i;let n=i.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}fromOffset(e){let r,i;if(this[ps])i=this[ps];else{let s=this.css.split(` +`);i=new Array(s.length);let a=0;for(let o=0,u=s.length;o=r)n=i.length-1;else{let s=i.length-2,a;for(;n>1),e=i[a+1])n=a+1;else{n=a;break}}return{line:n+1,col:e-i[n]+1}}error(e,r,i,n={}){let s,a,o;if(r&&typeof r=="object"){let l=r,c=i;if(typeof r.offset=="number"){let h=this.fromOffset(l.offset);r=h.line,i=h.col}else r=l.line,i=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);a=h.line,o=h.col}else a=c.line,o=c.column}else if(!i){let l=this.fromOffset(r);r=l.line,i=l.col}let u=this.origin(r,i,a,o);return u?s=new _u(e,u.endLine===void 0?u.line:{line:u.line,column:u.column},u.endLine===void 0?u.column:{line:u.endLine,column:u.endColumn},u.source,u.file,n.plugin):s=new _u(e,a===void 0?r:{line:r,column:i},a===void 0?i:{line:a,column:o},this.css,this.file,n.plugin),s.input={line:r,column:i,endLine:a,endColumn:o,source:this.css},this.file&&(Ti&&(s.input.url=Ti(this.file).toString()),s.input.file=this.file),s}origin(e,r,i,n){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({line:e,column:r});if(!a.source)return!1;let o;typeof i=="number"&&(o=s.originalPositionFor({line:i,column:n}));let u;gs(a.source)?u=Ti(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||Ti(this.map.mapFile));let l={url:u.toString(),line:a.line,column:a.column,endLine:o&&o.line,endColumn:o&&o.column};if(u.protocol==="file:")if(wu)l.file=wu(u);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(a.source);return c&&(l.source=c),l}mapResolve(e){return/^\w+:\/\//.test(e)?e:ds(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map=P({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};xu.exports=Bt;Bt.default=Bt;hs&&hs.registerInput&&hs.registerInput(Bt)});var ys=b((JT,Nu)=>{"use strict";var{SourceMapConsumer:Eu,SourceMapGenerator:xi}=wi(),{dirname:Si,resolve:Au,relative:Cu,sep:Ou}=_i(),{pathToFileURL:Su}=us(),Um=mr(),$m=Boolean(Eu&&xi),Wm=Boolean(Si&&Au&&Cu&&Ou),ms=class{constructor(e,r,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=n}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new Um(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let i=r.source.input.from;i&&!e[i]&&(e[i]=!0,this.map.setSourceContent(this.toUrl(this.path(i)),r.source.input.css))}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||Si(e.file),n;this.mapOpts.sourcesContent===!1?(n=new Eu(e.text),n.sourcesContent&&(n.sourcesContent=n.sourcesContent.map(()=>null))):n=e.consumer(),this.map.applySourceMap(n,r,this.toUrl(this.path(i)))}}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=` `;this.css.includes(`\r `)&&(r=`\r -`),this.css+=r+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=yi.fromSourceMap(e)}else this.map=new yi({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(e.indexOf("<")===0||/^\w+:\/\//.test(e)||this.mapOpts.absolute)return e;let r=this.opts.to?bi(this.opts.to):".";return typeof this.mapOpts.annotation=="string"&&(r=bi(fu(r,this.mapOpts.annotation))),e=hu(r,e),e}toUrl(e){return pu==="\\"&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(uu)return uu(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}else return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new yi({file:this.outputFile()});let e=1,r=1,i="",n={source:"",generated:{line:0,column:0},original:{line:0,column:0}},s,a;this.stringify(this.root,(o,u,l)=>{if(this.css+=o,u&&l!=="end"&&(n.generated.line=e,n.generated.column=r-1,u.source&&u.source.start?(n.source=this.sourcePath(u),n.original.line=u.source.start.line,n.original.column=u.source.start.column-1,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,this.map.addMapping(n))),s=o.match(/\n/g),s?(e+=s.length,a=o.lastIndexOf(` -`),r=o.length-a):r+=o.length,u&&l!=="start"){let c=u.parent||{raws:{}};(u.type!=="decl"||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(n.source=this.sourcePath(u),n.original.line=u.source.end.line,n.original.column=u.source.end.column-1,n.generated.line=e,n.generated.column=r-2,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=r-1,this.map.addMapping(n)))}})}generate(){if(this.clearAnnotation(),_m&&wm&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}};du.exports=os});var hr=v((ST,gu)=>{"use strict";var Tm=ar(),fr=class extends Tm{constructor(e){super(e),this.type="comment"}};gu.exports=fr;fr.default=fr});var Ve=v((ET,xu)=>{"use strict";var{isClean:mu,my:yu}=hi(),bu=lr(),vu=hr(),xm=ar(),wu,us,cs;function _u(t){return t.map(e=>(e.nodes&&(e.nodes=_u(e.nodes)),delete e.source,e))}function Tu(t){if(t[mu]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Tu(e)}var xe=class extends xm{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,n;for(;this.indexes[r]{let n;try{n=e(r,i)}catch(s){throw r.addToError(s)}return n!==!1&&r.walk&&(n=r.walk(e)),n})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="decl")return r(i,n)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="rule")return r(i,n)}))}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="atrule")return r(i,n)}))}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}insertBefore(e,r){e=this.index(e);let i=e===0?"prepend":!1,n=this.normalize(r,this.proxyOf.nodes[e],i).reverse();for(let a of n)this.proxyOf.nodes.splice(e,0,a);let s;for(let a in this.indexes)s=this.indexes[a],e<=s&&(this.indexes[a]=s+n.length);return this.markDirty(),this}insertAfter(e,r){e=this.index(e);let i=this.normalize(r,this.proxyOf.nodes[e]).reverse();for(let s of i)this.proxyOf.nodes.splice(e+1,0,s);let n;for(let s in this.indexes)n=this.indexes[s],e=e&&(this.indexes[i]=r-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,r,i){return i||(i=r,r={}),this.walkDecls(n=>{r.props&&!r.props.includes(n.prop)||r.fast&&!n.value.includes(r.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,r){if(typeof e=="string")e=_u(wu(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new bu(e)]}else if(e.selector)e=[new us(e)];else if(e.name)e=[new cs(e)];else if(e.text)e=[new vu(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[yu]||xe.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[mu]&&Tu(n),typeof n.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(n.raws.before=r.raws.before.replace(/\S/g,"")),n.parent=this,n))}getProxyProcessor(){return{set(e,r,i){return e[r]===i||(e[r]=i,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0},get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...i)=>e[r](...i.map(n=>typeof n=="function"?(s,a)=>n(s.toProxy(),a):n)):r==="every"||r==="some"?i=>e[r]((n,...s)=>i(n.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(i=>i.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]}}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}};xe.registerParse=t=>{wu=t};xe.registerRule=t=>{us=t};xe.registerAtRule=t=>{cs=t};xu.exports=xe;xe.default=xe;xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,cs.prototype):t.type==="rule"?Object.setPrototypeOf(t,us.prototype):t.type==="decl"?Object.setPrototypeOf(t,bu.prototype):t.type==="comment"&&Object.setPrototypeOf(t,vu.prototype),t[yu]=!0,t.nodes&&t.nodes.forEach(e=>{xe.rebuild(e)})}});var vi=v((AT,Au)=>{"use strict";var Sm=Ve(),Su,Eu,ft=class extends Sm{constructor(e){super(P({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Su(new Eu,this,e).stringify()}};ft.registerLazyResult=t=>{Su=t};ft.registerProcessor=t=>{Eu=t};Au.exports=ft;ft.default=ft});var fs=v((CT,Ou)=>{"use strict";var Cu={};Ou.exports=function(e){Cu[e]||(Cu[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var hs=v((OT,Nu)=>{"use strict";var pr=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Nu.exports=pr;pr.default=pr});var wi=v((NT,Lu)=>{"use strict";var Em=hs(),dr=class{constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let i=new Em(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};Lu.exports=dr;dr.default=dr});var qu=v((LT,Du)=>{"use strict";var ps="'".charCodeAt(0),Iu='"'.charCodeAt(0),_i="\\".charCodeAt(0),Ru="/".charCodeAt(0),Ti=` -`.charCodeAt(0),gr=" ".charCodeAt(0),xi="\f".charCodeAt(0),Si=" ".charCodeAt(0),Ei="\r".charCodeAt(0),Am="[".charCodeAt(0),Cm="]".charCodeAt(0),Om="(".charCodeAt(0),Nm=")".charCodeAt(0),Lm="{".charCodeAt(0),Im="}".charCodeAt(0),Rm=";".charCodeAt(0),Pm="*".charCodeAt(0),Dm=":".charCodeAt(0),qm="@".charCodeAt(0),Ai=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ci=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,km=/.[\n"'(/\\]/,Pu=/[\da-f]/i;Du.exports=function(e,r={}){let i=e.css.valueOf(),n=r.ignoreErrors,s,a,o,u,l,c,h,p,d,g,S=i.length,m=0,y=[],b=[];function E(){return m}function w(j){throw e.error("Unclosed "+j,m)}function O(){return b.length===0&&m>=S}function C(j){if(b.length)return b.pop();if(m>=S)return;let H=j?j.ignoreUnclosed:!1;switch(s=i.charCodeAt(m),s){case Ti:case gr:case Si:case Ei:case xi:{a=m;do a+=1,s=i.charCodeAt(a);while(s===gr||s===Ti||s===Si||s===Ei||s===xi);g=["space",i.slice(m,a)],m=a-1;break}case Am:case Cm:case Lm:case Im:case Dm:case Rm:case Nm:{let te=String.fromCharCode(s);g=[te,te,m];break}case Om:{if(p=y.length?y.pop()[1]:"",d=i.charCodeAt(m+1),p==="url"&&d!==ps&&d!==Iu&&d!==gr&&d!==Ti&&d!==Si&&d!==xi&&d!==Ei){a=m;do{if(c=!1,a=i.indexOf(")",a+1),a===-1)if(n||H){a=m;break}else w("bracket");for(h=a;i.charCodeAt(h-1)===_i;)h-=1,c=!c}while(c);g=["brackets",i.slice(m,a+1),m,a],m=a}else a=i.indexOf(")",m+1),u=i.slice(m,a+1),a===-1||km.test(u)?g=["(","(",m]:(g=["brackets",u,m,a],m=a);break}case ps:case Iu:{o=s===ps?"'":'"',a=m;do{if(c=!1,a=i.indexOf(o,a+1),a===-1)if(n||H){a=m+1;break}else w("string");for(h=a;i.charCodeAt(h-1)===_i;)h-=1,c=!c}while(c);g=["string",i.slice(m,a+1),m,a],m=a;break}case qm:{Ai.lastIndex=m+1,Ai.test(i),Ai.lastIndex===0?a=i.length-1:a=Ai.lastIndex-2,g=["at-word",i.slice(m,a+1),m,a],m=a;break}case _i:{for(a=m,l=!0;i.charCodeAt(a+1)===_i;)a+=1,l=!l;if(s=i.charCodeAt(a+1),l&&s!==Ru&&s!==gr&&s!==Ti&&s!==Si&&s!==Ei&&s!==xi&&(a+=1,Pu.test(i.charAt(a)))){for(;Pu.test(i.charAt(a+1));)a+=1;i.charCodeAt(a+1)===gr&&(a+=1)}g=["word",i.slice(m,a+1),m,a],m=a;break}default:{s===Ru&&i.charCodeAt(m+1)===Pm?(a=i.indexOf("*/",m+2)+1,a===0&&(n||H?a=i.length:w("comment")),g=["comment",i.slice(m,a+1),m,a],m=a):(Ci.lastIndex=m+1,Ci.test(i),Ci.lastIndex===0?a=i.length-1:a=Ci.lastIndex-2,g=["word",i.slice(m,a+1),m,a],y.push(g),m=a);break}}return m++,g}function D(j){b.push(j)}return{back:D,nextToken:C,endOfFile:O,position:E}}});var Oi=v((IT,Mu)=>{"use strict";var ku=Ve(),Dt=class extends ku{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Mu.exports=Dt;Dt.default=Dt;ku.registerAtRule(Dt)});var qt=v((RT,Fu)=>{"use strict";var Mm=Ve(),ju,Bu,ht=class extends Mm{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,r){let i=this.index(e);return!r&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}normalize(e,r,i){let n=super.normalize(e);if(r){if(i==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of n)s.raws.before=r.raws.before}return n}toResult(e={}){return new ju(new Bu,this,e).stringify()}};ht.registerLazyResult=t=>{ju=t};ht.registerProcessor=t=>{Bu=t};Fu.exports=ht;ht.default=ht});var ds=v((PT,Hu)=>{"use strict";var mr={split(t,e,r){let i=[],n="",s=!1,a=0,o=!1,u=!1;for(let l of t)u?u=!1:l==="\\"?u=!0:o?l===o&&(o=!1):l==='"'||l==="'"?o=l:l==="("?a+=1:l===")"?a>0&&(a-=1):a===0&&e.includes(l)&&(s=!0),s?(n!==""&&i.push(n.trim()),n="",s=!1):n+=l;return(r||n!=="")&&i.push(n.trim()),i},space(t){let e=[" ",` -`," "];return mr.split(t,e)},comma(t){return mr.split(t,[","],!0)}};Hu.exports=mr;mr.default=mr});var Ni=v((DT,$u)=>{"use strict";var Uu=Ve(),jm=ds(),kt=class extends Uu{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return jm.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};$u.exports=kt;kt.default=kt;Uu.registerRule(kt)});var Vu=v((qT,Gu)=>{"use strict";var Bm=lr(),Fm=qu(),Hm=hr(),Um=Oi(),$m=qt(),Wu=Ni(),zu={empty:!0,space:!0};function Wm(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var gs=class{constructor(e){this.input=e,this.root=new $m,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=Fm(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}comment(e){let r=new Hm;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]);let i=e[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}emptyRule(e){let r=new Wu;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}other(e){let r=!1,i=null,n=!1,s=null,a=[],o=e[1].startsWith("--"),u=[],l=e;for(;l;){if(i=l[0],u.push(l),i==="("||i==="[")s||(s=l),a.push(i==="("?")":"]");else if(o&&n&&i==="{")s||(s=l),a.push("}");else if(a.length===0)if(i===";")if(n){this.decl(u,o);return}else break;else if(i==="{"){this.rule(u);return}else if(i==="}"){this.tokenizer.back(u.pop()),r=!0;break}else i===":"&&(n=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),a.length>0&&this.unclosedBracket(s),r&&n){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}rule(e){e.pop();let r=new Wu;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}decl(e,r){let i=new Bm;this.init(i,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||Wm(e));e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,l);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=l;p>0;p--){let d=c[p][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=h,e=c)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),r),i.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}atrule(e){let r=new Um;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let i,n,s,a=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),this.semicolon=!0;break}else if(i==="{"){o=!0;break}else if(i==="}"){if(u.length>0){for(s=u.length-1,n=u[s];n&&n[0]==="space";)n=u[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(r.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(r,"params",u),a&&(e=u[u.length-1],r.source.end=this.getPosition(e[3]||e[2]),this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{offset:e,line:r.line,column:r.col}}init(e,r){this.current.push(e),e.source={start:this.getPosition(r),input:this.input},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}raw(e,r,i,n){let s,a,o=i.length,u="",l=!0,c,h;for(let p=0;pd+g[1],"");e.raws[r]={value:u,raw:p}}e[r]=u}spacesAndCommentsFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let r,i="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],r==="space");)i=e.pop()[1]+i;return i}stringFrom(e,r){let i="";for(let n=r;n=0&&(n=e[s],!(n[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}};Gu.exports=gs});var Ii=v((kT,Ju)=>{"use strict";var zm=Ve(),Gm=Vu(),Vm=cr();function Li(t,e){let r=new Vm(t,e),i=new Gm(r);try{i.parse()}catch(n){throw n}return i.root}Ju.exports=Li;Li.default=Li;zm.registerParse(Li)});var bs=v((jT,Qu)=>{"use strict";var{isClean:Pe,my:Jm}=hi(),Xm=ls(),Ym=nr(),Km=Ve(),Qm=vi(),MT=fs(),Xu=wi(),Zm=Ii(),ey=qt(),ty={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},ry={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},iy={postcssPlugin:!0,prepare:!0,Once:!0},Mt=0;function yr(t){return typeof t=="object"&&typeof t.then=="function"}function Ku(t){let e=!1,r=ty[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,Mt,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,Mt,r+"Exit"]:[r,r+"Exit"]}function Yu(t){let e;return t.type==="document"?e=["Document",Mt,"DocumentExit"]:t.type==="root"?e=["Root",Mt,"RootExit"]:e=Ku(t),{node:t,events:e,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function ms(t){return t[Pe]=!1,t.nodes&&t.nodes.forEach(e=>ms(e)),t}var ys={},De=class{constructor(e,r,i){this.stringified=!1,this.processed=!1;let n;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))n=ms(r);else if(r instanceof De||r instanceof Xu)n=ms(r.root),r.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let s=Zm;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{n=s(r,i)}catch(a){this.processed=!0,this.error=a}n&&!n[Jm]&&Km.rebuild(n)}this.result=new Xu(e,n,i),this.helpers=et(P({},ys),{result:this.result,postcss:ys}),this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?P(P({},s),s.prepare(this.result)):s)}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,r){return this.async().then(e,r)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(yr(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Pe];)e[Pe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=Ym;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let n=new Xm(r,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[Pe]=!0;let r=Ku(e);for(let i of r)if(i===Mt)e.nodes&&e.each(n=>{n[Pe]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}visitSync(e,r){for(let[i,n]of e){this.result.lastPlugin=i;let s;try{s=n(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(yr(s))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return yr(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}async runAsync(){this.plugin=0;for(let e=0;e0;){let i=this.visitTick(r);if(yr(i))try{await i}catch(n){let s=r[r.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let n=e.nodes.map(s=>i(s,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(r,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([r,n])};for(let r of this.plugins)if(typeof r=="object")for(let i in r){if(!ry[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!iy[i])if(typeof r[i]=="object")for(let n in r[i])n==="*"?e(r,i,r[i][n]):e(r,i+"-"+n.toLowerCase(),r[i][n]);else typeof r[i]=="function"&&e(r,i,r[i])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let r=e[e.length-1],{node:i,visitors:n}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&r.visitorIndex{ys=t};Qu.exports=De;De.default=De;ey.registerLazyResult(De);Qm.registerLazyResult(De)});var ec=v((FT,Zu)=>{"use strict";var ny=ls(),sy=nr(),BT=fs(),ay=Ii(),oy=wi(),br=class{constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let n,s=sy;this.result=new oy(this._processor,n,this._opts),this.result.css=r;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let o=new ny(s,n,this._opts,r);if(o.isMap()){let[u,l]=o.generate();u&&(this.result.css=u),l&&(this.result.map=l)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,r=ay;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,r){return this.async().then(e,r)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}};Zu.exports=br;br.default=br});var rc=v((HT,tc)=>{"use strict";var ly=ec(),uy=bs(),cy=vi(),fy=qt(),pt=class{constructor(e=[]){this.version="8.4.12",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,r={}){return this.plugins.length===0&&typeof r.parser>"u"&&typeof r.stringifier>"u"&&typeof r.syntax>"u"?new ly(this,e,r):new uy(this,e,r)}normalize(e){let r=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)r.push(i);else if(typeof i=="function")r.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return r}};tc.exports=pt;pt.default=pt;fy.registerProcessor(pt);cy.registerProcessor(pt)});var nc=v((UT,ic)=>{"use strict";var hy=lr(),py=rs(),dy=hr(),gy=Oi(),my=cr(),yy=qt(),by=Ni();function vr(t,e){if(Array.isArray(t))return t.map(a=>vr(a));let n=t,{inputs:r}=n,i=Ji(n,["inputs"]);if(r){e=[];for(let a of r){let o=et(P({},a),{__proto__:my.prototype});o.map&&(o.map=et(P({},o.map),{__proto__:py.prototype})),e.push(o)}}if(i.nodes&&(i.nodes=t.nodes.map(a=>vr(a,e))),i.source){let s=i.source,{inputId:a}=s,o=Ji(s,["inputId"]);i.source=o,a!=null&&(i.source.input=e[a])}if(i.type==="root")return new yy(i);if(i.type==="decl")return new hy(i);if(i.type==="rule")return new by(i);if(i.type==="comment")return new dy(i);if(i.type==="atrule")return new gy(i);throw new Error("Unknown node type: "+t.type)}ic.exports=vr;vr.default=vr});var hc=v(($T,fc)=>{"use strict";var vy=fi(),sc=lr(),wy=bs(),_y=Ve(),vs=rc(),Ty=nr(),xy=nc(),ac=vi(),Sy=hs(),oc=hr(),lc=Oi(),Ey=wi(),Ay=cr(),Cy=Ii(),Oy=ds(),uc=Ni(),cc=qt(),Ny=ar();function U(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new vs(t)}U.plugin=function(e,r){console&&console.warn&&(console.warn(e+`: postcss.plugin was deprecated. Migration guide: +`),this.css+=r+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=xi.fromSourceMap(e)}else this.map=new xi({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(e.indexOf("<")===0||/^\w+:\/\//.test(e)||this.mapOpts.absolute)return e;let r=this.opts.to?Si(this.opts.to):".";return typeof this.mapOpts.annotation=="string"&&(r=Si(Au(r,this.mapOpts.annotation))),e=Cu(r,e),e}toUrl(e){return Ou==="\\"&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(Su)return Su(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}else return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new xi({file:this.outputFile()});let e=1,r=1,i="",n={source:"",generated:{line:0,column:0},original:{line:0,column:0}},s,a;this.stringify(this.root,(o,u,l)=>{if(this.css+=o,u&&l!=="end"&&(n.generated.line=e,n.generated.column=r-1,u.source&&u.source.start?(n.source=this.sourcePath(u),n.original.line=u.source.start.line,n.original.column=u.source.start.column-1,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,this.map.addMapping(n))),s=o.match(/\n/g),s?(e+=s.length,a=o.lastIndexOf(` +`),r=o.length-a):r+=o.length,u&&l!=="start"){let c=u.parent||{raws:{}};(u.type!=="decl"||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(n.source=this.sourcePath(u),n.original.line=u.source.end.line,n.original.column=u.source.end.column-1,n.generated.line=e,n.generated.column=r-2,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=r-1,this.map.addMapping(n)))}})}generate(){if(this.clearAnnotation(),Wm&&$m&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}};Nu.exports=ms});var br=b((XT,Lu)=>{"use strict";var zm=hr(),yr=class extends zm{constructor(e){super(e),this.type="comment"}};Lu.exports=yr;yr.default=yr});var Xe=b((YT,ju)=>{"use strict";var{isClean:Ru,my:Iu}=bi(),Pu=dr(),Du=br(),Vm=hr(),qu,bs,vs;function Mu(t){return t.map(e=>(e.nodes&&(e.nodes=Mu(e.nodes)),delete e.source,e))}function ku(t){if(t[Ru]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ku(e)}var Se=class extends Vm{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,n;for(;this.indexes[r]{let n;try{n=e(r,i)}catch(s){throw r.addToError(s)}return n!==!1&&r.walk&&(n=r.walk(e)),n})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="decl")return r(i,n)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="rule")return r(i,n)}))}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="atrule")return r(i,n)}))}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}insertBefore(e,r){e=this.index(e);let i=e===0?"prepend":!1,n=this.normalize(r,this.proxyOf.nodes[e],i).reverse();for(let a of n)this.proxyOf.nodes.splice(e,0,a);let s;for(let a in this.indexes)s=this.indexes[a],e<=s&&(this.indexes[a]=s+n.length);return this.markDirty(),this}insertAfter(e,r){e=this.index(e);let i=this.normalize(r,this.proxyOf.nodes[e]).reverse();for(let s of i)this.proxyOf.nodes.splice(e+1,0,s);let n;for(let s in this.indexes)n=this.indexes[s],e=e&&(this.indexes[i]=r-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,r,i){return i||(i=r,r={}),this.walkDecls(n=>{r.props&&!r.props.includes(n.prop)||r.fast&&!n.value.includes(r.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,r){if(typeof e=="string")e=Mu(qu(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Pu(e)]}else if(e.selector)e=[new bs(e)];else if(e.name)e=[new vs(e)];else if(e.text)e=[new Du(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Iu]||Se.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Ru]&&ku(n),typeof n.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(n.raws.before=r.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}getProxyProcessor(){return{set(e,r,i){return e[r]===i||(e[r]=i,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0},get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...i)=>e[r](...i.map(n=>typeof n=="function"?(s,a)=>n(s.toProxy(),a):n)):r==="every"||r==="some"?i=>e[r]((n,...s)=>i(n.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(i=>i.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]}}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}};Se.registerParse=t=>{qu=t};Se.registerRule=t=>{bs=t};Se.registerAtRule=t=>{vs=t};ju.exports=Se;Se.default=Se;Se.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,vs.prototype):t.type==="rule"?Object.setPrototypeOf(t,bs.prototype):t.type==="decl"?Object.setPrototypeOf(t,Pu.prototype):t.type==="comment"&&Object.setPrototypeOf(t,Du.prototype),t[Iu]=!0,t.nodes&&t.nodes.forEach(e=>{Se.rebuild(e)})}});var Ei=b((KT,Hu)=>{"use strict";var Gm=Xe(),Bu,Fu,gt=class extends Gm{constructor(e){super(P({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Bu(new Fu,this,e).stringify()}};gt.registerLazyResult=t=>{Bu=t};gt.registerProcessor=t=>{Fu=t};Hu.exports=gt;gt.default=gt});var ws=b((QT,$u)=>{"use strict";var Uu={};$u.exports=function(e){Uu[e]||(Uu[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var _s=b((ZT,Wu)=>{"use strict";var vr=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Wu.exports=vr;vr.default=vr});var Ai=b((ex,zu)=>{"use strict";var Jm=_s(),wr=class{constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let i=new Jm(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};zu.exports=wr;wr.default=wr});var Yu=b((tx,Xu)=>{"use strict";var Ts="'".charCodeAt(0),Vu='"'.charCodeAt(0),Ci="\\".charCodeAt(0),Gu="/".charCodeAt(0),Oi=` +`.charCodeAt(0),_r=" ".charCodeAt(0),Ni="\f".charCodeAt(0),Li=" ".charCodeAt(0),Ri="\r".charCodeAt(0),Xm="[".charCodeAt(0),Ym="]".charCodeAt(0),Km="(".charCodeAt(0),Qm=")".charCodeAt(0),Zm="{".charCodeAt(0),ey="}".charCodeAt(0),ty=";".charCodeAt(0),ry="*".charCodeAt(0),iy=":".charCodeAt(0),ny="@".charCodeAt(0),Ii=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sy=/.[\n"'(/\\]/,Ju=/[\da-f]/i;Xu.exports=function(e,r={}){let i=e.css.valueOf(),n=r.ignoreErrors,s,a,o,u,l,c,h,p,d,g,E=i.length,m=0,y=[],v=[];function x(){return m}function _(j){throw e.error("Unclosed "+j,m)}function O(){return v.length===0&&m>=E}function C(j){if(v.length)return v.pop();if(m>=E)return;let H=j?j.ignoreUnclosed:!1;switch(s=i.charCodeAt(m),s){case Oi:case _r:case Li:case Ri:case Ni:{a=m;do a+=1,s=i.charCodeAt(a);while(s===_r||s===Oi||s===Li||s===Ri||s===Ni);g=["space",i.slice(m,a)],m=a-1;break}case Xm:case Ym:case Zm:case ey:case iy:case ty:case Qm:{let te=String.fromCharCode(s);g=[te,te,m];break}case Km:{if(p=y.length?y.pop()[1]:"",d=i.charCodeAt(m+1),p==="url"&&d!==Ts&&d!==Vu&&d!==_r&&d!==Oi&&d!==Li&&d!==Ni&&d!==Ri){a=m;do{if(c=!1,a=i.indexOf(")",a+1),a===-1)if(n||H){a=m;break}else _("bracket");for(h=a;i.charCodeAt(h-1)===Ci;)h-=1,c=!c}while(c);g=["brackets",i.slice(m,a+1),m,a],m=a}else a=i.indexOf(")",m+1),u=i.slice(m,a+1),a===-1||sy.test(u)?g=["(","(",m]:(g=["brackets",u,m,a],m=a);break}case Ts:case Vu:{o=s===Ts?"'":'"',a=m;do{if(c=!1,a=i.indexOf(o,a+1),a===-1)if(n||H){a=m+1;break}else _("string");for(h=a;i.charCodeAt(h-1)===Ci;)h-=1,c=!c}while(c);g=["string",i.slice(m,a+1),m,a],m=a;break}case ny:{Ii.lastIndex=m+1,Ii.test(i),Ii.lastIndex===0?a=i.length-1:a=Ii.lastIndex-2,g=["at-word",i.slice(m,a+1),m,a],m=a;break}case Ci:{for(a=m,l=!0;i.charCodeAt(a+1)===Ci;)a+=1,l=!l;if(s=i.charCodeAt(a+1),l&&s!==Gu&&s!==_r&&s!==Oi&&s!==Li&&s!==Ri&&s!==Ni&&(a+=1,Ju.test(i.charAt(a)))){for(;Ju.test(i.charAt(a+1));)a+=1;i.charCodeAt(a+1)===_r&&(a+=1)}g=["word",i.slice(m,a+1),m,a],m=a;break}default:{s===Gu&&i.charCodeAt(m+1)===ry?(a=i.indexOf("*/",m+2)+1,a===0&&(n||H?a=i.length:_("comment")),g=["comment",i.slice(m,a+1),m,a],m=a):(Pi.lastIndex=m+1,Pi.test(i),Pi.lastIndex===0?a=i.length-1:a=Pi.lastIndex-2,g=["word",i.slice(m,a+1),m,a],y.push(g),m=a);break}}return m++,g}function D(j){v.push(j)}return{back:D,nextToken:C,endOfFile:O,position:x}}});var Di=b((rx,Qu)=>{"use strict";var Ku=Xe(),Ft=class extends Ku{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Qu.exports=Ft;Ft.default=Ft;Ku.registerAtRule(Ft)});var Ht=b((ix,tc)=>{"use strict";var ay=Xe(),Zu,ec,mt=class extends ay{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,r){let i=this.index(e);return!r&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}normalize(e,r,i){let n=super.normalize(e);if(r){if(i==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of n)s.raws.before=r.raws.before}return n}toResult(e={}){return new Zu(new ec,this,e).stringify()}};mt.registerLazyResult=t=>{Zu=t};mt.registerProcessor=t=>{ec=t};tc.exports=mt;mt.default=mt});var xs=b((nx,rc)=>{"use strict";var Tr={split(t,e,r){let i=[],n="",s=!1,a=0,o=!1,u=!1;for(let l of t)u?u=!1:l==="\\"?u=!0:o?l===o&&(o=!1):l==='"'||l==="'"?o=l:l==="("?a+=1:l===")"?a>0&&(a-=1):a===0&&e.includes(l)&&(s=!0),s?(n!==""&&i.push(n.trim()),n="",s=!1):n+=l;return(r||n!=="")&&i.push(n.trim()),i},space(t){let e=[" ",` +`," "];return Tr.split(t,e)},comma(t){return Tr.split(t,[","],!0)}};rc.exports=Tr;Tr.default=Tr});var qi=b((sx,nc)=>{"use strict";var ic=Xe(),oy=xs(),Ut=class extends ic{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return oy.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};nc.exports=Ut;Ut.default=Ut;ic.registerRule(Ut)});var lc=b((ax,oc)=>{"use strict";var ly=dr(),uy=Yu(),cy=br(),fy=Di(),hy=Ht(),sc=qi(),ac={empty:!0,space:!0};function py(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var Ss=class{constructor(e){this.input=e,this.root=new hy,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=uy(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}comment(e){let r=new cy;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]);let i=e[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}emptyRule(e){let r=new sc;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}other(e){let r=!1,i=null,n=!1,s=null,a=[],o=e[1].startsWith("--"),u=[],l=e;for(;l;){if(i=l[0],u.push(l),i==="("||i==="[")s||(s=l),a.push(i==="("?")":"]");else if(o&&n&&i==="{")s||(s=l),a.push("}");else if(a.length===0)if(i===";")if(n){this.decl(u,o);return}else break;else if(i==="{"){this.rule(u);return}else if(i==="}"){this.tokenizer.back(u.pop()),r=!0;break}else i===":"&&(n=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),a.length>0&&this.unclosedBracket(s),r&&n){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}rule(e){e.pop();let r=new sc;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}decl(e,r){let i=new ly;this.init(i,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||py(e));e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,l);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=l;p>0;p--){let d=c[p][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=h,e=c)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),r),i.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}atrule(e){let r=new fy;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let i,n,s,a=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),this.semicolon=!0;break}else if(i==="{"){o=!0;break}else if(i==="}"){if(u.length>0){for(s=u.length-1,n=u[s];n&&n[0]==="space";)n=u[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(r.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(r,"params",u),a&&(e=u[u.length-1],r.source.end=this.getPosition(e[3]||e[2]),this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let r=this.input.fromOffset(e);return{offset:e,line:r.line,column:r.col}}init(e,r){this.current.push(e),e.source={start:this.getPosition(r),input:this.input},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}raw(e,r,i,n){let s,a,o=i.length,u="",l=!0,c,h;for(let p=0;pd+g[1],"");e.raws[r]={value:u,raw:p}}e[r]=u}spacesAndCommentsFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let r,i="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],r==="space");)i=e.pop()[1]+i;return i}stringFrom(e,r){let i="";for(let n=r;n=0&&(n=e[s],!(n[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}};oc.exports=Ss});var ki=b((ox,uc)=>{"use strict";var dy=Xe(),gy=lc(),my=mr();function Mi(t,e){let r=new my(t,e),i=new gy(r);try{i.parse()}catch(n){throw n}return i.root}uc.exports=Mi;Mi.default=Mi;dy.registerParse(Mi)});var Cs=b((ux,pc)=>{"use strict";var{isClean:De,my:yy}=bi(),by=ys(),vy=cr(),wy=Xe(),_y=Ei(),lx=ws(),cc=Ai(),Ty=ki(),xy=Ht(),Sy={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},Ey={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},Ay={postcssPlugin:!0,prepare:!0,Once:!0},$t=0;function xr(t){return typeof t=="object"&&typeof t.then=="function"}function hc(t){let e=!1,r=Sy[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,$t,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,$t,r+"Exit"]:[r,r+"Exit"]}function fc(t){let e;return t.type==="document"?e=["Document",$t,"DocumentExit"]:t.type==="root"?e=["Root",$t,"RootExit"]:e=hc(t),{node:t,events:e,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function Es(t){return t[De]=!1,t.nodes&&t.nodes.forEach(e=>Es(e)),t}var As={},qe=class{constructor(e,r,i){this.stringified=!1,this.processed=!1;let n;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))n=Es(r);else if(r instanceof qe||r instanceof cc)n=Es(r.root),r.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let s=Ty;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{n=s(r,i)}catch(a){this.processed=!0,this.error=a}n&&!n[yy]&&wy.rebuild(n)}this.result=new cc(e,n,i),this.helpers=rt(P({},As),{result:this.result,postcss:As}),this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?P(P({},s),s.prepare(this.result)):s)}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,r){return this.async().then(e,r)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(xr(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[De];)e[De]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=vy;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let n=new by(r,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[De]=!0;let r=hc(e);for(let i of r)if(i===$t)e.nodes&&e.each(n=>{n[De]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}visitSync(e,r){for(let[i,n]of e){this.result.lastPlugin=i;let s;try{s=n(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(xr(s))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return xr(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}async runAsync(){this.plugin=0;for(let e=0;e0;){let i=this.visitTick(r);if(xr(i))try{await i}catch(n){let s=r[r.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let n=e.nodes.map(s=>i(s,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(r,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([r,n])};for(let r of this.plugins)if(typeof r=="object")for(let i in r){if(!Ey[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ay[i])if(typeof r[i]=="object")for(let n in r[i])n==="*"?e(r,i,r[i][n]):e(r,i+"-"+n.toLowerCase(),r[i][n]);else typeof r[i]=="function"&&e(r,i,r[i])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let r=e[e.length-1],{node:i,visitors:n}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&r.visitorIndex{As=t};pc.exports=qe;qe.default=qe;xy.registerLazyResult(qe);_y.registerLazyResult(qe)});var gc=b((fx,dc)=>{"use strict";var Cy=ys(),Oy=cr(),cx=ws(),Ny=ki(),Ly=Ai(),Sr=class{constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let n,s=Oy;this.result=new Ly(this._processor,n,this._opts),this.result.css=r;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let o=new Cy(s,n,this._opts,r);if(o.isMap()){let[u,l]=o.generate();u&&(this.result.css=u),l&&(this.result.map=l)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,r=Ny;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,r){return this.async().then(e,r)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}};dc.exports=Sr;Sr.default=Sr});var yc=b((hx,mc)=>{"use strict";var Ry=gc(),Iy=Cs(),Py=Ei(),Dy=Ht(),yt=class{constructor(e=[]){this.version="8.4.14",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,r={}){return this.plugins.length===0&&typeof r.parser>"u"&&typeof r.stringifier>"u"&&typeof r.syntax>"u"?new Ry(this,e,r):new Iy(this,e,r)}normalize(e){let r=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)r.push(i);else if(typeof i=="function")r.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return r}};mc.exports=yt;yt.default=yt;Dy.registerProcessor(yt);Py.registerProcessor(yt)});var vc=b((px,bc)=>{"use strict";var qy=dr(),My=fs(),ky=br(),jy=Di(),By=mr(),Fy=Ht(),Hy=qi();function Er(t,e){if(Array.isArray(t))return t.map(a=>Er(a));let n=t,{inputs:r}=n,i=tn(n,["inputs"]);if(r){e=[];for(let a of r){let o=rt(P({},a),{__proto__:By.prototype});o.map&&(o.map=rt(P({},o.map),{__proto__:My.prototype})),e.push(o)}}if(i.nodes&&(i.nodes=t.nodes.map(a=>Er(a,e))),i.source){let s=i.source,{inputId:a}=s,o=tn(s,["inputId"]);i.source=o,a!=null&&(i.source.input=e[a])}if(i.type==="root")return new Fy(i);if(i.type==="decl")return new qy(i);if(i.type==="rule")return new Hy(i);if(i.type==="comment")return new ky(i);if(i.type==="atrule")return new jy(i);throw new Error("Unknown node type: "+t.type)}bc.exports=Er;Er.default=Er});var Cc=b((dx,Ac)=>{"use strict";var Uy=yi(),wc=dr(),$y=Cs(),Wy=Xe(),Os=yc(),zy=cr(),Vy=vc(),_c=Ei(),Gy=_s(),Tc=br(),xc=Di(),Jy=Ai(),Xy=mr(),Yy=ki(),Ky=xs(),Sc=qi(),Ec=Ht(),Qy=hr();function U(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Os(t)}U.plugin=function(e,r){let i=!1;function n(...a){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: -https://www.w3ctech.com/topic/2226`));function i(...s){let a=r(...s);return a.postcssPlugin=e,a.postcssVersion=new vs().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(s,a,o){return U([i(o)]).process(s,a)},i};U.stringify=Ty;U.parse=Cy;U.fromJSON=xy;U.list=Oy;U.comment=t=>new oc(t);U.atRule=t=>new lc(t);U.decl=t=>new sc(t);U.rule=t=>new uc(t);U.root=t=>new cc(t);U.document=t=>new ac(t);U.CssSyntaxError=vy;U.Declaration=sc;U.Container=_y;U.Processor=vs;U.Document=ac;U.Comment=oc;U.Warning=Sy;U.AtRule=lc;U.Result=Ey;U.Input=Ay;U.Rule=uc;U.Root=cc;U.Node=Ny;wy.registerPostcss(U);fc.exports=U;U.default=U});var ws=v((WT,mc)=>{var Ly=Rl(),pc=Dl(),{isPlainObject:Iy}=kl(),dc=Fl(),Ry=Ul(),{parse:Py}=hc(),Dy=["img","audio","video","picture","svg","object","map","iframe","embed"],qy=["script","style"];function wr(t,e){t&&Object.keys(t).forEach(function(r){e(t[r],r)})}function je(t,e){return{}.hasOwnProperty.call(t,e)}function gc(t,e){let r=[];return wr(t,function(i){e(i)&&r.push(i)}),r}function ky(t){for(let e in t)if(je(t,e))return!1;return!0}function My(t){return t.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}mc.exports=_r;var jy=/^[^\0\t\n\f\r /<=>]+$/;function _r(t,e,r){if(t==null)return"";let i="",n="";function s(_,A){let x=this;this.tag=_,this.attribs=A||{},this.tagPosition=i.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(S.length){let R=S[S.length-1];R.text+=x.text}},this.updateParentNodeMediaChildren=function(){S.length&&Dy.includes(this.tag)&&S[S.length-1].mediaChildren.push(this.tag)}}e=Object.assign({},_r.defaults,e),e.parser=Object.assign({},By,e.parser),qy.forEach(function(_){e.allowedTags&&e.allowedTags.indexOf(_)>-1&&!e.allowVulnerableTags&&console.warn(` +https://www.w3ctech.com/topic/2226`));let o=r(...a);return o.postcssPlugin=e,o.postcssVersion=new Os().version,o}let s;return Object.defineProperty(n,"postcss",{get(){return s||(s=n()),s}}),n.process=function(a,o,u){return U([n(u)]).process(a,o)},n};U.stringify=zy;U.parse=Yy;U.fromJSON=Vy;U.list=Ky;U.comment=t=>new Tc(t);U.atRule=t=>new xc(t);U.decl=t=>new wc(t);U.rule=t=>new Sc(t);U.root=t=>new Ec(t);U.document=t=>new _c(t);U.CssSyntaxError=Uy;U.Declaration=wc;U.Container=Wy;U.Processor=Os;U.Document=_c;U.Comment=Tc;U.Warning=Gy;U.AtRule=xc;U.Result=Jy;U.Input=Xy;U.Rule=Sc;U.Root=Ec;U.Node=Qy;$y.registerPostcss(U);Ac.exports=U;U.default=U});var Ns=b((gx,Rc)=>{var Zy=Gl(),Oc=Xl(),{isPlainObject:eb}=Kl(),Nc=tu(),tb=iu(),{parse:rb}=Cc(),ib=["img","audio","video","picture","svg","object","map","iframe","embed"],nb=["script","style"];function Ar(t,e){t&&Object.keys(t).forEach(function(r){e(t[r],r)})}function Fe(t,e){return{}.hasOwnProperty.call(t,e)}function Lc(t,e){let r=[];return Ar(t,function(i){e(i)&&r.push(i)}),r}function sb(t){for(let e in t)if(Fe(t,e))return!1;return!0}function ab(t){return t.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}Rc.exports=Cr;var ob=/^[^\0\t\n\f\r /<=>]+$/;function Cr(t,e,r){if(t==null)return"";let i="",n="";function s(w,A){let S=this;this.tag=w,this.attribs=A||{},this.tagPosition=i.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(E.length){let I=E[E.length-1];I.text+=S.text}},this.updateParentNodeMediaChildren=function(){E.length&&ib.includes(this.tag)&&E[E.length-1].mediaChildren.push(this.tag)}}e=Object.assign({},Cr.defaults,e),e.parser=Object.assign({},lb,e.parser),nb.forEach(function(w){e.allowedTags&&e.allowedTags.indexOf(w)>-1&&!e.allowVulnerableTags&&console.warn(` -⚠️ Your \`allowedTags\` option includes, \`${_}\`, which is inherently +⚠️ Your \`allowedTags\` option includes, \`${w}\`, which is inherently vulnerable to XSS attacks. Please remove it from \`allowedTags\`. Or, to disable this warning, add the \`allowVulnerableTags\` option and ensure you are accounting for this risk. -`)});let a=e.nonTextTags||["script","style","textarea","option"],o,u;e.allowedAttributes&&(o={},u={},wr(e.allowedAttributes,function(_,A){o[A]=[];let x=[];_.forEach(function(R){typeof R=="string"&&R.indexOf("*")>=0?x.push(pc(R).replace(/\\\*/g,".*")):o[A].push(R)}),x.length&&(u[A]=new RegExp("^("+x.join("|")+")$"))}));let l={},c={},h={};wr(e.allowedClasses,function(_,A){o&&(je(o,A)||(o[A]=[]),o[A].push("class")),l[A]=[],h[A]=[];let x=[];_.forEach(function(R){typeof R=="string"&&R.indexOf("*")>=0?x.push(pc(R).replace(/\\\*/g,".*")):R instanceof RegExp?h[A].push(R):l[A].push(R)}),x.length&&(c[A]=new RegExp("^("+x.join("|")+")$"))});let p={},d;wr(e.transformTags,function(_,A){let x;typeof _=="function"?x=_:typeof _=="string"&&(x=_r.simpleTransform(_)),A==="*"?d=x:p[A]=x});let g,S,m,y,b,E,w=!1;C();let O=new Ly.Parser({onopentag:function(_,A){if(e.enforceHtmlBoundary&&_==="html"&&C(),b){E++;return}let x=new s(_,A);S.push(x);let R=!1,z=!!x.text,ee;if(je(p,_)&&(ee=p[_](_,A),x.attribs=A=ee.attribs,ee.text!==void 0&&(x.innerText=ee.text),_!==ee.tagName&&(x.name=_=ee.tagName,y[g]=ee.tagName)),d&&(ee=d(_,A),x.attribs=A=ee.attribs,_!==ee.tagName&&(x.name=_=ee.tagName,y[g]=ee.tagName)),(e.allowedTags&&e.allowedTags.indexOf(_)===-1||e.disallowedTagsMode==="recursiveEscape"&&!ky(m)||e.nestingLimit!=null&&g>=e.nestingLimit)&&(R=!0,m[g]=!0,e.disallowedTagsMode==="discard"&&a.indexOf(_)!==-1&&(b=!0,E=1),m[g]=!0),g++,R){if(e.disallowedTagsMode==="discard")return;n=i,i=""}i+="<"+_,_==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(x.innerText=""),(!o||je(o,_)||o["*"])&&wr(A,function(F,L){if(!jy.test(L)){delete x.attribs[L];return}let Q,Se=!1;if(!o||je(o,_)&&o[_].indexOf(L)!==-1||o["*"]&&o["*"].indexOf(L)!==-1||je(u,_)&&u[_].test(L)||u["*"]&&u["*"].test(L))Se=!0;else if(o&&o[_]){for(let N of o[_])if(Iy(N)&&N.name&&N.name===L){Se=!0;let f="";if(N.multiple===!0){let Y=F.split(" ");for(let T of Y)N.values.indexOf(T)!==-1&&(f===""?f=T:f+=" "+T)}else N.values.indexOf(F)>=0&&(f=F);F=f}}if(Se){if(e.allowedSchemesAppliedToAttributes.indexOf(L)!==-1&&j(_,F)){delete x.attribs[L];return}if(_==="script"&&L==="src"){let N=!0;try{let f=new URL(F);if(e.allowedScriptHostnames||e.allowedScriptDomains){let Y=(e.allowedScriptHostnames||[]).find(function(X){return X===f.hostname}),T=(e.allowedScriptDomains||[]).find(function(X){return f.hostname===X||f.hostname.endsWith(`.${X}`)});N=Y||T}}catch{N=!1}if(!N){delete x.attribs[L];return}}if(_==="iframe"&&L==="src"){let N=!0;try{if(F=F.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),F.startsWith("relative:"))throw new Error("relative: exploit attempt");let f="relative://relative-site";for(let X=0;X<100;X++)f+=`/${X}`;let Y=new URL(F,f);if(Y&&Y.hostname==="relative-site"&&Y.protocol==="relative:")N=je(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){let X=(e.allowedIframeHostnames||[]).find(function(He){return He===Y.hostname}),_e=(e.allowedIframeDomains||[]).find(function(He){return Y.hostname===He||Y.hostname.endsWith(`.${He}`)});N=X||_e}}catch{N=!1}if(!N){delete x.attribs[L];return}}if(L==="srcset")try{if(Q=Ry(F),Q.forEach(function(N){j("srcset",N.url)&&(N.evil=!0)}),Q=gc(Q,function(N){return!N.evil}),Q.length)F=My(gc(Q,function(N){return!N.evil})),x.attribs[L]=F;else{delete x.attribs[L];return}}catch{delete x.attribs[L];return}if(L==="class"){let N=l[_],f=l["*"],Y=c[_],T=h[_],X=c["*"],_e=[Y,X].concat(T).filter(function(He){return He});if(N&&f?F=re(F,dc(N,f),_e):F=re(F,N||f,_e),!F.length){delete x.attribs[L];return}}if(L==="style")try{let N=Py(_+" {"+F+"}"),f=H(N,e.allowedStyles);if(F=te(f),F.length===0){delete x.attribs[L];return}}catch{delete x.attribs[L];return}i+=" "+L,F&&F.length&&(i+='="'+D(F,!0)+'"')}else delete x.attribs[L]}),e.selfClosing.indexOf(_)!==-1?i+=" />":(i+=">",x.innerText&&!z&&!e.textFilter&&(i+=D(x.innerText),w=!0)),R&&(i=n+D(i),n="")},ontext:function(_){if(b)return;let A=S[S.length-1],x;if(A&&(x=A.tag,_=A.innerText!==void 0?A.innerText:_),e.disallowedTagsMode==="discard"&&(x==="script"||x==="style"))i+=_;else{let R=D(_,!1);e.textFilter&&!w?i+=e.textFilter(R,x):w||(i+=R)}if(S.length){let R=S[S.length-1];R.text+=_}},onclosetag:function(_){if(b)if(E--,!E)b=!1;else return;let A=S.pop();if(!A)return;b=e.enforceHtmlBoundary?_==="html":!1,g--;let x=m[g];if(x){if(delete m[g],e.disallowedTagsMode==="discard"){A.updateParentNodeText();return}n=i,i=""}if(y[g]&&(_=y[g],delete y[g]),e.exclusiveFilter&&e.exclusiveFilter(A)){i=i.substr(0,A.tagPosition);return}if(A.updateParentNodeMediaChildren(),A.updateParentNodeText(),e.selfClosing.indexOf(_)!==-1){x&&(i=n,n="");return}i+="",x&&(i=n+D(i),n=""),w=!1}},e.parser);return O.write(t),O.end(),i;function C(){i="",g=0,S=[],m={},y={},b=!1,E=0}function D(_,A){return typeof _!="string"&&(_=_+""),e.parser.decodeEntities&&(_=_.replace(/&/g,"&").replace(//g,">"),A&&(_=_.replace(/"/g,"""))),_=_.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),A&&(_=_.replace(/"/g,""")),_}function j(_,A){A=A.replace(/[\x00-\x20]+/g,""),A=A.replace(//g,"");let x=A.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!x)return A.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;let R=x[1].toLowerCase();return je(e.allowedSchemesByTag,_)?e.allowedSchemesByTag[_].indexOf(R)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(R)===-1}function H(_,A){if(!A)return _;let x=_.nodes[0],R;return A[x.selector]&&A["*"]?R=dc(A[x.selector],A["*"]):R=A[x.selector]||A["*"],R&&(_.nodes[0].nodes=x.nodes.reduce(se(R),[])),_}function te(_){return _.nodes[0].nodes.reduce(function(A,x){return A.push(`${x.prop}:${x.value}${x.important?" !important":""}`),A},[]).join(";")}function se(_){return function(A,x){return je(_,x.prop)&&_[x.prop].some(function(z){return z.test(x.value)})&&A.push(x),A}}function re(_,A,x){return A?(_=_.split(/\s+/),_.filter(function(R){return A.indexOf(R)!==-1||x.some(function(z){return z.test(R)})}).join(" ")):_}}var By={decodeEntities:!0};_r.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1};_r.simpleTransform=function(t,e,r){return r=r===void 0?!0:r,e=e||{},function(i,n){let s;if(r)for(s in e)n[s]=e[s];else n=e;return{tagName:t,attribs:n}}}});var Yc=v((Ox,Xc)=>{var Rb="[object Object]";function Pb(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function Db(t,e){return function(r){return t(e(r))}}var qb=Function.prototype,Vc=Object.prototype,Jc=qb.toString,kb=Vc.hasOwnProperty,Mb=Jc.call(Object),jb=Vc.toString,Bb=Db(Object.getPrototypeOf,Object);function Fb(t){return!!t&&typeof t=="object"}function Hb(t){if(!Fb(t)||jb.call(t)!=Rb||Pb(t))return!1;var e=Bb(t);if(e===null)return!0;var r=kb.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Jc.call(r)==Mb}Xc.exports=Hb});var Bf=v((Ar,Ft)=>{var Ub=200,uf="__lodash_hash_undefined__",cf=9007199254740991,Ms="[object Arguments]",$b="[object Array]",ff="[object Boolean]",hf="[object Date]",Wb="[object Error]",js="[object Function]",pf="[object GeneratorFunction]",qi="[object Map]",df="[object Number]",Bs="[object Object]",Kc="[object Promise]",gf="[object RegExp]",ki="[object Set]",mf="[object String]",yf="[object Symbol]",Is="[object WeakMap]",bf="[object ArrayBuffer]",Mi="[object DataView]",vf="[object Float32Array]",wf="[object Float64Array]",_f="[object Int8Array]",Tf="[object Int16Array]",xf="[object Int32Array]",Sf="[object Uint8Array]",Ef="[object Uint8ClampedArray]",Af="[object Uint16Array]",Cf="[object Uint32Array]",zb=/[\\^$.*+?()[\]{}|]/g,Gb=/\w*$/,Vb=/^\[object .+?Constructor\]$/,Jb=/^(?:0|[1-9]\d*)$/,W={};W[Ms]=W[$b]=W[bf]=W[Mi]=W[ff]=W[hf]=W[vf]=W[wf]=W[_f]=W[Tf]=W[xf]=W[qi]=W[df]=W[Bs]=W[gf]=W[ki]=W[mf]=W[yf]=W[Sf]=W[Ef]=W[Af]=W[Cf]=!0;W[Wb]=W[js]=W[Is]=!1;var Xb=typeof global=="object"&&global&&global.Object===Object&&global,Yb=typeof self=="object"&&self&&self.Object===Object&&self,Be=Xb||Yb||Function("return this")(),Of=typeof Ar=="object"&&Ar&&!Ar.nodeType&&Ar,Qc=Of&&typeof Ft=="object"&&Ft&&!Ft.nodeType&&Ft,Kb=Qc&&Qc.exports===Of;function Qb(t,e){return t.set(e[0],e[1]),t}function Zb(t,e){return t.add(e),t}function ev(t,e){for(var r=-1,i=t?t.length:0;++r-1}function Cv(t,e){var r=this.__data__,i=Fi(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}Fe.prototype.clear=xv;Fe.prototype.delete=Sv;Fe.prototype.get=Ev;Fe.prototype.has=Av;Fe.prototype.set=Cv;function Ht(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=cf}function Ui(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hw(t){return!!t&&typeof t=="object"}function $s(t){return Mf(t)?jv(t):Wv(t)}function pw(){return[]}function dw(){return!1}Ft.exports=ow});var zf=v(($x,Ws)=>{function Wf(t,e){if(e&&e.documentElement)t=e,e=arguments[2];else if(!t||!t.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(e=e||{},this._doc=t,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!e.debug,this._maxElemsToParse=e.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=e.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=e.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(e.classesToPreserve||[]),this._keepClasses=!!e.keepClasses,this._serializer=e.serializer||function(r){return r.innerHTML},this._disableJSONLD=!!e.disableJSONLD,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let r=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let n=Array.from(i.attributes||[],function(s){return`${s.name}="${s.value}"`}).join(" ");return`<${i.localName} ${n}>`};this.log=function(){if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(n){return n&&n.nodeName?r(n):n}).join(" ");dump("Reader: (Readability) "+i+` -`)}else if(typeof console<"u"){let n=Array.from(arguments,s=>s&&s.nodeType==this.ELEMENT_NODE?r(s):s);n.unshift("Reader: (Readability)"),console.log.apply(console,n)}}}else this.log=function(){}}Wf.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(t){this._fixRelativeUris(t),this._simplifyNestedElements(t),this._keepClasses||this._cleanClasses(t)},_removeNodes:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var r=t.length-1;r>=0;r--){var i=t[r],n=i.parentNode;n&&(!e||e.call(this,i,r,t))&&n.removeChild(i)}},_replaceNodeTags:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let r of t)this._setNodeTag(r,e)},_forEachNode:function(t,e){Array.prototype.forEach.call(t,e,this)},_findNode:function(t,e){return Array.prototype.find.call(t,e,this)},_someNode:function(t,e){return Array.prototype.some.call(t,e,this)},_everyNode:function(t,e){return Array.prototype.every.call(t,e,this)},_concatNodeLists:function(){var t=Array.prototype.slice,e=t.call(arguments),r=e.map(function(i){return t.call(i)});return Array.prototype.concat.apply([],r)},_getAllNodesWithTag:function(t,e){return t.querySelectorAll?t.querySelectorAll(e.join(",")):[].concat.apply([],e.map(function(r){var i=t.getElementsByTagName(r);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(t){var e=this._classesToPreserve,r=(t.getAttribute("class")||"").split(/\s+/).filter(function(i){return e.indexOf(i)!=-1}).join(" ");for(r?t.setAttribute("class",r):t.removeAttribute("class"),t=t.firstElementChild;t;t=t.nextElementSibling)this._cleanClasses(t)},_fixRelativeUris:function(t){var e=this._doc.baseURI,r=this._doc.documentURI;function i(a){if(e==r&&a.charAt(0)=="#")return a;try{return new URL(a,e).href}catch{}return a}var n=this._getAllNodesWithTag(t,["a"]);this._forEachNode(n,function(a){var o=a.getAttribute("href");if(o)if(o.indexOf("javascript:")===0)if(a.childNodes.length===1&&a.childNodes[0].nodeType===this.TEXT_NODE){var u=this._doc.createTextNode(a.textContent);a.parentNode.replaceChild(u,a)}else{for(var l=this._doc.createElement("span");a.firstChild;)l.appendChild(a.firstChild);a.parentNode.replaceChild(l,a)}else a.setAttribute("href",i(o))});var s=this._getAllNodesWithTag(t,["img","picture","figure","video","audio","source"]);this._forEachNode(s,function(a){var o=a.getAttribute("src"),u=a.getAttribute("poster"),l=a.getAttribute("srcset");if(o&&a.setAttribute("src",i(o)),u&&a.setAttribute("poster",i(u)),l){var c=l.replace(this.REGEXPS.srcsetUrl,function(h,p,d,g){return i(p)+(d||"")+g});a.setAttribute("srcset",c)}})},_simplifyNestedElements:function(t){for(var e=t;e;){if(e.parentNode&&["DIV","SECTION"].includes(e.tagName)&&!(e.id&&e.id.startsWith("readability"))){if(this._isElementWithoutContent(e)){e=this._removeAndGetNext(e);continue}else if(this._hasSingleTagInsideElement(e,"DIV")||this._hasSingleTagInsideElement(e,"SECTION")){for(var r=e.children[0],i=0;i»] /.test(e))i=/ [\\\/>»] /.test(e),e=r.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),n(e)<3&&(e=r.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(e.indexOf(": ")!==-1){var s=this._concatNodeLists(t.getElementsByTagName("h1"),t.getElementsByTagName("h2")),a=e.trim(),o=this._someNode(s,function(c){return c.textContent.trim()===a});o||(e=r.substring(r.lastIndexOf(":")+1),n(e)<3?e=r.substring(r.indexOf(":")+1):n(r.substr(0,r.indexOf(":")))>5&&(e=r))}else if(e.length>150||e.length<15){var u=t.getElementsByTagName("h1");u.length===1&&(e=this._getInnerText(u[0]))}e=e.trim().replace(this.REGEXPS.normalize," ");var l=n(e);return l<=4&&(!i||l!=n(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(e=r),e},_prepDocument:function(){var t=this._doc;this._removeNodes(this._getAllNodesWithTag(t,["style"])),t.body&&this._replaceBrs(t.body),this._replaceNodeTags(this._getAllNodesWithTag(t,["font"]),"SPAN")},_nextNode:function(t){for(var e=t;e&&e.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(e.textContent);)e=e.nextSibling;return e},_replaceBrs:function(t){this._forEachNode(this._getAllNodesWithTag(t,["br"]),function(e){for(var r=e.nextSibling,i=!1;(r=this._nextNode(r))&&r.tagName=="BR";){i=!0;var n=r.nextSibling;r.parentNode.removeChild(r),r=n}if(i){var s=this._doc.createElement("p");for(e.parentNode.replaceChild(s,e),r=s.nextSibling;r;){if(r.tagName=="BR"){var a=this._nextNode(r.nextSibling);if(a&&a.tagName=="BR")break}if(!this._isPhrasingContent(r))break;var o=r.nextSibling;s.appendChild(r),r=o}for(;s.lastChild&&this._isWhitespace(s.lastChild);)s.removeChild(s.lastChild);s.parentNode.tagName==="P"&&this._setNodeTag(s.parentNode,"DIV")}})},_setNodeTag:function(t,e){if(this.log("_setNodeTag",t,e),this._docJSDOMParser)return t.localName=e.toLowerCase(),t.tagName=e.toUpperCase(),t;for(var r=t.ownerDocument.createElement(e);t.firstChild;)r.appendChild(t.firstChild);t.parentNode.replaceChild(r,t),t.readability&&(r.readability=t.readability);for(var i=0;i!r.includes(a)),s=n.join(" ").length/i.join(" ").length;return 1-s},_checkByline:function(t,e){if(this._articleByline)return!1;if(t.getAttribute!==void 0)var r=t.getAttribute("rel"),i=t.getAttribute("itemprop");return(r==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(e))&&this._isValidByline(t.textContent)?(this._articleByline=t.textContent.trim(),!0):!1},_getNodeAncestors:function(t,e){e=e||0;for(var r=0,i=[];t.parentNode&&(i.push(t.parentNode),!(e&&++r===e));)t=t.parentNode;return i},_grabArticle:function(t){this.log("**** grabArticle ****");var e=this._doc,r=t!==null;if(t=t||this._doc.body,!t)return this.log("No body found in document. Abort."),null;for(var i=t.innerHTML;;){this.log("Starting grabArticle loop");var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),s=[],a=this._doc.documentElement;let Js=!0;for(;a;){a.tagName==="HTML"&&(this._articleLang=a.getAttribute("lang"));var o=a.className+" "+a.id;if(!this._isProbablyVisible(a)){this.log("Removing hidden node - "+o),a=this._removeAndGetNext(a);continue}if(this._checkByline(a,o)){a=this._removeAndGetNext(a);continue}if(Js&&this._headerDuplicatesTitle(a)){this.log("Removing header: ",a.textContent.trim(),this._articleTitle.trim()),Js=!1,a=this._removeAndGetNext(a);continue}if(n){if(this.REGEXPS.unlikelyCandidates.test(o)&&!this.REGEXPS.okMaybeItsACandidate.test(o)&&!this._hasAncestorTag(a,"table")&&!this._hasAncestorTag(a,"code")&&a.tagName!=="BODY"&&a.tagName!=="A"){this.log("Removing unlikely candidate - "+o),a=this._removeAndGetNext(a);continue}if(this.UNLIKELY_ROLES.includes(a.getAttribute("role"))){this.log("Removing content with role "+a.getAttribute("role")+" - "+o),a=this._removeAndGetNext(a);continue}}if((a.tagName==="DIV"||a.tagName==="SECTION"||a.tagName==="HEADER"||a.tagName==="H1"||a.tagName==="H2"||a.tagName==="H3"||a.tagName==="H4"||a.tagName==="H5"||a.tagName==="H6")&&this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(a.tagName)!==-1&&s.push(a),a.tagName==="DIV"){for(var u=null,l=a.firstChild;l;){var c=l.nextSibling;if(this._isPhrasingContent(l))u!==null?u.appendChild(l):this._isWhitespace(l)||(u=e.createElement("p"),a.replaceChild(u,l),u.appendChild(l));else if(u!==null){for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u=null}l=c}if(this._hasSingleTagInsideElement(a,"P")&&this._getLinkDensity(a)<.25){var h=a.children[0];a.parentNode.replaceChild(h,a),a=h,s.push(a)}else this._hasChildBlockElement(a)||(a=this._setNodeTag(a,"P"),s.push(a))}a=this._getNextNode(a)}var p=[];this._forEachNode(s,function(qe){if(!(!qe.parentNode||typeof qe.parentNode.tagName>"u")){var Ue=this._getInnerText(qe);if(!(Ue.length<25)){var Xs=this._getNodeAncestors(qe,5);if(Xs.length!==0){var Nr=0;Nr+=1,Nr+=Ue.split(",").length,Nr+=Math.min(Math.floor(Ue.length/100),3),this._forEachNode(Xs,function(Ze,Wi){if(!(!Ze.tagName||!Ze.parentNode||typeof Ze.parentNode.tagName>"u")){if(typeof Ze.readability>"u"&&(this._initializeNode(Ze),p.push(Ze)),Wi===0)var zi=1;else Wi===1?zi=2:zi=Wi*3;Ze.readability.contentScore+=Nr/zi}})}}}});for(var d=[],g=0,S=p.length;gE.readability.contentScore){d.splice(b,0,m),d.length>this._nbTopCandidates&&d.pop();break}}}var w=d[0]||null,O=!1,C;if(w===null||w.tagName==="BODY"){for(w=e.createElement("DIV"),O=!0;t.firstChild;)this.log("Moving child out:",t.firstChild),w.appendChild(t.firstChild);t.appendChild(w),this._initializeNode(w)}else if(w){for(var D=[],j=1;j=.75&&D.push(this._getNodeAncestors(d[j]));var H=3;if(D.length>=H)for(C=w.parentNode;C.tagName!=="BODY";){for(var te=0,se=0;se=H){w=C;break}C=C.parentNode}w.readability||this._initializeNode(w),C=w.parentNode;for(var re=w.readability.contentScore,_=re/3;C.tagName!=="BODY";){if(!C.readability){C=C.parentNode;continue}var A=C.readability.contentScore;if(A<_)break;if(A>re){w=C;break}re=C.readability.contentScore,C=C.parentNode}for(C=w.parentNode;C.tagName!="BODY"&&C.children.length==1;)w=C,C=w.parentNode;w.readability||this._initializeNode(w)}var x=e.createElement("DIV");r&&(x.id="readability-content");var R=Math.max(10,w.readability.contentScore*.2);C=w.parentNode;for(var z=C.children,ee=0,F=z.length;ee=R)Q=!0;else if(L.nodeName==="P"){var N=this._getLinkDensity(L),f=this._getInnerText(L),Y=f.length;(Y>80&&N<.25||Y<80&&Y>0&&N===0&&f.search(/\.( |$)/)!==-1)&&(Q=!0)}}Q&&(this.log("Appending node:",L),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(L.nodeName)===-1&&(this.log("Altering sibling:",L,"to div."),L=this._setNodeTag(L,"DIV")),x.appendChild(L),z=C.children,ee-=1,F-=1)}if(this._debug&&this.log("Article content pre-prep: "+x.innerHTML),this._prepArticle(x),this._debug&&this.log("Article content post-prep: "+x.innerHTML),O)w.id="readability-page-1",w.className="page";else{var T=e.createElement("DIV");for(T.id="readability-page-1",T.className="page";x.firstChild;)T.appendChild(x.firstChild);x.appendChild(T)}this._debug&&this.log("Article content after paging: "+x.innerHTML);var X=!0,_e=this._getInnerText(x,!0).length;if(_e0&&t.length<100):!1},_unescapeHtmlEntities:function(t){if(!t)return t;var e=this.HTML_ESCAPE_MAP;return t.replace(/&(quot|amp|apos|lt|gt);/g,function(r,i){return e[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(r,i,n){var s=parseInt(i||n,i?16:10);return String.fromCharCode(s)})},_getJSONLD:function(t){var e=this._getAllNodesWithTag(t,["script"]),r;return this._forEachNode(e,function(i){if(!r&&i.getAttribute("type")==="application/ld+json")try{var n=i.textContent.replace(/^\s*\s*$/g,""),s=JSON.parse(n);if(!s["@context"]||!s["@context"].match(/^https?\:\/\/schema\.org$/)||(!s["@type"]&&Array.isArray(s["@graph"])&&(s=s["@graph"].find(function(l){return(l["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!s||!s["@type"]||!s["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(r={},typeof s.name=="string"&&typeof s.headline=="string"&&s.name!==s.headline){var a=this._getArticleTitle(),o=this._textSimilarity(s.name,a)>.75,u=this._textSimilarity(s.headline,a)>.75;u&&!o?r.title=s.headline:r.title=s.name}else typeof s.name=="string"?r.title=s.name.trim():typeof s.headline=="string"&&(r.title=s.headline.trim());s.author&&(typeof s.author.name=="string"?r.byline=s.author.name.trim():Array.isArray(s.author)&&s.author[0]&&typeof s.author[0].name=="string"&&(r.byline=s.author.filter(function(l){return l&&typeof l.name=="string"}).map(function(l){return l.name.trim()}).join(", "))),typeof s.description=="string"&&(r.excerpt=s.description.trim()),s.publisher&&typeof s.publisher.name=="string"&&(r.siteName=s.publisher.name.trim());return}catch(l){this.log(l.message)}}),r||{}},_getArticleMetadata:function(t){var e={},r={},i=this._doc.getElementsByTagName("meta"),n=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,s=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(a){var o=a.getAttribute("name"),u=a.getAttribute("property"),l=a.getAttribute("content");if(!!l){var c=null,h=null;u&&(c=u.match(n),c&&(h=c[0].toLowerCase().replace(/\s/g,""),r[h]=l.trim())),!c&&o&&s.test(o)&&(h=o,l&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),r[h]=l.trim()))}}),e.title=t.title||r["dc:title"]||r["dcterm:title"]||r["og:title"]||r["weibo:article:title"]||r["weibo:webpage:title"]||r.title||r["twitter:title"],e.title||(e.title=this._getArticleTitle()),e.byline=t.byline||r["dc:creator"]||r["dcterm:creator"]||r.author,e.excerpt=t.excerpt||r["dc:description"]||r["dcterm:description"]||r["og:description"]||r["weibo:article:description"]||r["weibo:webpage:description"]||r.description||r["twitter:description"],e.siteName=t.siteName||r["og:site_name"],e.title=this._unescapeHtmlEntities(e.title),e.byline=this._unescapeHtmlEntities(e.byline),e.excerpt=this._unescapeHtmlEntities(e.excerpt),e.siteName=this._unescapeHtmlEntities(e.siteName),e},_isSingleImage:function(t){return t.tagName==="IMG"?!0:t.children.length!==1||t.textContent.trim()!==""?!1:this._isSingleImage(t.children[0])},_unwrapNoscriptImages:function(t){var e=Array.from(t.getElementsByTagName("img"));this._forEachNode(e,function(i){for(var n=0;n"u"?!0:e;var r=t.textContent.trim();return e?r.replace(this.REGEXPS.normalize," "):r},_getCharCount:function(t,e){return e=e||",",this._getInnerText(t).split(e).length-1},_cleanStyles:function(t){if(!(!t||t.tagName.toLowerCase()==="svg")){for(var e=0;e0&&n>r)return!1;if(t.parentNode.tagName===e&&(!i||i(t.parentNode)))return!0;t=t.parentNode,n++}return!1},_getRowAndColumnCount:function(t){for(var e=0,r=0,i=t.getElementsByTagName("tr"),n=0;n0){i._readabilityDataTable=!0;continue}var u=["col","colgroup","tfoot","thead","th"],l=function(h){return!!i.getElementsByTagName(h)[0]};if(u.some(l)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var c=this._getRowAndColumnCount(i);if(c.rows>=10||c.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=c.rows*c.columns>10}},_fixLazyImages:function(t){this._forEachNode(this._getAllNodesWithTag(t,["img","picture","figure"]),function(e){if(e.src&&this.REGEXPS.b64DataUrl.test(e.src)){var r=this.REGEXPS.b64DataUrl.exec(e.src);if(r[1]==="image/svg+xml")return;for(var i=!1,n=0;ni+=this._getInnerText(s,!0).length),i/r},_cleanConditionally:function(t,e){!this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)||this._removeNodes(this._getAllNodesWithTag(t,[e]),function(r){var i=function(O){return O._readabilityDataTable},n=e==="ul"||e==="ol";if(!n){var s=0,a=this._getAllNodesWithTag(r,["ul","ol"]);this._forEachNode(a,O=>s+=this._getInnerText(O).length),n=s/this._getInnerText(r).length>.9}if(e==="table"&&i(r)||this._hasAncestorTag(r,"table",-1,i)||this._hasAncestorTag(r,"code"))return!1;var o=this._getClassWeight(r);this.log("Cleaning Conditionally",r);var u=0;if(o+u<0)return!0;if(this._getCharCount(r,",")<10){for(var l=r.getElementsByTagName("p").length,c=r.getElementsByTagName("img").length,h=r.getElementsByTagName("li").length-100,p=r.getElementsByTagName("input").length,d=this._getTextDensity(r,["h1","h2","h3","h4","h5","h6"]),g=0,S=this._getAllNodesWithTag(r,["object","embed","iframe"]),m=0;m1&&l/c<.5&&!this._hasAncestorTag(r,"figure")||!n&&h>l||p>Math.floor(l/3)||!n&&d<.9&&E<25&&(c===0||c>2)&&!this._hasAncestorTag(r,"figure")||!n&&o<25&&b>.2||o>=25&&b>.5||g===1&&E<75||g>1;return w}return!1})},_cleanMatchedNodes:function(t,e){for(var r=this._getNextNode(t,!0),i=this._getNextNode(t);i&&i!=r;)e.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(t){let e=this._getAllNodesWithTag(t,["h1","h2"]);this._removeNodes(e,function(r){let i=this._getClassWeight(r)<0;return i&&this.log("Removing header with low class weight:",r),i})},_headerDuplicatesTitle:function(t){if(t.tagName!="H1"&&t.tagName!="H2")return!1;var e=this._getInnerText(t,!1);return this.log("Evaluating similarity of header:",e,this._articleTitle),this._textSimilarity(this._articleTitle,e)>.75},_flagIsActive:function(t){return(this._flags&t)>0},_removeFlag:function(t){this._flags=this._flags&~t},_isProbablyVisible:function(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var t=this._doc.getElementsByTagName("*").length;if(t>this._maxElemsToParse)throw new Error("Aborting parsing document; "+t+" elements found")}this._unwrapNoscriptImages(this._doc);var e=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var r=this._getArticleMetadata(e);this._articleTitle=r.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!r.excerpt){var n=i.getElementsByTagName("p");n.length>0&&(r.excerpt=n[0].textContent.trim())}var s=i.textContent;return{title:this._articleTitle,byline:r.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:s,length:s.length,excerpt:r.excerpt,siteName:r.siteName||this._articleSiteName}}};typeof Ws=="object"&&(Ws.exports=Wf)});var Vf=v((Wx,zs)=>{var Gf={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function ww(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)}function _w(t,e={}){typeof e=="function"&&(e={visibilityChecker:e});var r={minScore:20,minContentLength:140,visibilityChecker:ww};e=Object.assign(r,e);var i=t.querySelectorAll("p, pre, article"),n=t.querySelectorAll("div > br");if(n.length){var s=new Set(i);[].forEach.call(n,function(o){s.add(o.parentNode)}),i=Array.from(s)}var a=0;return[].some.call(i,function(o){if(!e.visibilityChecker(o))return!1;var u=o.className+" "+o.id;if(Gf.unlikelyCandidates.test(u)&&!Gf.okMaybeItsACandidate.test(u)||o.matches("li p"))return!1;var l=o.textContent.trim().length;return le.minScore)})}typeof zs=="object"&&(zs.exports=_w)});var Xf=v((zx,Jf)=>{var Tw=zf(),xw=Vf();Jf.exports={Readability:Tw,isProbablyReaderable:xw}});var hh=t=>({}).toString.call(t);var Oe=t=>Array.isArray(t),yt=t=>String(t)===t,Yi=t=>Number(t)===t;var Rr=t=>hh(t)==="[object Object]"&&!Oe(t),ph=t=>t instanceof Date&&!isNaN(t.valueOf());var Qi=(t,e)=>!t||!e?!1:Object.prototype.hasOwnProperty.call(t,e);var Lw=Number.MAX_SAFE_INTEGER;var Pr=t=>{let e=Yi(t)?String(t):t;if(!yt(e))throw new Error("InvalidInput: String required.");return e},Ks=(t,e)=>{let r=Pr(t),i=e||140;if(r.length<=i)return r;let n=r.substring(0,i),s=n.split(" "),a=s.length,o="";return a>1?(s.pop(),o+=s.join(" "),o.lengthPr(t).replace(/<.*?>/gi," ").replace(/\s\s+/g," ").trim();var Ki=(t,e,r)=>{let i=Pr(t);if(Yi(e)&&(e=String(e)),Yi(r)&&(r=String(r)),yt(e)&&yt(r))i=i.split(e).join(r);else if(Oe(e)&&yt(r))e.forEach(n=>{i=Ki(i,n,r)});else if(Oe(e)&&Oe(r)&&e.length===r.length){let n=e.length;if(n>0)for(let s=0;s{let e=Pr(t),r={a:"á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ|ä",A:"Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ|Ä",c:"ç",C:"Ç",d:"đ",D:"Đ",e:"é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ|ë",E:"É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ|Ë",i:"í|ì|ỉ|ĩ|ị|ï|î",I:"Í|Ì|Ỉ|Ĩ|Ị|Ï|Î",o:"ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ|ö",O:"Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ô|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ|Ö",u:"ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự|û",U:"Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự|Û",y:"ý|ỳ|ỷ|ỹ|ỵ",Y:"Ý|Ỳ|Ỷ|Ỹ|Ỵ"},i=(n,s)=>{e=Ki(e,n,s)};for(let n in r)Qi(r,n)&&r[n].split("|").forEach(s=>i(s,n));return e};var Qs=(t,e="-")=>dh(t).trim().toLowerCase().replace(/\W+/g," ").replace(/\s+/g," ").replace(/\s/g,e);var Ee=(t,e=null)=>{let r=e||new Set;if(r.has(t))return t;if(r.add(t),ph(t))return new Date(t.valueOf());let i=s=>{let a=Object.create({});for(let o in s)Qi(s,o)&&(a[o]=Ee(s[o],r));return a},n=s=>[...s].map(a=>Oe(a)?n(a):Rr(a)?i(a):Ee(a,r));return Oe(t)?n(t):Rr(t)?i(t):t},qr=(t,e,r=!1,i=[])=>{for(let n in t)if(!(i.length>0&&i.includes(n))&&(!r||r&&Qi(e,n))){let s=t[n],a=e[n];Rr(a)&&Rr(s)||Oe(a)&&Oe(s)?e[n]=qr(s,e[n],r,i):e[n]=Ee(s)}return e},Zs=(t=[])=>[...new Set(t)];var kr=(t="")=>{try{let e=new URL(t);return e!==null&&e.protocol.startsWith("http")}catch{return!1}};var Vt=(t="")=>/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(t);var To=tt(oo(),1);var it=tt(ho(),1),St="article-parser",h_=(0,it.default)(`${St}:info`),p_=(0,it.default)(`${St}:error`),d_=(0,it.default)(`${St}:warning`),oe={info:(0,it.default)(`${St}:info`),error:(0,it.default)(`${St}:error`),warning:(0,it.default)(`${St}:warning`)};var po=[{patterns:["*://thanhnien.vn/*"],unwanted:[".morenews",".zone--media",".zone--timeline"]},{patterns:["*://zingnews.vn/*"],unwanted:[".the-article-category",".the-article-meta",".the-article-tags"]},{patterns:["*://{*.}?vnexpress.net/*"],unwanted:[".header-content"]},{patterns:["*://{*.}?vietnamnet.vn/*","*://{*.}?vnn.vn/*"],selector:"#ArticleContent",unwanted:[".inner-article",".article-relate"]},{patterns:["*://thehill.com/*"],unwanted:[".rollover-people-block"]},{patterns:["*://{*.}?digitaltrends.com/*"],unwanted:[".h-editors-recs-title","ul.h-editors-recs"]},{patterns:["*://{*.}?techradar.com/*"],unwanted:["nav.breadcrumb"]}];var _n=Ee(po),go={headers:{"user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0",accept:"text/html; charset=utf-8"},responseType:"text",responseEncoding:"utf8",timeout:6e4,maxRedirects:3},mo={allowedTags:["h1","h2","h3","h4","h5","u","b","i","em","strong","small","sup","sub","div","span","p","article","blockquote","section","details","summary","pre","code","ul","ol","li","dd","dl","table","th","tr","td","thead","tbody","tfood","fieldset","legend","figure","figcaption","img","picture","video","audio","source","iframe","progress","br","p","hr","label","abbr","a","svg"],allowedAttributes:{a:["href","target","title"],abbr:["title"],progress:["value","max"],img:["src","srcset","alt","width","height","style","title"],picture:["media","srcset"],video:["controls","width","height","autoplay","muted"],audio:["controls"],source:["src","srcset","data-srcset","type","media","sizes"],iframe:["src","frameborder","height","width","scrolling"],svg:["width","height"]},allowedIframeDomains:["youtube.com","vimeo.com"]},wn={wordsPerMinute:300,urlsCompareAlgorithm:"levenshtein",descriptionLengthThreshold:40,descriptionTruncateLen:156,contentLengthThreshold:200},yo={removeHTMLComments:2,removeLineBreaks:!0},Et=()=>Ee(wn),bo=()=>Ee(go),vo=()=>Ee(yo),wo=()=>Ee(mo),v_=t=>{Object.keys(wn).forEach(e=>{e in t&&(wn[e]=t[e])})},w_=t=>{qr(t,go)},__=t=>{qr(t,yo)},T_=t=>{Object.keys(t).forEach(e=>{mo[e]=Ee(t[e])})},_o=()=>Ee(_n),x_=t=>{_n=t},S_=(...t)=>_n.unshift(...t.filter(e=>Oe(e==null?void 0:e.patterns)));var xo=async t=>{try{let e=await To.default.get(t,bo()),r=e.headers["content-type"]||"";return!r||!r.includes("text/html")?(oe.error(`Content type must be "text/html", not "${r}"`),null):e.data}catch(e){return oe.error(e.message||e),null}};var ih=tt(ws(),1);var Fy=["CNDID","__twitter_impression","_hsenc","_openstat","action_object_map","action_ref_map","action_type_map","amp","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","ga_campaign","ga_content","ga_medium","ga_place","ga_source","ga_term","gs_l","hmb_campaign","hmb_medium","hmb_source","mbid","mc_cid","mc_eid","mkt_tok","referrer","spJobID","spMailingID","spReportId","spUserID","utm_brand","utm_campaign","utm_cid","utm_content","utm_int","utm_mailing","utm_medium","utm_name","utm_place","utm_pubreferrer","utm_reader","utm_social","utm_source","utm_swu","utm_term","utm_userid","utm_viz_id","wt_mc_o","yclid","WT.mc_id","WT.mc_ev","WT.srch","pk_source","pk_medium","pk_campaign"],yc=t=>{try{let e=new URL(t);return Fy.forEach(r=>{e.searchParams.delete(r)}),e.toString().replace(e.hash,"")}catch(e){return oe.error(e),null}};var Tr=(t="",e="")=>{try{return new URL(e,t).toString()}catch(r){return oe.error(r),""}};var xs={};ch(xs,{cosine:()=>Wy,diceCoefficient:()=>zy,jaccardIndex:()=>Gy,lcs:()=>Jy,levenshtein:()=>Vy,mlcs:()=>Xy});var I=class{sortMatch(t,e){return I.checkThanosType(t),I.checkAvengersType(e),e.map((r,i)=>({member:r,index:i,rating:this.similarity(t,r)})).sort((r,i)=>r.rating-i.rating)}static checkThanosType(t){if(typeof t!="string")throw new Error("first argument should be a string")}static checkRivalType(t){if(typeof t!="string")throw new Error("second argument should be a string")}static checkAvengersType(t){if(!Array.isArray(t))throw new Error("second argument should be an array of strings");if(t.find(e=>typeof e!="string"))throw new Error("second argument should be an array of strings")}static initParams(t,e){return[t.replace(/\s+/g,"").toLowerCase(),e.replace(/\s+/g,"").toLowerCase()]}},_s=class extends I{constructor(){super()}similarity(t,e){if(I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],!t.length&&!e.length)return 1;if(!t.length||!e.length)return 0;if(t===e)return 1;let r=Array.from(new Set(t.split("").concat(e.split("")))),i=_s.stringVectorization(t.split(""),r),n=_s.stringVectorization(e.split(""),r),[s,a,o]=[0,0,0];for(let u=0;ut.includes(r)?1:0)}},Hy=class extends I{constructor(){super()}similarity(t,e){I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1];let[r,i]=[t.length,e.length];if(!t.length&&!e.length||t===e)return 1;if(r<2||i<2)return 0;let n=new Map;for(let a=0;a0&&(n.set(o,u-1),++s)}return 2*s/(r+i-2)}distance(t,e){return 1-this.similarity(t,e)}},Uy=class extends I{constructor(){super()}similarity(t,e){if(I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],!t.length&&!e.length||t===e)return 1;let r=new Set(t.split("").concat(e.split(""))),i=new Set(t.split("").filter(n=>new Set(e).has(n)));return 1*i.size/r.size}distance(t,e){return 1-this.similarity(t,e)}},$y=class extends I{constructor(){super()}similarity(t,e){return I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],!t.length&&!e.length?1:1-1*this.distance(t,e)/Math.max(t.length,e.length)}distance(t,e){if(I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],t===e)return 0;let[r,i]=[t.length,e.length];if(!r)return i;if(!i)return r;let n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let a=0;a<=r;++a)n[a][0]=a;for(let a=0;a<=i;++a)n[0][a]=a;let s;for(let a=1;a<=r;++a)for(let o=1;o<=i;++o)s=t[a-1]===e[o-1]?0:1,n[a][o]=Math.min(n[a-1][o]+1,n[a][o-1]+1,n[a-1][o-1]+s);return n[r][i]}},Ts=class extends I{constructor(){super()}similarity(t,e){return I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],!t.length&&!e.length||t===e?1:2*Ts.lcsLength(t,e)/(t.length+e.length)}distance(t,e){return t.length+e.length-2*Ts.lcsLength(t,e)}static lcsLength(t,e){I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1];let[r,i]=[t.length,e.length],n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let s=1;s<=r;++s)for(let a=1;a<=i;++a)n[s][a]=t[s-1]===e[a-1]?n[s-1][a-1]+1:Math.max(n[s][a-1],n[s-1][a]);return n[r][i]}},bc=class extends I{constructor(){super()}similarity(t,e){return I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1],!t.length&&!e.length||t===e?1:1*bc.lcsLength(t,e)/Math.max(t.length,e.length)}distance(t,e){return I.checkThanosType(t),I.checkRivalType(e),t===e?0:1-this.similarity(t,e)}static lcsLength(t,e){I.checkThanosType(t),I.checkRivalType(e),t=I.initParams(t,e)[0],e=I.initParams(t,e)[1];let[r,i]=[t.length,e.length],n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let s=1;s<=r;++s)for(let a=1;a<=i;++a)n[s][a]=t[s-1]===e[a-1]?n[s-1][a-1]+1:Math.max(n[s][a-1],n[s-1][a]);return n[r][i]}},Wy=new _s,zy=new Hy,Gy=new Uy,Vy=new $y,Jy=new Ts,Xy=new bc;var vc=(t=[],e="")=>{let r=t.reduce((o,u)=>u.length{let l=s.similarity(u,a);return l>o.similarity?{similarity:l,value:u}:o},{similarity:s.similarity(r,a),value:r}).value};var wc=t=>{try{let{hostname:e}=new URL(t);return e.replace("www.","")}catch(e){return oe.error(e),""}};var Yy=/[$_\p{ID_Start}]/u,Ky=/[$_\u200C\u200D\p{ID_Continue}]/u;function Qy(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function Tc(t,e=!1){let r=[],i=0;for(;i{if(o{let m=c("MODIFIER");return m||c("ASTERISK")},p=m=>{let y=c(m);if(y!==void 0)return y;let{type:b,index:E}=r[o];throw new TypeError(`Unexpected ${b} at ${E}, expected ${m}`)},d=()=>{let m="",y;for(;y=c("CHAR")||c("ESCAPED_CHAR");)m+=y;return m},g=m=>m,S=e.encodePart||g;for(;o)?(?!\?)/g,i=0,n=r.exec(t.source);for(;n;)e.push({name:n[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),n=r.exec(t.source);return t}function eb(t,e,r){let i=t.map(n=>Ac(n,e,r).source);return new RegExp(`(?:${i.join("|")})`,Sc(r))}function tb(t,e,r){return Ec(xc(t,r),e,r)}function Ec(t,e,r={}){let{strict:i=!1,start:n=!0,end:s=!0,encode:a=c=>c}=r,o=`[${jt(r.endsWith||"")}]|$`,u=`[${jt(r.delimiter||"/#?")}]`,l=n?"^":"";for(let c of t)if(typeof c=="string")l+=jt(a(c));else{let h=jt(a(c.prefix)),p=jt(a(c.suffix));if(c.pattern)if(e&&e.push(c),h||p)if(c.modifier==="+"||c.modifier==="*"){let d=c.modifier==="*"?"?":"";l+=`(?:${h}((?:${c.pattern})(?:${p}${h}(?:${c.pattern}))*)${p})${d}`}else l+=`(?:${h}(${c.pattern})${p})${c.modifier}`;else c.modifier==="+"||c.modifier==="*"?l+=`((?:${c.pattern})${c.modifier})`:l+=`(${c.pattern})${c.modifier}`;else l+=`(?:${h}${p})${c.modifier}`}if(s)i||(l+=`${u}?`),l+=r.endsWith?`(?=${o})`:"$";else{let c=t[t.length-1],h=typeof c=="string"?u.indexOf(c[c.length-1])>-1:c===void 0;i||(l+=`(?:${u}(?=${o}))?`),h||(l+=`(?=${u}|${o})`)}return new RegExp(l,Sc(r))}function Ac(t,e,r){return t instanceof RegExp?Zy(t,e):Array.isArray(t)?eb(t,e,r):tb(t,e,r)}var Xe={delimiter:"",prefixes:"",sensitive:!0,strict:!0},rb={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ib={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function nb(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1}function Cc(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function sb(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t}function Oc(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["}var Nc=["ftp","file","http","https","ws","wss"];function Lc(t){if(!t)return!0;for(let e of Nc)if(t.test(e))return!0;return!1}function ab(t,e){if(t=Cc(t,"#"),e||t==="")return t;let r=new URL("https://example.com");return r.hash=t,r.hash?r.hash.substring(1,r.hash.length):""}function ob(t,e){if(t=Cc(t,"?"),e||t==="")return t;let r=new URL("https://example.com");return r.search=t,r.search?r.search.substring(1,r.search.length):""}function lb(t,e){return e||t===""?t:Oc(t)?Pc(t):Rc(t)}function ub(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.password=t,r.password}function cb(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.username=t,r.username}function fb(t,e,r){if(r||t==="")return t;if(e&&!Nc.includes(e))return new URL(`${e}:${t}`).pathname;let i=t[0]=="/";return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}function hb(t,e,r){return Ic(e)===t&&(t=""),r||t===""?t:Dc(t)}function pb(t,e){return t=sb(t,":"),e||t===""?t:Ss(t)}function Ic(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function Ss(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function db(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username}function gb(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password}function Rc(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname}function Pc(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function Dc(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function mb(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}function yb(t){return t===""?t:new URL(`data:${t}`).pathname}function bb(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function vb(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var wb=class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=Tc(this.input,!0);this.tokenIndex0)if(this.isGroupClose())this.groupDepth-=1;else continue;if(this.isGroupOpen()){this.groupDepth+=1;continue}switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1);break;case 9:break;case 10:break}}}changeState(t,e){switch(this.state){case 0:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 2:break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString();break;case 10:break}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t=0&&(t.pathname=i.pathname.substring(0,n+1)+t.pathname)}t.pathname=fb(t.pathname,t.protocol,r)}return typeof e.search=="string"&&(t.search=ob(e.search,r)),typeof e.hash=="string"&&(t.hash=ab(e.hash,r)),t}function Sr(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function Tb(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function xb(t,e){let r=".*",i=`[^${Tb(e.delimiter||"/#?")}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,s="";for(let a=0;a0?t[a-1]:null,l=a0?l[0]:"";p=n.test(d)}else p=typeof l.name=="number";if(!p&&o.prefix===""&&u&&typeof u=="string"&&u.length>0){let d=u[u.length-1];p=h.includes(d)}p&&(s+="{"),s+=Sr(o.prefix),c&&(s+=`:${o.name}`),o.pattern===r?!c&&(!u||typeof u=="string"||u.modifier||p||o.prefix!=="")?s+="*":s+=`(${r})`:o.pattern===i?c||(s+=`(${i})`):s+=`(${o.pattern})`,o.pattern===i&&c&&o.suffix!==""&&n.test(o.suffix[0])&&(s+="\\"),s+=Sr(o.suffix),p&&(s+="}"),s+=o.modifier}return s}var Es=class{constructor(t={},e){this.regexp={},this.keys={},this.component_pattern={};try{if(typeof t=="string"){let n=new wb(t);if(n.parse(),t=n.result,e)if(typeof e=="string")t.baseURL=e;else throw new TypeError("'baseURL' parameter is not of type 'string'.");else if(typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.")}else if(e)throw new TypeError("parameter 1 is not of type 'string'.");if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");let r={pathname:Je,protocol:Je,username:Je,password:Je,hostname:Je,port:Je,search:Je,hash:Je};this.pattern=xr(r,t,!0),Ic(this.pattern.protocol)===this.pattern.port&&(this.pattern.port="");let i;for(i of _b){if(!(i in this.pattern))continue;let n={},s=this.pattern[i];switch(this.keys[i]=[],i){case"protocol":Object.assign(n,Xe),n.encodePart=Ss;break;case"username":Object.assign(n,Xe),n.encodePart=db;break;case"password":Object.assign(n,Xe),n.encodePart=gb;break;case"hostname":Object.assign(n,rb),Oc(s)?n.encodePart=Pc:n.encodePart=Rc;break;case"port":Object.assign(n,Xe),n.encodePart=Dc;break;case"pathname":Lc(this.regexp.protocol)?(Object.assign(n,ib),n.encodePart=mb):(Object.assign(n,Xe),n.encodePart=yb);break;case"search":Object.assign(n,Xe),n.encodePart=bb;break;case"hash":Object.assign(n,Xe),n.encodePart=vb;break}try{let a=xc(s,n);this.regexp[i]=Ec(a,this.keys[i],n),this.component_pattern[i]=xb(a,n)}catch{throw new TypeError(`invalid ${i} pattern '${this.pattern[i]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?r=xr(r,t,!1):r=xr(r,_c(t,e),!1)}catch{return!1}let i;for(i in this.pattern)if(!this.regexp[i].exec(r[i]))return!1;return!0}exec(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?r=xr(r,t,!1):r=xr(r,_c(t,e),!1)}catch{return null}let i={};e?i.inputs=[t,e]:i.inputs=[t];let n;for(n in this.pattern){let s=this.regexp[n].exec(r[n]);if(!s)return null;let a={};for(let[o,u]of this.keys[n].entries())if(typeof u.name=="string"||typeof u.name=="number"){let l=s[o+1];a[u.name]=l}i[n]={input:r[n]||"",groups:a}}return i}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=Es);var qc=(t=[])=>{let e=_o();for(let r of e){let{patterns:i}=r;if(t.some(s=>i.some(a=>new Es(a).exec(s))))return r}return{}};var Hf=tt(ws(),1);var Sb={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function As(t,e){if(!Array.isArray(t)||!t.length)return t;let r=P(P({},Sb),e),i,n;if(r.strictlyTwoElementsInRangeArrays&&!t.every((o,u)=>!Array.isArray(o)||o.length!==2?(i=u,n=o.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) has not two but ${n} elements!`);if(!t.every((o,u)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(i=u,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) does not consist of only natural numbers!`);let s=t.length**2,a=0;return Array.from(t).sort((o,u)=>(r.progressFn&&(a+=1,r.progressFn(Math.floor(a*100/s))),o[0]===u[0]?o[1]u[1]?1:0:o[0]Array.isArray(l)).map(l=>[...l]).filter(l=>l[2]!==void 0||l[0]!==l[1]),s,a,o;i.progressFn?s=As(n,{progressFn:l=>{o=Math.floor(l/5),o!==a&&(a=o,i.progressFn(o))}}):s=As(n);let u=s.length-1;for(let l=u;l>0;l--)i.progressFn&&(o=Math.floor((1-l/u)*78)+21,o!==a&&o>a&&(a=o,i.progressFn(o))),(s[l][0]<=s[l-1][0]||!i.joinRangesThatTouchEdges&&s[l][0]=s[l][0]||s[l-1][1]<=s[l][1])&&s[l-1][2]!==null&&(s[l][2]===null&&s[l-1][2]!==null?s[l-1][2]=null:s[l-1][2]!=null?+i.mergeType==2&&s[l-1][0]===s[l][0]?s[l-1][2]=s[l][2]:s[l-1][2]+=s[l][2]:s[l-1][2]=s[l][2]),s.splice(l,1),l=s.length);return s.length?s:null}var Eb=!0,Cs="Invariant failed";function jc(t,e){if(!t){if(Eb)throw new Error(Cs);var r=typeof e=="function"?e():e,i=r?Cs+": "+r:Cs;throw new Error(i)}}function Bc(t,e,r){let i=0,n=0;if(arguments.length===0)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if(typeof t!="string")throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(e&&!Array.isArray(e))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(r&&typeof r!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!e||!e.filter(c=>c).length)return t;let s;Array.isArray(e)&&Number.isInteger(e[0])&&Number.isInteger(e[1])?s=[Array.from(e)]:s=Array.from(e);let a=s.length,o=0;s.filter(c=>c).forEach((c,h)=>{if(r&&(i=Math.floor(o/a*10),i!==n&&(n=i,r(i))),!Array.isArray(c))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${h}th element not an array: ${JSON.stringify(c,null,4)}, which is ${typeof c}`);if(!Number.isInteger(c[0])){if(!Number.isInteger(+c[0])||+c[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${h}th element, array ${JSON.stringify(c,null,0)}. Its first element is not an integer, string index, but ${typeof c[0]}, equal to: ${JSON.stringify(c[0],null,4)}.`);s[h][0]=+s[h][0]}if(!Number.isInteger(c[1])){if(!Number.isInteger(+c[1])||+c[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${h}th element, array ${JSON.stringify(c,null,0)}. Its second element is not an integer, string index, but ${typeof c[1]}, equal to: ${JSON.stringify(c[1],null,4)}.`);s[h][1]=+s[h][1]}o+=1});let u=Mc(s,{progressFn:c=>{r&&(i=10+Math.floor(c/10),i!==n&&(n=i,r(i)))}});jc(u);let l=u.length;if(l>0){let c=t.slice(u[l-1][1]);t=u.reduce((h,p,d,g)=>{r&&(i=20+Math.floor(d/l*80),i!==n&&(n=i,r(i)));let S=d===0?0:g[d-1][1],m=g[d][0];return`${h}${t.slice(S,m)}${g[d][2]||""}`},""),t+=c}return t}function Ri(t,e=1){let r=" ";function i(s){return Array.from(s).reverse().join("")}function n(s,a,o){let u=o?` +`)});let a=e.nonTextTags||["script","style","textarea","option"],o,u;e.allowedAttributes&&(o={},u={},Ar(e.allowedAttributes,function(w,A){o[A]=[];let S=[];w.forEach(function(I){typeof I=="string"&&I.indexOf("*")>=0?S.push(Oc(I).replace(/\\\*/g,".*")):o[A].push(I)}),S.length&&(u[A]=new RegExp("^("+S.join("|")+")$"))}));let l={},c={},h={};Ar(e.allowedClasses,function(w,A){o&&(Fe(o,A)||(o[A]=[]),o[A].push("class")),l[A]=[],h[A]=[];let S=[];w.forEach(function(I){typeof I=="string"&&I.indexOf("*")>=0?S.push(Oc(I).replace(/\\\*/g,".*")):I instanceof RegExp?h[A].push(I):l[A].push(I)}),S.length&&(c[A]=new RegExp("^("+S.join("|")+")$"))});let p={},d;Ar(e.transformTags,function(w,A){let S;typeof w=="function"?S=w:typeof w=="string"&&(S=Cr.simpleTransform(w)),A==="*"?d=S:p[A]=S});let g,E,m,y,v,x,_=!1;C();let O=new Zy.Parser({onopentag:function(w,A){if(e.enforceHtmlBoundary&&w==="html"&&C(),v){x++;return}let S=new s(w,A);E.push(S);let I=!1,z=!!S.text,ee;if(Fe(p,w)&&(ee=p[w](w,A),S.attribs=A=ee.attribs,ee.text!==void 0&&(S.innerText=ee.text),w!==ee.tagName&&(S.name=w=ee.tagName,y[g]=ee.tagName)),d&&(ee=d(w,A),S.attribs=A=ee.attribs,w!==ee.tagName&&(S.name=w=ee.tagName,y[g]=ee.tagName)),(e.allowedTags&&e.allowedTags.indexOf(w)===-1||e.disallowedTagsMode==="recursiveEscape"&&!sb(m)||e.nestingLimit!=null&&g>=e.nestingLimit)&&(I=!0,m[g]=!0,e.disallowedTagsMode==="discard"&&a.indexOf(w)!==-1&&(v=!0,x=1),m[g]=!0),g++,I){if(e.disallowedTagsMode==="discard")return;n=i,i=""}i+="<"+w,w==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(S.innerText=""),(!o||Fe(o,w)||o["*"])&&Ar(A,function(F,L){if(!ob.test(L)){delete S.attribs[L];return}let Q,Ee=!1;if(!o||Fe(o,w)&&o[w].indexOf(L)!==-1||o["*"]&&o["*"].indexOf(L)!==-1||Fe(u,w)&&u[w].test(L)||u["*"]&&u["*"].test(L))Ee=!0;else if(o&&o[w]){for(let N of o[w])if(eb(N)&&N.name&&N.name===L){Ee=!0;let f="";if(N.multiple===!0){let Y=F.split(" ");for(let T of Y)N.values.indexOf(T)!==-1&&(f===""?f=T:f+=" "+T)}else N.values.indexOf(F)>=0&&(f=F);F=f}}if(Ee){if(e.allowedSchemesAppliedToAttributes.indexOf(L)!==-1&&j(w,F)){delete S.attribs[L];return}if(w==="script"&&L==="src"){let N=!0;try{let f=new URL(F);if(e.allowedScriptHostnames||e.allowedScriptDomains){let Y=(e.allowedScriptHostnames||[]).find(function(X){return X===f.hostname}),T=(e.allowedScriptDomains||[]).find(function(X){return f.hostname===X||f.hostname.endsWith(`.${X}`)});N=Y||T}}catch{N=!1}if(!N){delete S.attribs[L];return}}if(w==="iframe"&&L==="src"){let N=!0;try{if(F=F.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),F.startsWith("relative:"))throw new Error("relative: exploit attempt");let f="relative://relative-site";for(let X=0;X<100;X++)f+=`/${X}`;let Y=new URL(F,f);if(Y&&Y.hostname==="relative-site"&&Y.protocol==="relative:")N=Fe(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){let X=(e.allowedIframeHostnames||[]).find(function($e){return $e===Y.hostname}),Te=(e.allowedIframeDomains||[]).find(function($e){return Y.hostname===$e||Y.hostname.endsWith(`.${$e}`)});N=X||Te}}catch{N=!1}if(!N){delete S.attribs[L];return}}if(L==="srcset")try{if(Q=tb(F),Q.forEach(function(N){j("srcset",N.url)&&(N.evil=!0)}),Q=Lc(Q,function(N){return!N.evil}),Q.length)F=ab(Lc(Q,function(N){return!N.evil})),S.attribs[L]=F;else{delete S.attribs[L];return}}catch{delete S.attribs[L];return}if(L==="class"){let N=l[w],f=l["*"],Y=c[w],T=h[w],X=c["*"],Te=[Y,X].concat(T).filter(function($e){return $e});if(N&&f?F=re(F,Nc(N,f),Te):F=re(F,N||f,Te),!F.length){delete S.attribs[L];return}}if(L==="style")try{let N=rb(w+" {"+F+"}"),f=H(N,e.allowedStyles);if(F=te(f),F.length===0){delete S.attribs[L];return}}catch{delete S.attribs[L];return}i+=" "+L,F&&F.length&&(i+='="'+D(F,!0)+'"')}else delete S.attribs[L]}),e.selfClosing.indexOf(w)!==-1?i+=" />":(i+=">",S.innerText&&!z&&!e.textFilter&&(i+=D(S.innerText),_=!0)),I&&(i=n+D(i),n="")},ontext:function(w){if(v)return;let A=E[E.length-1],S;if(A&&(S=A.tag,w=A.innerText!==void 0?A.innerText:w),e.disallowedTagsMode==="discard"&&(S==="script"||S==="style"))i+=w;else{let I=D(w,!1);e.textFilter&&!_?i+=e.textFilter(I,S):_||(i+=I)}if(E.length){let I=E[E.length-1];I.text+=w}},onclosetag:function(w){if(v)if(x--,!x)v=!1;else return;let A=E.pop();if(!A)return;v=e.enforceHtmlBoundary?w==="html":!1,g--;let S=m[g];if(S){if(delete m[g],e.disallowedTagsMode==="discard"){A.updateParentNodeText();return}n=i,i=""}if(y[g]&&(w=y[g],delete y[g]),e.exclusiveFilter&&e.exclusiveFilter(A)){i=i.substr(0,A.tagPosition);return}if(A.updateParentNodeMediaChildren(),A.updateParentNodeText(),e.selfClosing.indexOf(w)!==-1){S&&(i=n,n="");return}i+="",S&&(i=n+D(i),n=""),_=!1}},e.parser);return O.write(t),O.end(),i;function C(){i="",g=0,E=[],m={},y={},v=!1,x=0}function D(w,A){return typeof w!="string"&&(w=w+""),e.parser.decodeEntities&&(w=w.replace(/&/g,"&").replace(//g,">"),A&&(w=w.replace(/"/g,"""))),w=w.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),A&&(w=w.replace(/"/g,""")),w}function j(w,A){A=A.replace(/[\x00-\x20]+/g,""),A=A.replace(//g,"");let S=A.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!S)return A.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;let I=S[1].toLowerCase();return Fe(e.allowedSchemesByTag,w)?e.allowedSchemesByTag[w].indexOf(I)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(I)===-1}function H(w,A){if(!A)return w;let S=w.nodes[0],I;return A[S.selector]&&A["*"]?I=Nc(A[S.selector],A["*"]):I=A[S.selector]||A["*"],I&&(w.nodes[0].nodes=S.nodes.reduce(oe(I),[])),w}function te(w){return w.nodes[0].nodes.reduce(function(A,S){return A.push(`${S.prop}:${S.value}${S.important?" !important":""}`),A},[]).join(";")}function oe(w){return function(A,S){return Fe(w,S.prop)&&w[S.prop].some(function(z){return z.test(S.value)})&&A.push(S),A}}function re(w,A,S){return A?(w=w.split(/\s+/),w.filter(function(I){return A.indexOf(I)!==-1||S.some(function(z){return z.test(I)})}).join(" ")):w}}var lb={decodeEntities:!0};Cr.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1};Cr.simpleTransform=function(t,e,r){return r=r===void 0?!0:r,e=e||{},function(i,n){let s;if(r)for(s in e)n[s]=e[s];else n=e;return{tagName:t,attribs:n}}}});var hf=b((t0,ff)=>{var tv="[object Object]";function rv(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function iv(t,e){return function(r){return t(e(r))}}var nv=Function.prototype,uf=Object.prototype,cf=nv.toString,sv=uf.hasOwnProperty,av=cf.call(Object),ov=uf.toString,lv=iv(Object.getPrototypeOf,Object);function uv(t){return!!t&&typeof t=="object"}function cv(t){if(!uv(t)||ov.call(t)!=tv||rv(t))return!1;var e=lv(t);if(e===null)return!0;var r=sv.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&cf.call(r)==av}ff.exports=cv});var eh=b((Ir,Vt)=>{var fv=200,Sf="__lodash_hash_undefined__",Ef=9007199254740991,zs="[object Arguments]",hv="[object Array]",Af="[object Boolean]",Cf="[object Date]",pv="[object Error]",Vs="[object Function]",Of="[object GeneratorFunction]",Ui="[object Map]",Nf="[object Number]",Gs="[object Object]",pf="[object Promise]",Lf="[object RegExp]",$i="[object Set]",Rf="[object String]",If="[object Symbol]",Bs="[object WeakMap]",Pf="[object ArrayBuffer]",Wi="[object DataView]",Df="[object Float32Array]",qf="[object Float64Array]",Mf="[object Int8Array]",kf="[object Int16Array]",jf="[object Int32Array]",Bf="[object Uint8Array]",Ff="[object Uint8ClampedArray]",Hf="[object Uint16Array]",Uf="[object Uint32Array]",dv=/[\\^$.*+?()[\]{}|]/g,gv=/\w*$/,mv=/^\[object .+?Constructor\]$/,yv=/^(?:0|[1-9]\d*)$/,W={};W[zs]=W[hv]=W[Pf]=W[Wi]=W[Af]=W[Cf]=W[Df]=W[qf]=W[Mf]=W[kf]=W[jf]=W[Ui]=W[Nf]=W[Gs]=W[Lf]=W[$i]=W[Rf]=W[If]=W[Bf]=W[Ff]=W[Hf]=W[Uf]=!0;W[pv]=W[Vs]=W[Bs]=!1;var bv=typeof global=="object"&&global&&global.Object===Object&&global,vv=typeof self=="object"&&self&&self.Object===Object&&self,He=bv||vv||Function("return this")(),$f=typeof Ir=="object"&&Ir&&!Ir.nodeType&&Ir,df=$f&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,wv=df&&df.exports===$f;function _v(t,e){return t.set(e[0],e[1]),t}function Tv(t,e){return t.add(e),t}function xv(t,e){for(var r=-1,i=t?t.length:0;++r-1}function Yv(t,e){var r=this.__data__,i=Gi(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}Ue.prototype.clear=Vv;Ue.prototype.delete=Gv;Ue.prototype.get=Jv;Ue.prototype.has=Xv;Ue.prototype.set=Yv;function Gt(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=Ef}function Xi(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function qw(t){return!!t&&typeof t=="object"}function Ks(t){return Qf(t)?ow(t):pw(t)}function Mw(){return[]}function kw(){return!1}Vt.exports=Lw});var ah=b((m0,Qs)=>{function sh(t,e){if(e&&e.documentElement)t=e,e=arguments[2];else if(!t||!t.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(e=e||{},this._doc=t,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!e.debug,this._maxElemsToParse=e.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=e.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=e.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(e.classesToPreserve||[]),this._keepClasses=!!e.keepClasses,this._serializer=e.serializer||function(r){return r.innerHTML},this._disableJSONLD=!!e.disableJSONLD,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let r=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let n=Array.from(i.attributes||[],function(s){return`${s.name}="${s.value}"`}).join(" ");return`<${i.localName} ${n}>`};this.log=function(){if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(n){return n&&n.nodeName?r(n):n}).join(" ");dump("Reader: (Readability) "+i+` +`)}else if(typeof console<"u"){let n=Array.from(arguments,s=>s&&s.nodeType==this.ELEMENT_NODE?r(s):s);n.unshift("Reader: (Readability)"),console.log.apply(console,n)}}}else this.log=function(){}}sh.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(t){this._fixRelativeUris(t),this._simplifyNestedElements(t),this._keepClasses||this._cleanClasses(t)},_removeNodes:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var r=t.length-1;r>=0;r--){var i=t[r],n=i.parentNode;n&&(!e||e.call(this,i,r,t))&&n.removeChild(i)}},_replaceNodeTags:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let r of t)this._setNodeTag(r,e)},_forEachNode:function(t,e){Array.prototype.forEach.call(t,e,this)},_findNode:function(t,e){return Array.prototype.find.call(t,e,this)},_someNode:function(t,e){return Array.prototype.some.call(t,e,this)},_everyNode:function(t,e){return Array.prototype.every.call(t,e,this)},_concatNodeLists:function(){var t=Array.prototype.slice,e=t.call(arguments),r=e.map(function(i){return t.call(i)});return Array.prototype.concat.apply([],r)},_getAllNodesWithTag:function(t,e){return t.querySelectorAll?t.querySelectorAll(e.join(",")):[].concat.apply([],e.map(function(r){var i=t.getElementsByTagName(r);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(t){var e=this._classesToPreserve,r=(t.getAttribute("class")||"").split(/\s+/).filter(function(i){return e.indexOf(i)!=-1}).join(" ");for(r?t.setAttribute("class",r):t.removeAttribute("class"),t=t.firstElementChild;t;t=t.nextElementSibling)this._cleanClasses(t)},_fixRelativeUris:function(t){var e=this._doc.baseURI,r=this._doc.documentURI;function i(a){if(e==r&&a.charAt(0)=="#")return a;try{return new URL(a,e).href}catch{}return a}var n=this._getAllNodesWithTag(t,["a"]);this._forEachNode(n,function(a){var o=a.getAttribute("href");if(o)if(o.indexOf("javascript:")===0)if(a.childNodes.length===1&&a.childNodes[0].nodeType===this.TEXT_NODE){var u=this._doc.createTextNode(a.textContent);a.parentNode.replaceChild(u,a)}else{for(var l=this._doc.createElement("span");a.firstChild;)l.appendChild(a.firstChild);a.parentNode.replaceChild(l,a)}else a.setAttribute("href",i(o))});var s=this._getAllNodesWithTag(t,["img","picture","figure","video","audio","source"]);this._forEachNode(s,function(a){var o=a.getAttribute("src"),u=a.getAttribute("poster"),l=a.getAttribute("srcset");if(o&&a.setAttribute("src",i(o)),u&&a.setAttribute("poster",i(u)),l){var c=l.replace(this.REGEXPS.srcsetUrl,function(h,p,d,g){return i(p)+(d||"")+g});a.setAttribute("srcset",c)}})},_simplifyNestedElements:function(t){for(var e=t;e;){if(e.parentNode&&["DIV","SECTION"].includes(e.tagName)&&!(e.id&&e.id.startsWith("readability"))){if(this._isElementWithoutContent(e)){e=this._removeAndGetNext(e);continue}else if(this._hasSingleTagInsideElement(e,"DIV")||this._hasSingleTagInsideElement(e,"SECTION")){for(var r=e.children[0],i=0;i»] /.test(e))i=/ [\\\/>»] /.test(e),e=r.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),n(e)<3&&(e=r.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(e.indexOf(": ")!==-1){var s=this._concatNodeLists(t.getElementsByTagName("h1"),t.getElementsByTagName("h2")),a=e.trim(),o=this._someNode(s,function(c){return c.textContent.trim()===a});o||(e=r.substring(r.lastIndexOf(":")+1),n(e)<3?e=r.substring(r.indexOf(":")+1):n(r.substr(0,r.indexOf(":")))>5&&(e=r))}else if(e.length>150||e.length<15){var u=t.getElementsByTagName("h1");u.length===1&&(e=this._getInnerText(u[0]))}e=e.trim().replace(this.REGEXPS.normalize," ");var l=n(e);return l<=4&&(!i||l!=n(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(e=r),e},_prepDocument:function(){var t=this._doc;this._removeNodes(this._getAllNodesWithTag(t,["style"])),t.body&&this._replaceBrs(t.body),this._replaceNodeTags(this._getAllNodesWithTag(t,["font"]),"SPAN")},_nextNode:function(t){for(var e=t;e&&e.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(e.textContent);)e=e.nextSibling;return e},_replaceBrs:function(t){this._forEachNode(this._getAllNodesWithTag(t,["br"]),function(e){for(var r=e.nextSibling,i=!1;(r=this._nextNode(r))&&r.tagName=="BR";){i=!0;var n=r.nextSibling;r.parentNode.removeChild(r),r=n}if(i){var s=this._doc.createElement("p");for(e.parentNode.replaceChild(s,e),r=s.nextSibling;r;){if(r.tagName=="BR"){var a=this._nextNode(r.nextSibling);if(a&&a.tagName=="BR")break}if(!this._isPhrasingContent(r))break;var o=r.nextSibling;s.appendChild(r),r=o}for(;s.lastChild&&this._isWhitespace(s.lastChild);)s.removeChild(s.lastChild);s.parentNode.tagName==="P"&&this._setNodeTag(s.parentNode,"DIV")}})},_setNodeTag:function(t,e){if(this.log("_setNodeTag",t,e),this._docJSDOMParser)return t.localName=e.toLowerCase(),t.tagName=e.toUpperCase(),t;for(var r=t.ownerDocument.createElement(e);t.firstChild;)r.appendChild(t.firstChild);t.parentNode.replaceChild(r,t),t.readability&&(r.readability=t.readability);for(var i=0;i!r.includes(a)),s=n.join(" ").length/i.join(" ").length;return 1-s},_checkByline:function(t,e){if(this._articleByline)return!1;if(t.getAttribute!==void 0)var r=t.getAttribute("rel"),i=t.getAttribute("itemprop");return(r==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(e))&&this._isValidByline(t.textContent)?(this._articleByline=t.textContent.trim(),!0):!1},_getNodeAncestors:function(t,e){e=e||0;for(var r=0,i=[];t.parentNode&&(i.push(t.parentNode),!(e&&++r===e));)t=t.parentNode;return i},_grabArticle:function(t){this.log("**** grabArticle ****");var e=this._doc,r=t!==null;if(t=t||this._doc.body,!t)return this.log("No body found in document. Abort."),null;for(var i=t.innerHTML;;){this.log("Starting grabArticle loop");var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),s=[],a=this._doc.documentElement;let ra=!0;for(;a;){a.tagName==="HTML"&&(this._articleLang=a.getAttribute("lang"));var o=a.className+" "+a.id;if(!this._isProbablyVisible(a)){this.log("Removing hidden node - "+o),a=this._removeAndGetNext(a);continue}if(this._checkByline(a,o)){a=this._removeAndGetNext(a);continue}if(ra&&this._headerDuplicatesTitle(a)){this.log("Removing header: ",a.textContent.trim(),this._articleTitle.trim()),ra=!1,a=this._removeAndGetNext(a);continue}if(n){if(this.REGEXPS.unlikelyCandidates.test(o)&&!this.REGEXPS.okMaybeItsACandidate.test(o)&&!this._hasAncestorTag(a,"table")&&!this._hasAncestorTag(a,"code")&&a.tagName!=="BODY"&&a.tagName!=="A"){this.log("Removing unlikely candidate - "+o),a=this._removeAndGetNext(a);continue}if(this.UNLIKELY_ROLES.includes(a.getAttribute("role"))){this.log("Removing content with role "+a.getAttribute("role")+" - "+o),a=this._removeAndGetNext(a);continue}}if((a.tagName==="DIV"||a.tagName==="SECTION"||a.tagName==="HEADER"||a.tagName==="H1"||a.tagName==="H2"||a.tagName==="H3"||a.tagName==="H4"||a.tagName==="H5"||a.tagName==="H6")&&this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(a.tagName)!==-1&&s.push(a),a.tagName==="DIV"){for(var u=null,l=a.firstChild;l;){var c=l.nextSibling;if(this._isPhrasingContent(l))u!==null?u.appendChild(l):this._isWhitespace(l)||(u=e.createElement("p"),a.replaceChild(u,l),u.appendChild(l));else if(u!==null){for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u=null}l=c}if(this._hasSingleTagInsideElement(a,"P")&&this._getLinkDensity(a)<.25){var h=a.children[0];a.parentNode.replaceChild(h,a),a=h,s.push(a)}else this._hasChildBlockElement(a)||(a=this._setNodeTag(a,"P"),s.push(a))}a=this._getNextNode(a)}var p=[];this._forEachNode(s,function(Me){if(!(!Me.parentNode||typeof Me.parentNode.tagName>"u")){var We=this._getInnerText(Me);if(!(We.length<25)){var ia=this._getNodeAncestors(Me,5);if(ia.length!==0){var qr=0;qr+=1,qr+=We.split(",").length,qr+=Math.min(Math.floor(We.length/100),3),this._forEachNode(ia,function(tt,Ki){if(!(!tt.tagName||!tt.parentNode||typeof tt.parentNode.tagName>"u")){if(typeof tt.readability>"u"&&(this._initializeNode(tt),p.push(tt)),Ki===0)var Qi=1;else Ki===1?Qi=2:Qi=Ki*3;tt.readability.contentScore+=qr/Qi}})}}}});for(var d=[],g=0,E=p.length;gx.readability.contentScore){d.splice(v,0,m),d.length>this._nbTopCandidates&&d.pop();break}}}var _=d[0]||null,O=!1,C;if(_===null||_.tagName==="BODY"){for(_=e.createElement("DIV"),O=!0;t.firstChild;)this.log("Moving child out:",t.firstChild),_.appendChild(t.firstChild);t.appendChild(_),this._initializeNode(_)}else if(_){for(var D=[],j=1;j=.75&&D.push(this._getNodeAncestors(d[j]));var H=3;if(D.length>=H)for(C=_.parentNode;C.tagName!=="BODY";){for(var te=0,oe=0;oe=H){_=C;break}C=C.parentNode}_.readability||this._initializeNode(_),C=_.parentNode;for(var re=_.readability.contentScore,w=re/3;C.tagName!=="BODY";){if(!C.readability){C=C.parentNode;continue}var A=C.readability.contentScore;if(Are){_=C;break}re=C.readability.contentScore,C=C.parentNode}for(C=_.parentNode;C.tagName!="BODY"&&C.children.length==1;)_=C,C=_.parentNode;_.readability||this._initializeNode(_)}var S=e.createElement("DIV");r&&(S.id="readability-content");var I=Math.max(10,_.readability.contentScore*.2);C=_.parentNode;for(var z=C.children,ee=0,F=z.length;ee=I)Q=!0;else if(L.nodeName==="P"){var N=this._getLinkDensity(L),f=this._getInnerText(L),Y=f.length;(Y>80&&N<.25||Y<80&&Y>0&&N===0&&f.search(/\.( |$)/)!==-1)&&(Q=!0)}}Q&&(this.log("Appending node:",L),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(L.nodeName)===-1&&(this.log("Altering sibling:",L,"to div."),L=this._setNodeTag(L,"DIV")),S.appendChild(L),z=C.children,ee-=1,F-=1)}if(this._debug&&this.log("Article content pre-prep: "+S.innerHTML),this._prepArticle(S),this._debug&&this.log("Article content post-prep: "+S.innerHTML),O)_.id="readability-page-1",_.className="page";else{var T=e.createElement("DIV");for(T.id="readability-page-1",T.className="page";S.firstChild;)T.appendChild(S.firstChild);S.appendChild(T)}this._debug&&this.log("Article content after paging: "+S.innerHTML);var X=!0,Te=this._getInnerText(S,!0).length;if(Te0&&t.length<100):!1},_unescapeHtmlEntities:function(t){if(!t)return t;var e=this.HTML_ESCAPE_MAP;return t.replace(/&(quot|amp|apos|lt|gt);/g,function(r,i){return e[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(r,i,n){var s=parseInt(i||n,i?16:10);return String.fromCharCode(s)})},_getJSONLD:function(t){var e=this._getAllNodesWithTag(t,["script"]),r;return this._forEachNode(e,function(i){if(!r&&i.getAttribute("type")==="application/ld+json")try{var n=i.textContent.replace(/^\s*\s*$/g,""),s=JSON.parse(n);if(!s["@context"]||!s["@context"].match(/^https?\:\/\/schema\.org$/)||(!s["@type"]&&Array.isArray(s["@graph"])&&(s=s["@graph"].find(function(l){return(l["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!s||!s["@type"]||!s["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(r={},typeof s.name=="string"&&typeof s.headline=="string"&&s.name!==s.headline){var a=this._getArticleTitle(),o=this._textSimilarity(s.name,a)>.75,u=this._textSimilarity(s.headline,a)>.75;u&&!o?r.title=s.headline:r.title=s.name}else typeof s.name=="string"?r.title=s.name.trim():typeof s.headline=="string"&&(r.title=s.headline.trim());s.author&&(typeof s.author.name=="string"?r.byline=s.author.name.trim():Array.isArray(s.author)&&s.author[0]&&typeof s.author[0].name=="string"&&(r.byline=s.author.filter(function(l){return l&&typeof l.name=="string"}).map(function(l){return l.name.trim()}).join(", "))),typeof s.description=="string"&&(r.excerpt=s.description.trim()),s.publisher&&typeof s.publisher.name=="string"&&(r.siteName=s.publisher.name.trim());return}catch(l){this.log(l.message)}}),r||{}},_getArticleMetadata:function(t){var e={},r={},i=this._doc.getElementsByTagName("meta"),n=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,s=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(a){var o=a.getAttribute("name"),u=a.getAttribute("property"),l=a.getAttribute("content");if(!!l){var c=null,h=null;u&&(c=u.match(n),c&&(h=c[0].toLowerCase().replace(/\s/g,""),r[h]=l.trim())),!c&&o&&s.test(o)&&(h=o,l&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),r[h]=l.trim()))}}),e.title=t.title||r["dc:title"]||r["dcterm:title"]||r["og:title"]||r["weibo:article:title"]||r["weibo:webpage:title"]||r.title||r["twitter:title"],e.title||(e.title=this._getArticleTitle()),e.byline=t.byline||r["dc:creator"]||r["dcterm:creator"]||r.author,e.excerpt=t.excerpt||r["dc:description"]||r["dcterm:description"]||r["og:description"]||r["weibo:article:description"]||r["weibo:webpage:description"]||r.description||r["twitter:description"],e.siteName=t.siteName||r["og:site_name"],e.title=this._unescapeHtmlEntities(e.title),e.byline=this._unescapeHtmlEntities(e.byline),e.excerpt=this._unescapeHtmlEntities(e.excerpt),e.siteName=this._unescapeHtmlEntities(e.siteName),e},_isSingleImage:function(t){return t.tagName==="IMG"?!0:t.children.length!==1||t.textContent.trim()!==""?!1:this._isSingleImage(t.children[0])},_unwrapNoscriptImages:function(t){var e=Array.from(t.getElementsByTagName("img"));this._forEachNode(e,function(i){for(var n=0;n"u"?!0:e;var r=t.textContent.trim();return e?r.replace(this.REGEXPS.normalize," "):r},_getCharCount:function(t,e){return e=e||",",this._getInnerText(t).split(e).length-1},_cleanStyles:function(t){if(!(!t||t.tagName.toLowerCase()==="svg")){for(var e=0;e0&&n>r)return!1;if(t.parentNode.tagName===e&&(!i||i(t.parentNode)))return!0;t=t.parentNode,n++}return!1},_getRowAndColumnCount:function(t){for(var e=0,r=0,i=t.getElementsByTagName("tr"),n=0;n0){i._readabilityDataTable=!0;continue}var u=["col","colgroup","tfoot","thead","th"],l=function(h){return!!i.getElementsByTagName(h)[0]};if(u.some(l)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var c=this._getRowAndColumnCount(i);if(c.rows>=10||c.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=c.rows*c.columns>10}},_fixLazyImages:function(t){this._forEachNode(this._getAllNodesWithTag(t,["img","picture","figure"]),function(e){if(e.src&&this.REGEXPS.b64DataUrl.test(e.src)){var r=this.REGEXPS.b64DataUrl.exec(e.src);if(r[1]==="image/svg+xml")return;for(var i=!1,n=0;ni+=this._getInnerText(s,!0).length),i/r},_cleanConditionally:function(t,e){!this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)||this._removeNodes(this._getAllNodesWithTag(t,[e]),function(r){var i=function(O){return O._readabilityDataTable},n=e==="ul"||e==="ol";if(!n){var s=0,a=this._getAllNodesWithTag(r,["ul","ol"]);this._forEachNode(a,O=>s+=this._getInnerText(O).length),n=s/this._getInnerText(r).length>.9}if(e==="table"&&i(r)||this._hasAncestorTag(r,"table",-1,i)||this._hasAncestorTag(r,"code"))return!1;var o=this._getClassWeight(r);this.log("Cleaning Conditionally",r);var u=0;if(o+u<0)return!0;if(this._getCharCount(r,",")<10){for(var l=r.getElementsByTagName("p").length,c=r.getElementsByTagName("img").length,h=r.getElementsByTagName("li").length-100,p=r.getElementsByTagName("input").length,d=this._getTextDensity(r,["h1","h2","h3","h4","h5","h6"]),g=0,E=this._getAllNodesWithTag(r,["object","embed","iframe"]),m=0;m1&&l/c<.5&&!this._hasAncestorTag(r,"figure")||!n&&h>l||p>Math.floor(l/3)||!n&&d<.9&&x<25&&(c===0||c>2)&&!this._hasAncestorTag(r,"figure")||!n&&o<25&&v>.2||o>=25&&v>.5||g===1&&x<75||g>1;return _}return!1})},_cleanMatchedNodes:function(t,e){for(var r=this._getNextNode(t,!0),i=this._getNextNode(t);i&&i!=r;)e.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(t){let e=this._getAllNodesWithTag(t,["h1","h2"]);this._removeNodes(e,function(r){let i=this._getClassWeight(r)<0;return i&&this.log("Removing header with low class weight:",r),i})},_headerDuplicatesTitle:function(t){if(t.tagName!="H1"&&t.tagName!="H2")return!1;var e=this._getInnerText(t,!1);return this.log("Evaluating similarity of header:",e,this._articleTitle),this._textSimilarity(this._articleTitle,e)>.75},_flagIsActive:function(t){return(this._flags&t)>0},_removeFlag:function(t){this._flags=this._flags&~t},_isProbablyVisible:function(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var t=this._doc.getElementsByTagName("*").length;if(t>this._maxElemsToParse)throw new Error("Aborting parsing document; "+t+" elements found")}this._unwrapNoscriptImages(this._doc);var e=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var r=this._getArticleMetadata(e);this._articleTitle=r.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!r.excerpt){var n=i.getElementsByTagName("p");n.length>0&&(r.excerpt=n[0].textContent.trim())}var s=i.textContent;return{title:this._articleTitle,byline:r.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:s,length:s.length,excerpt:r.excerpt,siteName:r.siteName||this._articleSiteName}}};typeof Qs=="object"&&(Qs.exports=sh)});var lh=b((y0,Zs)=>{var oh={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function $w(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)}function Ww(t,e={}){typeof e=="function"&&(e={visibilityChecker:e});var r={minScore:20,minContentLength:140,visibilityChecker:$w};e=Object.assign(r,e);var i=t.querySelectorAll("p, pre, article"),n=t.querySelectorAll("div > br");if(n.length){var s=new Set(i);[].forEach.call(n,function(o){s.add(o.parentNode)}),i=Array.from(s)}var a=0;return[].some.call(i,function(o){if(!e.visibilityChecker(o))return!1;var u=o.className+" "+o.id;if(oh.unlikelyCandidates.test(u)&&!oh.okMaybeItsACandidate.test(u)||o.matches("li p"))return!1;var l=o.textContent.trim().length;return le.minScore)})}typeof Zs=="object"&&(Zs.exports=Ww)});var ch=b((b0,uh)=>{var zw=ah(),Vw=lh();uh.exports={Readability:zw,isProbablyReaderable:Vw}});var Ch=t=>({}).toString.call(t);var Le=t=>Array.isArray(t),_t=t=>String(t)===t,nn=t=>Number(t)===t;var jr=t=>Ch(t)==="[object Object]"&&!Le(t),Oh=t=>t instanceof Date&&!isNaN(t.valueOf());var an=(t,e)=>!t||!e?!1:Object.prototype.hasOwnProperty.call(t,e);var Zw=Number.MAX_SAFE_INTEGER;var Br=t=>{let e=nn(t)?String(t):t;if(!_t(e))throw new Error("InvalidInput: String required.");return e},sa=(t,e)=>{let r=Br(t),i=e||140;if(r.length<=i)return r;let n=r.substring(0,i),s=n.split(" "),a=s.length,o="";return a>1?(s.pop(),o+=s.join(" "),o.lengthBr(t).replace(/<.*?>/gi," ").replace(/\s\s+/g," ").trim();var sn=(t,e,r)=>{let i=Br(t);if(nn(e)&&(e=String(e)),nn(r)&&(r=String(r)),_t(e)&&_t(r))i=i.split(e).join(r);else if(Le(e)&&_t(r))e.forEach(n=>{i=sn(i,n,r)});else if(Le(e)&&Le(r)&&e.length===r.length){let n=e.length;if(n>0)for(let s=0;s{let e=Br(t),r={a:"á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ|ä",A:"Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ|Ä",c:"ç",C:"Ç",d:"đ",D:"Đ",e:"é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ|ë",E:"É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ|Ë",i:"í|ì|ỉ|ĩ|ị|ï|î",I:"Í|Ì|Ỉ|Ĩ|Ị|Ï|Î",o:"ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ|ö",O:"Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ô|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ|Ö",u:"ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự|û",U:"Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự|Û",y:"ý|ỳ|ỷ|ỹ|ỵ",Y:"Ý|Ỳ|Ỷ|Ỹ|Ỵ"},i=(n,s)=>{e=sn(e,n,s)};for(let n in r)an(r,n)&&r[n].split("|").forEach(s=>i(s,n));return e};var aa=(t,e="-")=>Nh(t).trim().toLowerCase().replace(/\W+/g," ").replace(/\s+/g," ").replace(/\s/g,e);var Ae=(t,e=null)=>{let r=e||new Set;if(r.has(t))return t;if(r.add(t),Oh(t))return new Date(t.valueOf());let i=s=>{let a=Object.create({});for(let o in s)an(s,o)&&(a[o]=Ae(s[o],r));return a},n=s=>[...s].map(a=>Le(a)?n(a):jr(a)?i(a):Ae(a,r));return Le(t)?n(t):jr(t)?i(t):t},Hr=(t,e,r=!1,i=[])=>{for(let n in t)if(!(i.length>0&&i.includes(n))&&(!r||r&&an(e,n))){let s=t[n],a=e[n];jr(a)&&jr(s)||Le(a)&&Le(s)?e[n]=Hr(s,e[n],r,i):e[n]=Ae(s)}return e},oa=(t=[])=>[...new Set(t)];var Ur=(t="")=>{try{let e=new URL(t);return e!==null&&e.protocol.startsWith("http")}catch{return!1}};var Zt=(t="")=>/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(t);var ko=it(xo(),1);var ot=it(Oo(),1),Lt="article-parser",k_=(0,ot.default)(`${Lt}:info`),j_=(0,ot.default)(`${Lt}:error`),B_=(0,ot.default)(`${Lt}:warning`),le={info:(0,ot.default)(`${Lt}:info`),error:(0,ot.default)(`${Lt}:error`),warning:(0,ot.default)(`${Lt}:warning`)};var No=[{patterns:["*://thanhnien.vn/*"],unwanted:[".morenews",".zone--media",".zone--timeline"]},{patterns:["*://zingnews.vn/*"],unwanted:[".the-article-category",".the-article-meta",".the-article-tags"]},{patterns:["*://{*.}?vnexpress.net/*"],unwanted:[".header-content"]},{patterns:["*://{*.}?vietnamnet.vn/*","*://{*.}?vnn.vn/*"],selector:"#ArticleContent",unwanted:[".inner-article",".article-relate"]},{patterns:["*://thehill.com/*"],unwanted:[".rollover-people-block"]},{patterns:["*://{*.}?digitaltrends.com/*"],unwanted:[".h-editors-recs-title","ul.h-editors-recs"]},{patterns:["*://{*.}?techradar.com/*"],unwanted:["nav.breadcrumb"]}];var Ln=Ae(No),Lo={headers:{"user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0",accept:"text/html; charset=utf-8"},responseType:"text",responseEncoding:"utf8",timeout:6e4,maxRedirects:3},Ro={allowedTags:["h1","h2","h3","h4","h5","u","b","i","em","strong","small","sup","sub","div","span","p","article","blockquote","section","details","summary","pre","code","ul","ol","li","dd","dl","table","th","tr","td","thead","tbody","tfood","fieldset","legend","figure","figcaption","img","picture","video","audio","source","iframe","progress","br","p","hr","label","abbr","a","svg"],allowedAttributes:{a:["href","target","title"],abbr:["title"],progress:["value","max"],img:["src","srcset","alt","width","height","style","title"],picture:["media","srcset"],video:["controls","width","height","autoplay","muted"],audio:["controls"],source:["src","srcset","data-srcset","type","media","sizes"],iframe:["src","frameborder","height","width","scrolling"],svg:["width","height"]},allowedIframeDomains:["youtube.com","vimeo.com"]},Nn={wordsPerMinute:300,urlsCompareAlgorithm:"levenshtein",descriptionLengthThreshold:40,descriptionTruncateLen:156,contentLengthThreshold:200},Io={removeHTMLComments:2,removeLineBreaks:!0},Rt=()=>Ae(Nn),Po=()=>Ae(Lo),Do=()=>Ae(Io),qo=()=>Ae(Ro),W_=t=>{Object.keys(Nn).forEach(e=>{e in t&&(Nn[e]=t[e])})},z_=t=>{Hr(t,Lo)},V_=t=>{Hr(t,Io)},G_=t=>{Object.keys(t).forEach(e=>{Ro[e]=Ae(t[e])})},Mo=()=>Ae(Ln),J_=t=>{Ln=t},X_=(...t)=>Ln.unshift(...t.filter(e=>Le(e==null?void 0:e.patterns)));var jo=async t=>{try{let e=await ko.default.get(t,Po()),r=e.headers["content-type"]||"";return!r||!r.includes("text/html")?(le.error(`Content type must be "text/html", not "${r}"`),null):e.data}catch(e){return le.error(e.message||e),null}};var bh=it(Ns(),1);var ub=["CNDID","__twitter_impression","_hsenc","_openstat","action_object_map","action_ref_map","action_type_map","amp","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","ga_campaign","ga_content","ga_medium","ga_place","ga_source","ga_term","gs_l","hmb_campaign","hmb_medium","hmb_source","mbid","mc_cid","mc_eid","mkt_tok","referrer","spJobID","spMailingID","spReportId","spUserID","utm_brand","utm_campaign","utm_cid","utm_content","utm_int","utm_mailing","utm_medium","utm_name","utm_place","utm_pubreferrer","utm_reader","utm_social","utm_source","utm_swu","utm_term","utm_userid","utm_viz_id","wt_mc_o","yclid","WT.mc_id","WT.mc_ev","WT.srch","pk_source","pk_medium","pk_campaign"],Ic=t=>{try{let e=new URL(t);return ub.forEach(r=>{e.searchParams.delete(r)}),e.toString().replace(e.hash,"")}catch(e){return le.error(e),null}};var Or=(t="",e="")=>{try{return new URL(e,t).toString()}catch(r){return le.error(r),""}};var Is={};Eh(Is,{cosine:()=>pb,diceCoefficient:()=>db,jaccardIndex:()=>gb,lcs:()=>yb,levenshtein:()=>mb,mlcs:()=>bb});var R=class{sortMatch(t,e){return R.checkThanosType(t),R.checkAvengersType(e),e.map((r,i)=>({member:r,index:i,rating:this.similarity(t,r)})).sort((r,i)=>r.rating-i.rating)}static checkThanosType(t){if(typeof t!="string")throw new Error("first argument should be a string")}static checkRivalType(t){if(typeof t!="string")throw new Error("second argument should be a string")}static checkAvengersType(t){if(!Array.isArray(t))throw new Error("second argument should be an array of strings");if(t.find(e=>typeof e!="string"))throw new Error("second argument should be an array of strings")}static initParams(t,e){return[t.replace(/\s+/g,"").toLowerCase(),e.replace(/\s+/g,"").toLowerCase()]}},Ls=class extends R{constructor(){super()}similarity(t,e){if(R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],!t.length&&!e.length)return 1;if(!t.length||!e.length)return 0;if(t===e)return 1;let r=Array.from(new Set(t.split("").concat(e.split("")))),i=Ls.stringVectorization(t.split(""),r),n=Ls.stringVectorization(e.split(""),r),[s,a,o]=[0,0,0];for(let u=0;ut.includes(r)?1:0)}},cb=class extends R{constructor(){super()}similarity(t,e){R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1];let[r,i]=[t.length,e.length];if(!t.length&&!e.length||t===e)return 1;if(r<2||i<2)return 0;let n=new Map;for(let a=0;a0&&(n.set(o,u-1),++s)}return 2*s/(r+i-2)}distance(t,e){return 1-this.similarity(t,e)}},fb=class extends R{constructor(){super()}similarity(t,e){if(R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],!t.length&&!e.length||t===e)return 1;let r=new Set(t.split("").concat(e.split(""))),i=new Set(t.split("").filter(n=>new Set(e).has(n)));return 1*i.size/r.size}distance(t,e){return 1-this.similarity(t,e)}},hb=class extends R{constructor(){super()}similarity(t,e){return R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],!t.length&&!e.length?1:1-1*this.distance(t,e)/Math.max(t.length,e.length)}distance(t,e){if(R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],t===e)return 0;let[r,i]=[t.length,e.length];if(!r)return i;if(!i)return r;let n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let a=0;a<=r;++a)n[a][0]=a;for(let a=0;a<=i;++a)n[0][a]=a;let s;for(let a=1;a<=r;++a)for(let o=1;o<=i;++o)s=t[a-1]===e[o-1]?0:1,n[a][o]=Math.min(n[a-1][o]+1,n[a][o-1]+1,n[a-1][o-1]+s);return n[r][i]}},Rs=class extends R{constructor(){super()}similarity(t,e){return R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],!t.length&&!e.length||t===e?1:2*Rs.lcsLength(t,e)/(t.length+e.length)}distance(t,e){return t.length+e.length-2*Rs.lcsLength(t,e)}static lcsLength(t,e){R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1];let[r,i]=[t.length,e.length],n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let s=1;s<=r;++s)for(let a=1;a<=i;++a)n[s][a]=t[s-1]===e[a-1]?n[s-1][a-1]+1:Math.max(n[s][a-1],n[s-1][a]);return n[r][i]}},Pc=class extends R{constructor(){super()}similarity(t,e){return R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1],!t.length&&!e.length||t===e?1:1*Pc.lcsLength(t,e)/Math.max(t.length,e.length)}distance(t,e){return R.checkThanosType(t),R.checkRivalType(e),t===e?0:1-this.similarity(t,e)}static lcsLength(t,e){R.checkThanosType(t),R.checkRivalType(e),t=R.initParams(t,e)[0],e=R.initParams(t,e)[1];let[r,i]=[t.length,e.length],n=[...Array(r+1)].map(()=>Array(i+1).fill(0));for(let s=1;s<=r;++s)for(let a=1;a<=i;++a)n[s][a]=t[s-1]===e[a-1]?n[s-1][a-1]+1:Math.max(n[s][a-1],n[s-1][a]);return n[r][i]}},pb=new Ls,db=new cb,gb=new fb,mb=new hb,yb=new Rs,bb=new Pc;var Dc=(t=[],e="")=>{let r=t.reduce((o,u)=>u.length{let l=s.similarity(u,a);return l>o.similarity?{similarity:l,value:u}:o},{similarity:s.similarity(r,a),value:r}).value};var qc=t=>{try{let{hostname:e}=new URL(t);return e.replace("www.","")}catch(e){return le.error(e),""}};var vb=/[$_\p{ID_Start}]/u,wb=/[$_\u200C\u200D\p{ID_Continue}]/u;function _b(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function kc(t,e=!1){let r=[],i=0;for(;i{if(o{let m=c("MODIFIER");return m||c("ASTERISK")},p=m=>{let y=c(m);if(y!==void 0)return y;let{type:v,index:x}=r[o];throw new TypeError(`Unexpected ${v} at ${x}, expected ${m}`)},d=()=>{let m="",y;for(;y=c("CHAR")||c("ESCAPED_CHAR");)m+=y;return m},g=m=>m,E=e.encodePart||g;for(;o)?(?!\?)/g,i=0,n=r.exec(t.source);for(;n;)e.push({name:n[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),n=r.exec(t.source);return t}function xb(t,e,r){let i=t.map(n=>Hc(n,e,r).source);return new RegExp(`(?:${i.join("|")})`,Bc(r))}function Sb(t,e,r){return Fc(jc(t,r),e,r)}function Fc(t,e,r={}){let{strict:i=!1,start:n=!0,end:s=!0,encode:a=c=>c}=r,o=`[${Wt(r.endsWith??"")}]|$`,u=`[${Wt(r.delimiter??"/#?")}]`,l=n?"^":"";for(let c of t)if(typeof c=="string")l+=Wt(a(c));else{let h=Wt(a(c.prefix)),p=Wt(a(c.suffix));if(c.pattern)if(e&&e.push(c),h||p)if(c.modifier==="+"||c.modifier==="*"){let d=c.modifier==="*"?"?":"";l+=`(?:${h}((?:${c.pattern})(?:${p}${h}(?:${c.pattern}))*)${p})${d}`}else l+=`(?:${h}(${c.pattern})${p})${c.modifier}`;else c.modifier==="+"||c.modifier==="*"?l+=`((?:${c.pattern})${c.modifier})`:l+=`(${c.pattern})${c.modifier}`;else l+=`(?:${h}${p})${c.modifier}`}if(s)i||(l+=`${u}?`),l+=r.endsWith?`(?=${o})`:"$";else{let c=t[t.length-1],h=typeof c=="string"?u.indexOf(c[c.length-1])>-1:c===void 0;i||(l+=`(?:${u}(?=${o}))?`),h||(l+=`(?=${u}|${o})`)}return new RegExp(l,Bc(r))}function Hc(t,e,r){return t instanceof RegExp?Tb(t,e):Array.isArray(t)?xb(t,e,r):Sb(t,e,r)}var Ke={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Eb={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Ab={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function Cb(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1}function Uc(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function Ob(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t}function $c(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["}var Wc=["ftp","file","http","https","ws","wss"];function zc(t){if(!t)return!0;for(let e of Wc)if(t.test(e))return!0;return!1}function Nb(t,e){if(t=Uc(t,"#"),e||t==="")return t;let r=new URL("https://example.com");return r.hash=t,r.hash?r.hash.substring(1,r.hash.length):""}function Lb(t,e){if(t=Uc(t,"?"),e||t==="")return t;let r=new URL("https://example.com");return r.search=t,r.search?r.search.substring(1,r.search.length):""}function Rb(t,e){return e||t===""?t:$c(t)?Jc(t):Gc(t)}function Ib(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.password=t,r.password}function Pb(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.username=t,r.username}function Db(t,e,r){if(r||t==="")return t;if(e&&!Wc.includes(e))return new URL(`${e}:${t}`).pathname;let i=t[0]=="/";return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}function qb(t,e,r){return Vc(e)===t&&(t=""),r||t===""?t:Xc(t)}function Mb(t,e){return t=Ob(t,":"),e||t===""?t:Ps(t)}function Vc(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function Ps(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function kb(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username}function jb(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password}function Gc(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname}function Jc(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function Xc(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function Bb(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}function Fb(t){return t===""?t:new URL(`data:${t}`).pathname}function Hb(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function Ub(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var $b=class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=kc(this.input,!0);this.tokenIndex0)if(this.isGroupClose())this.groupDepth-=1;else continue;if(this.isGroupOpen()){this.groupDepth+=1;continue}switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1);break;case 9:break;case 10:break}}}changeState(t,e){switch(this.state){case 0:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 2:break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString();break;case 10:break}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t=0&&(t.pathname=i.pathname.substring(0,n+1)+t.pathname)}t.pathname=Db(t.pathname,t.protocol,r)}return typeof e.search=="string"&&(t.search=Lb(e.search,r)),typeof e.hash=="string"&&(t.hash=Nb(e.hash,r)),t}function Lr(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function zb(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Vb(t,e){let r=".*",i=`[^${zb(e.delimiter??"/#?")}]+?`,n=/[$_\u200C\u200D\p{ID_Continue}]/u,s="";for(let a=0;a0?t[a-1]:null,l=a0?l[0]:"";p=n.test(d)}else p=typeof l.name=="number";if(!p&&o.prefix===""&&u&&typeof u=="string"&&u.length>0){let d=u[u.length-1];p=h.includes(d)}p&&(s+="{"),s+=Lr(o.prefix),c&&(s+=`:${o.name}`),o.pattern===r?!c&&(!u||typeof u=="string"||u.modifier||p||o.prefix!=="")?s+="*":s+=`(${r})`:o.pattern===i?c||(s+=`(${i})`):s+=`(${o.pattern})`,o.pattern===i&&c&&o.suffix!==""&&n.test(o.suffix[0])&&(s+="\\"),s+=Lr(o.suffix),p&&(s+="}"),s+=o.modifier}return s}var ji=class{constructor(t={},e){this.regexp={},this.keys={},this.component_pattern={};try{if(typeof t=="string"){let n=new $b(t);if(n.parse(),t=n.result,e)if(typeof e=="string")t.baseURL=e;else throw new TypeError("'baseURL' parameter is not of type 'string'.");else if(typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.")}else if(e)throw new TypeError("parameter 1 is not of type 'string'.");if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");let r={pathname:Ye,protocol:Ye,username:Ye,password:Ye,hostname:Ye,port:Ye,search:Ye,hash:Ye};this.pattern=Nr(r,t,!0),Vc(this.pattern.protocol)===this.pattern.port&&(this.pattern.port="");let i;for(i of Wb){if(!(i in this.pattern))continue;let n={},s=this.pattern[i];switch(this.keys[i]=[],i){case"protocol":Object.assign(n,Ke),n.encodePart=Ps;break;case"username":Object.assign(n,Ke),n.encodePart=kb;break;case"password":Object.assign(n,Ke),n.encodePart=jb;break;case"hostname":Object.assign(n,Eb),$c(s)?n.encodePart=Jc:n.encodePart=Gc;break;case"port":Object.assign(n,Ke),n.encodePart=Xc;break;case"pathname":zc(this.regexp.protocol)?(Object.assign(n,Ab),n.encodePart=Bb):(Object.assign(n,Ke),n.encodePart=Fb);break;case"search":Object.assign(n,Ke),n.encodePart=Hb;break;case"hash":Object.assign(n,Ke),n.encodePart=Ub;break}try{let a=jc(s,n);this.regexp[i]=Fc(a,this.keys[i],n),this.component_pattern[i]=Vb(a,n)}catch{throw new TypeError(`invalid ${i} pattern '${this.pattern[i]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?r=Nr(r,t,!1):r=Nr(r,Mc(t,e),!1)}catch{return!1}let i;for(i in this.pattern)if(!this.regexp[i].exec(r[i]))return!1;return!0}exec(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?r=Nr(r,t,!1):r=Nr(r,Mc(t,e),!1)}catch{return null}let i={};e?i.inputs=[t,e]:i.inputs=[t];let n;for(n in this.pattern){let s=this.regexp[n].exec(r[n]);if(!s)return null;let a={};for(let[o,u]of this.keys[n].entries())if(typeof u.name=="string"||typeof u.name=="number"){let l=s[o+1];a[u.name]=l}i[n]={input:r[n]||"",groups:a}}return i}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=ji);var Yc=(t=[])=>{let e=Mo();for(let r of e){let{patterns:i}=r;if(t.some(s=>i.some(a=>new ji(a).exec(s))))return r}return{}};var rh=it(Ns(),1);var Gb={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function Ds(t,e){if(!Array.isArray(t)||!t.length)return t;let r=P(P({},Gb),e),i,n;if(r.strictlyTwoElementsInRangeArrays&&!t.every((o,u)=>!Array.isArray(o)||o.length!==2?(i=u,n=o.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) has not two but ${n} elements!`);if(!t.every((o,u)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(i=u,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) does not consist of only natural numbers!`);let s=t.length**2,a=0;return Array.from(t).sort((o,u)=>(r.progressFn&&(a+=1,r.progressFn(Math.floor(a*100/s))),o[0]===u[0]?o[1]u[1]?1:0:o[0]Array.isArray(l)).map(l=>[...l]).filter(l=>l[2]!==void 0||l[0]!==l[1]),s,a,o;i.progressFn?s=Ds(n,{progressFn:l=>{o=Math.floor(l/5),o!==a&&(a=o,i.progressFn(o))}}):s=Ds(n);let u=s.length-1;for(let l=u;l>0;l--)i.progressFn&&(o=Math.floor((1-l/u)*78)+21,o!==a&&o>a&&(a=o,i.progressFn(o))),(s[l][0]<=s[l-1][0]||!i.joinRangesThatTouchEdges&&s[l][0]=s[l][0]||s[l-1][1]<=s[l][1])&&s[l-1][2]!==null&&(s[l][2]===null&&s[l-1][2]!==null?s[l-1][2]=null:s[l-1][2]!=null?+i.mergeType==2&&s[l-1][0]===s[l][0]?s[l-1][2]=s[l][2]:s[l-1][2]+=s[l][2]:s[l-1][2]=s[l][2]),s.splice(l,1),l=s.length);return s.length?s:null}var Jb=!0,qs="Invariant failed";function Zc(t,e){if(!t){if(Jb)throw new Error(qs);var r=typeof e=="function"?e():e,i=r?qs+": "+r:qs;throw new Error(i)}}function ef(t,e,r){let i=0,n=0;if(arguments.length===0)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if(typeof t!="string")throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(e&&!Array.isArray(e))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(r&&typeof r!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!e||!e.filter(c=>c).length)return t;let s;Array.isArray(e)&&Number.isInteger(e[0])&&Number.isInteger(e[1])?s=[Array.from(e)]:s=Array.from(e);let a=s.length,o=0;s.filter(c=>c).forEach((c,h)=>{if(r&&(i=Math.floor(o/a*10),i!==n&&(n=i,r(i))),!Array.isArray(c))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${h}th element not an array: ${JSON.stringify(c,null,4)}, which is ${typeof c}`);if(!Number.isInteger(c[0])){if(!Number.isInteger(+c[0])||+c[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${h}th element, array ${JSON.stringify(c,null,0)}. Its first element is not an integer, string index, but ${typeof c[0]}, equal to: ${JSON.stringify(c[0],null,4)}.`);s[h][0]=+s[h][0]}if(!Number.isInteger(c[1])){if(!Number.isInteger(+c[1])||+c[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${h}th element, array ${JSON.stringify(c,null,0)}. Its second element is not an integer, string index, but ${typeof c[1]}, equal to: ${JSON.stringify(c[1],null,4)}.`);s[h][1]=+s[h][1]}o+=1});let u=Qc(s,{progressFn:c=>{r&&(i=10+Math.floor(c/10),i!==n&&(n=i,r(i)))}});Zc(u);let l=u.length;if(l>0){let c=t.slice(u[l-1][1]);t=u.reduce((h,p,d,g)=>{r&&(i=20+Math.floor(d/l*80),i!==n&&(n=i,r(i)));let E=d===0?0:g[d-1][1],m=g[d][0];return`${h}${t.slice(E,m)}${g[d][2]||""}`},""),t+=c}return t}function Bi(t,e=1){let r=" ";function i(s){return Array.from(s).reverse().join("")}function n(s,a,o){let u=o?` `:"\r",l=o?"\r":` `;if(!s)return s;let c=0,h=0,p="";for(let d=0,g=s.length;d=0&&(s=+e);let a="",o="";if(!t.trim())a=t;else if(!t[0].trim()){for(let u=0,l=t.length;u!Array.isArray(o)||o.length!==2?(i=u,n=o.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) has not two but ${n} elements!`);if(!t.every((o,u)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(i=u,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) does not consist of only natural numbers!`);let s=t.length**2,a=0;return Array.from(t).sort((o,u)=>(r.progressFn&&(a+=1,r.progressFn(Math.floor(a*100/s))),o[0]===u[0]?o[1]u[1]?1:0:o[0]Array.isArray(l)).map(l=>[...l]).filter(l=>l[2]!==void 0||l[0]!==l[1]),s,a,o;i.progressFn?s=Fc(n,{progressFn:l=>{o=Math.floor(l/5),o!==a&&(a=o,i.progressFn(o))}}):s=Fc(n);let u=s.length-1;for(let l=u;l>0;l--)i.progressFn&&(o=Math.floor((1-l/u)*78)+21,o!==a&&o>a&&(a=o,i.progressFn(o))),(s[l][0]<=s[l-1][0]||!i.joinRangesThatTouchEdges&&s[l][0]=s[l][0]||s[l-1][1]<=s[l][1])&&s[l-1][2]!==null&&(s[l][2]===null&&s[l-1][2]!==null?s[l-1][2]=null:s[l-1][2]!=null?+i.mergeType==2&&s[l-1][0]===s[l][0]?s[l-1][2]=s[l][2]:s[l-1][2]+=s[l][2]:s[l-1][2]=s[l][2]),s.splice(l,1),l=s.length);return s.length?s:null}function Ye(t){return t!=null}function Ke(t){return Number.isInteger(t)&&t>=0}function Er(t){return typeof t=="string"}var Ob={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},Uc=class{constructor(t){Xi(this,"ranges");Xi(this,"opts");let e=P(P({},Ob),t);if(e.mergeType&&e.mergeType!==1&&e.mergeType!==2)if(Er(e.mergeType)&&e.mergeType.trim()==="1")e.mergeType=1;else if(Er(e.mergeType)&&e.mergeType.trim()==="2")e.mergeType=2;else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof e.mergeType}", equal to ${JSON.stringify(e.mergeType,null,4)}`);this.opts=e,this.ranges=[]}add(t,e,r){if(t==null&&e==null)return;if(Ye(t)&&!Ye(e)){if(Array.isArray(t)){if(t.length){if(t.some(s=>Array.isArray(s))){t.forEach(s=>{Array.isArray(s)&&this.add(...s)});return}t.length&&Ke(+t[0])&&Ke(+t[1])&&this.add(...t)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(t,null,0)}) but second-one, "to" is not (${JSON.stringify(e,null,0)})`)}else if(!Ye(t)&&Ye(e))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(e,null,0)}) but first-one, "from" is not (${JSON.stringify(t,null,0)})`);let i=+t,n=+e;if(Ke(r)&&(r=String(r)),Ke(i)&&Ke(n)){if(Ye(r)&&!Er(r)&&!Ke(r))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof r}, equal to: -${JSON.stringify(r,null,4)}`);if(Ye(this.ranges)&&Array.isArray(this.last())&&i===this.last()[1]){if(this.last()[1]=n,this.last()[2],this.last()[2]!==null&&Ye(r)){let s=this.last()[2]&&this.last()[2].length>0&&(!this.opts||!this.opts.mergeType||this.opts.mergeType===1)?`${this.last()[2]}${r}`:r;this.opts.limitToBeAddedWhitespace&&(s=Ri(s,this.opts.limitLinebreaksCount)),Er(s)&&!s.length||(this.last()[2]=s)}}else{this.ranges||(this.ranges=[]);let s=r!==void 0&&!(Er(r)&&!r.length)?[i,n,r&&this.opts.limitToBeAddedWhitespace?Ri(r,this.opts.limitLinebreaksCount):r]:[i,n];this.ranges.push(s)}}else throw Ke(i)&&i>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof n}" equal to: ${JSON.stringify(n,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i,null,4)}`)}push(t,e,r){this.add(t,e,r)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=Cb(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(t=>Ye(t[2])?[t[0],t[1],Ri(t[2],this.opts.limitLinebreaksCount)]:t):this.ranges):null}wipe(){this.ranges=[]}replace(t){if(Array.isArray(t)&&t.length)if(Array.isArray(t[0])&&Ke(t[0][0]))this.ranges=Array.from(t);else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(t[0],null,4)} should be an array and its first element should be an integer, a string index.`);else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};function $c(t){return typeof t=="string"?t.length?[t]:[]:t}function Wc(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Pi(t){return typeof t=="string"}var zc={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Nb=t=>t+1;function Lb(t,e,r,i,n=!1,s=Nb){let a=typeof r=="function"?r():r;if(+e<0&&n&&a==="EOL")return a;let o=P(P({},zc),i);if(e>=t.length&&!n)return!1;let u=n?1:r.length,l=0,c=!1,h=!1,p=!1,d=o.maxMismatches,g=e,S=!1,m=!1,y=!1;function b(){return l===1&&dO.toLowerCase()).includes(t[g].toLowerCase())){if(n&&r==="EOL"&&!t[E])return!0;g=s(g);continue}let w=E>g?r[r.length-u]:r[u-1];if(!o.i&&t[g]===w||o.i&&t[g].toLowerCase()===w.toLowerCase()){if(S||(S=!0),p||(p=!0),u===r.length){if(m=!0,d!==o.maxMismatches)return!1}else u===1&&(y=!0);if(u-=1,l++,b())return!1;if(!u)return l!==r.length||d===o.maxMismatches||!c?g:!1}else if(!c&&!l&&(c=!0),o.maxMismatches&&d&&g){d-=1;for(let O=0;O<=d;O++){let C=E>g?r[r.length-u+1+O]:r[u-2-O],D=t[s(g)];if(C&&(!o.i&&t[g]===C||o.i&&t[g].toLowerCase()===C.toLowerCase())&&(!o.firstMustMatch||u!==r.length)){if(l++,b())return!1;u-=2,S=!0;break}else if(D&&C&&(!o.i&&D===C||o.i&&D.toLowerCase()===C.toLowerCase())&&(!o.firstMustMatch||u!==r.length)){if(!l&&!o.hungry)return!1;u-=1,S=!0;break}else if(C===void 0&&d>=0&&S&&(!o.firstMustMatch||m)&&(!o.lastMustMatch||y))return g}S||(h=g)}else return g===0&&u===1&&!o.lastMustMatch&&p?0:!1;if(h!==!1&&h!==g&&(h=!1),u<1)return g;g=s(g)}if(u>0)return n&&a==="EOL"?!0:o&&o.maxMismatches>=u&&p?h||0:!1}function Os(t,e,r,i,n){if(Wc(n)&&Object.prototype.hasOwnProperty.call(n,"trimBeforeMatching")&&typeof n.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(n.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let s=P(P({},zc),n);if(typeof s.trimCharsBeforeMatching=="string"&&(s.trimCharsBeforeMatching=$c(s.trimCharsBeforeMatching)),s.trimCharsBeforeMatching=s.trimCharsBeforeMatching.map(c=>Pi(c)?c:String(c)),!Pi(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to: -${JSON.stringify(r,null,4)}`);let a,o;if(Pi(i))a=[i];else if(Array.isArray(i))a=i;else if(!i)a=i;else if(typeof i=="function")a=[],a.push(i);else throw new Error(`string-match-left-right/${t}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof i}, equal to: -${JSON.stringify(i,null,4)}`);if(n&&!Wc(n))throw new Error(`string-match-left-right/${t}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof n}", and equal to: -${JSON.stringify(n,null,4)}`);let u=0,l="";if((s==null?void 0:s.trimCharsBeforeMatching)&&s.trimCharsBeforeMatching.some((c,h)=>c.length>1?(u=h,l=c,!0):!1))throw new Error(`string-match-left-right/${t}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${l.length} (equals to ${l}). Please split it into separate characters and put into array as separate elements.`);if(!a||!Array.isArray(a)||Array.isArray(a)&&!a.length||Array.isArray(a)&&a.length===1&&Pi(a[0])&&!a[0].trim()){if(typeof s.cb=="function"){let h,p=r;if((t==="matchLeftIncl"||t==="matchRight")&&(p+=1),t[5]==="L")for(let m=p;m--;){let y=e[m];if((!s.trimBeforeMatching||s.trimBeforeMatching&&y!==void 0&&y.trim())&&(!s.trimCharsBeforeMatching||!s.trimCharsBeforeMatching.length||y!==void 0&&!s.trimCharsBeforeMatching.includes(y))){h=m;break}}else if(t.startsWith("matchRight"))for(let m=p;m0&&(S=e.slice(0,g)),t[5]==="L"||h&&h>0&&(S=e.slice(h)),s.cb(d,S,h)}let c="";throw n||(c=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${t}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${c}`)}for(let c=0,h=a.length;ct[5]==="L"?b-1:b+1);if(y&&o&&typeof p=="function"&&p()==="EOL")return p()&&(s.cb?s.cb(d,S,g):!0)?p():!1;if(Number.isInteger(y)&&(g=t.startsWith("matchLeft")?y-1:y+1,t[5]==="L"?S=e.slice(0,y):S=e.slice(g)),g<0&&(g=void 0),e[g]&&(d=e[g]),Number.isInteger(y)&&(s.cb?s.cb(d,S,g):!0))return p}return!1}function Gc(t,e,r,i){return Os("matchLeft",t,e,r,i)}function Ns(t,e,r,i){return Os("matchRightIncl",t,e,r,i)}function Bt(t,e,r,i){return Os("matchRight",t,e,r,i)}var Ib={str:"",from:0,to:0,ifLeftSideIncludesThisThenCropTightly:"",ifLeftSideIncludesThisCropItToo:"",ifRightSideIncludesThisThenCropTightly:"",ifRightSideIncludesThisCropItToo:"",extendToOneSide:!1,wipeAllWhitespaceOnLeft:!1,wipeAllWhitespaceOnRight:!1,addSingleSpaceToPreventAccidentalConcatenation:!1};function Di(t){var u;let e=/^[0-9a-zA-Z]+$/;function r(l){return!l||typeof l!="string"?!1:!l.trim()}function i(l){return typeof l=="string"}if(!t||typeof t!="object"||Array.isArray(t)){let l;throw t===void 0?l="but it is missing completely.":t===null?l="but it was given as null.":l=`but it was given as ${typeof t}, equal to: -${JSON.stringify(t,null,4)}.`,new Error(`string-range-expander: [THROW_ID_01] Input must be a plain object ${l}`)}else if(typeof t=="object"&&t!==null&&!Array.isArray(t)&&!Object.keys(t).length)throw new Error("string-range-expander: [THROW_ID_02] Input must be a plain object but it was given as a plain object without any keys.");if(typeof t.from!="number")throw new Error(`string-range-expander: [THROW_ID_03] The input's "from" value opts.from, is not a number! Currently it's given as ${typeof t.from}, equal to ${JSON.stringify(t.from,null,0)}`);if(typeof t.to!="number")throw new Error(`string-range-expander: [THROW_ID_04] The input's "to" value opts.to, is not a number! Currently it's given as ${typeof t.to}, equal to ${JSON.stringify(t.to,null,0)}`);if((t==null?void 0:t.str)&&!t.str[t.from]&&t.from!==t.to)throw new Error(`string-range-expander: [THROW_ID_05] The given input string opts.str ("${t.str}") must contain the character at index "from" ("${t.from}")`);if((t==null?void 0:t.str)&&!t.str[t.to-1])throw new Error(`string-range-expander: [THROW_ID_06] The given input string, opts.str ("${t.str}") must contain the character at index before "to" ("${t.to-1}")`);if(t.from>t.to)throw new Error(`string-range-expander: [THROW_ID_07] The given "from" index, "${t.from}" is greater than "to" index, "${t.to}". That's wrong!`);if(i(t.extendToOneSide)&&t.extendToOneSide!=="left"&&t.extendToOneSide!=="right"||!i(t.extendToOneSide)&&t.extendToOneSide!==void 0&&t.extendToOneSide!==!1)throw new Error(`string-range-expander: [THROW_ID_08] The opts.extendToOneSide value is not recogniseable! It's set to: "${t.extendToOneSide}" (${typeof t.extendToOneSide}). It has to be either Boolean "false" or strings "left" or "right"`);let n=P(P({},Ib),t);if(Array.isArray(n.ifLeftSideIncludesThisThenCropTightly)){let l,c;if(n.ifLeftSideIncludesThisThenCropTightly.every((h,p)=>i(h)?!0:(l=p,c=h,!1)))n.ifLeftSideIncludesThisThenCropTightly=n.ifLeftSideIncludesThisThenCropTightly.join("");else throw new Error(`string-range-expander: [THROW_ID_09] The opts.ifLeftSideIncludesThisThenCropTightly was set to an array: -${JSON.stringify(n.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that array contains not only string elements. For example, an element at index ${l} is of a type ${typeof c} (equal to ${JSON.stringify(c,null,0)}).`)}let s=n.str,a=n.from,o=n.to;if(n.extendToOneSide!=="right"&&(r(s[a-1])&&(r(s[a-2])||n.ifLeftSideIncludesThisCropItToo.includes(s[a-2]))||s[a-1]&&n.ifLeftSideIncludesThisCropItToo.includes(s[a-1])||n.wipeAllWhitespaceOnLeft&&r(s[a-1]))){for(let l=a;l--;)if(!n.ifLeftSideIncludesThisCropItToo.includes(s[l])){if(s[l].trim()){n.wipeAllWhitespaceOnLeft||n.ifLeftSideIncludesThisCropItToo.includes(s[l+1])?a=l+1:a=l+2;break}else if(l===0){n.wipeAllWhitespaceOnLeft?a=0:a=1;break}}}if(n.extendToOneSide!=="left"&&(r(s[o])&&(n.wipeAllWhitespaceOnRight||r(s[o+1]))||n.ifRightSideIncludesThisCropItToo.includes(s[o]))){for(let l=o,c=s.length;lf[0]))].join(""));let s={removeHTMLComments:!1,removeCSSComments:!1},a=null,o=null,u=!1,l=0,c=0,h=!1,p=!1,d=null,g=null,S=null,m=null,y,b=null,E=null,w=null,O=null,C=null,D=null,j=">};",H="<",te="!",se=">",re="<",_="{},:;<>~+",A=_,x=_,R=!0,z=t.length,ee=Math.floor(z/2),F=.01,L;i.reportProgressFunc&&(L=Math.floor(i.reportProgressFuncTo-(i.reportProgressFuncTo-i.reportProgressFuncFrom)*F-i.reportProgressFuncFrom));let Q,Se=0,N=` +`.includes(s[d])||s[d]===r?(c=0,s[d]===r?p+=s[d]:s[d]===u?h<=a&&(p+=s[d],s[d+1]===l&&(p+=s[d+1],d++)):s[d]===l&&(!s[d-1]||s[d-1]!==u)&&h<=a&&(p+=s[d])):(c++,!s[d+1]&&!h&&(p+=" "));return p}if(typeof t=="string"&&t.length){let s=1;typeof+e=="number"&&Number.isInteger(+e)&&+e>=0&&(s=+e);let a="",o="";if(!t.trim())a=t;else if(!t[0].trim()){for(let u=0,l=t.length;u!Array.isArray(o)||o.length!==2?(i=u,n=o.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) has not two but ${n} elements!`);if(!t.every((o,u)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(i=u,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${i}th range (${JSON.stringify(t[i],null,4)}) does not consist of only natural numbers!`);let s=t.length**2,a=0;return Array.from(t).sort((o,u)=>(r.progressFn&&(a+=1,r.progressFn(Math.floor(a*100/s))),o[0]===u[0]?o[1]u[1]?1:0:o[0]Array.isArray(l)).map(l=>[...l]).filter(l=>l[2]!==void 0||l[0]!==l[1]),s,a,o;i.progressFn?s=tf(n,{progressFn:l=>{o=Math.floor(l/5),o!==a&&(a=o,i.progressFn(o))}}):s=tf(n);let u=s.length-1;for(let l=u;l>0;l--)i.progressFn&&(o=Math.floor((1-l/u)*78)+21,o!==a&&o>a&&(a=o,i.progressFn(o))),(s[l][0]<=s[l-1][0]||!i.joinRangesThatTouchEdges&&s[l][0]=s[l][0]||s[l-1][1]<=s[l][1])&&s[l-1][2]!==null&&(s[l][2]===null&&s[l-1][2]!==null?s[l-1][2]=null:s[l-1][2]!=null?+i.mergeType==2&&s[l-1][0]===s[l][0]?s[l-1][2]=s[l][2]:s[l-1][2]+=s[l][2]:s[l-1][2]=s[l][2]),s.splice(l,1),l=s.length);return s.length?s:null}function Qe(t){return t!=null}function Ze(t){return Number.isInteger(t)&&t>=0}function Rr(t){return typeof t=="string"}var Kb={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},nf=class{constructor(t){rn(this,"ranges");rn(this,"opts");let e=P(P({},Kb),t);if(e.mergeType&&e.mergeType!==1&&e.mergeType!==2)if(Rr(e.mergeType)&&e.mergeType.trim()==="1")e.mergeType=1;else if(Rr(e.mergeType)&&e.mergeType.trim()==="2")e.mergeType=2;else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof e.mergeType}", equal to ${JSON.stringify(e.mergeType,null,4)}`);this.opts=e,this.ranges=[]}add(t,e,r){if(t==null&&e==null)return;if(Qe(t)&&!Qe(e)){if(Array.isArray(t)){if(t.length){if(t.some(s=>Array.isArray(s))){t.forEach(s=>{Array.isArray(s)&&this.add(...s)});return}t.length&&Ze(+t[0])&&Ze(+t[1])&&this.add(...t)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(t,null,0)}) but second-one, "to" is not (${JSON.stringify(e,null,0)})`)}else if(!Qe(t)&&Qe(e))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(e,null,0)}) but first-one, "from" is not (${JSON.stringify(t,null,0)})`);let i=+t,n=+e;if(Ze(r)&&(r=String(r)),Ze(i)&&Ze(n)){if(Qe(r)&&!Rr(r)&&!Ze(r))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof r}, equal to: +${JSON.stringify(r,null,4)}`);if(Qe(this.ranges)&&Array.isArray(this.last())&&i===this.last()[1]){if(this.last()[1]=n,this.last()[2],this.last()[2]!==null&&Qe(r)){let s=this.last()[2]&&this.last()[2].length&&(!this.opts||!this.opts.mergeType||this.opts.mergeType===1)?`${this.last()[2]}${r}`:r;this.opts.limitToBeAddedWhitespace&&(s=Bi(s,this.opts.limitLinebreaksCount)),Rr(s)&&!s.length||(this.last()[2]=s)}}else{this.ranges||(this.ranges=[]);let s=r!==void 0&&!(Rr(r)&&!r.length)?[i,n,r&&this.opts.limitToBeAddedWhitespace?Bi(r,this.opts.limitLinebreaksCount):r]:[i,n];this.ranges.push(s)}}else throw Ze(i)&&i>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof n}" equal to: ${JSON.stringify(n,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i,null,4)}`)}push(t,e,r){this.add(t,e,r)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=Yb(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(t=>Qe(t[2])?[t[0],t[1],Bi(t[2],this.opts.limitLinebreaksCount)]:t):this.ranges):null}wipe(){this.ranges=[]}replace(t){if(Array.isArray(t)&&t.length)if(Array.isArray(t[0])&&Ze(t[0][0]))this.ranges=Array.from(t);else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(t[0],null,4)} should be an array and its first element should be an integer, a string index.`);else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};function sf(t){return typeof t!="string"?t:t.length?[t]:[]}function af(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Fi(t){return typeof t=="string"}var of={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Qb=t=>t+1;function Zb(t,e,r,i,n=!1,s=Qb){let a=typeof r=="function"?r():r;if(+e<0&&n&&a==="EOL")return a;let o=P(P({},of),i);if(e>=t.length&&!n)return!1;let u=n?1:r.length,l=0,c=!1,h=!1,p=!1,d=o.maxMismatches,g=e,E=!1,m=!1,y=!1;function v(){return l===1&&dO.toLowerCase()).includes(t[g].toLowerCase())){if(n&&r==="EOL"&&!t[x])return!0;g=s(g);continue}let _=x>g?r[r.length-u]:r[u-1];if(!o.i&&t[g]===_||o.i&&t[g].toLowerCase()===_.toLowerCase()){if(E||(E=!0),p||(p=!0),u===r.length){if(m=!0,d!==o.maxMismatches)return!1}else u===1&&(y=!0);if(u-=1,l++,v())return!1;if(!u)return l!==r.length||d===o.maxMismatches||!c?g:!1}else if(!c&&!l&&(c=!0),o.maxMismatches&&d&&g){d-=1;for(let O=0;O<=d;O++){let C=x>g?r[r.length-u+1+O]:r[u-2-O],D=t[s(g)];if(C&&(!o.i&&t[g]===C||o.i&&t[g].toLowerCase()===C.toLowerCase())&&(!o.firstMustMatch||u!==r.length)){if(l++,v())return!1;u-=2,E=!0;break}else if(D&&C&&(!o.i&&D===C||o.i&&D.toLowerCase()===C.toLowerCase())&&(!o.firstMustMatch||u!==r.length)){if(!l&&!o.hungry)return!1;u-=1,E=!0;break}else if(C===void 0&&d>=0&&E&&(!o.firstMustMatch||m)&&(!o.lastMustMatch||y))return g}E||(h=g)}else return g===0&&u===1&&!o.lastMustMatch&&p?0:!1;if(h!==!1&&h!==g&&(h=!1),u<1)return g;g=s(g)}if(u>0)return n&&a==="EOL"?!0:o&&o.maxMismatches>=u&&p?h||0:!1}function Ms(t,e,r,i,n){if(af(n)&&Object.prototype.hasOwnProperty.call(n,"trimBeforeMatching")&&n&&typeof n.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(n.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let s=P(P({},of),n);if(typeof s.trimCharsBeforeMatching=="string"&&(s.trimCharsBeforeMatching=sf(s.trimCharsBeforeMatching)),s.trimCharsBeforeMatching=s.trimCharsBeforeMatching.map(c=>Fi(c)?c:String(c)),!Fi(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to: +${JSON.stringify(r,null,4)}`);let a,o;if(Fi(i))a=[i];else if(Array.isArray(i))a=i;else if(!i)a=i;else if(typeof i=="function")a=[],a.push(i);else throw new Error(`string-match-left-right/${t}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof i}, equal to: +${JSON.stringify(i,null,4)}`);if(n&&!af(n))throw new Error(`string-match-left-right/${t}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof n}", and equal to: +${JSON.stringify(n,null,4)}`);let u=0,l="";if((s==null?void 0:s.trimCharsBeforeMatching)&&s.trimCharsBeforeMatching.some((c,h)=>c.length>1?(u=h,l=c,!0):!1))throw new Error(`string-match-left-right/${t}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${l.length} (equals to ${l}). Please split it into separate characters and put into array as separate elements.`);if(!a||!Array.isArray(a)||Array.isArray(a)&&!a.length||Array.isArray(a)&&a.length===1&&Fi(a[0])&&!a[0].trim()){if(typeof s.cb=="function"){let h,p=r;if((t==="matchLeftIncl"||t==="matchRight")&&(p+=1),t[5]==="L")for(let m=p;m--;){let y=e[m];if((!s.trimBeforeMatching||s.trimBeforeMatching&&y!==void 0&&y.trim())&&(!s.trimCharsBeforeMatching||!s.trimCharsBeforeMatching.length||y!==void 0&&!s.trimCharsBeforeMatching.includes(y))){h=m;break}}else if(t.startsWith("matchRight"))for(let m=p;m0&&(E=e.slice(0,g)),t[5]==="L"||h&&h>0&&(E=e.slice(h)),s.cb(d,E,h)}let c="";throw n||(c=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${t}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${c}`)}for(let c=0,h=a.length;ct[5]==="L"?v-1:v+1);if(y&&o&&typeof p=="function"&&p()==="EOL")return p()&&(s.cb?s.cb(d,E,g):!0)?p():!1;if(Number.isInteger(y)&&(g=t.startsWith("matchLeft")?y-1:y+1,t[5]==="L"?E=e.slice(0,y):E=e.slice(g)),g<0&&(g=void 0),e[g]&&(d=e[g]),Number.isInteger(y)&&(s.cb?s.cb(d,E,g):!0))return p}return!1}function lf(t,e,r,i){return Ms("matchLeft",t,e,r,i)}function ks(t,e,r,i){return Ms("matchRightIncl",t,e,r,i)}function zt(t,e,r,i){return Ms("matchRight",t,e,r,i)}var ev={str:"",from:0,to:0,ifLeftSideIncludesThisThenCropTightly:"",ifLeftSideIncludesThisCropItToo:"",ifRightSideIncludesThisThenCropTightly:"",ifRightSideIncludesThisCropItToo:"",extendToOneSide:!1,wipeAllWhitespaceOnLeft:!1,wipeAllWhitespaceOnRight:!1,addSingleSpaceToPreventAccidentalConcatenation:!1};function Hi(t){var u;let e=/^[0-9a-zA-Z]+$/;function r(l){return!l||typeof l!="string"?!1:!l.trim()}function i(l){return typeof l=="string"}if(!t||typeof t!="object"||Array.isArray(t)){let l;throw t===void 0?l="but it is missing completely.":t===null?l="but it was given as null.":l=`but it was given as ${typeof t}, equal to: +${JSON.stringify(t,null,4)}.`,new Error(`string-range-expander: [THROW_ID_01] Input must be a plain object ${l}`)}else if(typeof t=="object"&&t!==null&&!Array.isArray(t)&&!Object.keys(t).length)throw new Error("string-range-expander: [THROW_ID_02] Input must be a plain object but it was given as a plain object without any keys.");if(typeof t.from!="number")throw new Error(`string-range-expander: [THROW_ID_03] The input's "from" value resolvedOpts.from, is not a number! Currently it's given as ${typeof t.from}, equal to ${JSON.stringify(t.from,null,0)}`);if(typeof t.to!="number")throw new Error(`string-range-expander: [THROW_ID_04] The input's "to" value resolvedOpts.to, is not a number! Currently it's given as ${typeof t.to}, equal to ${JSON.stringify(t.to,null,0)}`);if((t==null?void 0:t.str)&&!t.str[t.from]&&t.from!==t.to)throw new Error(`string-range-expander: [THROW_ID_05] The given input string resolvedOpts.str ("${t.str}") must contain the character at index "from" ("${t.from}")`);if((t==null?void 0:t.str)&&!t.str[t.to-1])throw new Error(`string-range-expander: [THROW_ID_06] The given input string, resolvedOpts.str ("${t.str}") must contain the character at index before "to" ("${t.to-1}")`);if(t.from>t.to)throw new Error(`string-range-expander: [THROW_ID_07] The given "from" index, "${t.from}" is greater than "to" index, "${t.to}". That's wrong!`);if(i(t.extendToOneSide)&&t.extendToOneSide!=="left"&&t.extendToOneSide!=="right"||!i(t.extendToOneSide)&&t.extendToOneSide!==void 0&&t.extendToOneSide!==!1)throw new Error(`string-range-expander: [THROW_ID_08] The resolvedOpts.extendToOneSide value is not recognisable! It's set to: "${t.extendToOneSide}" (${typeof t.extendToOneSide}). It has to be either Boolean "false" or strings "left" or "right"`);let n=P(P({},ev),t);if(Array.isArray(n.ifLeftSideIncludesThisThenCropTightly)){let l,c;if(n.ifLeftSideIncludesThisThenCropTightly.every((h,p)=>i(h)?!0:(l=p,c=h,!1)))n.ifLeftSideIncludesThisThenCropTightly=n.ifLeftSideIncludesThisThenCropTightly.join("");else throw new Error(`string-range-expander: [THROW_ID_09] The resolvedOpts.ifLeftSideIncludesThisThenCropTightly was set to an array: +${JSON.stringify(n.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that array contains not only string elements. For example, an element at index ${l} is of a type ${typeof c} (equal to ${JSON.stringify(c,null,0)}).`)}let s=n.str,a=n.from,o=n.to;if(n.extendToOneSide!=="right"&&(r(s[a-1])&&(r(s[a-2])||n.ifLeftSideIncludesThisCropItToo.includes(s[a-2]))||s[a-1]&&n.ifLeftSideIncludesThisCropItToo.includes(s[a-1])||n.wipeAllWhitespaceOnLeft&&r(s[a-1]))){for(let l=a;l--;)if(!n.ifLeftSideIncludesThisCropItToo.includes(s[l])){if(s[l].trim()){n.wipeAllWhitespaceOnLeft||n.ifLeftSideIncludesThisCropItToo.includes(s[l+1])?a=l+1:a=l+2;break}else if(l===0){n.wipeAllWhitespaceOnLeft?a=0:a=1;break}}}if(n.extendToOneSide!=="left"&&(r(s[o])&&(n.wipeAllWhitespaceOnRight||r(s[o+1]))||n.ifRightSideIncludesThisCropItToo.includes(s[o]))){for(let l=o,c=s.length;lf[0]))].join(""));let s={removeHTMLComments:!1,removeCSSComments:!1},a=null,o=null,u=!1,l=0,c=0,h=!1,p=!1,d=null,g=null,E=null,m=null,y,v=null,x=null,_=null,O=null,C=null,D=null,j=">};",H="<",te="!",oe=">",re="<",w="{},:;<>~+",A=w,S=w,I=!0,z=t.length,ee=Math.floor(z/2),F=.01,L;i.reportProgressFunc&&(L=Math.floor(i.reportProgressFuncTo-(i.reportProgressFuncTo-i.reportProgressFuncFrom)*F-i.reportProgressFuncFrom));let Q,Ee=0,N=` `;if(t.includes(`\r `)?N=`\r -`:t.includes("\r")&&(N="\r"),z){for(let f=0;f1e3&&z<2e3?f===ee&&i.reportProgressFunc(Math.floor((i.reportProgressFuncTo-i.reportProgressFuncFrom)/2)):z>=2e3&&(Q=i.reportProgressFuncFrom+Math.floor(f/z*(L||1)),Q!==Se&&(Se=Q,i.reportProgressFunc(Q)))),c++,!y&&h&&t[f]==="}"&&t[f-1]==="}"&&(l+1>=i.lineLengthLimit?(M.push(f,f,N),l=0):(b=f,E=f,w=" ")),y&&typeof y=="number"&&f>=y&&(y=void 0),m!==null&&t.startsWith("<\/script",f)&&!Gt(t[f+8])){if((i.removeIndentations||i.removeLineBreaks)&&f>0&&t[~-f]&&!t[~-f].trim()){for(let T=f;T--;)if(t[T]===` -`||t[T]==="\r"||t[T].trim()){T+10&&(T=N),M.push(o,f,T)),o=null,a=null}if(C!==null&&O===null&&!/\w/.test(t[f])){O=t.slice(C,f);let T=Z(t,~-f);typeof T=="number"&&t[T]===">"&&!t[f].trim()&&Z(t,f)?M.push(f,Z(t,f)):T&&t[T]==="/"&&t[Z(t,T)]===">"&&(!t[f].trim()&&Z(t,f)&&M.push(f,Z(t,f)),t[T+1]!==">"&&Z(t,T+1)&&M.push(T+1,Z(t,T+1)))}if(!y&&!h&&!d&&t[~-f]==="<"&&C===null&&(/\w/.test(t[f])?C=f:t[Z(t,~-f)]==="/"&&/\w/.test(t[Z(t,Z(t,~-f))]||"")&&(C=Z(t,Z(t,~-f)))),!y&&(h||d)&&g!==null&&t[f]==="*"&&t[f+1]==="/"&&([b,E]=Di({str:t,from:g,to:f+2,ifLeftSideIncludesThisThenCropTightly:A||"",ifRightSideIncludesThisThenCropTightly:x||""}),g=null,b!=null?M.push(b,E):(l+=1,f+=1),y=f+2),!y&&(h||d)&&g===null&&t[f]==="/"&&t[f+1]==="*"&&(s.removeCSSComments||(s.removeCSSComments=!0),i.removeCSSComments&&(g=f)),p&&t.startsWith("![endif",f+1)&&(p=!1),!y&&!h&&!d&&S!==null){let T;t.startsWith("-->",f)?T=3:t[f]===">"&&t[f-1]==="]"&&(T=1),T&&([b,E]=Di({str:t,from:S,to:f+T}),S=null,b!=null?i.lineLengthLimit&&c-(E-b)>=i.lineLengthLimit?(M.push(b,E,N),c=-T):(M.push(b,E),c-=E-b):(l+=T-1,f+=T-1),y=f+T)}if(!y&&!h&&!d&&(t.startsWith("",o)||t.startsWith("1e3&&z<2e3?f===ee&&i.reportProgressFunc(Math.floor((i.reportProgressFuncTo-i.reportProgressFuncFrom)/2)):z>=2e3&&(Q=i.reportProgressFuncFrom+Math.floor(f/z*(L||1)),Q!==Ee&&(Ee=Q,i.reportProgressFunc(Q)))),c++,!y&&h&&t[f]==="}"&&t[f-1]==="}"&&(l+1>=i.lineLengthLimit?(k.push(f,f,N),l=0):(v=f,x=f,_=" ")),y&&typeof y=="number"&&f>=y&&(y=void 0),m!==null&&t.startsWith("<\/script",f)&&!Qt(t[f+8])){if((i.removeIndentations||i.removeLineBreaks)&&f>0&&t[~-f]&&!t[~-f].trim()){for(let T=f;T--;)if(t[T]===` +`||t[T]==="\r"||t[T].trim()){T+10&&(T=N),k.push(o,f,T)),o=null,a=null}if(C!==null&&O===null&&!/\w/.test(t[f])){O=t.slice(C,f);let T=Z(t,~-f);typeof T=="number"&&t[T]===">"&&!t[f].trim()&&Z(t,f)?k.push(f,Z(t,f)):T&&t[T]==="/"&&t[Z(t,T)]===">"&&(!t[f].trim()&&Z(t,f)&&k.push(f,Z(t,f)),t[T+1]!==">"&&Z(t,T+1)&&k.push(T+1,Z(t,T+1)))}if(!y&&!h&&!d&&t[~-f]==="<"&&C===null&&(/\w/.test(t[f])?C=f:t[Z(t,~-f)]==="/"&&/\w/.test(t[Z(t,Z(t,~-f))]||"")&&(C=Z(t,Z(t,~-f)))),!y&&(h||d)&&g!==null&&t[f]==="*"&&t[f+1]==="/"&&([v,x]=Hi({str:t,from:g,to:f+2,ifLeftSideIncludesThisThenCropTightly:A||"",ifRightSideIncludesThisThenCropTightly:S||""}),g=null,v!=null?k.push(v,x):(l+=1,f+=1),y=f+2),!y&&(h||d)&&g===null&&t[f]==="/"&&t[f+1]==="*"&&(s.removeCSSComments||(s.removeCSSComments=!0),i.removeCSSComments&&(g=f)),p&&t.startsWith("![endif",f+1)&&(p=!1),!y&&!h&&!d&&E!==null){let T;t.startsWith("-->",f)?T=3:t[f]===">"&&t[f-1]==="]"&&(T=1),T&&([v,x]=Hi({str:t,from:E,to:f+T}),E=null,v!=null?i.lineLengthLimit&&c-(x-v)>=i.lineLengthLimit?(k.push(v,x,N),c=-T):(k.push(v,x),c-=x-v):(l+=T-1,f+=T-1),y=f+T)}if(!y&&!h&&!d&&(t.startsWith("",o)||t.startsWith("!X||!/\w/.test(X)})||(t[~-o]&&se.includes(t[~-o])&&re.includes(t[f])||(h||d)&&g===null&&(A.includes(t[~-o])||x.includes(t[f]))||t.startsWith("!important",f)&&!p||d&&(t[~-o]==="'"||t[~-o]==='"')||t[~-o]==="}"&&t.startsWith(""&&(`'"`.includes(t[$i(t,f)])||t[Z(t,f)]==="<")||t[f]==="/"&&t[Z(t,f)]===">")&&(T="",t[f]==="/"&&t[f+1]===">"&&Z(t,f)&&Z(t,f)>f+1&&(M.push(f+1,Z(t,f)),l-=Z(t,f)-f+1)),h&&t[f]==="}"&&o&&t[o-1]==="}"&&(T=" "),T!=null&&T.length&&(l+=1),i.lineLengthLimit?l>=i.lineLengthLimit||!t[f+1]||t[f]===">"||t[f]==="/"&&t[f+1]===">"?((l>i.lineLengthLimit||l===i.lineLengthLimit&&t[f+1]&&t[f+1].trim()&&!j.includes(t[f])&&!H.includes(t[f+1]))&&(T=N,l=1),(l>i.lineLengthLimit||!(T===" "&&f===o+1))&&(M.push(o,f,T),a=null),b=null,E=null,w=null):(b===null||oi.lineLengthLimit&&(T=N),(l+(T?T.length:0)>i.lineLengthLimit||!(T===" "&&E===b+1&&t[b]===" "))&&(t[~-b]==="}"&&t[E]==="{"||(M.push(b,E,T),a=null))}t[f].trim()&&(H.includes(t[f])||t[~-f]&&j.includes(t[~-f]))&&zt(D)&&(!O||!i.mindTheInlineTags.includes(O))&&!(t[f]==="<"&&Bt(t,f,i.mindTheInlineTags,{cb:T=>!T||!/\w/.test(T)}))&&!(t[f]==="<"&&Bt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)}))?(b=f,E=f,w=null):g===null&&b!==null&&(d||!i.mindTheInlineTags||!Array.isArray(i.mindTheInlineTags)||Array.isArray(i.mindTheInlineTags.length)&&!i.mindTheInlineTags.length||!zt(O)||Array.isArray(i.mindTheInlineTags)&&i.mindTheInlineTags.length&&zt(O)&&!i.mindTheInlineTags.includes(O))&&!(t[f]==="<"&&Bt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)}))&&(b=null,E=null,w=null)}}else if(i.lineLengthLimit)if(H.includes(t[f])&&!(t[f]==="<"&&Bt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)})))if(b!==null&&E!==null&&(b!==E||(w==null?void 0:w.length))){let T=w!=null&&w.length?w.length:0;l-(E-b-T)-1>i.lineLengthLimit||(M.push(b,E,w),l-(E-b-T)-1===i.lineLengthLimit&&(M.push(f,f,N),l=0),b=null,E=null,w=null)}else M.push(f,f,N),l=0;else t[f+1]&&j.includes(t[f])&&zt(O)&&Array.isArray(i.mindTheInlineTags)&&i.mindTheInlineTags.length&&!i.mindTheInlineTags.includes(O)?b!==null&&E!==null&&(b!==E||(w==null?void 0:w.length))||(M.push(f+1,f+1,N),l=0):t[f].trim()&&(t[f+1]||b!==null&&E!==null&&(b!==E||(w==null?void 0:w.length))&&M.push(b,E,N))}if(!y&&!R&&i.removeLineBreaks&&i.lineLengthLimit&&l>=i.lineLengthLimit&&b!==null&&E!==null&&!j.includes(t[f])&&!H.includes(t[f])&&!"/".includes(t[f])&&!(l===i.lineLengthLimit&&t[f+1]&&!t[f+1].trim())){let T=N;t[f+1]&&!t[f+1].trim()&&l===i.lineLengthLimit&&(T=w),T===N&&!t[~-b].trim()&&$i(t,b)&&(b=$i(t,b)+1),M.push(b,E,T),l=f-E,t[f].length&&(l+=1),b=null,E=null,w=null}if((!y&&t[f]===` +`&&t[f-2]==="\r"&&o===f-2)&&k.push(o,f,N),v=null,x=null,_=null,o=null,l=1;continue}let T=" ";t[f]==="<"&&zt(t,f,i.mindTheInlineTags,{cb:X=>!X||!/\w/.test(X)})||(t[~-o]&&oe.includes(t[~-o])&&re.includes(t[f])||(h||d)&&g===null&&(A.includes(t[~-o])||S.includes(t[f]))||t.startsWith("!important",f)&&!p||d&&(t[~-o]==="'"||t[~-o]==='"')||t[~-o]==="}"&&t.startsWith(""&&(`'"`.includes(t[Yi(t,f)])||t[Z(t,f)]==="<")||t[f]==="/"&&t[Z(t,f)]===">")&&(T="",t[f]==="/"&&t[f+1]===">"&&Z(t,f)&&Z(t,f)>f+1&&(k.push(f+1,Z(t,f)),l-=Z(t,f)-f+1)),h&&t[f]==="}"&&o&&t[o-1]==="}"&&(T=" "),T!=null&&T.length&&(l+=1),i.lineLengthLimit?l>=i.lineLengthLimit||!t[f+1]||t[f]===">"||t[f]==="/"&&t[f+1]===">"?((l>i.lineLengthLimit||l===i.lineLengthLimit&&t[f+1]&&t[f+1].trim()&&!j.includes(t[f])&&!H.includes(t[f+1]))&&(T=N,l=1),(l>i.lineLengthLimit||!(T===" "&&f===o+1))&&(k.push(o,f,T),a=null),v=null,x=null,_=null):(v===null||oi.lineLengthLimit&&(T=N),(l+(T?T.length:0)>i.lineLengthLimit||!(T===" "&&x===v+1&&t[v]===" "))&&(t[~-v]==="}"&&t[x]==="{"||(k.push(v,x,T),a=null))}t[f].trim()&&(H.includes(t[f])||t[~-f]&&j.includes(t[~-f]))&&Kt(D)&&(!O||!i.mindTheInlineTags.includes(O))&&!(t[f]==="<"&&zt(t,f,i.mindTheInlineTags,{cb:T=>!T||!/\w/.test(T)}))&&!(t[f]==="<"&&zt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)}))?(v=f,x=f,_=null):g===null&&v!==null&&(d||!i.mindTheInlineTags||!Array.isArray(i.mindTheInlineTags)||Array.isArray(i.mindTheInlineTags.length)&&!i.mindTheInlineTags.length||!Kt(O)||Array.isArray(i.mindTheInlineTags)&&i.mindTheInlineTags.length&&Kt(O)&&!i.mindTheInlineTags.includes(O))&&!(t[f]==="<"&&zt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)}))&&(v=null,x=null,_=null)}}else if(i.lineLengthLimit)if(H.includes(t[f])&&!(t[f]==="<"&&zt(t,f,i.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:T=>!T||!/\w/.test(T)})))if(v!==null&&x!==null&&(v!==x||(_==null?void 0:_.length))){let T=_!=null&&_.length?_.length:0;l-(x-v-T)-1>i.lineLengthLimit||(k.push(v,x,_),l-(x-v-T)-1===i.lineLengthLimit&&(k.push(f,f,N),l=0),v=null,x=null,_=null)}else k.push(f,f,N),l=0;else t[f+1]&&j.includes(t[f])&&Kt(O)&&Array.isArray(i.mindTheInlineTags)&&i.mindTheInlineTags.length&&!i.mindTheInlineTags.includes(O)?v!==null&&x!==null&&(v!==x||(_==null?void 0:_.length))||(k.push(f+1,f+1,N),l=0):t[f].trim()&&(t[f+1]||v!==null&&x!==null&&(v!==x||(_==null?void 0:_.length))&&k.push(v,x,N))}if(!y&&!I&&i.removeLineBreaks&&i.lineLengthLimit&&l>=i.lineLengthLimit&&v!==null&&x!==null&&!j.includes(t[f])&&!H.includes(t[f])&&!"/".includes(t[f])&&!(l===i.lineLengthLimit&&t[f+1]&&!t[f+1].trim())){let T=N;t[f+1]&&!t[f+1].trim()&&l===i.lineLengthLimit&&(T=_),T===N&&!t[~-v].trim()&&Yi(t,v)&&(v=Yi(t,v)+1),k.push(v,x,T),l=f-x,t[f].length&&(l+=1),v=null,x=null,_=null}if((!y&&t[f]===` `||t[f]==="\r"&&(!t[f+1]||t[f+1]&&t[f+1]!==` `))&&(a=f,u&&(u=!1),!i.removeLineBreaks&&o!==null&&o0&&(y=T)}if(!y&&!h&&t.startsWith("0&&(y=T)}if(!y&&t.startsWith("",f+9);T>0&&(y=T)}!y&&!h&&!d&&C!==null&&t[f]===">"&&(t[Z(t,f)]==="<"&&(D=O),C=null,O=null),t[f]==="<"&&D!==null&&(D=null),h&&t[f]==="{"&&t[f+1]==="{"&&t.indexOf("}}")!==-1&&(y=t.indexOf("}}")+2);let Y=!0}if(M.current()){let f=M.current();M.wipe();let Y=i.reportProgressFuncTo-(i.reportProgressFuncTo-i.reportProgressFuncFrom)*F,T=Bc(t,f,_e=>{i.reportProgressFunc&&z>=2e3&&(Q=Math.floor(Y+(i.reportProgressFuncTo-Y)*(_e/100)),Q!==Se&&(Se=Q,i.reportProgressFunc(Q)))}),X=T.length;return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:z,cleanedLength:X,bytesSaved:Math.max(z-X,0),percentageReducedOfOriginal:z?Math.round(Math.max(z-X,0)*100/z):0},ranges:f,applicableOpts:s,result:T}}}return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:z,cleanedLength:z,bytesSaved:0,percentageReducedOfOriginal:0},applicableOpts:s,ranges:null,result:t}}var ce=global.DOMParser;var Uf=t=>{let r=new ce().parseFromString(t,"text/html").documentElement.innerHTML,i=Ff(r,vo());return(0,Hf.default)(i.result,wo()).trim()};var $f=t=>{var c;let e={url:"",shortlink:"",amphtml:"",canonical:"",title:"",description:"",image:"",author:"",source:"",published:""},r=["application-name","og:site_name","twitter:site","dc.title"],i=["og:url","twitter:url"],n=["title","og:title","twitter:title"],s=["description","og:description","twitter:description"],a=["og:image","twitter:image","twitter:image:src"],o=["author","creator","og:creator","article:author","twitter:creator","dc.creator"],u=["article:published_time","article:modified_time","og:updated_time","datepublished"],l=new ce().parseFromString(t,"text/html");return e.title=(c=l.querySelector("head > title"))==null?void 0:c.innerText,Array.from(l.getElementsByTagName("link")).forEach(h=>{let p=h.getAttribute("rel"),d=h.getAttribute("href");p&&d&&(e[p]=d)}),Array.from(l.getElementsByTagName("meta")).forEach(h=>{var S,m,y;let p=h.getAttribute("content"),d=((S=h.getAttribute("property"))==null?void 0:S.toLowerCase())??((m=h.getAttribute("itemprop"))==null?void 0:m.toLowerCase()),g=(y=h.getAttribute("name"))==null?void 0:y.toLowerCase();(r.includes(d)||r.includes(g))&&(e.source=p),(i.includes(d)||i.includes(g))&&(e.url=p),(n.includes(d)||n.includes(g))&&(e.title=p),(s.includes(d)||s.includes(g))&&(e.description=p),(a.includes(d)||a.includes(g))&&(e.image=p),(o.includes(d)||o.includes(g))&&(e.author=p),(u.includes(d)||u.includes(g))&&(e.published=p)}),e};var Gs=tt(Xf(),1);var Yf=(t,e="")=>{if(!Vt(t))return null;let r=new ce().parseFromString(t,"text/html"),i=r.createElement("base");i.setAttribute("href",e),r.head.appendChild(i);let s=new Gs.Readability(r).parse()||{};return s.textContent?s.content:null};function Kf(t){if(!Vt(t))return null;let e=new ce().parseFromString(t,"text/html");return new Gs.Readability(e)._getArticleTitle()}var Sw=100,Ew=20,Aw=t=>t.length>0?t.split(/\s+/).length:0,Qf=(t,e=null)=>{if(!e)return null;try{let r=new ce().parseFromString(t,"text/html"),i=[];return r.querySelectorAll(e).forEach(n=>{let s=n.innerHTML.trim();Aw(s)>=Sw&&i.push(s)}),i.length?i.reduce((n,s)=>n.concat([s]),[]).filter(n=>Dr(n).length>Ew).join(""):r.documentElement.innerHTML}catch(r){oe.error(r)}return null};var Zf=t=>{let e=t.trim().split(/\s+/g).length,{wordsPerMinute:r}=Et(),i=e/r;return Math.ceil(i*60)};var eh=(t,e)=>{let r=new ce().parseFromString(t,"text/html");return Array.from(r.getElementsByTagName("a")).forEach(i=>{let n=i.getAttribute("href");n&&(i.setAttribute("href",Tr(e,n)),i.setAttribute("target","_blank"))}),Array.from(r.getElementsByTagName("img")).forEach(i=>{let n=i.getAttribute("data-src")??i.getAttribute("src");n&&i.setAttribute("src",Tr(e,n))}),r.toString()};var th=(t,e=[])=>{if(!(e!=null&&e.length))return t;let r=new ce().parseFromString(t,"text/html");for(let i of e)r.querySelectorAll(i).forEach(n=>n.remove());return r.toString()};var rh=(t,e=null)=>{if(!e)return t;let r=new ce().parseFromString(t,"text/html");return e(r).toString()};var Cw=t=>(0,ih.default)(t,{allowedTags:!1,allowedAttributes:!1}),Ow=(t,e,r,i)=>t.length{let r=Cw(t),i=$f(r),n=i.title,{url:s,shortlink:a,amphtml:o,canonical:u,description:l,image:c,author:h,source:p,published:d}=i,{descriptionLengthThreshold:g,descriptionTruncateLen:S,contentLengthThreshold:m}=Et();if(n||(oe.info("Could not detect article title from meta!"),n=Kf(r,e)),!n)return oe.info("Could not detect article title!"),null;let y=Zs([s,a,o,u,e].filter(kr).map(yc));if(!y.length)return oe.info("Could not detect article link!"),null;let b=vc(y,n),{selector:E=null,unwanted:w=[],transform:O=null}=qc(y),C=Qf(r,E),D=th(C??r,w),j=eh(D,b),H=rh(j,O),te=Yf(H,b);if(!te)return oe.info("Could not detect article content!"),null;let se=Uf(te),re=Dr(se);if(re.length{if(!yt(t))throw new Error("Input must be a string");if(Vt(t))return Vs(t);if(!kr(t))throw new Error("Input must be a valid URL");let e=await xo(t);return e?Vs(e,t):null};export{S_ as addQueryRules,I0 as extract,vo as getHtmlCrushOptions,Et as getParserOptions,_o as getQueryRules,bo as getRequestOptions,wo as getSanitizeHtmlOptions,__ as setHtmlCrushOptions,v_ as setParserOptions,x_ as setQueryRules,w_ as setRequestOptions,T_ as setSanitizeHtmlOptions}; +`&&t[f-1]!=="\r")&&k.push(o,f)),!y&&d&&d0&&(y=T)}if(!y&&!h&&t.startsWith("0&&(y=T)}if(!y&&t.startsWith("",f+9);T>0&&(y=T)}!y&&!h&&!d&&C!==null&&t[f]===">"&&(t[Z(t,f)]==="<"&&(D=O),C=null,O=null),t[f]==="<"&&D!==null&&(D=null),h&&t[f]==="{"&&t[f+1]==="{"&&t.indexOf("}}")!==-1&&(y=t.indexOf("}}")+2);let Y=!0}if(k.current()){let f=k.current();k.wipe();let Y=i.reportProgressFuncTo-(i.reportProgressFuncTo-i.reportProgressFuncFrom)*F,T=ef(t,f,Te=>{i.reportProgressFunc&&z>=2e3&&(Q=Math.floor(Y+(i.reportProgressFuncTo-Y)*(Te/100)),Q!==Ee&&(Ee=Q,i.reportProgressFunc(Q)))}),X=T.length;return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:z,cleanedLength:X,bytesSaved:Math.max(z-X,0),percentageReducedOfOriginal:z?Math.round(Math.max(z-X,0)*100/z):0},ranges:f,applicableOpts:s,result:T}}}return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:z,cleanedLength:z,bytesSaved:0,percentageReducedOfOriginal:0},applicableOpts:s,ranges:null,result:t}}var ce=global.DOMParser;var ih=t=>{let r=new ce().parseFromString(t,"text/html").documentElement.innerHTML,i=th(r,Do());return(0,rh.default)(i.result,qo()).trim()};var nh=t=>{var c;let e={url:"",shortlink:"",amphtml:"",canonical:"",title:"",description:"",image:"",author:"",source:"",published:""},r=["application-name","og:site_name","twitter:site","dc.title"],i=["og:url","twitter:url"],n=["title","og:title","twitter:title"],s=["description","og:description","twitter:description"],a=["og:image","twitter:image","twitter:image:src"],o=["author","creator","og:creator","article:author","twitter:creator","dc.creator"],u=["article:published_time","article:modified_time","og:updated_time","datepublished"],l=new ce().parseFromString(t,"text/html");return e.title=(c=l.querySelector("head > title"))==null?void 0:c.innerText,Array.from(l.getElementsByTagName("link")).forEach(h=>{let p=h.getAttribute("rel"),d=h.getAttribute("href");p&&d&&(e[p]=d)}),Array.from(l.getElementsByTagName("meta")).forEach(h=>{var E,m,y;let p=h.getAttribute("content"),d=((E=h.getAttribute("property"))==null?void 0:E.toLowerCase())??((m=h.getAttribute("itemprop"))==null?void 0:m.toLowerCase()),g=(y=h.getAttribute("name"))==null?void 0:y.toLowerCase();(r.includes(d)||r.includes(g))&&(e.source=p),(i.includes(d)||i.includes(g))&&(e.url=p),(n.includes(d)||n.includes(g))&&(e.title=p),(s.includes(d)||s.includes(g))&&(e.description=p),(a.includes(d)||a.includes(g))&&(e.image=p),(o.includes(d)||o.includes(g))&&(e.author=p),(u.includes(d)||u.includes(g))&&(e.published=p)}),e};var ea=it(ch(),1);var fh=(t,e="")=>{if(!Zt(t))return null;let r=new ce().parseFromString(t,"text/html"),i=r.createElement("base");i.setAttribute("href",e),r.head.appendChild(i);let s=new ea.Readability(r).parse()||{};return s.textContent?s.content:null};function hh(t){if(!Zt(t))return null;let e=new ce().parseFromString(t,"text/html");return new ea.Readability(e)._getArticleTitle()}var Gw=100,Jw=20,Xw=t=>t.length>0?t.split(/\s+/).length:0,ph=(t,e=null)=>{if(!e)return null;try{let r=new ce().parseFromString(t,"text/html"),i=[];return r.querySelectorAll(e).forEach(n=>{let s=n.innerHTML.trim();Xw(s)>=Gw&&i.push(s)}),i.length?i.reduce((n,s)=>n.concat([s]),[]).filter(n=>Fr(n).length>Jw).join(""):r.documentElement.innerHTML}catch(r){le.error(r)}return null};var dh=t=>{let e=t.trim().split(/\s+/g).length,{wordsPerMinute:r}=Rt(),i=e/r;return Math.ceil(i*60)};var gh=(t,e)=>{let r=new ce().parseFromString(t,"text/html");return Array.from(r.getElementsByTagName("a")).forEach(i=>{let n=i.getAttribute("href");n&&(i.setAttribute("href",Or(e,n)),i.setAttribute("target","_blank"))}),Array.from(r.getElementsByTagName("img")).forEach(i=>{let n=i.getAttribute("data-src")??i.getAttribute("src");n&&i.setAttribute("src",Or(e,n))}),r.toString()};var mh=(t,e=[])=>{if(!(e!=null&&e.length))return t;let r=new ce().parseFromString(t,"text/html");for(let i of e)r.querySelectorAll(i).forEach(n=>n.remove());return r.toString()};var yh=(t,e=null)=>{if(!e)return t;let r=new ce().parseFromString(t,"text/html");return e(r).toString()};var Yw=t=>(0,bh.default)(t,{allowedTags:!1,allowedAttributes:!1}),Kw=(t,e,r,i)=>t.length{let r=Yw(t),i=nh(r),n=i.title,{url:s,shortlink:a,amphtml:o,canonical:u,description:l,image:c,author:h,source:p,published:d}=i,{descriptionLengthThreshold:g,descriptionTruncateLen:E,contentLengthThreshold:m}=Rt();if(n||(le.info("Could not detect article title from meta!"),n=hh(r,e)),!n)return le.info("Could not detect article title!"),null;let y=oa([s,a,o,u,e].filter(Ur).map(Ic));if(!y.length)return le.info("Could not detect article link!"),null;let v=Dc(y,n),{selector:x=null,unwanted:_=[],transform:O=null}=Yc(y),C=ph(r,x),D=mh(C??r,_),j=gh(D,v),H=yh(j,O),te=fh(H,v);if(!te)return le.info("Could not detect article content!"),null;let oe=ih(te),re=Fr(oe);if(re.length{if(!_t(t))throw new Error("Input must be a string");if(Zt(t))return ta(t);if(!Ur(t))throw new Error("Input must be a valid URL");let e=await jo(t);return e?ta(e,t):null};export{X_ as addQueryRules,nS as extract,Do as getHtmlCrushOptions,Rt as getParserOptions,Mo as getQueryRules,Po as getRequestOptions,qo as getSanitizeHtmlOptions,V_ as setHtmlCrushOptions,W_ as setParserOptions,J_ as setQueryRules,z_ as setRequestOptions,G_ as setSanitizeHtmlOptions}; /*! * is-plain-object * @@ -79,7 +79,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name arrayiffy-if-string * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else. - * @version 4.0.12 + * @version 4.0.14 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/arrayiffy-if-string/} @@ -87,7 +87,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name html-crush * @fileoverview Minifies HTML/CSS: valid or broken, pure or mixed with other languages - * @version 5.0.12 + * @version 5.0.18 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/html-crush/} @@ -95,7 +95,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name ranges-apply * @fileoverview Take an array of string index ranges, delete/replace the string according to them - * @version 6.0.12 + * @version 6.1.3 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/ranges-apply/} @@ -103,7 +103,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name ranges-merge * @fileoverview Merge and sort string index ranges - * @version 8.0.12 + * @version 8.1.3 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/ranges-merge/} @@ -111,7 +111,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name ranges-push * @fileoverview Gather string index ranges - * @version 6.0.12 + * @version 6.1.3 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/ranges-push/} @@ -119,7 +119,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name ranges-sort * @fileoverview Sort string index ranges - * @version 5.0.12 + * @version 5.0.13 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/ranges-sort/} @@ -127,7 +127,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name string-collapse-leading-whitespace * @fileoverview Collapse the leading and trailing whitespace of a string - * @version 6.0.12 + * @version 6.0.14 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-collapse-leading-whitespace/} @@ -135,7 +135,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name string-left-right * @fileoverview Looks up the first non-whitespace character to the left/right of a given index - * @version 5.0.12 + * @version 5.0.13 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-left-right/} @@ -143,7 +143,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name string-match-left-right * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace - * @version 8.0.12 + * @version 8.1.3 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-match-left-right/} @@ -151,7 +151,7 @@ ${JSON.stringify(e.breakToTheLeftOf[f],null,4)}`)}let i=P(P({},vw),e);typeof i.r /** * @name string-range-expander * @fileoverview Expands string index ranges within whitespace boundaries until letters are met - * @version 3.0.12 + * @version 3.0.13 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-range-expander/} diff --git a/dist/article-parser.browser.js.map b/dist/article-parser.browser.js.map index 6c5e4ea9..5cd1463d 100644 --- a/dist/article-parser.browser.js.map +++ b/dist/article-parser.browser.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/bind.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/utils.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/buildURL.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/InterceptorManager.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/normalizeHeaderName.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/enhanceError.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/defaults/transitional.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/createError.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/settle.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/cookies.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/isAbsoluteURL.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/combineURLs.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/buildFullPath.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/parseHeaders.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/isURLSameOrigin.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/cancel/Cancel.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/adapters/xhr.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/defaults/index.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/transformData.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/cancel/isCancel.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/dispatchRequest.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/mergeConfig.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/env/data.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/validator.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/core/Axios.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/cancel/CancelToken.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/spread.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/helpers/isAxiosError.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/lib/axios.js", "../node_modules/.pnpm/axios@0.26.1_debug@4.3.4/node_modules/axios/index.js", "../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js", "../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js", "../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js", "../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode_codepoint.js", "../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Tokenizer.js", "../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Parser.js", "../node_modules/.pnpm/domelementtype@2.2.0/node_modules/domelementtype/lib/index.js", "../node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/node.js", "../node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/index.js", "../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode.js", "../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/encode.js", "../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/index.js", "../node_modules/.pnpm/dom-serializer@1.3.2/node_modules/dom-serializer/lib/foreignNames.js", "../node_modules/.pnpm/dom-serializer@1.3.2/node_modules/dom-serializer/lib/index.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/stringify.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/traversal.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/manipulation.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/querying.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/legacy.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/helpers.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/feeds.js", "../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/index.js", "../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/FeedHandler.js", "../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/index.js", "../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js", "../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js", "../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js", "../node_modules/.pnpm/parse-srcset@1.0.2/node_modules/parse-srcset/src/parse-srcset.js", "../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.browser.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/terminal-highlight", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/css-syntax-error.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/symbols.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/stringifier.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/stringify.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/node.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/declaration.js", "../node_modules/.pnpm/source-map-js@1.0.2/node_modules/source-map-js/source-map.js", "(disabled):path", "(disabled):url", "../node_modules/.pnpm/nanoid@3.3.1/node_modules/nanoid/non-secure/index.cjs", "(disabled):fs", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/previous-map.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/input.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/map-generator.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/comment.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/container.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/document.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/warn-once.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/warning.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/result.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/tokenize.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/at-rule.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/root.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/list.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/rule.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/parser.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/parse.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/lazy-result.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/no-work-result.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/processor.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/fromJSON.js", "../node_modules/.pnpm/postcss@8.4.12/node_modules/postcss/lib/postcss.js", "../node_modules/.pnpm/sanitize-html@2.7.0/node_modules/sanitize-html/index.js", "../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js", "../node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js", "../node_modules/.pnpm/@mozilla+readability@0.4.2/node_modules/@mozilla/readability/Readability.js", "../node_modules/.pnpm/@mozilla+readability@0.4.2/node_modules/@mozilla/readability/Readability-readerable.js", "../node_modules/.pnpm/@mozilla+readability@0.4.2/node_modules/@mozilla/readability/index.js", "../node_modules/.pnpm/bellajs@11.0.2/node_modules/bellajs/dist/bella.esm.js", "../src/utils/isValidUrl.js", "../src/utils/isHTMLString.js", "../src/utils/retrieve.js", "../src/utils/logger.js", "../src/rules.js", "../src/config.js", "../src/utils/parseFromHtml.js", "../src/utils/purifyUrl.js", "../src/utils/absolutifyUrl.js", "../node_modules/.pnpm/string-comparison@1.1.0/node_modules/string-comparison/dist/index.mjs", "../src/utils/chooseBestUrl.js", "../src/utils/getHostname.js", "../node_modules/.pnpm/urlpattern-polyfill@4.0.2/node_modules/urlpattern-polyfill/dist/index.js", "../src/utils/findRulesByUrl.js", "../src/utils/cleanAndMinifyHtml.js", "../node_modules/.pnpm/ranges-sort@5.0.12/node_modules/ranges-sort/dist/ranges-sort.esm.js", "../node_modules/.pnpm/ranges-merge@8.0.12/node_modules/ranges-merge/dist/ranges-merge.esm.js", "../node_modules/.pnpm/tiny-invariant@1.2.0/node_modules/tiny-invariant/dist/tiny-invariant.esm.js", "../node_modules/.pnpm/ranges-apply@6.0.12/node_modules/ranges-apply/dist/ranges-apply.esm.js", "../node_modules/.pnpm/string-collapse-leading-whitespace@6.0.12/node_modules/string-collapse-leading-whitespace/dist/string-collapse-leading-whitespace.esm.js", "../node_modules/.pnpm/ranges-push@6.0.12/node_modules/ranges-push/dist/ranges-push.esm.js", "../node_modules/.pnpm/arrayiffy-if-string@4.0.12/node_modules/arrayiffy-if-string/dist/arrayiffy-if-string.esm.js", "../node_modules/.pnpm/string-match-left-right@8.0.12/node_modules/string-match-left-right/dist/string-match-left-right.esm.js", "../node_modules/.pnpm/string-range-expander@3.0.12/node_modules/string-range-expander/dist/string-range-expander.esm.js", "../node_modules/.pnpm/string-left-right@5.0.12/node_modules/string-left-right/dist/string-left-right.esm.js", "../node_modules/.pnpm/html-crush@5.0.12/node_modules/html-crush/dist/html-crush.esm.js", "../src/browser/linkedom.js", "../src/utils/extractMetaData.js", "../src/utils/extractWithReadability.js", "../src/utils/extractWithSelector.js", "../src/utils/getTimeToRead.js", "../src/utils/normalizeUrls.js", "../src/utils/stripUnwantedTags.js", "../src/utils/transformHtml.js", "../src/main.js"], - "sourcesContent": ["'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n", "'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return toString.call(val) === '[object FormData]';\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return toString.call(val) === '[object URLSearchParams]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n", "'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n", "'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n", "'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n", "'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n", "'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n", "'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n", "'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n", "'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar transitionalDefaults = require('../defaults/transitional');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n", "'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar enhanceError = require('../core/enhanceError');\nvar transitionalDefaults = require('./transitional');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n", "'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n", "'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n", "'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n", "'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n", "module.exports = {\n \"version\": \"0.26.1\"\n};", "'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n", "'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n", "'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n", "'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n", "module.exports = require('./lib/axios');", "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(require(\"./maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_codepoint_1 = __importDefault(require(\"entities/lib/decode_codepoint\"));\nvar entities_json_1 = __importDefault(require(\"entities/lib/maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"entities/lib/maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"entities/lib/maps/xml.json\"));\nfunction whitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\nfunction isASCIIAlpha(c) {\n return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\");\n}\nfunction ifElseState(upper, SUCCESS, FAILURE) {\n var lower = upper.toLowerCase();\n if (upper === lower) {\n return function (t, c) {\n if (c === lower) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n }\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n}\nfunction consumeSpecialNameChar(upper, NEXT_STATE) {\n var lower = upper.toLowerCase();\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = NEXT_STATE;\n }\n else {\n t._state = 3 /* InTagName */;\n t._index--; // Consume the token again\n }\n };\n}\nvar stateBeforeCdata1 = ifElseState(\"C\", 24 /* BeforeCdata2 */, 16 /* InDeclaration */);\nvar stateBeforeCdata2 = ifElseState(\"D\", 25 /* BeforeCdata3 */, 16 /* InDeclaration */);\nvar stateBeforeCdata3 = ifElseState(\"A\", 26 /* BeforeCdata4 */, 16 /* InDeclaration */);\nvar stateBeforeCdata4 = ifElseState(\"T\", 27 /* BeforeCdata5 */, 16 /* InDeclaration */);\nvar stateBeforeCdata5 = ifElseState(\"A\", 28 /* BeforeCdata6 */, 16 /* InDeclaration */);\nvar stateBeforeScript1 = consumeSpecialNameChar(\"R\", 35 /* BeforeScript2 */);\nvar stateBeforeScript2 = consumeSpecialNameChar(\"I\", 36 /* BeforeScript3 */);\nvar stateBeforeScript3 = consumeSpecialNameChar(\"P\", 37 /* BeforeScript4 */);\nvar stateBeforeScript4 = consumeSpecialNameChar(\"T\", 38 /* BeforeScript5 */);\nvar stateAfterScript1 = ifElseState(\"R\", 40 /* AfterScript2 */, 1 /* Text */);\nvar stateAfterScript2 = ifElseState(\"I\", 41 /* AfterScript3 */, 1 /* Text */);\nvar stateAfterScript3 = ifElseState(\"P\", 42 /* AfterScript4 */, 1 /* Text */);\nvar stateAfterScript4 = ifElseState(\"T\", 43 /* AfterScript5 */, 1 /* Text */);\nvar stateBeforeStyle1 = consumeSpecialNameChar(\"Y\", 45 /* BeforeStyle2 */);\nvar stateBeforeStyle2 = consumeSpecialNameChar(\"L\", 46 /* BeforeStyle3 */);\nvar stateBeforeStyle3 = consumeSpecialNameChar(\"E\", 47 /* BeforeStyle4 */);\nvar stateAfterStyle1 = ifElseState(\"Y\", 49 /* AfterStyle2 */, 1 /* Text */);\nvar stateAfterStyle2 = ifElseState(\"L\", 50 /* AfterStyle3 */, 1 /* Text */);\nvar stateAfterStyle3 = ifElseState(\"E\", 51 /* AfterStyle4 */, 1 /* Text */);\nvar stateBeforeSpecialT = consumeSpecialNameChar(\"I\", 54 /* BeforeTitle1 */);\nvar stateBeforeTitle1 = consumeSpecialNameChar(\"T\", 55 /* BeforeTitle2 */);\nvar stateBeforeTitle2 = consumeSpecialNameChar(\"L\", 56 /* BeforeTitle3 */);\nvar stateBeforeTitle3 = consumeSpecialNameChar(\"E\", 57 /* BeforeTitle4 */);\nvar stateAfterSpecialTEnd = ifElseState(\"I\", 58 /* AfterTitle1 */, 1 /* Text */);\nvar stateAfterTitle1 = ifElseState(\"T\", 59 /* AfterTitle2 */, 1 /* Text */);\nvar stateAfterTitle2 = ifElseState(\"L\", 60 /* AfterTitle3 */, 1 /* Text */);\nvar stateAfterTitle3 = ifElseState(\"E\", 61 /* AfterTitle4 */, 1 /* Text */);\nvar stateBeforeEntity = ifElseState(\"#\", 63 /* BeforeNumericEntity */, 64 /* InNamedEntity */);\nvar stateBeforeNumericEntity = ifElseState(\"X\", 66 /* InHexEntity */, 65 /* InNumericEntity */);\nvar Tokenizer = /** @class */ (function () {\n function Tokenizer(options, cbs) {\n var _a;\n /** The current state the tokenizer is in. */\n this._state = 1 /* Text */;\n /** The read buffer. */\n this.buffer = \"\";\n /** The beginning of the section that is currently being read. */\n this.sectionStart = 0;\n /** The index within the buffer that we are currently looking at. */\n this._index = 0;\n /**\n * Data that has already been processed will be removed from the buffer occasionally.\n * `_bufferOffset` keeps track of how many characters have been removed, to make sure position information is accurate.\n */\n this.bufferOffset = 0;\n /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n this.baseState = 1 /* Text */;\n /** For special parsing behavior inside of script and style tags. */\n this.special = 1 /* None */;\n /** Indicates whether the tokenizer has been paused. */\n this.running = true;\n /** Indicates whether the tokenizer has finished running / `.end` has been called. */\n this.ended = false;\n this.cbs = cbs;\n this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode);\n this.decodeEntities = (_a = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a !== void 0 ? _a : true;\n }\n Tokenizer.prototype.reset = function () {\n this._state = 1 /* Text */;\n this.buffer = \"\";\n this.sectionStart = 0;\n this._index = 0;\n this.bufferOffset = 0;\n this.baseState = 1 /* Text */;\n this.special = 1 /* None */;\n this.running = true;\n this.ended = false;\n };\n Tokenizer.prototype.write = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".write() after done!\"));\n this.buffer += chunk;\n this.parse();\n };\n Tokenizer.prototype.end = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".end() after done!\"));\n if (chunk)\n this.write(chunk);\n this.ended = true;\n if (this.running)\n this.finish();\n };\n Tokenizer.prototype.pause = function () {\n this.running = false;\n };\n Tokenizer.prototype.resume = function () {\n this.running = true;\n if (this._index < this.buffer.length) {\n this.parse();\n }\n if (this.ended) {\n this.finish();\n }\n };\n /**\n * The current index within all of the written data.\n */\n Tokenizer.prototype.getAbsoluteIndex = function () {\n return this.bufferOffset + this._index;\n };\n Tokenizer.prototype.stateText = function (c) {\n if (c === \"<\") {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this._state = 2 /* BeforeTagName */;\n this.sectionStart = this._index;\n }\n else if (this.decodeEntities &&\n c === \"&\" &&\n (this.special === 1 /* None */ || this.special === 4 /* Title */)) {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this.baseState = 1 /* Text */;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return (isASCIIAlpha(c) ||\n (this.xmlMode && !whitespace(c) && c !== \"/\" && c !== \">\"));\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === \"/\") {\n this._state = 5 /* BeforeClosingTagName */;\n }\n else if (c === \"<\") {\n this.cbs.ontext(this.getSection());\n this.sectionStart = this._index;\n }\n else if (c === \">\" ||\n this.special !== 1 /* None */ ||\n whitespace(c)) {\n this._state = 1 /* Text */;\n }\n else if (c === \"!\") {\n this._state = 15 /* BeforeDeclaration */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"?\") {\n this._state = 17 /* InProcessingInstruction */;\n this.sectionStart = this._index + 1;\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 1 /* Text */;\n }\n else {\n this._state =\n !this.xmlMode && (c === \"s\" || c === \"S\")\n ? 32 /* BeforeSpecialS */\n : !this.xmlMode && (c === \"t\" || c === \"T\")\n ? 52 /* BeforeSpecialT */\n : 3 /* InTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.emitToken(\"onopentagname\");\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (whitespace(c)) {\n // Ignore\n }\n else if (c === \">\") {\n this._state = 1 /* Text */;\n }\n else if (this.special !== 1 /* None */) {\n if (this.special !== 4 /* Title */ && (c === \"s\" || c === \"S\")) {\n this._state = 33 /* BeforeSpecialSEnd */;\n }\n else if (this.special === 4 /* Title */ &&\n (c === \"t\" || c === \"T\")) {\n this._state = 53 /* BeforeSpecialTEnd */;\n }\n else {\n this._state = 1 /* Text */;\n this._index--;\n }\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 20 /* InSpecialComment */;\n this.sectionStart = this._index;\n }\n else {\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === \">\" || whitespace(c)) {\n this.emitToken(\"onclosetag\");\n this._state = 7 /* AfterClosingTagName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === \">\") {\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === \">\") {\n this.cbs.onopentagend();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"/\") {\n this._state = 4 /* InSelfClosingTag */;\n }\n else if (!whitespace(c)) {\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === \">\") {\n this.cbs.onselfclosingtag();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n this.special = 1 /* None */; // Reset special state, in case of self-closing special tags\n }\n else if (!whitespace(c)) {\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === \"=\" || c === \"/\" || c === \">\" || whitespace(c)) {\n this.cbs.onattribname(this.getSection());\n this.sectionStart = -1;\n this._state = 10 /* AfterAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === \"=\") {\n this._state = 11 /* BeforeAttributeValue */;\n }\n else if (c === \"/\" || c === \">\") {\n this.cbs.onattribend(undefined);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (!whitespace(c)) {\n this.cbs.onattribend(undefined);\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === '\"') {\n this._state = 12 /* InAttributeValueDq */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"'\") {\n this._state = 13 /* InAttributeValueSq */;\n this.sectionStart = this._index + 1;\n }\n else if (!whitespace(c)) {\n this._state = 14 /* InAttributeValueNq */;\n this.sectionStart = this._index;\n this._index--; // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote) {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(quote);\n this._state = 8 /* BeforeAttributeName */;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, '\"');\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, \"'\");\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (whitespace(c) || c === \">\") {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(null);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n this._state =\n c === \"[\"\n ? 23 /* BeforeCdata1 */\n : c === \"-\"\n ? 18 /* BeforeComment */\n : 16 /* InDeclaration */;\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === \">\") {\n this.cbs.ondeclaration(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === \">\") {\n this.cbs.onprocessinginstruction(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === \"-\") {\n this._state = 19 /* InComment */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n }\n };\n Tokenizer.prototype.stateInComment = function (c) {\n if (c === \"-\")\n this._state = 21 /* AfterComment1 */;\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === \">\") {\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateAfterComment1 = function (c) {\n if (c === \"-\") {\n this._state = 22 /* AfterComment2 */;\n }\n else {\n this._state = 19 /* InComment */;\n }\n };\n Tokenizer.prototype.stateAfterComment2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"-\") {\n this._state = 19 /* InComment */;\n }\n // Else: stay in AFTER_COMMENT_2 (`--->`)\n };\n Tokenizer.prototype.stateBeforeCdata6 = function (c) {\n if (c === \"[\") {\n this._state = 29 /* InCdata */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInCdata = function (c) {\n if (c === \"]\")\n this._state = 30 /* AfterCdata1 */;\n };\n Tokenizer.prototype.stateAfterCdata1 = function (c) {\n if (c === \"]\")\n this._state = 31 /* AfterCdata2 */;\n else\n this._state = 29 /* InCdata */;\n };\n Tokenizer.prototype.stateAfterCdata2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"]\") {\n this._state = 29 /* InCdata */;\n }\n // Else: stay in AFTER_CDATA_2 (`]]]>`)\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n if (c === \"c\" || c === \"C\") {\n this._state = 34 /* BeforeScript1 */;\n }\n else if (c === \"t\" || c === \"T\") {\n this._state = 44 /* BeforeStyle1 */;\n }\n else {\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeSpecialSEnd = function (c) {\n if (this.special === 2 /* Script */ && (c === \"c\" || c === \"C\")) {\n this._state = 39 /* AfterScript1 */;\n }\n else if (this.special === 3 /* Style */ && (c === \"t\" || c === \"T\")) {\n this._state = 48 /* AfterStyle1 */;\n }\n else\n this._state = 1 /* Text */;\n };\n Tokenizer.prototype.stateBeforeSpecialLast = function (c, special) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.special = special;\n }\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n };\n Tokenizer.prototype.stateAfterSpecialLast = function (c, sectionStartOffset) {\n if (c === \">\" || whitespace(c)) {\n this.special = 1 /* None */;\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index - sectionStartOffset;\n this._index--; // Reconsume the token\n }\n else\n this._state = 1 /* Text */;\n };\n // For entities terminated with a semicolon\n Tokenizer.prototype.parseFixedEntity = function (map) {\n if (map === void 0) { map = this.xmlMode ? xml_json_1.default : entities_json_1.default; }\n // Offset = 1\n if (this.sectionStart + 1 < this._index) {\n var entity = this.buffer.substring(this.sectionStart + 1, this._index);\n if (Object.prototype.hasOwnProperty.call(map, entity)) {\n this.emitPartial(map[entity]);\n this.sectionStart = this._index + 1;\n }\n }\n };\n // Parses legacy entities (without trailing semicolon)\n Tokenizer.prototype.parseLegacyEntity = function () {\n var start = this.sectionStart + 1;\n // The max length of legacy entities is 6\n var limit = Math.min(this._index - start, 6);\n while (limit >= 2) {\n // The min length of legacy entities is 2\n var entity = this.buffer.substr(start, limit);\n if (Object.prototype.hasOwnProperty.call(legacy_json_1.default, entity)) {\n this.emitPartial(legacy_json_1.default[entity]);\n this.sectionStart += limit + 1;\n return;\n }\n limit--;\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n if (c === \";\") {\n this.parseFixedEntity();\n // Retry as legacy entity if entity wasn't parsed\n if (this.baseState === 1 /* Text */ &&\n this.sectionStart + 1 < this._index &&\n !this.xmlMode) {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n }\n else if ((c < \"0\" || c > \"9\") && !isASCIIAlpha(c)) {\n if (this.xmlMode || this.sectionStart + 1 === this._index) {\n // Ignore\n }\n else if (this.baseState !== 1 /* Text */) {\n if (c !== \"=\") {\n // Parse as legacy entity, without allowing additional characters.\n this.parseFixedEntity(legacy_json_1.default);\n }\n }\n else {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n this._index--;\n }\n };\n Tokenizer.prototype.decodeNumericEntity = function (offset, base, strict) {\n var sectionStart = this.sectionStart + offset;\n if (sectionStart !== this._index) {\n // Parse entity\n var entity = this.buffer.substring(sectionStart, this._index);\n var parsed = parseInt(entity, base);\n this.emitPartial(decode_codepoint_1.default(parsed));\n this.sectionStart = strict ? this._index + 1 : this._index;\n }\n this._state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(2, 10, true);\n }\n else if (c < \"0\" || c > \"9\") {\n if (!this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(3, 16, true);\n }\n else if ((c < \"a\" || c > \"f\") &&\n (c < \"A\" || c > \"F\") &&\n (c < \"0\" || c > \"9\")) {\n if (!this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.cleanup = function () {\n if (this.sectionStart < 0) {\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.running) {\n if (this._state === 1 /* Text */) {\n if (this.sectionStart !== this._index) {\n this.cbs.ontext(this.buffer.substr(this.sectionStart));\n }\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.sectionStart === this._index) {\n // The section just started\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else {\n // Remove everything unnecessary\n this.buffer = this.buffer.substr(this.sectionStart);\n this._index -= this.sectionStart;\n this.bufferOffset += this.sectionStart;\n }\n this.sectionStart = 0;\n }\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this._index < this.buffer.length && this.running) {\n var c = this.buffer.charAt(this._index);\n if (this._state === 1 /* Text */) {\n this.stateText(c);\n }\n else if (this._state === 12 /* InAttributeValueDq */) {\n this.stateInAttributeValueDoubleQuotes(c);\n }\n else if (this._state === 9 /* InAttributeName */) {\n this.stateInAttributeName(c);\n }\n else if (this._state === 19 /* InComment */) {\n this.stateInComment(c);\n }\n else if (this._state === 20 /* InSpecialComment */) {\n this.stateInSpecialComment(c);\n }\n else if (this._state === 8 /* BeforeAttributeName */) {\n this.stateBeforeAttributeName(c);\n }\n else if (this._state === 3 /* InTagName */) {\n this.stateInTagName(c);\n }\n else if (this._state === 6 /* InClosingTagName */) {\n this.stateInClosingTagName(c);\n }\n else if (this._state === 2 /* BeforeTagName */) {\n this.stateBeforeTagName(c);\n }\n else if (this._state === 10 /* AfterAttributeName */) {\n this.stateAfterAttributeName(c);\n }\n else if (this._state === 13 /* InAttributeValueSq */) {\n this.stateInAttributeValueSingleQuotes(c);\n }\n else if (this._state === 11 /* BeforeAttributeValue */) {\n this.stateBeforeAttributeValue(c);\n }\n else if (this._state === 5 /* BeforeClosingTagName */) {\n this.stateBeforeClosingTagName(c);\n }\n else if (this._state === 7 /* AfterClosingTagName */) {\n this.stateAfterClosingTagName(c);\n }\n else if (this._state === 32 /* BeforeSpecialS */) {\n this.stateBeforeSpecialS(c);\n }\n else if (this._state === 21 /* AfterComment1 */) {\n this.stateAfterComment1(c);\n }\n else if (this._state === 14 /* InAttributeValueNq */) {\n this.stateInAttributeValueNoQuotes(c);\n }\n else if (this._state === 4 /* InSelfClosingTag */) {\n this.stateInSelfClosingTag(c);\n }\n else if (this._state === 16 /* InDeclaration */) {\n this.stateInDeclaration(c);\n }\n else if (this._state === 15 /* BeforeDeclaration */) {\n this.stateBeforeDeclaration(c);\n }\n else if (this._state === 22 /* AfterComment2 */) {\n this.stateAfterComment2(c);\n }\n else if (this._state === 18 /* BeforeComment */) {\n this.stateBeforeComment(c);\n }\n else if (this._state === 33 /* BeforeSpecialSEnd */) {\n this.stateBeforeSpecialSEnd(c);\n }\n else if (this._state === 53 /* BeforeSpecialTEnd */) {\n stateAfterSpecialTEnd(this, c);\n }\n else if (this._state === 39 /* AfterScript1 */) {\n stateAfterScript1(this, c);\n }\n else if (this._state === 40 /* AfterScript2 */) {\n stateAfterScript2(this, c);\n }\n else if (this._state === 41 /* AfterScript3 */) {\n stateAfterScript3(this, c);\n }\n else if (this._state === 34 /* BeforeScript1 */) {\n stateBeforeScript1(this, c);\n }\n else if (this._state === 35 /* BeforeScript2 */) {\n stateBeforeScript2(this, c);\n }\n else if (this._state === 36 /* BeforeScript3 */) {\n stateBeforeScript3(this, c);\n }\n else if (this._state === 37 /* BeforeScript4 */) {\n stateBeforeScript4(this, c);\n }\n else if (this._state === 38 /* BeforeScript5 */) {\n this.stateBeforeSpecialLast(c, 2 /* Script */);\n }\n else if (this._state === 42 /* AfterScript4 */) {\n stateAfterScript4(this, c);\n }\n else if (this._state === 43 /* AfterScript5 */) {\n this.stateAfterSpecialLast(c, 6);\n }\n else if (this._state === 44 /* BeforeStyle1 */) {\n stateBeforeStyle1(this, c);\n }\n else if (this._state === 29 /* InCdata */) {\n this.stateInCdata(c);\n }\n else if (this._state === 45 /* BeforeStyle2 */) {\n stateBeforeStyle2(this, c);\n }\n else if (this._state === 46 /* BeforeStyle3 */) {\n stateBeforeStyle3(this, c);\n }\n else if (this._state === 47 /* BeforeStyle4 */) {\n this.stateBeforeSpecialLast(c, 3 /* Style */);\n }\n else if (this._state === 48 /* AfterStyle1 */) {\n stateAfterStyle1(this, c);\n }\n else if (this._state === 49 /* AfterStyle2 */) {\n stateAfterStyle2(this, c);\n }\n else if (this._state === 50 /* AfterStyle3 */) {\n stateAfterStyle3(this, c);\n }\n else if (this._state === 51 /* AfterStyle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 52 /* BeforeSpecialT */) {\n stateBeforeSpecialT(this, c);\n }\n else if (this._state === 54 /* BeforeTitle1 */) {\n stateBeforeTitle1(this, c);\n }\n else if (this._state === 55 /* BeforeTitle2 */) {\n stateBeforeTitle2(this, c);\n }\n else if (this._state === 56 /* BeforeTitle3 */) {\n stateBeforeTitle3(this, c);\n }\n else if (this._state === 57 /* BeforeTitle4 */) {\n this.stateBeforeSpecialLast(c, 4 /* Title */);\n }\n else if (this._state === 58 /* AfterTitle1 */) {\n stateAfterTitle1(this, c);\n }\n else if (this._state === 59 /* AfterTitle2 */) {\n stateAfterTitle2(this, c);\n }\n else if (this._state === 60 /* AfterTitle3 */) {\n stateAfterTitle3(this, c);\n }\n else if (this._state === 61 /* AfterTitle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 17 /* InProcessingInstruction */) {\n this.stateInProcessingInstruction(c);\n }\n else if (this._state === 64 /* InNamedEntity */) {\n this.stateInNamedEntity(c);\n }\n else if (this._state === 23 /* BeforeCdata1 */) {\n stateBeforeCdata1(this, c);\n }\n else if (this._state === 62 /* BeforeEntity */) {\n stateBeforeEntity(this, c);\n }\n else if (this._state === 24 /* BeforeCdata2 */) {\n stateBeforeCdata2(this, c);\n }\n else if (this._state === 25 /* BeforeCdata3 */) {\n stateBeforeCdata3(this, c);\n }\n else if (this._state === 30 /* AfterCdata1 */) {\n this.stateAfterCdata1(c);\n }\n else if (this._state === 31 /* AfterCdata2 */) {\n this.stateAfterCdata2(c);\n }\n else if (this._state === 26 /* BeforeCdata4 */) {\n stateBeforeCdata4(this, c);\n }\n else if (this._state === 27 /* BeforeCdata5 */) {\n stateBeforeCdata5(this, c);\n }\n else if (this._state === 28 /* BeforeCdata6 */) {\n this.stateBeforeCdata6(c);\n }\n else if (this._state === 66 /* InHexEntity */) {\n this.stateInHexEntity(c);\n }\n else if (this._state === 65 /* InNumericEntity */) {\n this.stateInNumericEntity(c);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if (this._state === 63 /* BeforeNumericEntity */) {\n stateBeforeNumericEntity(this, c);\n }\n else {\n this.cbs.onerror(Error(\"unknown _state\"), this._state);\n }\n this._index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this._index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n Tokenizer.prototype.handleTrailingData = function () {\n var data = this.buffer.substr(this.sectionStart);\n if (this._state === 29 /* InCdata */ ||\n this._state === 30 /* AfterCdata1 */ ||\n this._state === 31 /* AfterCdata2 */) {\n this.cbs.oncdata(data);\n }\n else if (this._state === 19 /* InComment */ ||\n this._state === 21 /* AfterComment1 */ ||\n this._state === 22 /* AfterComment2 */) {\n this.cbs.oncomment(data);\n }\n else if (this._state === 64 /* InNamedEntity */ && !this.xmlMode) {\n this.parseLegacyEntity();\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 65 /* InNumericEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 66 /* InHexEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state !== 3 /* InTagName */ &&\n this._state !== 8 /* BeforeAttributeName */ &&\n this._state !== 11 /* BeforeAttributeValue */ &&\n this._state !== 10 /* AfterAttributeName */ &&\n this._state !== 9 /* InAttributeName */ &&\n this._state !== 13 /* InAttributeValueSq */ &&\n this._state !== 12 /* InAttributeValueDq */ &&\n this._state !== 14 /* InAttributeValueNq */ &&\n this._state !== 6 /* InClosingTagName */) {\n this.cbs.ontext(data);\n }\n /*\n * Else, ignore remaining data\n * TODO add a way to remove current tag\n */\n };\n Tokenizer.prototype.getSection = function () {\n return this.buffer.substring(this.sectionStart, this._index);\n };\n Tokenizer.prototype.emitToken = function (name) {\n this.cbs[name](this.getSection());\n this.sectionStart = -1;\n };\n Tokenizer.prototype.emitPartial = function (value) {\n if (this.baseState !== 1 /* Text */) {\n this.cbs.onattribdata(value); // TODO implement the new event\n }\n else {\n this.cbs.ontext(value);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Parser = void 0;\nvar Tokenizer_1 = __importDefault(require(\"./Tokenizer\"));\nvar formTags = new Set([\n \"input\",\n \"option\",\n \"optgroup\",\n \"select\",\n \"button\",\n \"datalist\",\n \"textarea\",\n]);\nvar pTag = new Set([\"p\"]);\nvar openImpliesClose = {\n tr: new Set([\"tr\", \"th\", \"td\"]),\n th: new Set([\"th\"]),\n td: new Set([\"thead\", \"th\", \"td\"]),\n body: new Set([\"head\", \"link\", \"script\"]),\n li: new Set([\"li\"]),\n p: pTag,\n h1: pTag,\n h2: pTag,\n h3: pTag,\n h4: pTag,\n h5: pTag,\n h6: pTag,\n select: formTags,\n input: formTags,\n output: formTags,\n button: formTags,\n datalist: formTags,\n textarea: formTags,\n option: new Set([\"option\"]),\n optgroup: new Set([\"optgroup\", \"option\"]),\n dd: new Set([\"dt\", \"dd\"]),\n dt: new Set([\"dt\", \"dd\"]),\n address: pTag,\n article: pTag,\n aside: pTag,\n blockquote: pTag,\n details: pTag,\n div: pTag,\n dl: pTag,\n fieldset: pTag,\n figcaption: pTag,\n figure: pTag,\n footer: pTag,\n form: pTag,\n header: pTag,\n hr: pTag,\n main: pTag,\n nav: pTag,\n ol: pTag,\n pre: pTag,\n section: pTag,\n table: pTag,\n ul: pTag,\n rt: new Set([\"rt\", \"rp\"]),\n rp: new Set([\"rt\", \"rp\"]),\n tbody: new Set([\"thead\", \"tbody\"]),\n tfoot: new Set([\"thead\", \"tbody\"]),\n};\nvar voidElements = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\nvar foreignContextElements = new Set([\"math\", \"svg\"]);\nvar htmlIntegrationElements = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar reNameEnd = /\\s|\\//;\nvar Parser = /** @class */ (function () {\n function Parser(cbs, options) {\n if (options === void 0) { options = {}; }\n var _a, _b, _c, _d, _e;\n /** The start index of the last event. */\n this.startIndex = 0;\n /** The end index of the last event. */\n this.endIndex = null;\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribvalue = \"\";\n this.attribs = null;\n this.stack = [];\n this.foreignContext = [];\n this.options = options;\n this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n this.lowerCaseAttributeNames =\n (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);\n (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n }\n Parser.prototype.updatePosition = function (initialOffset) {\n if (this.endIndex === null) {\n if (this.tokenizer.sectionStart <= initialOffset) {\n this.startIndex = 0;\n }\n else {\n this.startIndex = this.tokenizer.sectionStart - initialOffset;\n }\n }\n else {\n this.startIndex = this.endIndex + 1;\n }\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n };\n // Tokenizer event handlers\n Parser.prototype.ontext = function (data) {\n var _a, _b;\n this.updatePosition(1);\n this.endIndex--;\n (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n };\n Parser.prototype.onopentagname = function (name) {\n var _a, _b;\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n this.tagname = name;\n if (!this.options.xmlMode &&\n Object.prototype.hasOwnProperty.call(openImpliesClose, name)) {\n var el = void 0;\n while (this.stack.length > 0 &&\n openImpliesClose[name].has((el = this.stack[this.stack.length - 1]))) {\n this.onclosetag(el);\n }\n }\n if (this.options.xmlMode || !voidElements.has(name)) {\n this.stack.push(name);\n if (foreignContextElements.has(name)) {\n this.foreignContext.push(true);\n }\n else if (htmlIntegrationElements.has(name)) {\n this.foreignContext.push(false);\n }\n }\n (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n if (this.cbs.onopentag)\n this.attribs = {};\n };\n Parser.prototype.onopentagend = function () {\n var _a, _b;\n this.updatePosition(1);\n if (this.attribs) {\n (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs);\n this.attribs = null;\n }\n if (!this.options.xmlMode &&\n this.cbs.onclosetag &&\n voidElements.has(this.tagname)) {\n this.cbs.onclosetag(this.tagname);\n }\n this.tagname = \"\";\n };\n Parser.prototype.onclosetag = function (name) {\n this.updatePosition(1);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n if (foreignContextElements.has(name) ||\n htmlIntegrationElements.has(name)) {\n this.foreignContext.pop();\n }\n if (this.stack.length &&\n (this.options.xmlMode || !voidElements.has(name))) {\n var pos = this.stack.lastIndexOf(name);\n if (pos !== -1) {\n if (this.cbs.onclosetag) {\n pos = this.stack.length - pos;\n while (pos--) {\n // We know the stack has sufficient elements.\n this.cbs.onclosetag(this.stack.pop());\n }\n }\n else\n this.stack.length = pos;\n }\n else if (name === \"p\" && !this.options.xmlMode) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n }\n else if (!this.options.xmlMode && (name === \"br\" || name === \"p\")) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n };\n Parser.prototype.onselfclosingtag = function () {\n if (this.options.xmlMode ||\n this.options.recognizeSelfClosing ||\n this.foreignContext[this.foreignContext.length - 1]) {\n this.closeCurrentTag();\n }\n else {\n this.onopentagend();\n }\n };\n Parser.prototype.closeCurrentTag = function () {\n var _a, _b;\n var name = this.tagname;\n this.onopentagend();\n /*\n * Self-closing tags will be on the top of the stack\n * (cheaper check than in onclosetag)\n */\n if (this.stack[this.stack.length - 1] === name) {\n (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n this.stack.pop();\n }\n };\n Parser.prototype.onattribname = function (name) {\n if (this.lowerCaseAttributeNames) {\n name = name.toLowerCase();\n }\n this.attribname = name;\n };\n Parser.prototype.onattribdata = function (value) {\n this.attribvalue += value;\n };\n Parser.prototype.onattribend = function (quote) {\n var _a, _b;\n (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);\n if (this.attribs &&\n !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n this.attribs[this.attribname] = this.attribvalue;\n }\n this.attribname = \"\";\n this.attribvalue = \"\";\n };\n Parser.prototype.getInstructionName = function (value) {\n var idx = value.search(reNameEnd);\n var name = idx < 0 ? value : value.substr(0, idx);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n return name;\n };\n Parser.prototype.ondeclaration = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_1 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"!\" + name_1, \"!\" + value);\n }\n };\n Parser.prototype.onprocessinginstruction = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_2 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"?\" + name_2, \"?\" + value);\n }\n };\n Parser.prototype.oncomment = function (value) {\n var _a, _b, _c, _d;\n this.updatePosition(4);\n (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n };\n Parser.prototype.oncdata = function (value) {\n var _a, _b, _c, _d, _e, _f;\n this.updatePosition(1);\n if (this.options.xmlMode || this.options.recognizeCDATA) {\n (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n }\n else {\n this.oncomment(\"[CDATA[\" + value + \"]]\");\n }\n };\n Parser.prototype.onerror = function (err) {\n var _a, _b;\n (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n Parser.prototype.onend = function () {\n var _a, _b;\n if (this.cbs.onclosetag) {\n for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i]))\n ;\n }\n (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n /**\n * Resets the parser to a blank state, ready to parse a new HTML document\n */\n Parser.prototype.reset = function () {\n var _a, _b, _c, _d;\n (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.tokenizer.reset();\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribs = null;\n this.stack = [];\n (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n };\n /**\n * Resets the parser, then parses a complete document and\n * pushes it to the handler.\n *\n * @param data Document to parse.\n */\n Parser.prototype.parseComplete = function (data) {\n this.reset();\n this.end(data);\n };\n /**\n * Parses a chunk of data and calls the corresponding callbacks.\n *\n * @param chunk Chunk to parse.\n */\n Parser.prototype.write = function (chunk) {\n this.tokenizer.write(chunk);\n };\n /**\n * Parses the end of the buffer and clears the stack, calls onend.\n *\n * @param chunk Optional final chunk to parse.\n */\n Parser.prototype.end = function (chunk) {\n this.tokenizer.end(chunk);\n };\n /**\n * Pauses parsing. The parser won't emit events until `resume` is called.\n */\n Parser.prototype.pause = function () {\n this.tokenizer.pause();\n };\n /**\n * Resumes parsing after `pause` was called.\n */\n Parser.prototype.resume = function () {\n this.tokenizer.resume();\n };\n /**\n * Alias of `write`, for backwards compatibility.\n *\n * @param chunk Chunk to parse.\n * @deprecated\n */\n Parser.prototype.parseChunk = function (chunk) {\n this.write(chunk);\n };\n /**\n * Alias of `end`, for backwards compatibility.\n *\n * @param chunk Optional final chunk to parse.\n * @deprecated\n */\n Parser.prototype.done = function (chunk) {\n this.end(chunk);\n };\n return Parser;\n}());\nexports.Parser = Parser;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for `.\n this.sequenceIndex = Number(c === 60 /* Lt */);\n }\n };\n Tokenizer.prototype.stateCDATASequence = function (c) {\n if (c === Sequences.Cdata[this.sequenceIndex]) {\n if (++this.sequenceIndex === Sequences.Cdata.length) {\n this._state = 21 /* InCommentLike */;\n this.currentSequence = Sequences.CdataEnd;\n this.sequenceIndex = 0;\n this.sectionStart = this._index + 1;\n }\n }\n else {\n this.sequenceIndex = 0;\n this._state = 16 /* InDeclaration */;\n this.stateInDeclaration(c); // Reconsume the character\n }\n };\n /**\n * When we wait for one specific character, we can speed things up\n * by skipping through the buffer until we find it.\n *\n * @returns Whether the character was found.\n */\n Tokenizer.prototype.fastForwardTo = function (c) {\n while (++this._index < this.buffer.length) {\n if (this.buffer.charCodeAt(this._index) === c) {\n return true;\n }\n }\n /*\n * We increment the index at the end of the `parse` loop,\n * so set it to `buffer.length - 1` here.\n *\n * TODO: Refactor `parse` to increment index before calling states.\n */\n this._index = this.buffer.length - 1;\n return false;\n };\n /**\n * Comments and CDATA end with `-->` and `]]>`.\n *\n * Their common qualities are:\n * - Their end sequences have a distinct character they start with.\n * - That character is then repeated, so we have to check multiple repeats.\n * - All characters but the start character of the sequence can be skipped.\n */\n Tokenizer.prototype.stateInCommentLike = function (c) {\n if (c === this.currentSequence[this.sequenceIndex]) {\n if (++this.sequenceIndex === this.currentSequence.length) {\n // Remove 2 trailing chars\n var section = this.buffer.slice(this.sectionStart, this._index - 2);\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(section);\n }\n else {\n this.cbs.oncomment(section);\n }\n this.sequenceIndex = 0;\n this.sectionStart = this._index + 1;\n this._state = 1 /* Text */;\n }\n }\n else if (this.sequenceIndex === 0) {\n // Fast-forward to the first character of the sequence\n if (this.fastForwardTo(this.currentSequence[0])) {\n this.sequenceIndex = 1;\n }\n }\n else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n // Allow long sequences, eg. --->, ]]]>\n this.sequenceIndex = 0;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n };\n Tokenizer.prototype.startSpecial = function (sequence, offset) {\n this.isSpecial = true;\n this.currentSequence = sequence;\n this.sequenceIndex = offset;\n this._state = 23 /* SpecialStartSequence */;\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === 33 /* ExclamationMark */) {\n this._state = 15 /* BeforeDeclaration */;\n this.sectionStart = this._index + 1;\n }\n else if (c === 63 /* Questionmark */) {\n this._state = 17 /* InProcessingInstruction */;\n this.sectionStart = this._index + 1;\n }\n else if (this.isTagStartChar(c)) {\n var lower = c | 0x20;\n this.sectionStart = this._index;\n if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {\n this.startSpecial(Sequences.TitleEnd, 3);\n }\n else {\n this._state =\n !this.xmlMode && lower === Sequences.ScriptEnd[2]\n ? 22 /* BeforeSpecialS */\n : 3 /* InTagName */;\n }\n }\n else if (c === 47 /* Slash */) {\n this._state = 5 /* BeforeClosingTagName */;\n }\n else {\n this._state = 1 /* Text */;\n this.stateText(c);\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (isEndOfTagSection(c)) {\n this.cbs.onopentagname(this.getSection());\n this.sectionStart = -1;\n this._state = 8 /* BeforeAttributeName */;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (isWhitespace(c)) {\n // Ignore\n }\n else if (c === 62 /* Gt */) {\n this._state = 1 /* Text */;\n }\n else {\n this._state = this.isTagStartChar(c)\n ? 6 /* InClosingTagName */\n : 20 /* InSpecialComment */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === 62 /* Gt */ || isWhitespace(c)) {\n this.cbs.onclosetag(this.getSection());\n this.sectionStart = -1;\n this._state = 7 /* AfterClosingTagName */;\n this.stateAfterClosingTagName(c);\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === 62 /* Gt */ || this.fastForwardTo(62 /* Gt */)) {\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === 62 /* Gt */) {\n this.cbs.onopentagend();\n if (this.isSpecial) {\n this._state = 24 /* InSpecialTag */;\n this.sequenceIndex = 0;\n }\n else {\n this._state = 1 /* Text */;\n }\n this.baseState = this._state;\n this.sectionStart = this._index + 1;\n }\n else if (c === 47 /* Slash */) {\n this._state = 4 /* InSelfClosingTag */;\n }\n else if (!isWhitespace(c)) {\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === 62 /* Gt */) {\n this.cbs.onselfclosingtag();\n this._state = 1 /* Text */;\n this.baseState = 1 /* Text */;\n this.sectionStart = this._index + 1;\n this.isSpecial = false; // Reset special state, in case of self-closing special tags\n }\n else if (!isWhitespace(c)) {\n this._state = 8 /* BeforeAttributeName */;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === 61 /* Eq */ || isEndOfTagSection(c)) {\n this.cbs.onattribname(this.getSection());\n this.sectionStart = -1;\n this._state = 10 /* AfterAttributeName */;\n this.stateAfterAttributeName(c);\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === 61 /* Eq */) {\n this._state = 11 /* BeforeAttributeValue */;\n }\n else if (c === 47 /* Slash */ || c === 62 /* Gt */) {\n this.cbs.onattribend(undefined);\n this._state = 8 /* BeforeAttributeName */;\n this.stateBeforeAttributeName(c);\n }\n else if (!isWhitespace(c)) {\n this.cbs.onattribend(undefined);\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === 34 /* DoubleQuote */) {\n this._state = 12 /* InAttributeValueDq */;\n this.sectionStart = this._index + 1;\n }\n else if (c === 39 /* SingleQuote */) {\n this._state = 13 /* InAttributeValueSq */;\n this.sectionStart = this._index + 1;\n }\n else if (!isWhitespace(c)) {\n this.sectionStart = this._index;\n this._state = 14 /* InAttributeValueNq */;\n this.stateInAttributeValueNoQuotes(c); // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote ||\n (!this.decodeEntities && this.fastForwardTo(quote))) {\n this.cbs.onattribdata(this.getSection());\n this.sectionStart = -1;\n this.cbs.onattribend(String.fromCharCode(quote));\n this._state = 8 /* BeforeAttributeName */;\n }\n else if (this.decodeEntities && c === 38 /* Amp */) {\n this.baseState = this._state;\n this._state = 25 /* BeforeEntity */;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, 34 /* DoubleQuote */);\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, 39 /* SingleQuote */);\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (isWhitespace(c) || c === 62 /* Gt */) {\n this.cbs.onattribdata(this.getSection());\n this.sectionStart = -1;\n this.cbs.onattribend(null);\n this._state = 8 /* BeforeAttributeName */;\n this.stateBeforeAttributeName(c);\n }\n else if (this.decodeEntities && c === 38 /* Amp */) {\n this.baseState = this._state;\n this._state = 25 /* BeforeEntity */;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n if (c === 91 /* OpeningSquareBracket */) {\n this._state = 19 /* CDATASequence */;\n this.sequenceIndex = 0;\n }\n else {\n this._state =\n c === 45 /* Dash */\n ? 18 /* BeforeComment */\n : 16 /* InDeclaration */;\n }\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === 62 /* Gt */ || this.fastForwardTo(62 /* Gt */)) {\n this.cbs.ondeclaration(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === 62 /* Gt */ || this.fastForwardTo(62 /* Gt */)) {\n this.cbs.onprocessinginstruction(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === 45 /* Dash */) {\n this._state = 21 /* InCommentLike */;\n this.currentSequence = Sequences.CommentEnd;\n // Allow short comments (eg. )\n this.sequenceIndex = 2;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n }\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === 62 /* Gt */ || this.fastForwardTo(62 /* Gt */)) {\n this.cbs.oncomment(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n var lower = c | 0x20;\n if (lower === Sequences.ScriptEnd[3]) {\n this.startSpecial(Sequences.ScriptEnd, 4);\n }\n else if (lower === Sequences.StyleEnd[3]) {\n this.startSpecial(Sequences.StyleEnd, 4);\n }\n else {\n this._state = 3 /* InTagName */;\n this.stateInTagName(c); // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeEntity = function (c) {\n // Start excess with 1 to include the '&'\n this.entityExcess = 1;\n if (c === 35 /* Num */) {\n this._state = 26 /* BeforeNumericEntity */;\n }\n else if (c === 38 /* Amp */) {\n // We have two `&` characters in a row. Stay in the current state.\n }\n else {\n this.trieIndex = 0;\n this.trieCurrent = this.entityTrie[0];\n this.trieResult = null;\n this._state = 27 /* InNamedEntity */;\n this.stateInNamedEntity(c);\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n this.entityExcess += 1;\n this.trieIndex = (0, decode_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);\n if (this.trieIndex < 0) {\n this.emitNamedEntity();\n this._index--;\n return;\n }\n this.trieCurrent = this.entityTrie[this.trieIndex];\n // If the branch is a value, store it and continue\n if (this.trieCurrent & decode_1.BinTrieFlags.HAS_VALUE) {\n // If we have a legacy entity while parsing strictly, just skip the number of bytes\n if (!this.allowLegacyEntity() && c !== 59 /* Semi */) {\n // No need to consider multi-byte values, as the legacy entity is always a single byte\n this.trieIndex += 1;\n }\n else {\n // Add 1 as we have already incremented the excess\n var entityStart = this._index - this.entityExcess + 1;\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.buffer.substring(this.sectionStart, entityStart));\n }\n // If this is a surrogate pair, combine the higher bits from the node with the next byte\n this.trieResult =\n this.trieCurrent & decode_1.BinTrieFlags.MULTI_BYTE\n ? String.fromCharCode(this.entityTrie[++this.trieIndex], this.entityTrie[++this.trieIndex])\n : String.fromCharCode(this.entityTrie[++this.trieIndex]);\n this.entityExcess = 0;\n this.sectionStart = this._index + 1;\n }\n }\n };\n Tokenizer.prototype.emitNamedEntity = function () {\n if (this.trieResult) {\n this.emitPartial(this.trieResult);\n }\n this._state = this.baseState;\n };\n Tokenizer.prototype.stateBeforeNumericEntity = function (c) {\n if ((c | 0x20) === 120 /* LowerX */) {\n this.entityExcess++;\n this._state = 29 /* InHexEntity */;\n }\n else {\n this._state = 28 /* InNumericEntity */;\n this.stateInNumericEntity(c);\n }\n };\n Tokenizer.prototype.decodeNumericEntity = function (base, strict) {\n var entityStart = this._index - this.entityExcess - 1;\n var numberStart = entityStart + 2 + (base >> 4);\n if (numberStart !== this._index) {\n // Emit leading data if any\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.buffer.substring(this.sectionStart, entityStart));\n }\n // Parse entity\n var entity = this.buffer.substring(numberStart, this._index);\n var parsed = parseInt(entity, base);\n this.emitPartial((0, decode_codepoint_1.default)(parsed));\n this.sectionStart = this._index + Number(strict);\n }\n this._state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === 59 /* Semi */) {\n this.decodeNumericEntity(10, true);\n }\n else if (!isNumber(c)) {\n if (this.allowLegacyEntity()) {\n this.decodeNumericEntity(10, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n else {\n this.entityExcess++;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === 59 /* Semi */) {\n this.decodeNumericEntity(16, true);\n }\n else if ((c < 97 /* LowerA */ || c > 102 /* LowerF */) &&\n (c < 65 /* UpperA */ || c > 70 /* UpperF */) &&\n !isNumber(c)) {\n if (this.allowLegacyEntity()) {\n this.decodeNumericEntity(16, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n else {\n this.entityExcess++;\n }\n };\n Tokenizer.prototype.allowLegacyEntity = function () {\n return (!this.xmlMode &&\n (this.baseState === 1 /* Text */ ||\n this.baseState === 24 /* InSpecialTag */));\n };\n /**\n * Remove data that has already been consumed from the buffer.\n */\n Tokenizer.prototype.cleanup = function () {\n // If we are inside of text, emit what we already have.\n if (this.running &&\n this.sectionStart !== this._index &&\n (this._state === 1 /* Text */ ||\n (this._state === 24 /* InSpecialTag */ &&\n this.sequenceIndex === 0))) {\n // TODO: We could emit attribute data here as well.\n this.cbs.ontext(this.buffer.substr(this.sectionStart));\n this.sectionStart = this._index;\n }\n var start = this.sectionStart < 0 ? this._index : this.sectionStart;\n this.buffer =\n start === this.buffer.length ? \"\" : this.buffer.substr(start);\n this._index -= start;\n this.bufferOffset += start;\n if (this.sectionStart > 0) {\n this.sectionStart = 0;\n }\n };\n Tokenizer.prototype.shouldContinue = function () {\n return this._index < this.buffer.length && this.running;\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this.shouldContinue()) {\n var c = this.buffer.charCodeAt(this._index);\n if (this._state === 1 /* Text */) {\n this.stateText(c);\n }\n else if (this._state === 23 /* SpecialStartSequence */) {\n this.stateSpecialStartSequence(c);\n }\n else if (this._state === 24 /* InSpecialTag */) {\n this.stateInSpecialTag(c);\n }\n else if (this._state === 19 /* CDATASequence */) {\n this.stateCDATASequence(c);\n }\n else if (this._state === 12 /* InAttributeValueDq */) {\n this.stateInAttributeValueDoubleQuotes(c);\n }\n else if (this._state === 9 /* InAttributeName */) {\n this.stateInAttributeName(c);\n }\n else if (this._state === 21 /* InCommentLike */) {\n this.stateInCommentLike(c);\n }\n else if (this._state === 20 /* InSpecialComment */) {\n this.stateInSpecialComment(c);\n }\n else if (this._state === 8 /* BeforeAttributeName */) {\n this.stateBeforeAttributeName(c);\n }\n else if (this._state === 3 /* InTagName */) {\n this.stateInTagName(c);\n }\n else if (this._state === 6 /* InClosingTagName */) {\n this.stateInClosingTagName(c);\n }\n else if (this._state === 2 /* BeforeTagName */) {\n this.stateBeforeTagName(c);\n }\n else if (this._state === 10 /* AfterAttributeName */) {\n this.stateAfterAttributeName(c);\n }\n else if (this._state === 13 /* InAttributeValueSq */) {\n this.stateInAttributeValueSingleQuotes(c);\n }\n else if (this._state === 11 /* BeforeAttributeValue */) {\n this.stateBeforeAttributeValue(c);\n }\n else if (this._state === 5 /* BeforeClosingTagName */) {\n this.stateBeforeClosingTagName(c);\n }\n else if (this._state === 7 /* AfterClosingTagName */) {\n this.stateAfterClosingTagName(c);\n }\n else if (this._state === 22 /* BeforeSpecialS */) {\n this.stateBeforeSpecialS(c);\n }\n else if (this._state === 14 /* InAttributeValueNq */) {\n this.stateInAttributeValueNoQuotes(c);\n }\n else if (this._state === 4 /* InSelfClosingTag */) {\n this.stateInSelfClosingTag(c);\n }\n else if (this._state === 16 /* InDeclaration */) {\n this.stateInDeclaration(c);\n }\n else if (this._state === 15 /* BeforeDeclaration */) {\n this.stateBeforeDeclaration(c);\n }\n else if (this._state === 18 /* BeforeComment */) {\n this.stateBeforeComment(c);\n }\n else if (this._state === 17 /* InProcessingInstruction */) {\n this.stateInProcessingInstruction(c);\n }\n else if (this._state === 27 /* InNamedEntity */) {\n this.stateInNamedEntity(c);\n }\n else if (this._state === 25 /* BeforeEntity */) {\n this.stateBeforeEntity(c);\n }\n else if (this._state === 29 /* InHexEntity */) {\n this.stateInHexEntity(c);\n }\n else if (this._state === 28 /* InNumericEntity */) {\n this.stateInNumericEntity(c);\n }\n else {\n // `this._state === State.BeforeNumericEntity`\n this.stateBeforeNumericEntity(c);\n }\n this._index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n if (this._state === 27 /* InNamedEntity */) {\n this.emitNamedEntity();\n }\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this._index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n /** Handle any trailing data. */\n Tokenizer.prototype.handleTrailingData = function () {\n var data = this.buffer.substr(this.sectionStart);\n if (this._state === 21 /* InCommentLike */) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(data);\n }\n else {\n this.cbs.oncomment(data);\n }\n }\n else if (this._state === 28 /* InNumericEntity */ &&\n this.allowLegacyEntity()) {\n this.decodeNumericEntity(10, false);\n // All trailing data will have been consumed\n }\n else if (this._state === 29 /* InHexEntity */ &&\n this.allowLegacyEntity()) {\n this.decodeNumericEntity(16, false);\n // All trailing data will have been consumed\n }\n else if (this._state === 3 /* InTagName */ ||\n this._state === 8 /* BeforeAttributeName */ ||\n this._state === 11 /* BeforeAttributeValue */ ||\n this._state === 10 /* AfterAttributeName */ ||\n this._state === 9 /* InAttributeName */ ||\n this._state === 13 /* InAttributeValueSq */ ||\n this._state === 12 /* InAttributeValueDq */ ||\n this._state === 14 /* InAttributeValueNq */ ||\n this._state === 6 /* InClosingTagName */) {\n /*\n * If we are currently in an opening or closing tag, us not calling the\n * respective callback signals that the tag should be ignored.\n */\n }\n else {\n this.cbs.ontext(data);\n }\n };\n Tokenizer.prototype.getSection = function () {\n return this.buffer.substring(this.sectionStart, this._index);\n };\n Tokenizer.prototype.emitPartial = function (value) {\n if (this.baseState !== 1 /* Text */ &&\n this.baseState !== 24 /* InSpecialTag */) {\n this.cbs.onattribdata(value);\n }\n else {\n this.cbs.ontext(value);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Parser = void 0;\nvar Tokenizer_1 = __importDefault(require(\"./Tokenizer\"));\nvar formTags = new Set([\n \"input\",\n \"option\",\n \"optgroup\",\n \"select\",\n \"button\",\n \"datalist\",\n \"textarea\",\n]);\nvar pTag = new Set([\"p\"]);\nvar tableSectionTags = new Set([\"thead\", \"tbody\"]);\nvar ddtTags = new Set([\"dd\", \"dt\"]);\nvar rtpTags = new Set([\"rt\", \"rp\"]);\nvar openImpliesClose = new Map([\n [\"tr\", new Set([\"tr\", \"th\", \"td\"])],\n [\"th\", new Set([\"th\"])],\n [\"td\", new Set([\"thead\", \"th\", \"td\"])],\n [\"body\", new Set([\"head\", \"link\", \"script\"])],\n [\"li\", new Set([\"li\"])],\n [\"p\", pTag],\n [\"h1\", pTag],\n [\"h2\", pTag],\n [\"h3\", pTag],\n [\"h4\", pTag],\n [\"h5\", pTag],\n [\"h6\", pTag],\n [\"select\", formTags],\n [\"input\", formTags],\n [\"output\", formTags],\n [\"button\", formTags],\n [\"datalist\", formTags],\n [\"textarea\", formTags],\n [\"option\", new Set([\"option\"])],\n [\"optgroup\", new Set([\"optgroup\", \"option\"])],\n [\"dd\", ddtTags],\n [\"dt\", ddtTags],\n [\"address\", pTag],\n [\"article\", pTag],\n [\"aside\", pTag],\n [\"blockquote\", pTag],\n [\"details\", pTag],\n [\"div\", pTag],\n [\"dl\", pTag],\n [\"fieldset\", pTag],\n [\"figcaption\", pTag],\n [\"figure\", pTag],\n [\"footer\", pTag],\n [\"form\", pTag],\n [\"header\", pTag],\n [\"hr\", pTag],\n [\"main\", pTag],\n [\"nav\", pTag],\n [\"ol\", pTag],\n [\"pre\", pTag],\n [\"section\", pTag],\n [\"table\", pTag],\n [\"ul\", pTag],\n [\"rt\", rtpTags],\n [\"rp\", rtpTags],\n [\"tbody\", tableSectionTags],\n [\"tfoot\", tableSectionTags],\n]);\nvar voidElements = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\nvar foreignContextElements = new Set([\"math\", \"svg\"]);\nvar htmlIntegrationElements = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignobject\",\n \"desc\",\n \"title\",\n]);\nvar reNameEnd = /\\s|\\//;\nvar Parser = /** @class */ (function () {\n function Parser(cbs, options) {\n if (options === void 0) { options = {}; }\n var _a, _b, _c, _d, _e;\n this.options = options;\n /** The start index of the last event. */\n this.startIndex = 0;\n /** The end index of the last event. */\n this.endIndex = 0;\n /**\n * Store the start index of the current open tag,\n * so we can update the start index for attributes.\n */\n this.openTagStart = 0;\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribvalue = \"\";\n this.attribs = null;\n this.stack = [];\n this.foreignContext = [];\n this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n this.lowerCaseAttributeNames =\n (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);\n (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n }\n // Tokenizer event handlers\n /** @internal */\n Parser.prototype.ontext = function (data) {\n var _a, _b;\n var idx = this.tokenizer.getAbsoluteIndex();\n this.endIndex = idx - 1;\n (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n this.startIndex = idx;\n };\n Parser.prototype.isVoidElement = function (name) {\n return !this.options.xmlMode && voidElements.has(name);\n };\n /** @internal */\n Parser.prototype.onopentagname = function (name) {\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n this.emitOpenTag(name);\n };\n Parser.prototype.emitOpenTag = function (name) {\n var _a, _b, _c, _d;\n this.openTagStart = this.startIndex;\n this.tagname = name;\n var impliesClose = !this.options.xmlMode && openImpliesClose.get(name);\n if (impliesClose) {\n while (this.stack.length > 0 &&\n impliesClose.has(this.stack[this.stack.length - 1])) {\n var el = this.stack.pop();\n (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, el, true);\n }\n }\n if (!this.isVoidElement(name)) {\n this.stack.push(name);\n if (foreignContextElements.has(name)) {\n this.foreignContext.push(true);\n }\n else if (htmlIntegrationElements.has(name)) {\n this.foreignContext.push(false);\n }\n }\n (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);\n if (this.cbs.onopentag)\n this.attribs = {};\n };\n Parser.prototype.endOpenTag = function (isImplied) {\n var _a, _b;\n this.startIndex = this.openTagStart;\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.attribs) {\n (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);\n this.attribs = null;\n }\n if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {\n this.cbs.onclosetag(this.tagname, true);\n }\n this.tagname = \"\";\n };\n /** @internal */\n Parser.prototype.onopentagend = function () {\n this.endOpenTag(false);\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.onclosetag = function (name) {\n var _a, _b, _c, _d, _e, _f;\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n if (foreignContextElements.has(name) ||\n htmlIntegrationElements.has(name)) {\n this.foreignContext.pop();\n }\n if (!this.isVoidElement(name)) {\n var pos = this.stack.lastIndexOf(name);\n if (pos !== -1) {\n if (this.cbs.onclosetag) {\n var count = this.stack.length - pos;\n while (count--) {\n // We know the stack has sufficient elements.\n this.cbs.onclosetag(this.stack.pop(), count !== 0);\n }\n }\n else\n this.stack.length = pos;\n }\n else if (!this.options.xmlMode && name === \"p\") {\n this.emitOpenTag(name);\n this.closeCurrentTag(true);\n }\n }\n else if (!this.options.xmlMode && name === \"br\") {\n // We can't go through `emitOpenTag` here, as `br` would be implicitly closed.\n (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n (_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, name, {}, true);\n (_f = (_e = this.cbs).onclosetag) === null || _f === void 0 ? void 0 : _f.call(_e, name, false);\n }\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.onselfclosingtag = function () {\n if (this.options.xmlMode ||\n this.options.recognizeSelfClosing ||\n this.foreignContext[this.foreignContext.length - 1]) {\n this.closeCurrentTag(false);\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n }\n else {\n // Ignore the fact that the tag is self-closing.\n this.onopentagend();\n }\n };\n Parser.prototype.closeCurrentTag = function (isOpenImplied) {\n var _a, _b;\n var name = this.tagname;\n this.endOpenTag(isOpenImplied);\n // Self-closing tags will be on the top of the stack\n if (this.stack[this.stack.length - 1] === name) {\n // If the opening tag isn't implied, the closing tag has to be implied.\n (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);\n this.stack.pop();\n }\n };\n /** @internal */\n Parser.prototype.onattribname = function (name) {\n this.startIndex = this.tokenizer.getAbsoluteSectionStart();\n if (this.lowerCaseAttributeNames) {\n name = name.toLowerCase();\n }\n this.attribname = name;\n };\n /** @internal */\n Parser.prototype.onattribdata = function (value) {\n this.attribvalue += value;\n };\n /** @internal */\n Parser.prototype.onattribend = function (quote) {\n var _a, _b;\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);\n if (this.attribs &&\n !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n this.attribs[this.attribname] = this.attribvalue;\n }\n this.attribname = \"\";\n this.attribvalue = \"\";\n };\n Parser.prototype.getInstructionName = function (value) {\n var idx = value.search(reNameEnd);\n var name = idx < 0 ? value : value.substr(0, idx);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n return name;\n };\n /** @internal */\n Parser.prototype.ondeclaration = function (value) {\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.cbs.onprocessinginstruction) {\n var name_1 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"!\" + name_1, \"!\" + value);\n }\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.onprocessinginstruction = function (value) {\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.cbs.onprocessinginstruction) {\n var name_2 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"?\" + name_2, \"?\" + value);\n }\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.oncomment = function (value) {\n var _a, _b, _c, _d;\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.oncdata = function (value) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n if (this.options.xmlMode || this.options.recognizeCDATA) {\n (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n }\n else {\n (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, \"[CDATA[\" + value + \"]]\");\n (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);\n }\n // Set `startIndex` for next node\n this.startIndex = this.endIndex + 1;\n };\n /** @internal */\n Parser.prototype.onerror = function (err) {\n var _a, _b;\n (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n /** @internal */\n Parser.prototype.onend = function () {\n var _a, _b;\n if (this.cbs.onclosetag) {\n // Set the end index for all remaining tags\n this.endIndex = this.startIndex;\n for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i], true))\n ;\n }\n (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n /**\n * Resets the parser to a blank state, ready to parse a new HTML document\n */\n Parser.prototype.reset = function () {\n var _a, _b, _c, _d;\n (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.tokenizer.reset();\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribs = null;\n this.stack = [];\n this.startIndex = 0;\n this.endIndex = 0;\n (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n };\n /**\n * Resets the parser, then parses a complete document and\n * pushes it to the handler.\n *\n * @param data Document to parse.\n */\n Parser.prototype.parseComplete = function (data) {\n this.reset();\n this.end(data);\n };\n /**\n * Parses a chunk of data and calls the corresponding callbacks.\n *\n * @param chunk Chunk to parse.\n */\n Parser.prototype.write = function (chunk) {\n this.tokenizer.write(chunk);\n };\n /**\n * Parses the end of the buffer and clears the stack, calls onend.\n *\n * @param chunk Optional final chunk to parse.\n */\n Parser.prototype.end = function (chunk) {\n this.tokenizer.end(chunk);\n };\n /**\n * Pauses parsing. The parser won't emit events until `resume` is called.\n */\n Parser.prototype.pause = function () {\n this.tokenizer.pause();\n };\n /**\n * Resumes parsing after `pause` was called.\n */\n Parser.prototype.resume = function () {\n this.tokenizer.resume();\n };\n /**\n * Alias of `write`, for backwards compatibility.\n *\n * @param chunk Chunk to parse.\n * @deprecated\n */\n Parser.prototype.parseChunk = function (chunk) {\n this.write(chunk);\n };\n /**\n * Alias of `end`, for backwards compatibility.\n *\n * @param chunk Optional final chunk to parse.\n * @deprecated\n */\n Parser.prototype.done = function (chunk) {\n this.end(chunk);\n };\n return Parser;\n}());\nexports.Parser = Parser;\n", "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseFeed = exports.FeedHandler = exports.getFeed = void 0;\nvar domhandler_1 = __importDefault(require(\"domhandler\"));\nvar domutils_1 = require(\"domutils\");\nObject.defineProperty(exports, \"getFeed\", { enumerable: true, get: function () { return domutils_1.getFeed; } });\nvar Parser_1 = require(\"./Parser\");\n/** @deprecated Handler is no longer necessary; use `getFeed` or `parseFeed` instead. */\nvar FeedHandler = /** @class */ (function (_super) {\n __extends(FeedHandler, _super);\n /**\n *\n * @param callback\n * @param options\n */\n function FeedHandler(callback, options) {\n var _this = this;\n if (typeof callback === \"object\") {\n callback = undefined;\n options = callback;\n }\n _this = _super.call(this, callback, options) || this;\n return _this;\n }\n FeedHandler.prototype.onend = function () {\n var feed = (0, domutils_1.getFeed)(this.dom);\n if (feed) {\n this.feed = feed;\n this.handleCallback(null);\n }\n else {\n this.handleCallback(new Error(\"couldn't find root of feed\"));\n }\n };\n return FeedHandler;\n}(domhandler_1.default));\nexports.FeedHandler = FeedHandler;\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = { xmlMode: true }; }\n var handler = new domhandler_1.default(null, options);\n new Parser_1.Parser(handler, options).end(feed);\n return (0, domutils_1.getFeed)(handler.dom);\n}\nexports.parseFeed = parseFeed;\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;\nvar Parser_1 = require(\"./Parser\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_1.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param cb A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCb An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(cb, options, elementCb) {\n var handler = new domhandler_1.DomHandler(cb, options, elementCb);\n return new Parser_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_1 = require(\"./Tokenizer\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_1).default; } });\nvar ElementType = __importStar(require(\"domelementtype\"));\nexports.ElementType = ElementType;\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\n__exportStar(require(\"./FeedHandler\"), exports);\nexports.DomUtils = __importStar(require(\"domutils\"));\nvar FeedHandler_1 = require(\"./FeedHandler\");\nObject.defineProperty(exports, \"RssHandler\", { enumerable: true, get: function () { return FeedHandler_1.FeedHandler; } });\n", "/* c8 ignore start */\ntry {\n const {performance} = require('perf_hooks');\n exports.performance = performance;\n}\ncatch (fallback) {\n exports.performance = {now() { return +new Date; }};\n}\n/* c8 ignore stop */\n", "module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};", "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTraversal = void 0;\nvar reName = /^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/;\nvar reEscape = /\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi;\nvar actionTypes = new Map([\n [\"~\", \"element\"],\n [\"^\", \"start\"],\n [\"$\", \"end\"],\n [\"*\", \"any\"],\n [\"!\", \"not\"],\n [\"|\", \"hyphen\"],\n]);\nvar Traversals = {\n \">\": \"child\",\n \"<\": \"parent\",\n \"~\": \"sibling\",\n \"+\": \"adjacent\",\n};\nvar attribSelectors = {\n \"#\": [\"id\", \"equals\"],\n \".\": [\"class\", \"element\"],\n};\n// Pseudos, whose data property is parsed as well.\nvar unpackPseudos = new Set([\n \"has\",\n \"not\",\n \"matches\",\n \"is\",\n \"where\",\n \"host\",\n \"host-context\",\n]);\nvar traversalNames = new Set(__spreadArray([\n \"descendant\"\n], Object.keys(Traversals).map(function (k) { return Traversals[k]; }), true));\n/**\n * Attributes that are case-insensitive in HTML.\n *\n * @private\n * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors\n */\nvar caseInsensitiveAttributes = new Set([\n \"accept\",\n \"accept-charset\",\n \"align\",\n \"alink\",\n \"axis\",\n \"bgcolor\",\n \"charset\",\n \"checked\",\n \"clear\",\n \"codetype\",\n \"color\",\n \"compact\",\n \"declare\",\n \"defer\",\n \"dir\",\n \"direction\",\n \"disabled\",\n \"enctype\",\n \"face\",\n \"frame\",\n \"hreflang\",\n \"http-equiv\",\n \"lang\",\n \"language\",\n \"link\",\n \"media\",\n \"method\",\n \"multiple\",\n \"nohref\",\n \"noresize\",\n \"noshade\",\n \"nowrap\",\n \"readonly\",\n \"rel\",\n \"rev\",\n \"rules\",\n \"scope\",\n \"scrolling\",\n \"selected\",\n \"shape\",\n \"target\",\n \"text\",\n \"type\",\n \"valign\",\n \"valuetype\",\n \"vlink\",\n]);\n/**\n * Checks whether a specific selector is a traversal.\n * This is useful eg. in swapping the order of elements that\n * are not traversals.\n *\n * @param selector Selector to check.\n */\nfunction isTraversal(selector) {\n return traversalNames.has(selector.type);\n}\nexports.isTraversal = isTraversal;\nvar stripQuotesFromPseudos = new Set([\"contains\", \"icontains\"]);\nvar quotes = new Set(['\"', \"'\"]);\n// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152\nfunction funescape(_, escaped, escapedWhitespace) {\n var high = parseInt(escaped, 16) - 0x10000;\n // NaN means non-codepoint\n return high !== high || escapedWhitespace\n ? escaped\n : high < 0\n ? // BMP codepoint\n String.fromCharCode(high + 0x10000)\n : // Supplemental Plane codepoint (surrogate pair)\n String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);\n}\nfunction unescapeCSS(str) {\n return str.replace(reEscape, funescape);\n}\nfunction isWhitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\n/**\n * Parses `selector`, optionally with the passed `options`.\n *\n * @param selector Selector to parse.\n * @param options Options for parsing.\n * @returns Returns a two-dimensional array.\n * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),\n * the second contains the relevant tokens for that selector.\n */\nfunction parse(selector, options) {\n var subselects = [];\n var endIndex = parseSelector(subselects, \"\" + selector, options, 0);\n if (endIndex < selector.length) {\n throw new Error(\"Unmatched selector: \" + selector.slice(endIndex));\n }\n return subselects;\n}\nexports.default = parse;\nfunction parseSelector(subselects, selector, options, selectorIndex) {\n var _a, _b;\n if (options === void 0) { options = {}; }\n var tokens = [];\n var sawWS = false;\n function getName(offset) {\n var match = selector.slice(selectorIndex + offset).match(reName);\n if (!match) {\n throw new Error(\"Expected name, found \" + selector.slice(selectorIndex));\n }\n var name = match[0];\n selectorIndex += offset + name.length;\n return unescapeCSS(name);\n }\n function stripWhitespace(offset) {\n while (isWhitespace(selector.charAt(selectorIndex + offset)))\n offset++;\n selectorIndex += offset;\n }\n function isEscaped(pos) {\n var slashCount = 0;\n while (selector.charAt(--pos) === \"\\\\\")\n slashCount++;\n return (slashCount & 1) === 1;\n }\n function ensureNotTraversal() {\n if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {\n throw new Error(\"Did not expect successive traversals.\");\n }\n }\n stripWhitespace(0);\n while (selector !== \"\") {\n var firstChar = selector.charAt(selectorIndex);\n if (isWhitespace(firstChar)) {\n sawWS = true;\n stripWhitespace(1);\n }\n else if (firstChar in Traversals) {\n ensureNotTraversal();\n tokens.push({ type: Traversals[firstChar] });\n sawWS = false;\n stripWhitespace(1);\n }\n else if (firstChar === \",\") {\n if (tokens.length === 0) {\n throw new Error(\"Empty sub-selector\");\n }\n subselects.push(tokens);\n tokens = [];\n sawWS = false;\n stripWhitespace(1);\n }\n else if (selector.startsWith(\"/*\", selectorIndex)) {\n var endIndex = selector.indexOf(\"*/\", selectorIndex + 2);\n if (endIndex < 0) {\n throw new Error(\"Comment was not terminated\");\n }\n selectorIndex = endIndex + 2;\n }\n else {\n if (sawWS) {\n ensureNotTraversal();\n tokens.push({ type: \"descendant\" });\n sawWS = false;\n }\n if (firstChar in attribSelectors) {\n var _c = attribSelectors[firstChar], name_1 = _c[0], action = _c[1];\n tokens.push({\n type: \"attribute\",\n name: name_1,\n action: action,\n value: getName(1),\n namespace: null,\n // TODO: Add quirksMode option, which makes `ignoreCase` `true` for HTML.\n ignoreCase: options.xmlMode ? null : false,\n });\n }\n else if (firstChar === \"[\") {\n stripWhitespace(1);\n // Determine attribute name and namespace\n var namespace = null;\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = \"\";\n selectorIndex += 1;\n }\n if (selector.startsWith(\"*|\", selectorIndex)) {\n namespace = \"*\";\n selectorIndex += 2;\n }\n var name_2 = getName(0);\n if (namespace === null &&\n selector.charAt(selectorIndex) === \"|\" &&\n selector.charAt(selectorIndex + 1) !== \"=\") {\n namespace = name_2;\n name_2 = getName(1);\n }\n if ((_a = options.lowerCaseAttributeNames) !== null && _a !== void 0 ? _a : !options.xmlMode) {\n name_2 = name_2.toLowerCase();\n }\n stripWhitespace(0);\n // Determine comparison operation\n var action = \"exists\";\n var possibleAction = actionTypes.get(selector.charAt(selectorIndex));\n if (possibleAction) {\n action = possibleAction;\n if (selector.charAt(selectorIndex + 1) !== \"=\") {\n throw new Error(\"Expected `=`\");\n }\n stripWhitespace(2);\n }\n else if (selector.charAt(selectorIndex) === \"=\") {\n action = \"equals\";\n stripWhitespace(1);\n }\n // Determine value\n var value = \"\";\n var ignoreCase = null;\n if (action !== \"exists\") {\n if (quotes.has(selector.charAt(selectorIndex))) {\n var quote = selector.charAt(selectorIndex);\n var sectionEnd = selectorIndex + 1;\n while (sectionEnd < selector.length &&\n (selector.charAt(sectionEnd) !== quote ||\n isEscaped(sectionEnd))) {\n sectionEnd += 1;\n }\n if (selector.charAt(sectionEnd) !== quote) {\n throw new Error(\"Attribute value didn't end\");\n }\n value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));\n selectorIndex = sectionEnd + 1;\n }\n else {\n var valueStart = selectorIndex;\n while (selectorIndex < selector.length &&\n ((!isWhitespace(selector.charAt(selectorIndex)) &&\n selector.charAt(selectorIndex) !== \"]\") ||\n isEscaped(selectorIndex))) {\n selectorIndex += 1;\n }\n value = unescapeCSS(selector.slice(valueStart, selectorIndex));\n }\n stripWhitespace(0);\n // See if we have a force ignore flag\n var forceIgnore = selector.charAt(selectorIndex);\n // If the forceIgnore flag is set (either `i` or `s`), use that value\n if (forceIgnore === \"s\" || forceIgnore === \"S\") {\n ignoreCase = false;\n stripWhitespace(1);\n }\n else if (forceIgnore === \"i\" || forceIgnore === \"I\") {\n ignoreCase = true;\n stripWhitespace(1);\n }\n }\n // If `xmlMode` is set, there are no rules; otherwise, use the `caseInsensitiveAttributes` list.\n if (!options.xmlMode) {\n // TODO: Skip this for `exists`, as there is no value to compare to.\n ignoreCase !== null && ignoreCase !== void 0 ? ignoreCase : (ignoreCase = caseInsensitiveAttributes.has(name_2));\n }\n if (selector.charAt(selectorIndex) !== \"]\") {\n throw new Error(\"Attribute selector didn't terminate\");\n }\n selectorIndex += 1;\n var attributeSelector = {\n type: \"attribute\",\n name: name_2,\n action: action,\n value: value,\n namespace: namespace,\n ignoreCase: ignoreCase,\n };\n tokens.push(attributeSelector);\n }\n else if (firstChar === \":\") {\n if (selector.charAt(selectorIndex + 1) === \":\") {\n tokens.push({\n type: \"pseudo-element\",\n name: getName(2).toLowerCase(),\n });\n continue;\n }\n var name_3 = getName(1).toLowerCase();\n var data = null;\n if (selector.charAt(selectorIndex) === \"(\") {\n if (unpackPseudos.has(name_3)) {\n if (quotes.has(selector.charAt(selectorIndex + 1))) {\n throw new Error(\"Pseudo-selector \" + name_3 + \" cannot be quoted\");\n }\n data = [];\n selectorIndex = parseSelector(data, selector, options, selectorIndex + 1);\n if (selector.charAt(selectorIndex) !== \")\") {\n throw new Error(\"Missing closing parenthesis in :\" + name_3 + \" (\" + selector + \")\");\n }\n selectorIndex += 1;\n }\n else {\n selectorIndex += 1;\n var start = selectorIndex;\n var counter = 1;\n for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {\n if (selector.charAt(selectorIndex) === \"(\" &&\n !isEscaped(selectorIndex)) {\n counter++;\n }\n else if (selector.charAt(selectorIndex) === \")\" &&\n !isEscaped(selectorIndex)) {\n counter--;\n }\n }\n if (counter) {\n throw new Error(\"Parenthesis not matched\");\n }\n data = selector.slice(start, selectorIndex - 1);\n if (stripQuotesFromPseudos.has(name_3)) {\n var quot = data.charAt(0);\n if (quot === data.slice(-1) && quotes.has(quot)) {\n data = data.slice(1, -1);\n }\n data = unescapeCSS(data);\n }\n }\n }\n tokens.push({ type: \"pseudo\", name: name_3, data: data });\n }\n else {\n var namespace = null;\n var name_4 = void 0;\n if (firstChar === \"*\") {\n selectorIndex += 1;\n name_4 = \"*\";\n }\n else if (reName.test(selector.slice(selectorIndex))) {\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = \"\";\n selectorIndex += 1;\n }\n name_4 = getName(0);\n }\n else {\n /*\n * We have finished parsing the selector.\n * Remove descendant tokens at the end if they exist,\n * and return the last index, so that parsing can be\n * picked up from here.\n */\n if (tokens.length &&\n tokens[tokens.length - 1].type === \"descendant\") {\n tokens.pop();\n }\n addToken(subselects, tokens);\n return selectorIndex;\n }\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = name_4;\n if (selector.charAt(selectorIndex + 1) === \"*\") {\n name_4 = \"*\";\n selectorIndex += 2;\n }\n else {\n name_4 = getName(1);\n }\n }\n if (name_4 === \"*\") {\n tokens.push({ type: \"universal\", namespace: namespace });\n }\n else {\n if ((_b = options.lowerCaseTags) !== null && _b !== void 0 ? _b : !options.xmlMode) {\n name_4 = name_4.toLowerCase();\n }\n tokens.push({ type: \"tag\", name: name_4, namespace: namespace });\n }\n }\n }\n }\n addToken(subselects, tokens);\n return selectorIndex;\n}\nfunction addToken(subselects, tokens) {\n if (subselects.length > 0 && tokens.length === 0) {\n throw new Error(\"Empty sub-selector\");\n }\n subselects.push(tokens);\n}\n", "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar actionTypes = {\n equals: \"\",\n element: \"~\",\n start: \"^\",\n end: \"$\",\n any: \"*\",\n not: \"!\",\n hyphen: \"|\",\n};\nvar charsToEscape = new Set(__spreadArray(__spreadArray([], Object.keys(actionTypes)\n .map(function (typeKey) { return actionTypes[typeKey]; })\n .filter(Boolean), true), [\n \":\",\n \"[\",\n \"]\",\n \" \",\n \"\\\\\",\n \"(\",\n \")\",\n \"'\",\n], false));\n/**\n * Turns `selector` back into a string.\n *\n * @param selector Selector to stringify.\n */\nfunction stringify(selector) {\n return selector.map(stringifySubselector).join(\", \");\n}\nexports.default = stringify;\nfunction stringifySubselector(token) {\n return token.map(stringifyToken).join(\"\");\n}\nfunction stringifyToken(token) {\n switch (token.type) {\n // Simple types\n case \"child\":\n return \" > \";\n case \"parent\":\n return \" < \";\n case \"sibling\":\n return \" ~ \";\n case \"adjacent\":\n return \" + \";\n case \"descendant\":\n return \" \";\n case \"universal\":\n return getNamespace(token.namespace) + \"*\";\n case \"tag\":\n return getNamespacedName(token);\n case \"pseudo-element\":\n return \"::\" + escapeName(token.name);\n case \"pseudo\":\n if (token.data === null)\n return \":\" + escapeName(token.name);\n if (typeof token.data === \"string\") {\n return \":\" + escapeName(token.name) + \"(\" + escapeName(token.data) + \")\";\n }\n return \":\" + escapeName(token.name) + \"(\" + stringify(token.data) + \")\";\n case \"attribute\": {\n if (token.name === \"id\" &&\n token.action === \"equals\" &&\n !token.ignoreCase &&\n !token.namespace) {\n return \"#\" + escapeName(token.value);\n }\n if (token.name === \"class\" &&\n token.action === \"element\" &&\n !token.ignoreCase &&\n !token.namespace) {\n return \".\" + escapeName(token.value);\n }\n var name_1 = getNamespacedName(token);\n if (token.action === \"exists\") {\n return \"[\" + name_1 + \"]\";\n }\n return \"[\" + name_1 + actionTypes[token.action] + \"='\" + escapeName(token.value) + \"'\" + (token.ignoreCase ? \"i\" : token.ignoreCase === false ? \"s\" : \"\") + \"]\";\n }\n }\n}\nfunction getNamespacedName(token) {\n return \"\" + getNamespace(token.namespace) + escapeName(token.name);\n}\nfunction getNamespace(namespace) {\n return namespace !== null\n ? (namespace === \"*\" ? \"*\" : escapeName(namespace)) + \"|\"\n : \"\";\n}\nfunction escapeName(str) {\n return str\n .split(\"\")\n .map(function (c) { return (charsToEscape.has(c) ? \"\\\\\" + c : c); })\n .join(\"\");\n}\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringify = exports.parse = void 0;\n__exportStar(require(\"./parse\"), exports);\nvar parse_1 = require(\"./parse\");\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return __importDefault(parse_1).default; } });\nvar stringify_1 = require(\"./stringify\");\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return __importDefault(stringify_1).default; } });\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTraversal = exports.procedure = void 0;\nexports.procedure = {\n universal: 50,\n tag: 30,\n attribute: 1,\n pseudo: 0,\n \"pseudo-element\": 0,\n descendant: -1,\n child: -1,\n parent: -1,\n sibling: -1,\n adjacent: -1,\n _flexibleDescendant: -1,\n};\nfunction isTraversal(t) {\n return exports.procedure[t.type] < 0;\n}\nexports.isTraversal = isTraversal;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar procedure_1 = require(\"./procedure\");\nvar attributes = {\n exists: 10,\n equals: 8,\n not: 7,\n start: 6,\n end: 6,\n any: 5,\n hyphen: 4,\n element: 4,\n};\n/**\n * Sort the parts of the passed selector,\n * as there is potential for optimization\n * (some types of selectors are faster than others)\n *\n * @param arr Selector to sort\n */\nfunction sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}\nexports.default = sortByProcedure;\nfunction getProcedure(token) {\n var proc = procedure_1.procedure[token.type];\n if (token.type === \"attribute\") {\n proc = attributes[token.action];\n if (proc === attributes.equals && token.name === \"id\") {\n // Prefer ID selectors (eg. #ID)\n proc = 9;\n }\n if (token.ignoreCase) {\n /*\n * IgnoreCase adds some overhead, prefer \"normal\" token\n * this is a binary operation, to ensure it's still an int\n */\n proc >>= 1;\n }\n }\n else if (token.type === \"pseudo\") {\n if (!token.data) {\n proc = 3;\n }\n else if (token.name === \"has\" || token.name === \"contains\") {\n proc = 0; // Expensive in any case\n }\n else if (Array.isArray(token.data)) {\n // \"matches\" and \"not\"\n proc = 0;\n for (var i = 0; i < token.data.length; i++) {\n // TODO better handling of complex selectors\n if (token.data[i].length !== 1)\n continue;\n var cur = getProcedure(token.data[i][0]);\n // Avoid executing :has or :contains\n if (cur === 0) {\n proc = 0;\n break;\n }\n if (cur > proc)\n proc = cur;\n }\n if (token.data.length > 1 && proc > 0)\n proc -= 1;\n }\n else {\n proc = 1;\n }\n }\n return proc;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeRules = void 0;\nvar boolbase_1 = require(\"boolbase\");\n/**\n * All reserved characters in a regex, used for escaping.\n *\n * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license\n * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794\n */\nvar reChars = /[-[\\]{}()*+?.,\\\\^$|#\\s]/g;\nfunction escapeRegex(value) {\n return value.replace(reChars, \"\\\\$&\");\n}\n/**\n * Attribute selectors\n */\nexports.attributeRules = {\n equals: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name;\n var value = data.value;\n if (data.ignoreCase) {\n value = value.toLowerCase();\n return function (elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n attr.length === value.length &&\n attr.toLowerCase() === value &&\n next(elem));\n };\n }\n return function (elem) {\n return adapter.getAttributeValue(elem, name) === value && next(elem);\n };\n },\n hyphen: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name;\n var value = data.value;\n var len = value.length;\n if (data.ignoreCase) {\n value = value.toLowerCase();\n return function hyphenIC(elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n (attr.length === len || attr.charAt(len) === \"-\") &&\n attr.substr(0, len).toLowerCase() === value &&\n next(elem));\n };\n }\n return function hyphen(elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n (attr.length === len || attr.charAt(len) === \"-\") &&\n attr.substr(0, len) === value &&\n next(elem));\n };\n },\n element: function (next, _a, _b) {\n var name = _a.name, value = _a.value, ignoreCase = _a.ignoreCase;\n var adapter = _b.adapter;\n if (/\\s/.test(value)) {\n return boolbase_1.falseFunc;\n }\n var regex = new RegExp(\"(?:^|\\\\s)\".concat(escapeRegex(value), \"(?:$|\\\\s)\"), ignoreCase ? \"i\" : \"\");\n return function element(elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n attr.length >= value.length &&\n regex.test(attr) &&\n next(elem));\n };\n },\n exists: function (next, _a, _b) {\n var name = _a.name;\n var adapter = _b.adapter;\n return function (elem) { return adapter.hasAttrib(elem, name) && next(elem); };\n },\n start: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name;\n var value = data.value;\n var len = value.length;\n if (len === 0) {\n return boolbase_1.falseFunc;\n }\n if (data.ignoreCase) {\n value = value.toLowerCase();\n return function (elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n attr.length >= len &&\n attr.substr(0, len).toLowerCase() === value &&\n next(elem));\n };\n }\n return function (elem) {\n var _a;\n return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&\n next(elem);\n };\n },\n end: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name;\n var value = data.value;\n var len = -value.length;\n if (len === 0) {\n return boolbase_1.falseFunc;\n }\n if (data.ignoreCase) {\n value = value.toLowerCase();\n return function (elem) {\n var _a;\n return ((_a = adapter\n .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);\n };\n }\n return function (elem) {\n var _a;\n return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&\n next(elem);\n };\n },\n any: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name, value = data.value;\n if (value === \"\") {\n return boolbase_1.falseFunc;\n }\n if (data.ignoreCase) {\n var regex_1 = new RegExp(escapeRegex(value), \"i\");\n return function anyIC(elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return (attr != null &&\n attr.length >= value.length &&\n regex_1.test(attr) &&\n next(elem));\n };\n }\n return function (elem) {\n var _a;\n return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&\n next(elem);\n };\n },\n not: function (next, data, _a) {\n var adapter = _a.adapter;\n var name = data.name;\n var value = data.value;\n if (value === \"\") {\n return function (elem) {\n return !!adapter.getAttributeValue(elem, name) && next(elem);\n };\n }\n else if (data.ignoreCase) {\n value = value.toLowerCase();\n return function (elem) {\n var attr = adapter.getAttributeValue(elem, name);\n return ((attr == null ||\n attr.length !== value.length ||\n attr.toLowerCase() !== value) &&\n next(elem));\n };\n }\n return function (elem) {\n return adapter.getAttributeValue(elem, name) !== value && next(elem);\n };\n },\n};\n", "\"use strict\";\n// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = void 0;\n// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is \" \\t\\r\\n\\f\"\nvar whitespace = new Set([9, 10, 12, 13, 32]);\nvar ZERO = \"0\".charCodeAt(0);\nvar NINE = \"9\".charCodeAt(0);\n/**\n * Parses an expression.\n *\n * @throws An `Error` if parsing fails.\n * @returns An array containing the integer step size and the integer offset of the nth rule.\n * @example nthCheck.parse(\"2n+3\"); // returns [2, 3]\n */\nfunction parse(formula) {\n formula = formula.trim().toLowerCase();\n if (formula === \"even\") {\n return [2, 0];\n }\n else if (formula === \"odd\") {\n return [2, 1];\n }\n // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]?\n var idx = 0;\n var a = 0;\n var sign = readSign();\n var number = readNumber();\n if (idx < formula.length && formula.charAt(idx) === \"n\") {\n idx++;\n a = sign * (number !== null && number !== void 0 ? number : 1);\n skipWhitespace();\n if (idx < formula.length) {\n sign = readSign();\n skipWhitespace();\n number = readNumber();\n }\n else {\n sign = number = 0;\n }\n }\n // Throw if there is anything else\n if (number === null || idx < formula.length) {\n throw new Error(\"n-th rule couldn't be parsed ('\" + formula + \"')\");\n }\n return [a, sign * number];\n function readSign() {\n if (formula.charAt(idx) === \"-\") {\n idx++;\n return -1;\n }\n if (formula.charAt(idx) === \"+\") {\n idx++;\n }\n return 1;\n }\n function readNumber() {\n var start = idx;\n var value = 0;\n while (idx < formula.length &&\n formula.charCodeAt(idx) >= ZERO &&\n formula.charCodeAt(idx) <= NINE) {\n value = value * 10 + (formula.charCodeAt(idx) - ZERO);\n idx++;\n }\n // Return `null` if we didn't read anything.\n return idx === start ? null : value;\n }\n function skipWhitespace() {\n while (idx < formula.length &&\n whitespace.has(formula.charCodeAt(idx))) {\n idx++;\n }\n }\n}\nexports.parse = parse;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compile = void 0;\nvar boolbase_1 = require(\"boolbase\");\n/**\n * Returns a function that checks if an elements index matches the given rule\n * highly optimized to return the fastest solution.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A highly optimized function that returns whether an index matches the nth-check.\n * @example\n * const check = nthCheck.compile([2, 3]);\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n */\nfunction compile(parsed) {\n var a = parsed[0];\n // Subtract 1 from `b`, to convert from one- to zero-indexed.\n var b = parsed[1] - 1;\n /*\n * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n * Besides, the specification states that no elements are\n * matched when `a` and `b` are 0.\n *\n * `b < 0` here as we subtracted 1 from `b` above.\n */\n if (b < 0 && a <= 0)\n return boolbase_1.falseFunc;\n // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n if (a === -1)\n return function (index) { return index <= b; };\n if (a === 0)\n return function (index) { return index === b; };\n // When `b <= 0` and `a === 1`, they match any element.\n if (a === 1)\n return b < 0 ? boolbase_1.trueFunc : function (index) { return index >= b; };\n /*\n * Otherwise, modulo can be used to check if there is a match.\n *\n * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n */\n var absA = Math.abs(a);\n // Get `b mod a`, + a if this is negative.\n var bMod = ((b % absA) + absA) % absA;\n return a > 1\n ? function (index) { return index >= b && index % absA === bMod; }\n : function (index) { return index <= b && index % absA === bMod; };\n}\nexports.compile = compile;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compile = exports.parse = void 0;\nvar parse_1 = require(\"./parse\");\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return parse_1.parse; } });\nvar compile_1 = require(\"./compile\");\nObject.defineProperty(exports, \"compile\", { enumerable: true, get: function () { return compile_1.compile; } });\n/**\n * Parses and compiles a formula to a highly optimized function.\n * Combination of `parse` and `compile`.\n *\n * If the formula doesn't match any elements,\n * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`.\n * Otherwise, a function accepting an _index_ is returned, which returns\n * whether or not the passed _index_ matches the formula.\n *\n * Note: The nth-rule starts counting at `1`, the returned function at `0`.\n *\n * @param formula The formula to compile.\n * @example\n * const check = nthCheck(\"2n+3\");\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n */\nfunction nthCheck(formula) {\n return (0, compile_1.compile)((0, parse_1.parse)(formula));\n}\nexports.default = nthCheck;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filters = void 0;\nvar nth_check_1 = __importDefault(require(\"nth-check\"));\nvar boolbase_1 = require(\"boolbase\");\nfunction getChildFunc(next, adapter) {\n return function (elem) {\n var parent = adapter.getParent(elem);\n return parent != null && adapter.isTag(parent) && next(elem);\n };\n}\nexports.filters = {\n contains: function (next, text, _a) {\n var adapter = _a.adapter;\n return function contains(elem) {\n return next(elem) && adapter.getText(elem).includes(text);\n };\n },\n icontains: function (next, text, _a) {\n var adapter = _a.adapter;\n var itext = text.toLowerCase();\n return function icontains(elem) {\n return (next(elem) &&\n adapter.getText(elem).toLowerCase().includes(itext));\n };\n },\n // Location specific methods\n \"nth-child\": function (next, rule, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var func = (0, nth_check_1.default)(rule);\n if (func === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n if (func === boolbase_1.trueFunc)\n return getChildFunc(next, adapter);\n return function nthChild(elem) {\n var siblings = adapter.getSiblings(elem);\n var pos = 0;\n for (var i = 0; i < siblings.length; i++) {\n if (equals(elem, siblings[i]))\n break;\n if (adapter.isTag(siblings[i])) {\n pos++;\n }\n }\n return func(pos) && next(elem);\n };\n },\n \"nth-last-child\": function (next, rule, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var func = (0, nth_check_1.default)(rule);\n if (func === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n if (func === boolbase_1.trueFunc)\n return getChildFunc(next, adapter);\n return function nthLastChild(elem) {\n var siblings = adapter.getSiblings(elem);\n var pos = 0;\n for (var i = siblings.length - 1; i >= 0; i--) {\n if (equals(elem, siblings[i]))\n break;\n if (adapter.isTag(siblings[i])) {\n pos++;\n }\n }\n return func(pos) && next(elem);\n };\n },\n \"nth-of-type\": function (next, rule, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var func = (0, nth_check_1.default)(rule);\n if (func === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n if (func === boolbase_1.trueFunc)\n return getChildFunc(next, adapter);\n return function nthOfType(elem) {\n var siblings = adapter.getSiblings(elem);\n var pos = 0;\n for (var i = 0; i < siblings.length; i++) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n break;\n if (adapter.isTag(currentSibling) &&\n adapter.getName(currentSibling) === adapter.getName(elem)) {\n pos++;\n }\n }\n return func(pos) && next(elem);\n };\n },\n \"nth-last-of-type\": function (next, rule, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var func = (0, nth_check_1.default)(rule);\n if (func === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n if (func === boolbase_1.trueFunc)\n return getChildFunc(next, adapter);\n return function nthLastOfType(elem) {\n var siblings = adapter.getSiblings(elem);\n var pos = 0;\n for (var i = siblings.length - 1; i >= 0; i--) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n break;\n if (adapter.isTag(currentSibling) &&\n adapter.getName(currentSibling) === adapter.getName(elem)) {\n pos++;\n }\n }\n return func(pos) && next(elem);\n };\n },\n // TODO determine the actual root element\n root: function (next, _rule, _a) {\n var adapter = _a.adapter;\n return function (elem) {\n var parent = adapter.getParent(elem);\n return (parent == null || !adapter.isTag(parent)) && next(elem);\n };\n },\n scope: function (next, rule, options, context) {\n var equals = options.equals;\n if (!context || context.length === 0) {\n // Equivalent to :root\n return exports.filters.root(next, rule, options);\n }\n if (context.length === 1) {\n // NOTE: can't be unpacked, as :has uses this for side-effects\n return function (elem) { return equals(context[0], elem) && next(elem); };\n }\n return function (elem) { return context.includes(elem) && next(elem); };\n },\n hover: dynamicStatePseudo(\"isHovered\"),\n visited: dynamicStatePseudo(\"isVisited\"),\n active: dynamicStatePseudo(\"isActive\"),\n};\n/**\n * Dynamic state pseudos. These depend on optional Adapter methods.\n *\n * @param name The name of the adapter method to call.\n * @returns Pseudo for the `filters` object.\n */\nfunction dynamicStatePseudo(name) {\n return function dynamicPseudo(next, _rule, _a) {\n var adapter = _a.adapter;\n var func = adapter[name];\n if (typeof func !== \"function\") {\n return boolbase_1.falseFunc;\n }\n return function active(elem) {\n return func(elem) && next(elem);\n };\n };\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.verifyPseudoArgs = exports.pseudos = void 0;\n// While filters are precompiled, pseudos get called when they are needed\nexports.pseudos = {\n empty: function (elem, _a) {\n var adapter = _a.adapter;\n return !adapter.getChildren(elem).some(function (elem) {\n // FIXME: `getText` call is potentially expensive.\n return adapter.isTag(elem) || adapter.getText(elem) !== \"\";\n });\n },\n \"first-child\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var firstChild = adapter\n .getSiblings(elem)\n .find(function (elem) { return adapter.isTag(elem); });\n return firstChild != null && equals(elem, firstChild);\n },\n \"last-child\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var siblings = adapter.getSiblings(elem);\n for (var i = siblings.length - 1; i >= 0; i--) {\n if (equals(elem, siblings[i]))\n return true;\n if (adapter.isTag(siblings[i]))\n break;\n }\n return false;\n },\n \"first-of-type\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var siblings = adapter.getSiblings(elem);\n var elemName = adapter.getName(elem);\n for (var i = 0; i < siblings.length; i++) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n return true;\n if (adapter.isTag(currentSibling) &&\n adapter.getName(currentSibling) === elemName) {\n break;\n }\n }\n return false;\n },\n \"last-of-type\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var siblings = adapter.getSiblings(elem);\n var elemName = adapter.getName(elem);\n for (var i = siblings.length - 1; i >= 0; i--) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n return true;\n if (adapter.isTag(currentSibling) &&\n adapter.getName(currentSibling) === elemName) {\n break;\n }\n }\n return false;\n },\n \"only-of-type\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n var elemName = adapter.getName(elem);\n return adapter\n .getSiblings(elem)\n .every(function (sibling) {\n return equals(elem, sibling) ||\n !adapter.isTag(sibling) ||\n adapter.getName(sibling) !== elemName;\n });\n },\n \"only-child\": function (elem, _a) {\n var adapter = _a.adapter, equals = _a.equals;\n return adapter\n .getSiblings(elem)\n .every(function (sibling) { return equals(elem, sibling) || !adapter.isTag(sibling); });\n },\n};\nfunction verifyPseudoArgs(func, name, subselect) {\n if (subselect === null) {\n if (func.length > 2) {\n throw new Error(\"pseudo-selector :\".concat(name, \" requires an argument\"));\n }\n }\n else if (func.length === 2) {\n throw new Error(\"pseudo-selector :\".concat(name, \" doesn't have any arguments\"));\n }\n}\nexports.verifyPseudoArgs = verifyPseudoArgs;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.aliases = void 0;\n/**\n * Aliases are pseudos that are expressed as selectors.\n */\nexports.aliases = {\n // Links\n \"any-link\": \":is(a, area, link)[href]\",\n link: \":any-link:not(:visited)\",\n // Forms\n // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements\n disabled: \":is(\\n :is(button, input, select, textarea, optgroup, option)[disabled],\\n optgroup[disabled] > option,\\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\\n )\",\n enabled: \":not(:disabled)\",\n checked: \":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)\",\n required: \":is(input, select, textarea)[required]\",\n optional: \":is(input, select, textarea):not([required])\",\n // JQuery extensions\n // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness\n selected: \"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)\",\n checkbox: \"[type=checkbox]\",\n file: \"[type=file]\",\n password: \"[type=password]\",\n radio: \"[type=radio]\",\n reset: \"[type=reset]\",\n image: \"[type=image]\",\n submit: \"[type=submit]\",\n parent: \":not(:empty)\",\n header: \":is(h1, h2, h3, h4, h5, h6)\",\n button: \":is(button, input[type=button])\",\n input: \":is(input, textarea, select, button)\",\n text: \"input:is(:not([type!='']), [type=text])\",\n};\n", "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;\nvar boolbase_1 = require(\"boolbase\");\nvar procedure_1 = require(\"../procedure\");\n/** Used as a placeholder for :has. Will be replaced with the actual element. */\nexports.PLACEHOLDER_ELEMENT = {};\nfunction ensureIsTag(next, adapter) {\n if (next === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n return function (elem) { return adapter.isTag(elem) && next(elem); };\n}\nexports.ensureIsTag = ensureIsTag;\nfunction getNextSiblings(elem, adapter) {\n var siblings = adapter.getSiblings(elem);\n if (siblings.length <= 1)\n return [];\n var elemIndex = siblings.indexOf(elem);\n if (elemIndex < 0 || elemIndex === siblings.length - 1)\n return [];\n return siblings.slice(elemIndex + 1).filter(adapter.isTag);\n}\nexports.getNextSiblings = getNextSiblings;\nvar is = function (next, token, options, context, compileToken) {\n var opts = {\n xmlMode: !!options.xmlMode,\n adapter: options.adapter,\n equals: options.equals,\n };\n var func = compileToken(token, opts, context);\n return function (elem) { return func(elem) && next(elem); };\n};\n/*\n * :not, :has, :is, :matches and :where have to compile selectors\n * doing this in src/pseudos.ts would lead to circular dependencies,\n * so we add them here\n */\nexports.subselects = {\n is: is,\n /**\n * `:matches` and `:where` are aliases for `:is`.\n */\n matches: is,\n where: is,\n not: function (next, token, options, context, compileToken) {\n var opts = {\n xmlMode: !!options.xmlMode,\n adapter: options.adapter,\n equals: options.equals,\n };\n var func = compileToken(token, opts, context);\n if (func === boolbase_1.falseFunc)\n return next;\n if (func === boolbase_1.trueFunc)\n return boolbase_1.falseFunc;\n return function not(elem) {\n return !func(elem) && next(elem);\n };\n },\n has: function (next, subselect, options, _context, compileToken) {\n var adapter = options.adapter;\n var opts = {\n xmlMode: !!options.xmlMode,\n adapter: adapter,\n equals: options.equals,\n };\n // @ts-expect-error Uses an array as a pointer to the current element (side effects)\n var context = subselect.some(function (s) {\n return s.some(procedure_1.isTraversal);\n })\n ? [exports.PLACEHOLDER_ELEMENT]\n : undefined;\n var compiled = compileToken(subselect, opts, context);\n if (compiled === boolbase_1.falseFunc)\n return boolbase_1.falseFunc;\n if (compiled === boolbase_1.trueFunc) {\n return function (elem) {\n return adapter.getChildren(elem).some(adapter.isTag) && next(elem);\n };\n }\n var hasElement = ensureIsTag(compiled, adapter);\n var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings = _a === void 0 ? false : _a;\n /*\n * `shouldTestNextSiblings` will only be true if the query starts with\n * a traversal (sibling or adjacent). That means we will always have a context.\n */\n if (context) {\n return function (elem) {\n context[0] = elem;\n var childs = adapter.getChildren(elem);\n var nextElements = shouldTestNextSiblings\n ? __spreadArray(__spreadArray([], childs, true), getNextSiblings(elem, adapter), true) : childs;\n return (next(elem) && adapter.existsOne(hasElement, nextElements));\n };\n }\n return function (elem) {\n return next(elem) &&\n adapter.existsOne(hasElement, adapter.getChildren(elem));\n };\n },\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0;\n/*\n * Pseudo selectors\n *\n * Pseudo selectors are available in three forms:\n *\n * 1. Filters are called when the selector is compiled and return a function\n * that has to return either false, or the results of `next()`.\n * 2. Pseudos are called on execution. They have to return a boolean.\n * 3. Subselects work like filters, but have an embedded selector that will be run separately.\n *\n * Filters are great if you want to do some pre-processing, or change the call order\n * of `next()` and your code.\n * Pseudos should be used to implement simple checks.\n */\nvar boolbase_1 = require(\"boolbase\");\nvar css_what_1 = require(\"css-what\");\nvar filters_1 = require(\"./filters\");\nObject.defineProperty(exports, \"filters\", { enumerable: true, get: function () { return filters_1.filters; } });\nvar pseudos_1 = require(\"./pseudos\");\nObject.defineProperty(exports, \"pseudos\", { enumerable: true, get: function () { return pseudos_1.pseudos; } });\nvar aliases_1 = require(\"./aliases\");\nObject.defineProperty(exports, \"aliases\", { enumerable: true, get: function () { return aliases_1.aliases; } });\nvar subselects_1 = require(\"./subselects\");\nfunction compilePseudoSelector(next, selector, options, context, compileToken) {\n var name = selector.name, data = selector.data;\n if (Array.isArray(data)) {\n return subselects_1.subselects[name](next, data, options, context, compileToken);\n }\n if (name in aliases_1.aliases) {\n if (data != null) {\n throw new Error(\"Pseudo \".concat(name, \" doesn't have any arguments\"));\n }\n // The alias has to be parsed here, to make sure options are respected.\n var alias = (0, css_what_1.parse)(aliases_1.aliases[name], options);\n return subselects_1.subselects.is(next, alias, options, context, compileToken);\n }\n if (name in filters_1.filters) {\n return filters_1.filters[name](next, data, options, context);\n }\n if (name in pseudos_1.pseudos) {\n var pseudo_1 = pseudos_1.pseudos[name];\n (0, pseudos_1.verifyPseudoArgs)(pseudo_1, name, data);\n return pseudo_1 === boolbase_1.falseFunc\n ? boolbase_1.falseFunc\n : next === boolbase_1.trueFunc\n ? function (elem) { return pseudo_1(elem, options, data); }\n : function (elem) { return pseudo_1(elem, options, data) && next(elem); };\n }\n throw new Error(\"unmatched pseudo-class :\".concat(name));\n}\nexports.compilePseudoSelector = compilePseudoSelector;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileGeneralSelector = void 0;\nvar attributes_1 = require(\"./attributes\");\nvar pseudo_selectors_1 = require(\"./pseudo-selectors\");\n/*\n * All available rules\n */\nfunction compileGeneralSelector(next, selector, options, context, compileToken) {\n var adapter = options.adapter, equals = options.equals;\n switch (selector.type) {\n case \"pseudo-element\":\n throw new Error(\"Pseudo-elements are not supported by css-select\");\n case \"attribute\":\n return attributes_1.attributeRules[selector.action](next, selector, options);\n case \"pseudo\":\n return (0, pseudo_selectors_1.compilePseudoSelector)(next, selector, options, context, compileToken);\n // Tags\n case \"tag\":\n return function tag(elem) {\n return adapter.getName(elem) === selector.name && next(elem);\n };\n // Traversal\n case \"descendant\":\n if (options.cacheResults === false ||\n typeof WeakSet === \"undefined\") {\n return function descendant(elem) {\n var current = elem;\n while ((current = adapter.getParent(current))) {\n if (adapter.isTag(current) && next(current)) {\n return true;\n }\n }\n return false;\n };\n }\n // @ts-expect-error `ElementNode` is not extending object\n // eslint-disable-next-line no-case-declarations\n var isFalseCache_1 = new WeakSet();\n return function cachedDescendant(elem) {\n var current = elem;\n while ((current = adapter.getParent(current))) {\n if (!isFalseCache_1.has(current)) {\n if (adapter.isTag(current) && next(current)) {\n return true;\n }\n isFalseCache_1.add(current);\n }\n }\n return false;\n };\n case \"_flexibleDescendant\":\n // Include element itself, only used while querying an array\n return function flexibleDescendant(elem) {\n var current = elem;\n do {\n if (adapter.isTag(current) && next(current))\n return true;\n } while ((current = adapter.getParent(current)));\n return false;\n };\n case \"parent\":\n return function parent(elem) {\n return adapter\n .getChildren(elem)\n .some(function (elem) { return adapter.isTag(elem) && next(elem); });\n };\n case \"child\":\n return function child(elem) {\n var parent = adapter.getParent(elem);\n return parent != null && adapter.isTag(parent) && next(parent);\n };\n case \"sibling\":\n return function sibling(elem) {\n var siblings = adapter.getSiblings(elem);\n for (var i = 0; i < siblings.length; i++) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n break;\n if (adapter.isTag(currentSibling) && next(currentSibling)) {\n return true;\n }\n }\n return false;\n };\n case \"adjacent\":\n return function adjacent(elem) {\n var siblings = adapter.getSiblings(elem);\n var lastElement;\n for (var i = 0; i < siblings.length; i++) {\n var currentSibling = siblings[i];\n if (equals(elem, currentSibling))\n break;\n if (adapter.isTag(currentSibling)) {\n lastElement = currentSibling;\n }\n }\n return !!lastElement && next(lastElement);\n };\n case \"universal\":\n return next;\n }\n}\nexports.compileGeneralSelector = compileGeneralSelector;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileToken = exports.compileUnsafe = exports.compile = void 0;\nvar css_what_1 = require(\"css-what\");\nvar boolbase_1 = require(\"boolbase\");\nvar sort_1 = __importDefault(require(\"./sort\"));\nvar procedure_1 = require(\"./procedure\");\nvar general_1 = require(\"./general\");\nvar subselects_1 = require(\"./pseudo-selectors/subselects\");\n/**\n * Compiles a selector to an executable function.\n *\n * @param selector Selector to compile.\n * @param options Compilation options.\n * @param context Optional context for the selector.\n */\nfunction compile(selector, options, context) {\n var next = compileUnsafe(selector, options, context);\n return (0, subselects_1.ensureIsTag)(next, options.adapter);\n}\nexports.compile = compile;\nfunction compileUnsafe(selector, options, context) {\n var token = typeof selector === \"string\" ? (0, css_what_1.parse)(selector, options) : selector;\n return compileToken(token, options, context);\n}\nexports.compileUnsafe = compileUnsafe;\nfunction includesScopePseudo(t) {\n return (t.type === \"pseudo\" &&\n (t.name === \"scope\" ||\n (Array.isArray(t.data) &&\n t.data.some(function (data) { return data.some(includesScopePseudo); }))));\n}\nvar DESCENDANT_TOKEN = { type: \"descendant\" };\nvar FLEXIBLE_DESCENDANT_TOKEN = {\n type: \"_flexibleDescendant\",\n};\nvar SCOPE_TOKEN = { type: \"pseudo\", name: \"scope\", data: null };\n/*\n * CSS 4 Spec (Draft): 3.3.1. Absolutizing a Scope-relative Selector\n * http://www.w3.org/TR/selectors4/#absolutizing\n */\nfunction absolutize(token, _a, context) {\n var adapter = _a.adapter;\n // TODO Use better check if the context is a document\n var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function (e) {\n var parent = adapter.isTag(e) && adapter.getParent(e);\n return e === subselects_1.PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent));\n }));\n for (var _i = 0, token_1 = token; _i < token_1.length; _i++) {\n var t = token_1[_i];\n if (t.length > 0 && (0, procedure_1.isTraversal)(t[0]) && t[0].type !== \"descendant\") {\n // Don't continue in else branch\n }\n else if (hasContext && !t.some(includesScopePseudo)) {\n t.unshift(DESCENDANT_TOKEN);\n }\n else {\n continue;\n }\n t.unshift(SCOPE_TOKEN);\n }\n}\nfunction compileToken(token, options, context) {\n var _a;\n token = token.filter(function (t) { return t.length > 0; });\n token.forEach(sort_1.default);\n context = (_a = options.context) !== null && _a !== void 0 ? _a : context;\n var isArrayContext = Array.isArray(context);\n var finalContext = context && (Array.isArray(context) ? context : [context]);\n absolutize(token, options, finalContext);\n var shouldTestNextSiblings = false;\n var query = token\n .map(function (rules) {\n if (rules.length >= 2) {\n var first = rules[0], second = rules[1];\n if (first.type !== \"pseudo\" || first.name !== \"scope\") {\n // Ignore\n }\n else if (isArrayContext && second.type === \"descendant\") {\n rules[1] = FLEXIBLE_DESCENDANT_TOKEN;\n }\n else if (second.type === \"adjacent\" ||\n second.type === \"sibling\") {\n shouldTestNextSiblings = true;\n }\n }\n return compileRules(rules, options, finalContext);\n })\n .reduce(reduceRules, boolbase_1.falseFunc);\n query.shouldTestNextSiblings = shouldTestNextSiblings;\n return query;\n}\nexports.compileToken = compileToken;\nfunction compileRules(rules, options, context) {\n var _a;\n return rules.reduce(function (previous, rule) {\n return previous === boolbase_1.falseFunc\n ? boolbase_1.falseFunc\n : (0, general_1.compileGeneralSelector)(previous, rule, options, context, compileToken);\n }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.trueFunc);\n}\nfunction reduceRules(a, b) {\n if (b === boolbase_1.falseFunc || a === boolbase_1.trueFunc) {\n return a;\n }\n if (a === boolbase_1.falseFunc || b === boolbase_1.trueFunc) {\n return b;\n }\n return function combine(elem) {\n return a(elem) || b(elem);\n };\n}\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0;\nvar DomUtils = __importStar(require(\"domutils\"));\nvar boolbase_1 = require(\"boolbase\");\nvar compile_1 = require(\"./compile\");\nvar subselects_1 = require(\"./pseudo-selectors/subselects\");\nvar defaultEquals = function (a, b) { return a === b; };\nvar defaultOptions = {\n adapter: DomUtils,\n equals: defaultEquals,\n};\nfunction convertOptionFormats(options) {\n var _a, _b, _c, _d;\n /*\n * We force one format of options to the other one.\n */\n // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`.\n var opts = options !== null && options !== void 0 ? options : defaultOptions;\n // @ts-expect-error Same as above.\n (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);\n // @ts-expect-error `equals` does not exist on `Options`\n (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);\n return opts;\n}\nfunction wrapCompile(func) {\n return function addAdapter(selector, options, context) {\n var opts = convertOptionFormats(options);\n return func(selector, opts, context);\n };\n}\n/**\n * Compiles the query, returns a function.\n */\nexports.compile = wrapCompile(compile_1.compile);\nexports._compileUnsafe = wrapCompile(compile_1.compileUnsafe);\nexports._compileToken = wrapCompile(compile_1.compileToken);\nfunction getSelectorFunc(searchFunc) {\n return function select(query, elements, options) {\n var opts = convertOptionFormats(options);\n if (typeof query !== \"function\") {\n query = (0, compile_1.compileUnsafe)(query, opts, elements);\n }\n var filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings);\n return searchFunc(query, filteredElements, opts);\n };\n}\nfunction prepareContext(elems, adapter, shouldTestNextSiblings) {\n if (shouldTestNextSiblings === void 0) { shouldTestNextSiblings = false; }\n /*\n * Add siblings if the query requires them.\n * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692\n */\n if (shouldTestNextSiblings) {\n elems = appendNextSiblings(elems, adapter);\n }\n return Array.isArray(elems)\n ? adapter.removeSubsets(elems)\n : adapter.getChildren(elems);\n}\nexports.prepareContext = prepareContext;\nfunction appendNextSiblings(elem, adapter) {\n // Order matters because jQuery seems to check the children before the siblings\n var elems = Array.isArray(elem) ? elem.slice(0) : [elem];\n var elemsLength = elems.length;\n for (var i = 0; i < elemsLength; i++) {\n var nextSiblings = (0, subselects_1.getNextSiblings)(elems[i], adapter);\n elems.push.apply(elems, nextSiblings);\n }\n return elems;\n}\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns All matching elements.\n *\n */\nexports.selectAll = getSelectorFunc(function (query, elems, options) {\n return query === boolbase_1.falseFunc || !elems || elems.length === 0\n ? []\n : options.adapter.findAll(query, elems);\n});\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns the first match, or null if there was no match.\n */\nexports.selectOne = getSelectorFunc(function (query, elems, options) {\n return query === boolbase_1.falseFunc || !elems || elems.length === 0\n ? null\n : options.adapter.findOne(query, elems);\n});\n/**\n * Tests whether or not an element is matched by query.\n *\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elem The element to test if it matches the query.\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns\n */\nfunction is(elem, query, options) {\n var opts = convertOptionFormats(options);\n return (typeof query === \"function\" ? query : (0, compile_1.compile)(query, opts))(elem);\n}\nexports.is = is;\n/**\n * Alias for selectAll(query, elems, options).\n * @see [compile] for supported selector queries.\n */\nexports.default = exports.selectAll;\n// Export filters, pseudos and aliases to allow users to supply their own.\nvar pseudo_selectors_1 = require(\"./pseudo-selectors\");\nObject.defineProperty(exports, \"filters\", { enumerable: true, get: function () { return pseudo_selectors_1.filters; } });\nObject.defineProperty(exports, \"pseudos\", { enumerable: true, get: function () { return pseudo_selectors_1.pseudos; } });\nObject.defineProperty(exports, \"aliases\", { enumerable: true, get: function () { return pseudo_selectors_1.aliases; } });\n", "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#the-stylesheet-interface\n */\nCSSOM.StyleSheet = function StyleSheet() {\n\tthis.parentStyleSheet = null;\n};\n\n\n//.CommonJS\nexports.StyleSheet = CSSOM.StyleSheet;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule\n */\nCSSOM.CSSRule = function CSSRule() {\n\tthis.parentRule = null;\n\tthis.parentStyleSheet = null;\n};\n\nCSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete\nCSSOM.CSSRule.STYLE_RULE = 1;\nCSSOM.CSSRule.CHARSET_RULE = 2; // obsolete\nCSSOM.CSSRule.IMPORT_RULE = 3;\nCSSOM.CSSRule.MEDIA_RULE = 4;\nCSSOM.CSSRule.FONT_FACE_RULE = 5;\nCSSOM.CSSRule.PAGE_RULE = 6;\nCSSOM.CSSRule.KEYFRAMES_RULE = 7;\nCSSOM.CSSRule.KEYFRAME_RULE = 8;\nCSSOM.CSSRule.MARGIN_RULE = 9;\nCSSOM.CSSRule.NAMESPACE_RULE = 10;\nCSSOM.CSSRule.COUNTER_STYLE_RULE = 11;\nCSSOM.CSSRule.SUPPORTS_RULE = 12;\nCSSOM.CSSRule.DOCUMENT_RULE = 13;\nCSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14;\nCSSOM.CSSRule.VIEWPORT_RULE = 15;\nCSSOM.CSSRule.REGION_STYLE_RULE = 16;\n\n\nCSSOM.CSSRule.prototype = {\n\tconstructor: CSSOM.CSSRule\n\t//FIXME\n};\n\n\n//.CommonJS\nexports.CSSRule = CSSOM.CSSRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssstylerule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule\n */\nCSSOM.CSSStyleRule = function CSSStyleRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.selectorText = \"\";\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;\nCSSOM.CSSStyleRule.prototype.type = 1;\n\nObject.defineProperty(CSSOM.CSSStyleRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar text;\n\t\tif (this.selectorText) {\n\t\t\ttext = this.selectorText + \" {\" + this.style.cssText + \"}\";\n\t\t} else {\n\t\t\ttext = \"\";\n\t\t}\n\t\treturn text;\n\t},\n\tset: function(cssText) {\n\t\tvar rule = CSSOM.CSSStyleRule.parse(cssText);\n\t\tthis.style = rule.style;\n\t\tthis.selectorText = rule.selectorText;\n\t}\n});\n\n\n/**\n * NON-STANDARD\n * lightweight version of parse.js.\n * @param {string} ruleText\n * @return CSSStyleRule\n */\nCSSOM.CSSStyleRule.parse = function(ruleText) {\n\tvar i = 0;\n\tvar state = \"selector\";\n\tvar index;\n\tvar j = i;\n\tvar buffer = \"\";\n\n\tvar SIGNIFICANT_WHITESPACE = {\n\t\t\"selector\": true,\n\t\t\"value\": true\n\t};\n\n\tvar styleRule = new CSSOM.CSSStyleRule();\n\tvar name, priority=\"\";\n\n\tfor (var character; (character = ruleText.charAt(i)); i++) {\n\n\t\tswitch (character) {\n\n\t\tcase \" \":\n\t\tcase \"\\t\":\n\t\tcase \"\\r\":\n\t\tcase \"\\n\":\n\t\tcase \"\\f\":\n\t\t\tif (SIGNIFICANT_WHITESPACE[state]) {\n\t\t\t\t// Squash 2 or more white-spaces in the row into 1\n\t\t\t\tswitch (ruleText.charAt(i - 1)) {\n\t\t\t\t\tcase \" \":\n\t\t\t\t\tcase \"\\t\":\n\t\t\t\t\tcase \"\\r\":\n\t\t\t\t\tcase \"\\n\":\n\t\t\t\t\tcase \"\\f\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbuffer += \" \";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\t// String\n\t\tcase '\"':\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf('\"', j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow '\" is missing';\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\tcase \"'\":\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf(\"'\", j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow \"' is missing\";\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\t// Comment\n\t\tcase \"/\":\n\t\t\tif (ruleText.charAt(i + 1) === \"*\") {\n\t\t\t\ti += 2;\n\t\t\t\tindex = ruleText.indexOf(\"*/\", i);\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tthrow new SyntaxError(\"Missing */\");\n\t\t\t\t} else {\n\t\t\t\t\ti = index + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"{\":\n\t\t\tif (state === \"selector\") {\n\t\t\t\tstyleRule.selectorText = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \":\":\n\t\t\tif (state === \"name\") {\n\t\t\t\tname = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"value\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"!\":\n\t\t\tif (state === \"value\" && ruleText.indexOf(\"!important\", i) === i) {\n\t\t\t\tpriority = \"important\";\n\t\t\t\ti += \"important\".length;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \";\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"}\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t} else if (state === \"name\") {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tstate = \"selector\";\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\n\t\t}\n\t}\n\n\treturn styleRule;\n\n};\n\n\n//.CommonJS\nexports.CSSStyleRule = CSSOM.CSSStyleRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tStyleSheet: require(\"./StyleSheet\").StyleSheet,\n\tCSSStyleRule: require(\"./CSSStyleRule\").CSSStyleRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet\n */\nCSSOM.CSSStyleSheet = function CSSStyleSheet() {\n\tCSSOM.StyleSheet.call(this);\n\tthis.cssRules = [];\n};\n\n\nCSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet();\nCSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet;\n\n\n/**\n * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.\n *\n * sheet = new Sheet(\"body {margin: 0}\")\n * sheet.toString()\n * -> \"body{margin:0;}\"\n * sheet.insertRule(\"img {border: none}\", 0)\n * -> 0\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n *\n * @param {string} rule\n * @param {number} index\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule\n * @return {number} The index within the style sheet's rule collection of the newly inserted rule.\n */\nCSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) {\n\tif (index < 0 || index > this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tvar cssRule = CSSOM.parse(rule).cssRules[0];\n\tcssRule.parentStyleSheet = this;\n\tthis.cssRules.splice(index, 0, cssRule);\n\treturn index;\n};\n\n\n/**\n * Used to delete a rule from the style sheet.\n *\n * sheet = new Sheet(\"img{border:none} body{margin:0}\")\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n * sheet.deleteRule(0)\n * sheet.toString()\n * -> \"body{margin:0;}\"\n *\n * @param {number} index within the style sheet's rule list of the rule to remove.\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule\n */\nCSSOM.CSSStyleSheet.prototype.deleteRule = function(index) {\n\tif (index < 0 || index >= this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tthis.cssRules.splice(index, 1);\n};\n\n\n/**\n * NON-STANDARD\n * @return {string} serialize stylesheet\n */\nCSSOM.CSSStyleSheet.prototype.toString = function() {\n\tvar result = \"\";\n\tvar rules = this.cssRules;\n\tfor (var i=0; i \"body{margin:0;}\"\n * cssGroupingRule.insertRule(\"img{border:none;}\", 1)\n * -> 1\n * cssGroupingRule.cssText\n * -> \"body{margin:0;}img{border:none;}\"\n *\n * @param {string} rule\n * @param {number} [index]\n * @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-insertrule\n * @return {number} The index within the grouping rule's collection of the newly inserted rule.\n */\n CSSOM.CSSGroupingRule.prototype.insertRule = function insertRule(rule, index) {\n\tif (index < 0 || index > this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tvar cssRule = CSSOM.parse(rule).cssRules[0];\n\tcssRule.parentRule = this;\n\tthis.cssRules.splice(index, 0, cssRule);\n\treturn index;\n};\n\n/**\n * Used to delete a rule from the grouping rule.\n *\n * cssGroupingRule.cssText\n * -> \"img{border:none;}body{margin:0;}\"\n * cssGroupingRule.deleteRule(0)\n * cssGroupingRule.cssText\n * -> \"body{margin:0;}\"\n *\n * @param {number} index within the grouping rule's rule list of the rule to remove.\n * @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-deleterule\n */\n CSSOM.CSSGroupingRule.prototype.deleteRule = function deleteRule(index) {\n\tif (index < 0 || index >= this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tthis.cssRules.splice(index, 1)[0].parentRule = null;\n};\n\n//.CommonJS\nexports.CSSGroupingRule = CSSOM.CSSGroupingRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n CSSRule: require(\"./CSSRule\").CSSRule,\n CSSGroupingRule: require(\"./CSSGroupingRule\").CSSGroupingRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://www.w3.org/TR/css-conditional-3/#the-cssconditionrule-interface\n */\nCSSOM.CSSConditionRule = function CSSConditionRule() {\n CSSOM.CSSGroupingRule.call(this);\n this.cssRules = [];\n};\n\nCSSOM.CSSConditionRule.prototype = new CSSOM.CSSGroupingRule();\nCSSOM.CSSConditionRule.prototype.constructor = CSSOM.CSSConditionRule;\nCSSOM.CSSConditionRule.prototype.conditionText = ''\nCSSOM.CSSConditionRule.prototype.cssText = ''\n\n//.CommonJS\nexports.CSSConditionRule = CSSOM.CSSConditionRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSGroupingRule: require(\"./CSSGroupingRule\").CSSGroupingRule,\n\tCSSConditionRule: require(\"./CSSConditionRule\").CSSConditionRule,\n\tMediaList: require(\"./MediaList\").MediaList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssmediarule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule\n */\nCSSOM.CSSMediaRule = function CSSMediaRule() {\n\tCSSOM.CSSConditionRule.call(this);\n\tthis.media = new CSSOM.MediaList();\n};\n\nCSSOM.CSSMediaRule.prototype = new CSSOM.CSSConditionRule();\nCSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;\nCSSOM.CSSMediaRule.prototype.type = 4;\n\n// https://opensource.apple.com/source/WebCore/WebCore-7611.1.21.161.3/css/CSSMediaRule.cpp\nObject.defineProperties(CSSOM.CSSMediaRule.prototype, {\n \"conditionText\": {\n get: function() {\n return this.media.mediaText;\n },\n set: function(value) {\n this.media.mediaText = value;\n },\n configurable: true,\n enumerable: true\n },\n \"cssText\": {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n return \"@media \" + this.media.mediaText + \" {\" + cssTexts.join(\"\") + \"}\";\n },\n configurable: true,\n enumerable: true\n }\n});\n\n\n//.CommonJS\nexports.CSSMediaRule = CSSOM.CSSMediaRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n CSSRule: require(\"./CSSRule\").CSSRule,\n CSSGroupingRule: require(\"./CSSGroupingRule\").CSSGroupingRule,\n CSSConditionRule: require(\"./CSSConditionRule\").CSSConditionRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface\n */\nCSSOM.CSSSupportsRule = function CSSSupportsRule() {\n CSSOM.CSSConditionRule.call(this);\n};\n\nCSSOM.CSSSupportsRule.prototype = new CSSOM.CSSConditionRule();\nCSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule;\nCSSOM.CSSSupportsRule.prototype.type = 12;\n\nObject.defineProperty(CSSOM.CSSSupportsRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n\n for (var i = 0, length = this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n\n return \"@supports \" + this.conditionText + \" {\" + cssTexts.join(\"\") + \"}\";\n }\n});\n\n//.CommonJS\nexports.CSSSupportsRule = CSSOM.CSSSupportsRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule\n */\nCSSOM.CSSFontFaceRule = function CSSFontFaceRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;\nCSSOM.CSSFontFaceRule.prototype.type = 5;\n//FIXME\n//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp\nObject.defineProperty(CSSOM.CSSFontFaceRule.prototype, \"cssText\", {\n get: function() {\n return \"@font-face {\" + this.style.cssText + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/shadow-dom/#host-at-rule\n */\nCSSOM.CSSHostRule = function CSSHostRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;\nCSSOM.CSSHostRule.prototype.type = 1001;\n//FIXME\n//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\nObject.defineProperty(CSSOM.CSSHostRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar cssTexts = [];\n\t\tfor (var i=0, length=this.cssRules.length; i < length; i++) {\n\t\t\tcssTexts.push(this.cssRules[i].cssText);\n\t\t}\n\t\treturn \"@host {\" + cssTexts.join(\"\") + \"}\";\n\t}\n});\n\n\n//.CommonJS\nexports.CSSHostRule = CSSOM.CSSHostRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleDeclaration: require('./CSSStyleDeclaration').CSSStyleDeclaration\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule\n */\nCSSOM.CSSKeyframeRule = function CSSKeyframeRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.keyText = '';\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule;\nCSSOM.CSSKeyframeRule.prototype.type = 8;\n//FIXME\n//CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframeRule.prototype, \"cssText\", {\n get: function() {\n return this.keyText + \" {\" + this.style.cssText + \"} \";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframeRule = CSSOM.CSSKeyframeRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule\n */\nCSSOM.CSSKeyframesRule = function CSSKeyframesRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.name = '';\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule;\nCSSOM.CSSKeyframesRule.prototype.type = 7;\n//FIXME\n//CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframesRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(\" \" + this.cssRules[i].cssText);\n }\n return \"@\" + (this._vendorPrefix || '') + \"keyframes \" + this.name + \" { \\n\" + cssTexts.join(\"\\n\") + \"\\n}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframesRule = CSSOM.CSSKeyframesRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue\n *\n * TODO: add if needed\n */\nCSSOM.CSSValue = function CSSValue() {\n};\n\nCSSOM.CSSValue.prototype = {\n\tconstructor: CSSOM.CSSValue,\n\n\t// @see: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue\n\tset cssText(text) {\n\t\tvar name = this._getConstructorName();\n\n\t\tthrow new Error('DOMException: property \"cssText\" of \"' + name + '\" is readonly and can not be replaced with \"' + text + '\"!');\n\t},\n\n\tget cssText() {\n\t\tvar name = this._getConstructorName();\n\n\t\tthrow new Error('getter \"cssText\" of \"' + name + '\" is not implemented!');\n\t},\n\n\t_getConstructorName: function() {\n\t\tvar s = this.constructor.toString(),\n\t\t\t\tc = s.match(/function\\s([^\\(]+)/),\n\t\t\t\tname = c[1];\n\n\t\treturn name;\n\t}\n};\n\n\n//.CommonJS\nexports.CSSValue = CSSOM.CSSValue;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSValue: require('./CSSValue').CSSValue\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx\n *\n */\nCSSOM.CSSValueExpression = function CSSValueExpression(token, idx) {\n\tthis._token = token;\n\tthis._idx = idx;\n};\n\nCSSOM.CSSValueExpression.prototype = new CSSOM.CSSValue();\nCSSOM.CSSValueExpression.prototype.constructor = CSSOM.CSSValueExpression;\n\n/**\n * parse css expression() value\n *\n * @return {Object}\n * - error:\n * or\n * - idx:\n * - expression:\n *\n * Example:\n *\n * .selector {\n *\t\tzoom: expression(documentElement.clientWidth > 1000 ? '1000px' : 'auto');\n * }\n */\nCSSOM.CSSValueExpression.prototype.parse = function() {\n\tvar token = this._token,\n\t\t\tidx = this._idx;\n\n\tvar character = '',\n\t\t\texpression = '',\n\t\t\terror = '',\n\t\t\tinfo,\n\t\t\tparen = [];\n\n\n\tfor (; ; ++idx) {\n\t\tcharacter = token.charAt(idx);\n\n\t\t// end of token\n\t\tif (character === '') {\n\t\t\terror = 'css expression error: unfinished expression!';\n\t\t\tbreak;\n\t\t}\n\n\t\tswitch(character) {\n\t\t\tcase '(':\n\t\t\t\tparen.push(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase ')':\n\t\t\t\tparen.pop(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase '/':\n\t\t\t\tif ((info = this._parseJSComment(token, idx))) { // comment?\n\t\t\t\t\tif (info.error) {\n\t\t\t\t\t\terror = 'css expression error: unfinished comment in expression!';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tidx = info.idx;\n\t\t\t\t\t\t// ignore the comment\n\t\t\t\t\t}\n\t\t\t\t} else if ((info = this._parseJSRexExp(token, idx))) { // regexp\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else { // other\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"'\":\n\t\t\tcase '\"':\n\t\t\t\tinfo = this._parseJSString(token, idx, character);\n\t\t\t\tif (info) { // string\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else {\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (error) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// end of expression\n\t\tif (paren.length === 0) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tvar ret;\n\tif (error) {\n\t\tret = {\n\t\t\terror: error\n\t\t};\n\t} else {\n\t\tret = {\n\t\t\tidx: idx,\n\t\t\texpression: expression\n\t\t};\n\t}\n\n\treturn ret;\n};\n\n\n/**\n *\n * @return {Object|false}\n * - idx:\n * - text:\n * or\n * - error:\n * or\n * false\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {\n\tvar nextChar = token.charAt(idx + 1),\n\t\t\ttext;\n\n\tif (nextChar === '/' || nextChar === '*') {\n\t\tvar startIdx = idx,\n\t\t\t\tendIdx,\n\t\t\t\tcommentEndChar;\n\n\t\tif (nextChar === '/') { // line comment\n\t\t\tcommentEndChar = '\\n';\n\t\t} else if (nextChar === '*') { // block comment\n\t\t\tcommentEndChar = '*/';\n\t\t}\n\n\t\tendIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);\n\t\tif (endIdx !== -1) {\n\t\t\tendIdx = endIdx + commentEndChar.length - 1;\n\t\t\ttext = token.substring(idx, endIdx + 1);\n\t\t\treturn {\n\t\t\t\tidx: endIdx,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t} else {\n\t\t\tvar error = 'css expression error: unfinished comment in expression!';\n\t\t\treturn {\n\t\t\t\terror: error\n\t\t\t};\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n};\n\n\n/**\n *\n * @return {Object|false}\n *\t\t\t\t\t- idx:\n *\t\t\t\t\t- text:\n *\t\t\t\t\tor \n *\t\t\t\t\tfalse\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {\n\tvar endIdx = this._findMatchedIdx(token, idx, sep),\n\t\t\ttext;\n\n\tif (endIdx === -1) {\n\t\treturn false;\n\t} else {\n\t\ttext = token.substring(idx, endIdx + sep.length);\n\n\t\treturn {\n\t\t\tidx: endIdx,\n\t\t\ttext: text\n\t\t};\n\t}\n};\n\n\n/**\n * parse regexp in css expression\n *\n * @return {Object|false}\n *\t\t\t\t- idx:\n *\t\t\t\t- regExp:\n *\t\t\t\tor \n *\t\t\t\tfalse\n */\n\n/*\n\nall legal RegExp\n \n/a/\n(/a/)\n[/a/]\n[12, /a/]\n\n!/a/\n\n+/a/\n-/a/\n* /a/\n/ /a/\n%/a/\n\n===/a/\n!==/a/\n==/a/\n!=/a/\n>/a/\n>=/a/\n>/a/\n>>>/a/\n\n&&/a/\n||/a/\n?/a/\n=/a/\n,/a/\n\n\t\tdelete /a/\n\t\t\t\tin /a/\ninstanceof /a/\n\t\t\t\tnew /a/\n\t\ttypeof /a/\n\t\t\tvoid /a/\n\n*/\nCSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) {\n\tvar before = token.substring(0, idx).replace(/\\s+$/, \"\"),\n\t\t\tlegalRegx = [\n\t\t\t\t/^$/,\n\t\t\t\t/\\($/,\n\t\t\t\t/\\[$/,\n\t\t\t\t/\\!$/,\n\t\t\t\t/\\+$/,\n\t\t\t\t/\\-$/,\n\t\t\t\t/\\*$/,\n\t\t\t\t/\\/\\s+/,\n\t\t\t\t/\\%$/,\n\t\t\t\t/\\=$/,\n\t\t\t\t/\\>$/,\n\t\t\t\t/<$/,\n\t\t\t\t/\\&$/,\n\t\t\t\t/\\|$/,\n\t\t\t\t/\\^$/,\n\t\t\t\t/\\~$/,\n\t\t\t\t/\\?$/,\n\t\t\t\t/\\,$/,\n\t\t\t\t/delete$/,\n\t\t\t\t/in$/,\n\t\t\t\t/instanceof$/,\n\t\t\t\t/new$/,\n\t\t\t\t/typeof$/,\n\t\t\t\t/void$/\n\t\t\t];\n\n\tvar isLegal = legalRegx.some(function(reg) {\n\t\treturn reg.test(before);\n\t});\n\n\tif (!isLegal) {\n\t\treturn false;\n\t} else {\n\t\tvar sep = '/';\n\n\t\t// same logic as string\n\t\treturn this._parseJSString(token, idx, sep);\n\t}\n};\n\n\n/**\n *\n * find next sep(same line) index in `token`\n *\n * @return {Number}\n *\n */\nCSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) {\n\tvar startIdx = idx,\n\t\t\tendIdx;\n\n\tvar NOT_FOUND = -1;\n\n\twhile(true) {\n\t\tendIdx = token.indexOf(sep, startIdx + 1);\n\n\t\tif (endIdx === -1) { // not found\n\t\t\tendIdx = NOT_FOUND;\n\t\t\tbreak;\n\t\t} else {\n\t\t\tvar text = token.substring(idx + 1, endIdx),\n\t\t\t\t\tmatched = text.match(/\\\\+$/);\n\t\t\tif (!matched || matched[0] % 2 === 0) { // not escaped\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tstartIdx = endIdx;\n\t\t\t}\n\t\t}\n\t}\n\n\t// boundary must be in the same line(js sting or regexp)\n\tvar nextNewLineIdx = token.indexOf('\\n', idx + 1);\n\tif (nextNewLineIdx < endIdx) {\n\t\tendIdx = NOT_FOUND;\n\t}\n\n\n\treturn endIdx;\n};\n\n\n\n\n//.CommonJS\nexports.CSSValueExpression = CSSOM.CSSValueExpression;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://developer.mozilla.org/en/CSS/@-moz-document\n */\nCSSOM.MatcherList = function MatcherList(){\n this.length = 0;\n};\n\nCSSOM.MatcherList.prototype = {\n\n constructor: CSSOM.MatcherList,\n\n /**\n * @return {string}\n */\n get matcherText() {\n return Array.prototype.join.call(this, \", \");\n },\n\n /**\n * @param {string} value\n */\n set matcherText(value) {\n // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','.\n var values = value.split(\",\");\n var length = this.length = values.length;\n for (var i=0; i 0;\n\n\t\t\t\t\twhile (ancestorRules.length > 0) {\n\t\t\t\t\t\tparentRule = ancestorRules.pop();\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tparentRule.constructor.name === \"CSSMediaRule\"\n\t\t\t\t\t\t\t|| parentRule.constructor.name === \"CSSSupportsRule\"\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tprevScope = currentScope;\n\t\t\t\t\t\t\tcurrentScope = parentRule;\n\t\t\t\t\t\t\tcurrentScope.cssRules.push(prevScope);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ancestorRules.length === 0) {\n\t\t\t\t\t\t\thasAncestors = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!hasAncestors) {\n\t\t\t\t\t\tcurrentScope.__ends = i + 1;\n\t\t\t\t\t\tstyleSheet.cssRules.push(currentScope);\n\t\t\t\t\t\tcurrentScope = styleSheet;\n\t\t\t\t\t\tparentRule = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tbuffer = \"\";\n\t\t\t\t\tstate = \"before-selector\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tswitch (state) {\n\t\t\t\tcase \"before-selector\":\n\t\t\t\t\tstate = \"selector\";\n\t\t\t\t\tstyleRule = new CSSOM.CSSStyleRule();\n\t\t\t\t\tstyleRule.__starts = i;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-name\":\n\t\t\t\t\tstate = \"name\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-value\":\n\t\t\t\t\tstate = \"value\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"importRule-begin\":\n\t\t\t\t\tstate = \"importRule\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn styleSheet;\n};\n\n\n//.CommonJS\nexports.parse = CSSOM.parse;\n// The following modules cannot be included sooner due to the mutual dependency with parse.js\nCSSOM.CSSStyleSheet = require(\"./CSSStyleSheet\").CSSStyleSheet;\nCSSOM.CSSStyleRule = require(\"./CSSStyleRule\").CSSStyleRule;\nCSSOM.CSSImportRule = require(\"./CSSImportRule\").CSSImportRule;\nCSSOM.CSSGroupingRule = require(\"./CSSGroupingRule\").CSSGroupingRule;\nCSSOM.CSSMediaRule = require(\"./CSSMediaRule\").CSSMediaRule;\nCSSOM.CSSConditionRule = require(\"./CSSConditionRule\").CSSConditionRule;\nCSSOM.CSSSupportsRule = require(\"./CSSSupportsRule\").CSSSupportsRule;\nCSSOM.CSSFontFaceRule = require(\"./CSSFontFaceRule\").CSSFontFaceRule;\nCSSOM.CSSHostRule = require(\"./CSSHostRule\").CSSHostRule;\nCSSOM.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;\nCSSOM.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule;\nCSSOM.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule;\nCSSOM.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression;\nCSSOM.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule;\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration\n */\nCSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){\n\tthis.length = 0;\n\tthis.parentRule = null;\n\n\t// NON-STANDARD\n\tthis._importants = {};\n};\n\n\nCSSOM.CSSStyleDeclaration.prototype = {\n\n\tconstructor: CSSOM.CSSStyleDeclaration,\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set.\n\t */\n\tgetPropertyValue: function(name) {\n\t\treturn this[name] || \"\";\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @param {string} value\n\t * @param {string} [priority=null] \"important\" or null\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty\n\t */\n\tsetProperty: function(name, value, priority) {\n\t\tif (this[name]) {\n\t\t\t// Property already exist. Overwrite it.\n\t\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\t\tif (index < 0) {\n\t\t\t\tthis[this.length] = name;\n\t\t\t\tthis.length++;\n\t\t\t}\n\t\t} else {\n\t\t\t// New property.\n\t\t\tthis[this.length] = name;\n\t\t\tthis.length++;\n\t\t}\n\t\tthis[name] = value + \"\";\n\t\tthis._importants[name] = priority;\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.\n\t */\n\tremoveProperty: function(name) {\n\t\tif (!(name in this)) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\tif (index < 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar prevValue = this[name];\n\t\tthis[name] = \"\";\n\n\t\t// That's what WebKit and Opera do\n\t\tArray.prototype.splice.call(this, index, 1);\n\n\t\t// That's what Firefox does\n\t\t//this[index] = \"\"\n\n\t\treturn prevValue;\n\t},\n\n\tgetPropertyCSSValue: function() {\n\t\t//FIXME\n\t},\n\n\t/**\n\t *\n\t * @param {String} name\n\t */\n\tgetPropertyPriority: function(name) {\n\t\treturn this._importants[name] || \"\";\n\t},\n\n\n\t/**\n\t * element.style.overflow = \"auto\"\n\t * element.style.getPropertyShorthand(\"overflow-x\")\n\t * -> \"overflow\"\n\t */\n\tgetPropertyShorthand: function() {\n\t\t//FIXME\n\t},\n\n\tisPropertyImplicit: function() {\n\t\t//FIXME\n\t},\n\n\t// Doesn't work in IE < 9\n\tget cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t},\n\n\tset cssText(text){\n\t\tvar i, name;\n\t\tfor (i = this.length; i--;) {\n\t\t\tname = this[i];\n\t\t\tthis[name] = \"\";\n\t\t}\n\t\tArray.prototype.splice.call(this, 0, this.length);\n\t\tthis._importants = {};\n\n\t\tvar dummyRule = CSSOM.parse('#bogus{' + text + '}').cssRules[0].style;\n\t\tvar length = dummyRule.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tname = dummyRule[i];\n\t\t\tthis.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));\n\t\t}\n\t}\n};\n\n\n//.CommonJS\nexports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;\nCSSOM.parse = require('./parse').parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js\n///CommonJS\n", "//.CommonJS\nvar CSSOM = {\n\tCSSStyleSheet: require(\"./CSSStyleSheet\").CSSStyleSheet,\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleRule: require(\"./CSSStyleRule\").CSSStyleRule,\n\tCSSGroupingRule: require(\"./CSSGroupingRule\").CSSGroupingRule,\n\tCSSConditionRule: require(\"./CSSConditionRule\").CSSConditionRule,\n\tCSSMediaRule: require(\"./CSSMediaRule\").CSSMediaRule,\n\tCSSSupportsRule: require(\"./CSSSupportsRule\").CSSSupportsRule,\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSKeyframeRule: require('./CSSKeyframeRule').CSSKeyframeRule,\n\tCSSKeyframesRule: require('./CSSKeyframesRule').CSSKeyframesRule\n};\n///CommonJS\n\n\n/**\n * Produces a deep copy of stylesheet — the instance variables of stylesheet are copied recursively.\n * @param {CSSStyleSheet|CSSOM.CSSStyleSheet} stylesheet\n * @nosideeffects\n * @return {CSSOM.CSSStyleSheet}\n */\nCSSOM.clone = function clone(stylesheet) {\n\n\tvar cloned = new CSSOM.CSSStyleSheet();\n\n\tvar rules = stylesheet.cssRules;\n\tif (!rules) {\n\t\treturn cloned;\n\t}\n\n\tfor (var i = 0, rulesLength = rules.length; i < rulesLength; i++) {\n\t\tvar rule = rules[i];\n\t\tvar ruleClone = cloned.cssRules[i] = new rule.constructor();\n\n\t\tvar style = rule.style;\n\t\tif (style) {\n\t\t\tvar styleClone = ruleClone.style = new CSSOM.CSSStyleDeclaration();\n\t\t\tfor (var j = 0, styleLength = style.length; j < styleLength; j++) {\n\t\t\t\tvar name = styleClone[j] = style[j];\n\t\t\t\tstyleClone[name] = style[name];\n\t\t\t\tstyleClone._importants[name] = style.getPropertyPriority(name);\n\t\t\t}\n\t\t\tstyleClone.length = style.length;\n\t\t}\n\n\t\tif (rule.hasOwnProperty('keyText')) {\n\t\t\truleClone.keyText = rule.keyText;\n\t\t}\n\n\t\tif (rule.hasOwnProperty('selectorText')) {\n\t\t\truleClone.selectorText = rule.selectorText;\n\t\t}\n\n\t\tif (rule.hasOwnProperty('mediaText')) {\n\t\t\truleClone.mediaText = rule.mediaText;\n\t\t}\n\n\t\tif (rule.hasOwnProperty('conditionText')) {\n\t\t\truleClone.conditionText = rule.conditionText;\n\t\t}\n\n\t\tif (rule.hasOwnProperty('cssRules')) {\n\t\t\truleClone.cssRules = clone(rule).cssRules;\n\t\t}\n\t}\n\n\treturn cloned;\n\n};\n\n//.CommonJS\nexports.clone = CSSOM.clone;\n///CommonJS\n", "'use strict';\n\nexports.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;\nexports.CSSRule = require('./CSSRule').CSSRule;\nexports.CSSGroupingRule = require('./CSSGroupingRule').CSSGroupingRule;\nexports.CSSConditionRule = require('./CSSConditionRule').CSSConditionRule;\nexports.CSSStyleRule = require('./CSSStyleRule').CSSStyleRule;\nexports.MediaList = require('./MediaList').MediaList;\nexports.CSSMediaRule = require('./CSSMediaRule').CSSMediaRule;\nexports.CSSSupportsRule = require('./CSSSupportsRule').CSSSupportsRule;\nexports.CSSImportRule = require('./CSSImportRule').CSSImportRule;\nexports.CSSFontFaceRule = require('./CSSFontFaceRule').CSSFontFaceRule;\nexports.CSSHostRule = require('./CSSHostRule').CSSHostRule;\nexports.StyleSheet = require('./StyleSheet').StyleSheet;\nexports.CSSStyleSheet = require('./CSSStyleSheet').CSSStyleSheet;\nexports.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule;\nexports.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule;\nexports.MatcherList = require('./MatcherList').MatcherList;\nexports.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule;\nexports.CSSValue = require('./CSSValue').CSSValue;\nexports.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression;\nexports.parse = require('./parse').parse;\nexports.clone = require('./clone').clone;\n", "/* c8 ignore start */\ntry {\n module.exports = require('canvas');\n}\ncatch (fallback) {\n class Canvas {\n constructor(width, height) {\n this.width = width;\n this.height = height;\n }\n getContext() { return null; }\n toDataURL() { return ''; }\n }\n module.exports = {\n createCanvas: (width, height) => new Canvas(width, height)\n };\n}\n/* c8 ignore stop */\n", "/*eslint-env es6:false*/\n/*\n * Copyright (c) 2010 Arc90 Inc\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This code is heavily based on Arc90's readability.js (1.7.1) script\n * available at: http://code.google.com/p/arc90labs-readability\n */\n\n/**\n * Public constructor.\n * @param {HTMLDocument} doc The document to parse.\n * @param {Object} options The options object.\n */\nfunction Readability(doc, options) {\n // In some older versions, people passed a URI as the first argument. Cope:\n if (options && options.documentElement) {\n doc = options;\n options = arguments[2];\n } else if (!doc || !doc.documentElement) {\n throw new Error(\"First argument to Readability constructor should be a document object.\");\n }\n options = options || {};\n\n this._doc = doc;\n this._docJSDOMParser = this._doc.firstChild.__JSDOMParser__;\n this._articleTitle = null;\n this._articleByline = null;\n this._articleDir = null;\n this._articleSiteName = null;\n this._attempts = [];\n\n // Configurable options\n this._debug = !!options.debug;\n this._maxElemsToParse = options.maxElemsToParse || this.DEFAULT_MAX_ELEMS_TO_PARSE;\n this._nbTopCandidates = options.nbTopCandidates || this.DEFAULT_N_TOP_CANDIDATES;\n this._charThreshold = options.charThreshold || this.DEFAULT_CHAR_THRESHOLD;\n this._classesToPreserve = this.CLASSES_TO_PRESERVE.concat(options.classesToPreserve || []);\n this._keepClasses = !!options.keepClasses;\n this._serializer = options.serializer || function(el) {\n return el.innerHTML;\n };\n this._disableJSONLD = !!options.disableJSONLD;\n\n // Start with all flags set\n this._flags = this.FLAG_STRIP_UNLIKELYS |\n this.FLAG_WEIGHT_CLASSES |\n this.FLAG_CLEAN_CONDITIONALLY;\n\n\n // Control whether log messages are sent to the console\n if (this._debug) {\n let logNode = function(node) {\n if (node.nodeType == node.TEXT_NODE) {\n return `${node.nodeName} (\"${node.textContent}\")`;\n }\n let attrPairs = Array.from(node.attributes || [], function(attr) {\n return `${attr.name}=\"${attr.value}\"`;\n }).join(\" \");\n return `<${node.localName} ${attrPairs}>`;\n };\n this.log = function () {\n if (typeof dump !== \"undefined\") {\n var msg = Array.prototype.map.call(arguments, function(x) {\n return (x && x.nodeName) ? logNode(x) : x;\n }).join(\" \");\n dump(\"Reader: (Readability) \" + msg + \"\\n\");\n } else if (typeof console !== \"undefined\") {\n let args = Array.from(arguments, arg => {\n if (arg && arg.nodeType == this.ELEMENT_NODE) {\n return logNode(arg);\n }\n return arg;\n });\n args.unshift(\"Reader: (Readability)\");\n console.log.apply(console, args);\n }\n };\n } else {\n this.log = function () {};\n }\n}\n\nReadability.prototype = {\n FLAG_STRIP_UNLIKELYS: 0x1,\n FLAG_WEIGHT_CLASSES: 0x2,\n FLAG_CLEAN_CONDITIONALLY: 0x4,\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n ELEMENT_NODE: 1,\n TEXT_NODE: 3,\n\n // Max number of nodes supported by this parser. Default: 0 (no limit)\n DEFAULT_MAX_ELEMS_TO_PARSE: 0,\n\n // The number of top candidates to consider when analysing how\n // tight the competition is among candidates.\n DEFAULT_N_TOP_CANDIDATES: 5,\n\n // Element tags to score by default.\n DEFAULT_TAGS_TO_SCORE: \"section,h2,h3,h4,h5,h6,p,td,pre\".toUpperCase().split(\",\"),\n\n // The default number of chars an article must have in order to return a result\n DEFAULT_CHAR_THRESHOLD: 500,\n\n // All of the regular expressions in use within readability.\n // Defined up here so we don't instantiate them repeatedly in loops.\n REGEXPS: {\n // NOTE: These two regular expressions are duplicated in\n // Readability-readerable.js. Please keep both copies in sync.\n unlikelyCandidates: /-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,\n okMaybeItsACandidate: /and|article|body|column|content|main|shadow/i,\n\n positive: /article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,\n negative: /-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,\n extraneous: /print|archive|comment|discuss|e[\\-]?mail|share|reply|all|login|sign|single|utility/i,\n byline: /byline|author|dateline|writtenby|p-author/i,\n replaceFonts: /<(\\/?)font[^>]*>/gi,\n normalize: /\\s{2,}/g,\n videos: /\\/\\/(www\\.)?((dailymotion|youtube|youtube-nocookie|player\\.vimeo|v\\.qq)\\.com|(archive|upload\\.wikimedia)\\.org|player\\.twitch\\.tv)/i,\n shareElements: /(\\b|_)(share|sharedaddy)(\\b|_)/i,\n nextLink: /(next|weiter|continue|>([^\\|]|$)|»([^\\|]|$))/i,\n prevLink: /(prev|earl|old|new|<|«)/i,\n tokenize: /\\W+/g,\n whitespace: /^\\s*$/,\n hasContent: /\\S$/,\n hashUrl: /^#.+/,\n srcsetUrl: /(\\S+)(\\s+[\\d.]+[xw])?(\\s*(?:,|$))/g,\n b64DataUrl: /^data:\\s*([^\\s;,]+)\\s*;\\s*base64\\s*,/i,\n // See: https://schema.org/Article\n jsonLdArticleTypes: /^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/\n },\n\n UNLIKELY_ROLES: [ \"menu\", \"menubar\", \"complementary\", \"navigation\", \"alert\", \"alertdialog\", \"dialog\" ],\n\n DIV_TO_P_ELEMS: new Set([ \"BLOCKQUOTE\", \"DL\", \"DIV\", \"IMG\", \"OL\", \"P\", \"PRE\", \"TABLE\", \"UL\" ]),\n\n ALTER_TO_DIV_EXCEPTIONS: [\"DIV\", \"ARTICLE\", \"SECTION\", \"P\"],\n\n PRESENTATIONAL_ATTRIBUTES: [ \"align\", \"background\", \"bgcolor\", \"border\", \"cellpadding\", \"cellspacing\", \"frame\", \"hspace\", \"rules\", \"style\", \"valign\", \"vspace\" ],\n\n DEPRECATED_SIZE_ATTRIBUTE_ELEMS: [ \"TABLE\", \"TH\", \"TD\", \"HR\", \"PRE\" ],\n\n // The commented out elements qualify as phrasing content but tend to be\n // removed by readability when put into paragraphs, so we ignore them here.\n PHRASING_ELEMS: [\n // \"CANVAS\", \"IFRAME\", \"SVG\", \"VIDEO\",\n \"ABBR\", \"AUDIO\", \"B\", \"BDO\", \"BR\", \"BUTTON\", \"CITE\", \"CODE\", \"DATA\",\n \"DATALIST\", \"DFN\", \"EM\", \"EMBED\", \"I\", \"IMG\", \"INPUT\", \"KBD\", \"LABEL\",\n \"MARK\", \"MATH\", \"METER\", \"NOSCRIPT\", \"OBJECT\", \"OUTPUT\", \"PROGRESS\", \"Q\",\n \"RUBY\", \"SAMP\", \"SCRIPT\", \"SELECT\", \"SMALL\", \"SPAN\", \"STRONG\", \"SUB\",\n \"SUP\", \"TEXTAREA\", \"TIME\", \"VAR\", \"WBR\"\n ],\n\n // These are the classes that readability sets itself.\n CLASSES_TO_PRESERVE: [ \"page\" ],\n\n // These are the list of HTML entities that need to be escaped.\n HTML_ESCAPE_MAP: {\n \"lt\": \"<\",\n \"gt\": \">\",\n \"amp\": \"&\",\n \"quot\": '\"',\n \"apos\": \"'\",\n },\n\n /**\n * Run any post-process modifications to article content as necessary.\n *\n * @param Element\n * @return void\n **/\n _postProcessContent: function(articleContent) {\n // Readability cannot open relative uris so we convert them to absolute uris.\n this._fixRelativeUris(articleContent);\n\n this._simplifyNestedElements(articleContent);\n\n if (!this._keepClasses) {\n // Remove classes.\n this._cleanClasses(articleContent);\n }\n },\n\n /**\n * Iterates over a NodeList, calls `filterFn` for each node and removes node\n * if function returned `true`.\n *\n * If function is not passed, removes all the nodes in node list.\n *\n * @param NodeList nodeList The nodes to operate on\n * @param Function filterFn the function to use as a filter\n * @return void\n */\n _removeNodes: function(nodeList, filterFn) {\n // Avoid ever operating on live node lists.\n if (this._docJSDOMParser && nodeList._isLiveNodeList) {\n throw new Error(\"Do not pass live node lists to _removeNodes\");\n }\n for (var i = nodeList.length - 1; i >= 0; i--) {\n var node = nodeList[i];\n var parentNode = node.parentNode;\n if (parentNode) {\n if (!filterFn || filterFn.call(this, node, i, nodeList)) {\n parentNode.removeChild(node);\n }\n }\n }\n },\n\n /**\n * Iterates over a NodeList, and calls _setNodeTag for each node.\n *\n * @param NodeList nodeList The nodes to operate on\n * @param String newTagName the new tag name to use\n * @return void\n */\n _replaceNodeTags: function(nodeList, newTagName) {\n // Avoid ever operating on live node lists.\n if (this._docJSDOMParser && nodeList._isLiveNodeList) {\n throw new Error(\"Do not pass live node lists to _replaceNodeTags\");\n }\n for (const node of nodeList) {\n this._setNodeTag(node, newTagName);\n }\n },\n\n /**\n * Iterate over a NodeList, which doesn't natively fully implement the Array\n * interface.\n *\n * For convenience, the current object context is applied to the provided\n * iterate function.\n *\n * @param NodeList nodeList The NodeList.\n * @param Function fn The iterate function.\n * @return void\n */\n _forEachNode: function(nodeList, fn) {\n Array.prototype.forEach.call(nodeList, fn, this);\n },\n\n /**\n * Iterate over a NodeList, and return the first node that passes\n * the supplied test function\n *\n * For convenience, the current object context is applied to the provided\n * test function.\n *\n * @param NodeList nodeList The NodeList.\n * @param Function fn The test function.\n * @return void\n */\n _findNode: function(nodeList, fn) {\n return Array.prototype.find.call(nodeList, fn, this);\n },\n\n /**\n * Iterate over a NodeList, return true if any of the provided iterate\n * function calls returns true, false otherwise.\n *\n * For convenience, the current object context is applied to the\n * provided iterate function.\n *\n * @param NodeList nodeList The NodeList.\n * @param Function fn The iterate function.\n * @return Boolean\n */\n _someNode: function(nodeList, fn) {\n return Array.prototype.some.call(nodeList, fn, this);\n },\n\n /**\n * Iterate over a NodeList, return true if all of the provided iterate\n * function calls return true, false otherwise.\n *\n * For convenience, the current object context is applied to the\n * provided iterate function.\n *\n * @param NodeList nodeList The NodeList.\n * @param Function fn The iterate function.\n * @return Boolean\n */\n _everyNode: function(nodeList, fn) {\n return Array.prototype.every.call(nodeList, fn, this);\n },\n\n /**\n * Concat all nodelists passed as arguments.\n *\n * @return ...NodeList\n * @return Array\n */\n _concatNodeLists: function() {\n var slice = Array.prototype.slice;\n var args = slice.call(arguments);\n var nodeLists = args.map(function(list) {\n return slice.call(list);\n });\n return Array.prototype.concat.apply([], nodeLists);\n },\n\n _getAllNodesWithTag: function(node, tagNames) {\n if (node.querySelectorAll) {\n return node.querySelectorAll(tagNames.join(\",\"));\n }\n return [].concat.apply([], tagNames.map(function(tag) {\n var collection = node.getElementsByTagName(tag);\n return Array.isArray(collection) ? collection : Array.from(collection);\n }));\n },\n\n /**\n * Removes the class=\"\" attribute from every element in the given\n * subtree, except those that match CLASSES_TO_PRESERVE and\n * the classesToPreserve array from the options object.\n *\n * @param Element\n * @return void\n */\n _cleanClasses: function(node) {\n var classesToPreserve = this._classesToPreserve;\n var className = (node.getAttribute(\"class\") || \"\")\n .split(/\\s+/)\n .filter(function(cls) {\n return classesToPreserve.indexOf(cls) != -1;\n })\n .join(\" \");\n\n if (className) {\n node.setAttribute(\"class\", className);\n } else {\n node.removeAttribute(\"class\");\n }\n\n for (node = node.firstElementChild; node; node = node.nextElementSibling) {\n this._cleanClasses(node);\n }\n },\n\n /**\n * Converts each and uri in the given element to an absolute URI,\n * ignoring #ref URIs.\n *\n * @param Element\n * @return void\n */\n _fixRelativeUris: function(articleContent) {\n var baseURI = this._doc.baseURI;\n var documentURI = this._doc.documentURI;\n function toAbsoluteURI(uri) {\n // Leave hash links alone if the base URI matches the document URI:\n if (baseURI == documentURI && uri.charAt(0) == \"#\") {\n return uri;\n }\n\n // Otherwise, resolve against base URI:\n try {\n return new URL(uri, baseURI).href;\n } catch (ex) {\n // Something went wrong, just return the original:\n }\n return uri;\n }\n\n var links = this._getAllNodesWithTag(articleContent, [\"a\"]);\n this._forEachNode(links, function(link) {\n var href = link.getAttribute(\"href\");\n if (href) {\n // Remove links with javascript: URIs, since\n // they won't work after scripts have been removed from the page.\n if (href.indexOf(\"javascript:\") === 0) {\n // if the link only contains simple text content, it can be converted to a text node\n if (link.childNodes.length === 1 && link.childNodes[0].nodeType === this.TEXT_NODE) {\n var text = this._doc.createTextNode(link.textContent);\n link.parentNode.replaceChild(text, link);\n } else {\n // if the link has multiple children, they should all be preserved\n var container = this._doc.createElement(\"span\");\n while (link.firstChild) {\n container.appendChild(link.firstChild);\n }\n link.parentNode.replaceChild(container, link);\n }\n } else {\n link.setAttribute(\"href\", toAbsoluteURI(href));\n }\n }\n });\n\n var medias = this._getAllNodesWithTag(articleContent, [\n \"img\", \"picture\", \"figure\", \"video\", \"audio\", \"source\"\n ]);\n\n this._forEachNode(medias, function(media) {\n var src = media.getAttribute(\"src\");\n var poster = media.getAttribute(\"poster\");\n var srcset = media.getAttribute(\"srcset\");\n\n if (src) {\n media.setAttribute(\"src\", toAbsoluteURI(src));\n }\n\n if (poster) {\n media.setAttribute(\"poster\", toAbsoluteURI(poster));\n }\n\n if (srcset) {\n var newSrcset = srcset.replace(this.REGEXPS.srcsetUrl, function(_, p1, p2, p3) {\n return toAbsoluteURI(p1) + (p2 || \"\") + p3;\n });\n\n media.setAttribute(\"srcset\", newSrcset);\n }\n });\n },\n\n _simplifyNestedElements: function(articleContent) {\n var node = articleContent;\n\n while (node) {\n if (node.parentNode && [\"DIV\", \"SECTION\"].includes(node.tagName) && !(node.id && node.id.startsWith(\"readability\"))) {\n if (this._isElementWithoutContent(node)) {\n node = this._removeAndGetNext(node);\n continue;\n } else if (this._hasSingleTagInsideElement(node, \"DIV\") || this._hasSingleTagInsideElement(node, \"SECTION\")) {\n var child = node.children[0];\n for (var i = 0; i < node.attributes.length; i++) {\n child.setAttribute(node.attributes[i].name, node.attributes[i].value);\n }\n node.parentNode.replaceChild(child, node);\n node = child;\n continue;\n }\n }\n\n node = this._getNextNode(node);\n }\n },\n\n /**\n * Get the article title as an H1.\n *\n * @return string\n **/\n _getArticleTitle: function() {\n var doc = this._doc;\n var curTitle = \"\";\n var origTitle = \"\";\n\n try {\n curTitle = origTitle = doc.title.trim();\n\n // If they had an element with id \"title\" in their HTML\n if (typeof curTitle !== \"string\")\n curTitle = origTitle = this._getInnerText(doc.getElementsByTagName(\"title\")[0]);\n } catch (e) {/* ignore exceptions setting the title. */}\n\n var titleHadHierarchicalSeparators = false;\n function wordCount(str) {\n return str.split(/\\s+/).length;\n }\n\n // If there's a separator in the title, first remove the final part\n if ((/ [\\|\\-\\\\\\/>»] /).test(curTitle)) {\n titleHadHierarchicalSeparators = / [\\\\\\/>»] /.test(curTitle);\n curTitle = origTitle.replace(/(.*)[\\|\\-\\\\\\/>»] .*/gi, \"$1\");\n\n // If the resulting title is too short (3 words or fewer), remove\n // the first part instead:\n if (wordCount(curTitle) < 3)\n curTitle = origTitle.replace(/[^\\|\\-\\\\\\/>»]*[\\|\\-\\\\\\/>»](.*)/gi, \"$1\");\n } else if (curTitle.indexOf(\": \") !== -1) {\n // Check if we have an heading containing this exact string, so we\n // could assume it's the full title.\n var headings = this._concatNodeLists(\n doc.getElementsByTagName(\"h1\"),\n doc.getElementsByTagName(\"h2\")\n );\n var trimmedTitle = curTitle.trim();\n var match = this._someNode(headings, function(heading) {\n return heading.textContent.trim() === trimmedTitle;\n });\n\n // If we don't, let's extract the title out of the original title string.\n if (!match) {\n curTitle = origTitle.substring(origTitle.lastIndexOf(\":\") + 1);\n\n // If the title is now too short, try the first colon instead:\n if (wordCount(curTitle) < 3) {\n curTitle = origTitle.substring(origTitle.indexOf(\":\") + 1);\n // But if we have too many words before the colon there's something weird\n // with the titles and the H tags so let's just use the original title instead\n } else if (wordCount(origTitle.substr(0, origTitle.indexOf(\":\"))) > 5) {\n curTitle = origTitle;\n }\n }\n } else if (curTitle.length > 150 || curTitle.length < 15) {\n var hOnes = doc.getElementsByTagName(\"h1\");\n\n if (hOnes.length === 1)\n curTitle = this._getInnerText(hOnes[0]);\n }\n\n curTitle = curTitle.trim().replace(this.REGEXPS.normalize, \" \");\n // If we now have 4 words or fewer as our title, and either no\n // 'hierarchical' separators (\\, /, > or ») were found in the original\n // title or we decreased the number of words by more than 1 word, use\n // the original title.\n var curTitleWordCount = wordCount(curTitle);\n if (curTitleWordCount <= 4 &&\n (!titleHadHierarchicalSeparators ||\n curTitleWordCount != wordCount(origTitle.replace(/[\\|\\-\\\\\\/>»]+/g, \"\")) - 1)) {\n curTitle = origTitle;\n }\n\n return curTitle;\n },\n\n /**\n * Prepare the HTML document for readability to scrape it.\n * This includes things like stripping javascript, CSS, and handling terrible markup.\n *\n * @return void\n **/\n _prepDocument: function() {\n var doc = this._doc;\n\n // Remove all style tags in head\n this._removeNodes(this._getAllNodesWithTag(doc, [\"style\"]));\n\n if (doc.body) {\n this._replaceBrs(doc.body);\n }\n\n this._replaceNodeTags(this._getAllNodesWithTag(doc, [\"font\"]), \"SPAN\");\n },\n\n /**\n * Finds the next node, starting from the given node, and ignoring\n * whitespace in between. If the given node is an element, the same node is\n * returned.\n */\n _nextNode: function (node) {\n var next = node;\n while (next\n && (next.nodeType != this.ELEMENT_NODE)\n && this.REGEXPS.whitespace.test(next.textContent)) {\n next = next.nextSibling;\n }\n return next;\n },\n\n /**\n * Replaces 2 or more successive
elements with a single

.\n * Whitespace between
elements are ignored. For example:\n *

foo
bar


abc
\n * will become:\n *
foo
bar

abc

\n */\n _replaceBrs: function (elem) {\n this._forEachNode(this._getAllNodesWithTag(elem, [\"br\"]), function(br) {\n var next = br.nextSibling;\n\n // Whether 2 or more
elements have been found and replaced with a\n //

block.\n var replaced = false;\n\n // If we find a
chain, remove the
s until we hit another node\n // or non-whitespace. This leaves behind the first
in the chain\n // (which will be replaced with a

later).\n while ((next = this._nextNode(next)) && (next.tagName == \"BR\")) {\n replaced = true;\n var brSibling = next.nextSibling;\n next.parentNode.removeChild(next);\n next = brSibling;\n }\n\n // If we removed a
chain, replace the remaining
with a

. Add\n // all sibling nodes as children of the

until we hit another
\n // chain.\n if (replaced) {\n var p = this._doc.createElement(\"p\");\n br.parentNode.replaceChild(p, br);\n\n next = p.nextSibling;\n while (next) {\n // If we've hit another

, we're done adding children to this

.\n if (next.tagName == \"BR\") {\n var nextElem = this._nextNode(next.nextSibling);\n if (nextElem && nextElem.tagName == \"BR\")\n break;\n }\n\n if (!this._isPhrasingContent(next))\n break;\n\n // Otherwise, make this node a child of the new

.\n var sibling = next.nextSibling;\n p.appendChild(next);\n next = sibling;\n }\n\n while (p.lastChild && this._isWhitespace(p.lastChild)) {\n p.removeChild(p.lastChild);\n }\n\n if (p.parentNode.tagName === \"P\")\n this._setNodeTag(p.parentNode, \"DIV\");\n }\n });\n },\n\n _setNodeTag: function (node, tag) {\n this.log(\"_setNodeTag\", node, tag);\n if (this._docJSDOMParser) {\n node.localName = tag.toLowerCase();\n node.tagName = tag.toUpperCase();\n return node;\n }\n\n var replacement = node.ownerDocument.createElement(tag);\n while (node.firstChild) {\n replacement.appendChild(node.firstChild);\n }\n node.parentNode.replaceChild(replacement, node);\n if (node.readability)\n replacement.readability = node.readability;\n\n for (var i = 0; i < node.attributes.length; i++) {\n try {\n replacement.setAttribute(node.attributes[i].name, node.attributes[i].value);\n } catch (ex) {\n /* it's possible for setAttribute() to throw if the attribute name\n * isn't a valid XML Name. Such attributes can however be parsed from\n * source in HTML docs, see https://github.com/whatwg/html/issues/4275,\n * so we can hit them here and then throw. We don't care about such\n * attributes so we ignore them.\n */\n }\n }\n return replacement;\n },\n\n /**\n * Prepare the article node for display. Clean out any inline styles,\n * iframes, forms, strip extraneous

tags, etc.\n *\n * @param Element\n * @return void\n **/\n _prepArticle: function(articleContent) {\n this._cleanStyles(articleContent);\n\n // Check for data tables before we continue, to avoid removing items in\n // those tables, which will often be isolated even though they're\n // visually linked to other content-ful elements (text, images, etc.).\n this._markDataTables(articleContent);\n\n this._fixLazyImages(articleContent);\n\n // Clean out junk from the article content\n this._cleanConditionally(articleContent, \"form\");\n this._cleanConditionally(articleContent, \"fieldset\");\n this._clean(articleContent, \"object\");\n this._clean(articleContent, \"embed\");\n this._clean(articleContent, \"footer\");\n this._clean(articleContent, \"link\");\n this._clean(articleContent, \"aside\");\n\n // Clean out elements with little content that have \"share\" in their id/class combinations from final top candidates,\n // which means we don't remove the top candidates even they have \"share\".\n\n var shareElementThreshold = this.DEFAULT_CHAR_THRESHOLD;\n\n this._forEachNode(articleContent.children, function (topCandidate) {\n this._cleanMatchedNodes(topCandidate, function (node, matchString) {\n return this.REGEXPS.shareElements.test(matchString) && node.textContent.length < shareElementThreshold;\n });\n });\n\n this._clean(articleContent, \"iframe\");\n this._clean(articleContent, \"input\");\n this._clean(articleContent, \"textarea\");\n this._clean(articleContent, \"select\");\n this._clean(articleContent, \"button\");\n this._cleanHeaders(articleContent);\n\n // Do these last as the previous stuff may have removed junk\n // that will affect these\n this._cleanConditionally(articleContent, \"table\");\n this._cleanConditionally(articleContent, \"ul\");\n this._cleanConditionally(articleContent, \"div\");\n\n // replace H1 with H2 as H1 should be only title that is displayed separately\n this._replaceNodeTags(this._getAllNodesWithTag(articleContent, [\"h1\"]), \"h2\");\n\n // Remove extra paragraphs\n this._removeNodes(this._getAllNodesWithTag(articleContent, [\"p\"]), function (paragraph) {\n var imgCount = paragraph.getElementsByTagName(\"img\").length;\n var embedCount = paragraph.getElementsByTagName(\"embed\").length;\n var objectCount = paragraph.getElementsByTagName(\"object\").length;\n // At this point, nasty iframes have been removed, only remain embedded video ones.\n var iframeCount = paragraph.getElementsByTagName(\"iframe\").length;\n var totalCount = imgCount + embedCount + objectCount + iframeCount;\n\n return totalCount === 0 && !this._getInnerText(paragraph, false);\n });\n\n this._forEachNode(this._getAllNodesWithTag(articleContent, [\"br\"]), function(br) {\n var next = this._nextNode(br.nextSibling);\n if (next && next.tagName == \"P\")\n br.parentNode.removeChild(br);\n });\n\n // Remove single-cell tables\n this._forEachNode(this._getAllNodesWithTag(articleContent, [\"table\"]), function(table) {\n var tbody = this._hasSingleTagInsideElement(table, \"TBODY\") ? table.firstElementChild : table;\n if (this._hasSingleTagInsideElement(tbody, \"TR\")) {\n var row = tbody.firstElementChild;\n if (this._hasSingleTagInsideElement(row, \"TD\")) {\n var cell = row.firstElementChild;\n cell = this._setNodeTag(cell, this._everyNode(cell.childNodes, this._isPhrasingContent) ? \"P\" : \"DIV\");\n table.parentNode.replaceChild(cell, table);\n }\n }\n });\n },\n\n /**\n * Initialize a node with the readability object. Also checks the\n * className/id for special names to add to its score.\n *\n * @param Element\n * @return void\n **/\n _initializeNode: function(node) {\n node.readability = {\"contentScore\": 0};\n\n switch (node.tagName) {\n case \"DIV\":\n node.readability.contentScore += 5;\n break;\n\n case \"PRE\":\n case \"TD\":\n case \"BLOCKQUOTE\":\n node.readability.contentScore += 3;\n break;\n\n case \"ADDRESS\":\n case \"OL\":\n case \"UL\":\n case \"DL\":\n case \"DD\":\n case \"DT\":\n case \"LI\":\n case \"FORM\":\n node.readability.contentScore -= 3;\n break;\n\n case \"H1\":\n case \"H2\":\n case \"H3\":\n case \"H4\":\n case \"H5\":\n case \"H6\":\n case \"TH\":\n node.readability.contentScore -= 5;\n break;\n }\n\n node.readability.contentScore += this._getClassWeight(node);\n },\n\n _removeAndGetNext: function(node) {\n var nextNode = this._getNextNode(node, true);\n node.parentNode.removeChild(node);\n return nextNode;\n },\n\n /**\n * Traverse the DOM from node to node, starting at the node passed in.\n * Pass true for the second parameter to indicate this node itself\n * (and its kids) are going away, and we want the next node over.\n *\n * Calling this in a loop will traverse the DOM depth-first.\n */\n _getNextNode: function(node, ignoreSelfAndKids) {\n // First check for kids if those aren't being ignored\n if (!ignoreSelfAndKids && node.firstElementChild) {\n return node.firstElementChild;\n }\n // Then for siblings...\n if (node.nextElementSibling) {\n return node.nextElementSibling;\n }\n // And finally, move up the parent chain *and* find a sibling\n // (because this is depth-first traversal, we will have already\n // seen the parent nodes themselves).\n do {\n node = node.parentNode;\n } while (node && !node.nextElementSibling);\n return node && node.nextElementSibling;\n },\n\n // compares second text to first one\n // 1 = same text, 0 = completely different text\n // works the way that it splits both texts into words and then finds words that are unique in second text\n // the result is given by the lower length of unique parts\n _textSimilarity: function(textA, textB) {\n var tokensA = textA.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);\n var tokensB = textB.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);\n if (!tokensA.length || !tokensB.length) {\n return 0;\n }\n var uniqTokensB = tokensB.filter(token => !tokensA.includes(token));\n var distanceB = uniqTokensB.join(\" \").length / tokensB.join(\" \").length;\n return 1 - distanceB;\n },\n\n _checkByline: function(node, matchString) {\n if (this._articleByline) {\n return false;\n }\n\n if (node.getAttribute !== undefined) {\n var rel = node.getAttribute(\"rel\");\n var itemprop = node.getAttribute(\"itemprop\");\n }\n\n if ((rel === \"author\" || (itemprop && itemprop.indexOf(\"author\") !== -1) || this.REGEXPS.byline.test(matchString)) && this._isValidByline(node.textContent)) {\n this._articleByline = node.textContent.trim();\n return true;\n }\n\n return false;\n },\n\n _getNodeAncestors: function(node, maxDepth) {\n maxDepth = maxDepth || 0;\n var i = 0, ancestors = [];\n while (node.parentNode) {\n ancestors.push(node.parentNode);\n if (maxDepth && ++i === maxDepth)\n break;\n node = node.parentNode;\n }\n return ancestors;\n },\n\n /***\n * grabArticle - Using a variety of metrics (content score, classname, element types), find the content that is\n * most likely to be the stuff a user wants to read. Then return it wrapped up in a div.\n *\n * @param page a document to run upon. Needs to be a full document, complete with body.\n * @return Element\n **/\n _grabArticle: function (page) {\n this.log(\"**** grabArticle ****\");\n var doc = this._doc;\n var isPaging = page !== null;\n page = page ? page : this._doc.body;\n\n // We can't grab an article if we don't have a page!\n if (!page) {\n this.log(\"No body found in document. Abort.\");\n return null;\n }\n\n var pageCacheHtml = page.innerHTML;\n\n while (true) {\n this.log(\"Starting grabArticle loop\");\n var stripUnlikelyCandidates = this._flagIsActive(this.FLAG_STRIP_UNLIKELYS);\n\n // First, node prepping. Trash nodes that look cruddy (like ones with the\n // class name \"comment\", etc), and turn divs into P tags where they have been\n // used inappropriately (as in, where they contain no other block level elements.)\n var elementsToScore = [];\n var node = this._doc.documentElement;\n\n let shouldRemoveTitleHeader = true;\n\n while (node) {\n\n if (node.tagName === \"HTML\") {\n this._articleLang = node.getAttribute(\"lang\");\n }\n\n var matchString = node.className + \" \" + node.id;\n\n if (!this._isProbablyVisible(node)) {\n this.log(\"Removing hidden node - \" + matchString);\n node = this._removeAndGetNext(node);\n continue;\n }\n\n // Check to see if this node is a byline, and remove it if it is.\n if (this._checkByline(node, matchString)) {\n node = this._removeAndGetNext(node);\n continue;\n }\n\n if (shouldRemoveTitleHeader && this._headerDuplicatesTitle(node)) {\n this.log(\"Removing header: \", node.textContent.trim(), this._articleTitle.trim());\n shouldRemoveTitleHeader = false;\n node = this._removeAndGetNext(node);\n continue;\n }\n\n // Remove unlikely candidates\n if (stripUnlikelyCandidates) {\n if (this.REGEXPS.unlikelyCandidates.test(matchString) &&\n !this.REGEXPS.okMaybeItsACandidate.test(matchString) &&\n !this._hasAncestorTag(node, \"table\") &&\n !this._hasAncestorTag(node, \"code\") &&\n node.tagName !== \"BODY\" &&\n node.tagName !== \"A\") {\n this.log(\"Removing unlikely candidate - \" + matchString);\n node = this._removeAndGetNext(node);\n continue;\n }\n\n if (this.UNLIKELY_ROLES.includes(node.getAttribute(\"role\"))) {\n this.log(\"Removing content with role \" + node.getAttribute(\"role\") + \" - \" + matchString);\n node = this._removeAndGetNext(node);\n continue;\n }\n }\n\n // Remove DIV, SECTION, and HEADER nodes without any content(e.g. text, image, video, or iframe).\n if ((node.tagName === \"DIV\" || node.tagName === \"SECTION\" || node.tagName === \"HEADER\" ||\n node.tagName === \"H1\" || node.tagName === \"H2\" || node.tagName === \"H3\" ||\n node.tagName === \"H4\" || node.tagName === \"H5\" || node.tagName === \"H6\") &&\n this._isElementWithoutContent(node)) {\n node = this._removeAndGetNext(node);\n continue;\n }\n\n if (this.DEFAULT_TAGS_TO_SCORE.indexOf(node.tagName) !== -1) {\n elementsToScore.push(node);\n }\n\n // Turn all divs that don't have children block level elements into p's\n if (node.tagName === \"DIV\") {\n // Put phrasing content into paragraphs.\n var p = null;\n var childNode = node.firstChild;\n while (childNode) {\n var nextSibling = childNode.nextSibling;\n if (this._isPhrasingContent(childNode)) {\n if (p !== null) {\n p.appendChild(childNode);\n } else if (!this._isWhitespace(childNode)) {\n p = doc.createElement(\"p\");\n node.replaceChild(p, childNode);\n p.appendChild(childNode);\n }\n } else if (p !== null) {\n while (p.lastChild && this._isWhitespace(p.lastChild)) {\n p.removeChild(p.lastChild);\n }\n p = null;\n }\n childNode = nextSibling;\n }\n\n // Sites like http://mobile.slate.com encloses each paragraph with a DIV\n // element. DIVs with only a P element inside and no text content can be\n // safely converted into plain P elements to avoid confusing the scoring\n // algorithm with DIVs with are, in practice, paragraphs.\n if (this._hasSingleTagInsideElement(node, \"P\") && this._getLinkDensity(node) < 0.25) {\n var newNode = node.children[0];\n node.parentNode.replaceChild(newNode, node);\n node = newNode;\n elementsToScore.push(node);\n } else if (!this._hasChildBlockElement(node)) {\n node = this._setNodeTag(node, \"P\");\n elementsToScore.push(node);\n }\n }\n node = this._getNextNode(node);\n }\n\n /**\n * Loop through all paragraphs, and assign a score to them based on how content-y they look.\n * Then add their score to their parent node.\n *\n * A score is determined by things like number of commas, class names, etc. Maybe eventually link density.\n **/\n var candidates = [];\n this._forEachNode(elementsToScore, function(elementToScore) {\n if (!elementToScore.parentNode || typeof(elementToScore.parentNode.tagName) === \"undefined\")\n return;\n\n // If this paragraph is less than 25 characters, don't even count it.\n var innerText = this._getInnerText(elementToScore);\n if (innerText.length < 25)\n return;\n\n // Exclude nodes with no ancestor.\n var ancestors = this._getNodeAncestors(elementToScore, 5);\n if (ancestors.length === 0)\n return;\n\n var contentScore = 0;\n\n // Add a point for the paragraph itself as a base.\n contentScore += 1;\n\n // Add points for any commas within this paragraph.\n contentScore += innerText.split(\",\").length;\n\n // For every 100 characters in this paragraph, add another point. Up to 3 points.\n contentScore += Math.min(Math.floor(innerText.length / 100), 3);\n\n // Initialize and score ancestors.\n this._forEachNode(ancestors, function(ancestor, level) {\n if (!ancestor.tagName || !ancestor.parentNode || typeof(ancestor.parentNode.tagName) === \"undefined\")\n return;\n\n if (typeof(ancestor.readability) === \"undefined\") {\n this._initializeNode(ancestor);\n candidates.push(ancestor);\n }\n\n // Node score divider:\n // - parent: 1 (no division)\n // - grandparent: 2\n // - great grandparent+: ancestor level * 3\n if (level === 0)\n var scoreDivider = 1;\n else if (level === 1)\n scoreDivider = 2;\n else\n scoreDivider = level * 3;\n ancestor.readability.contentScore += contentScore / scoreDivider;\n });\n });\n\n // After we've calculated scores, loop through all of the possible\n // candidate nodes we found and find the one with the highest score.\n var topCandidates = [];\n for (var c = 0, cl = candidates.length; c < cl; c += 1) {\n var candidate = candidates[c];\n\n // Scale the final candidates score based on link density. Good content\n // should have a relatively small link density (5% or less) and be mostly\n // unaffected by this operation.\n var candidateScore = candidate.readability.contentScore * (1 - this._getLinkDensity(candidate));\n candidate.readability.contentScore = candidateScore;\n\n this.log(\"Candidate:\", candidate, \"with score \" + candidateScore);\n\n for (var t = 0; t < this._nbTopCandidates; t++) {\n var aTopCandidate = topCandidates[t];\n\n if (!aTopCandidate || candidateScore > aTopCandidate.readability.contentScore) {\n topCandidates.splice(t, 0, candidate);\n if (topCandidates.length > this._nbTopCandidates)\n topCandidates.pop();\n break;\n }\n }\n }\n\n var topCandidate = topCandidates[0] || null;\n var neededToCreateTopCandidate = false;\n var parentOfTopCandidate;\n\n // If we still have no top candidate, just use the body as a last resort.\n // We also have to copy the body node so it is something we can modify.\n if (topCandidate === null || topCandidate.tagName === \"BODY\") {\n // Move all of the page's children into topCandidate\n topCandidate = doc.createElement(\"DIV\");\n neededToCreateTopCandidate = true;\n // Move everything (not just elements, also text nodes etc.) into the container\n // so we even include text directly in the body:\n while (page.firstChild) {\n this.log(\"Moving child out:\", page.firstChild);\n topCandidate.appendChild(page.firstChild);\n }\n\n page.appendChild(topCandidate);\n\n this._initializeNode(topCandidate);\n } else if (topCandidate) {\n // Find a better top candidate node if it contains (at least three) nodes which belong to `topCandidates` array\n // and whose scores are quite closed with current `topCandidate` node.\n var alternativeCandidateAncestors = [];\n for (var i = 1; i < topCandidates.length; i++) {\n if (topCandidates[i].readability.contentScore / topCandidate.readability.contentScore >= 0.75) {\n alternativeCandidateAncestors.push(this._getNodeAncestors(topCandidates[i]));\n }\n }\n var MINIMUM_TOPCANDIDATES = 3;\n if (alternativeCandidateAncestors.length >= MINIMUM_TOPCANDIDATES) {\n parentOfTopCandidate = topCandidate.parentNode;\n while (parentOfTopCandidate.tagName !== \"BODY\") {\n var listsContainingThisAncestor = 0;\n for (var ancestorIndex = 0; ancestorIndex < alternativeCandidateAncestors.length && listsContainingThisAncestor < MINIMUM_TOPCANDIDATES; ancestorIndex++) {\n listsContainingThisAncestor += Number(alternativeCandidateAncestors[ancestorIndex].includes(parentOfTopCandidate));\n }\n if (listsContainingThisAncestor >= MINIMUM_TOPCANDIDATES) {\n topCandidate = parentOfTopCandidate;\n break;\n }\n parentOfTopCandidate = parentOfTopCandidate.parentNode;\n }\n }\n if (!topCandidate.readability) {\n this._initializeNode(topCandidate);\n }\n\n // Because of our bonus system, parents of candidates might have scores\n // themselves. They get half of the node. There won't be nodes with higher\n // scores than our topCandidate, but if we see the score going *up* in the first\n // few steps up the tree, that's a decent sign that there might be more content\n // lurking in other places that we want to unify in. The sibling stuff\n // below does some of that - but only if we've looked high enough up the DOM\n // tree.\n parentOfTopCandidate = topCandidate.parentNode;\n var lastScore = topCandidate.readability.contentScore;\n // The scores shouldn't get too low.\n var scoreThreshold = lastScore / 3;\n while (parentOfTopCandidate.tagName !== \"BODY\") {\n if (!parentOfTopCandidate.readability) {\n parentOfTopCandidate = parentOfTopCandidate.parentNode;\n continue;\n }\n var parentScore = parentOfTopCandidate.readability.contentScore;\n if (parentScore < scoreThreshold)\n break;\n if (parentScore > lastScore) {\n // Alright! We found a better parent to use.\n topCandidate = parentOfTopCandidate;\n break;\n }\n lastScore = parentOfTopCandidate.readability.contentScore;\n parentOfTopCandidate = parentOfTopCandidate.parentNode;\n }\n\n // If the top candidate is the only child, use parent instead. This will help sibling\n // joining logic when adjacent content is actually located in parent's sibling node.\n parentOfTopCandidate = topCandidate.parentNode;\n while (parentOfTopCandidate.tagName != \"BODY\" && parentOfTopCandidate.children.length == 1) {\n topCandidate = parentOfTopCandidate;\n parentOfTopCandidate = topCandidate.parentNode;\n }\n if (!topCandidate.readability) {\n this._initializeNode(topCandidate);\n }\n }\n\n // Now that we have the top candidate, look through its siblings for content\n // that might also be related. Things like preambles, content split by ads\n // that we removed, etc.\n var articleContent = doc.createElement(\"DIV\");\n if (isPaging)\n articleContent.id = \"readability-content\";\n\n var siblingScoreThreshold = Math.max(10, topCandidate.readability.contentScore * 0.2);\n // Keep potential top candidate's parent node to try to get text direction of it later.\n parentOfTopCandidate = topCandidate.parentNode;\n var siblings = parentOfTopCandidate.children;\n\n for (var s = 0, sl = siblings.length; s < sl; s++) {\n var sibling = siblings[s];\n var append = false;\n\n this.log(\"Looking at sibling node:\", sibling, sibling.readability ? (\"with score \" + sibling.readability.contentScore) : \"\");\n this.log(\"Sibling has score\", sibling.readability ? sibling.readability.contentScore : \"Unknown\");\n\n if (sibling === topCandidate) {\n append = true;\n } else {\n var contentBonus = 0;\n\n // Give a bonus if sibling nodes and top candidates have the example same classname\n if (sibling.className === topCandidate.className && topCandidate.className !== \"\")\n contentBonus += topCandidate.readability.contentScore * 0.2;\n\n if (sibling.readability &&\n ((sibling.readability.contentScore + contentBonus) >= siblingScoreThreshold)) {\n append = true;\n } else if (sibling.nodeName === \"P\") {\n var linkDensity = this._getLinkDensity(sibling);\n var nodeContent = this._getInnerText(sibling);\n var nodeLength = nodeContent.length;\n\n if (nodeLength > 80 && linkDensity < 0.25) {\n append = true;\n } else if (nodeLength < 80 && nodeLength > 0 && linkDensity === 0 &&\n nodeContent.search(/\\.( |$)/) !== -1) {\n append = true;\n }\n }\n }\n\n if (append) {\n this.log(\"Appending node:\", sibling);\n\n if (this.ALTER_TO_DIV_EXCEPTIONS.indexOf(sibling.nodeName) === -1) {\n // We have a node that isn't a common block level element, like a form or td tag.\n // Turn it into a div so it doesn't get filtered out later by accident.\n this.log(\"Altering sibling:\", sibling, \"to div.\");\n\n sibling = this._setNodeTag(sibling, \"DIV\");\n }\n\n articleContent.appendChild(sibling);\n // Fetch children again to make it compatible\n // with DOM parsers without live collection support.\n siblings = parentOfTopCandidate.children;\n // siblings is a reference to the children array, and\n // sibling is removed from the array when we call appendChild().\n // As a result, we must revisit this index since the nodes\n // have been shifted.\n s -= 1;\n sl -= 1;\n }\n }\n\n if (this._debug)\n this.log(\"Article content pre-prep: \" + articleContent.innerHTML);\n // So we have all of the content that we need. Now we clean it up for presentation.\n this._prepArticle(articleContent);\n if (this._debug)\n this.log(\"Article content post-prep: \" + articleContent.innerHTML);\n\n if (neededToCreateTopCandidate) {\n // We already created a fake div thing, and there wouldn't have been any siblings left\n // for the previous loop, so there's no point trying to create a new div, and then\n // move all the children over. Just assign IDs and class names here. No need to append\n // because that already happened anyway.\n topCandidate.id = \"readability-page-1\";\n topCandidate.className = \"page\";\n } else {\n var div = doc.createElement(\"DIV\");\n div.id = \"readability-page-1\";\n div.className = \"page\";\n while (articleContent.firstChild) {\n div.appendChild(articleContent.firstChild);\n }\n articleContent.appendChild(div);\n }\n\n if (this._debug)\n this.log(\"Article content after paging: \" + articleContent.innerHTML);\n\n var parseSuccessful = true;\n\n // Now that we've gone through the full algorithm, check to see if\n // we got any meaningful content. If we didn't, we may need to re-run\n // grabArticle with different flags set. This gives us a higher likelihood of\n // finding the content, and the sieve approach gives us a higher likelihood of\n // finding the -right- content.\n var textLength = this._getInnerText(articleContent, true).length;\n if (textLength < this._charThreshold) {\n parseSuccessful = false;\n page.innerHTML = pageCacheHtml;\n\n if (this._flagIsActive(this.FLAG_STRIP_UNLIKELYS)) {\n this._removeFlag(this.FLAG_STRIP_UNLIKELYS);\n this._attempts.push({articleContent: articleContent, textLength: textLength});\n } else if (this._flagIsActive(this.FLAG_WEIGHT_CLASSES)) {\n this._removeFlag(this.FLAG_WEIGHT_CLASSES);\n this._attempts.push({articleContent: articleContent, textLength: textLength});\n } else if (this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)) {\n this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY);\n this._attempts.push({articleContent: articleContent, textLength: textLength});\n } else {\n this._attempts.push({articleContent: articleContent, textLength: textLength});\n // No luck after removing flags, just return the longest text we found during the different loops\n this._attempts.sort(function (a, b) {\n return b.textLength - a.textLength;\n });\n\n // But first check if we actually have something\n if (!this._attempts[0].textLength) {\n return null;\n }\n\n articleContent = this._attempts[0].articleContent;\n parseSuccessful = true;\n }\n }\n\n if (parseSuccessful) {\n // Find out text direction from ancestors of final top candidate.\n var ancestors = [parentOfTopCandidate, topCandidate].concat(this._getNodeAncestors(parentOfTopCandidate));\n this._someNode(ancestors, function(ancestor) {\n if (!ancestor.tagName)\n return false;\n var articleDir = ancestor.getAttribute(\"dir\");\n if (articleDir) {\n this._articleDir = articleDir;\n return true;\n }\n return false;\n });\n return articleContent;\n }\n }\n },\n\n /**\n * Check whether the input string could be a byline.\n * This verifies that the input is a string, and that the length\n * is less than 100 chars.\n *\n * @param possibleByline {string} - a string to check whether its a byline.\n * @return Boolean - whether the input string is a byline.\n */\n _isValidByline: function(byline) {\n if (typeof byline == \"string\" || byline instanceof String) {\n byline = byline.trim();\n return (byline.length > 0) && (byline.length < 100);\n }\n return false;\n },\n\n /**\n * Converts some of the common HTML entities in string to their corresponding characters.\n *\n * @param str {string} - a string to unescape.\n * @return string without HTML entity.\n */\n _unescapeHtmlEntities: function(str) {\n if (!str) {\n return str;\n }\n\n var htmlEscapeMap = this.HTML_ESCAPE_MAP;\n return str.replace(/&(quot|amp|apos|lt|gt);/g, function(_, tag) {\n return htmlEscapeMap[tag];\n }).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi, function(_, hex, numStr) {\n var num = parseInt(hex || numStr, hex ? 16 : 10);\n return String.fromCharCode(num);\n });\n },\n\n /**\n * Try to extract metadata from JSON-LD object.\n * For now, only Schema.org objects of type Article or its subtypes are supported.\n * @return Object with any metadata that could be extracted (possibly none)\n */\n _getJSONLD: function (doc) {\n var scripts = this._getAllNodesWithTag(doc, [\"script\"]);\n\n var metadata;\n\n this._forEachNode(scripts, function(jsonLdElement) {\n if (!metadata && jsonLdElement.getAttribute(\"type\") === \"application/ld+json\") {\n try {\n // Strip CDATA markers if present\n var content = jsonLdElement.textContent.replace(/^\\s*\\s*$/g, \"\");\n var parsed = JSON.parse(content);\n if (\n !parsed[\"@context\"] ||\n !parsed[\"@context\"].match(/^https?\\:\\/\\/schema\\.org$/)\n ) {\n return;\n }\n\n if (!parsed[\"@type\"] && Array.isArray(parsed[\"@graph\"])) {\n parsed = parsed[\"@graph\"].find(function(it) {\n return (it[\"@type\"] || \"\").match(\n this.REGEXPS.jsonLdArticleTypes\n );\n });\n }\n\n if (\n !parsed ||\n !parsed[\"@type\"] ||\n !parsed[\"@type\"].match(this.REGEXPS.jsonLdArticleTypes)\n ) {\n return;\n }\n\n metadata = {};\n\n if (typeof parsed.name === \"string\" && typeof parsed.headline === \"string\" && parsed.name !== parsed.headline) {\n // we have both name and headline element in the JSON-LD. They should both be the same but some websites like aktualne.cz\n // put their own name into \"name\" and the article title to \"headline\" which confuses Readability. So we try to check if either\n // \"name\" or \"headline\" closely matches the html title, and if so, use that one. If not, then we use \"name\" by default.\n\n var title = this._getArticleTitle();\n var nameMatches = this._textSimilarity(parsed.name, title) > 0.75;\n var headlineMatches = this._textSimilarity(parsed.headline, title) > 0.75;\n\n if (headlineMatches && !nameMatches) {\n metadata.title = parsed.headline;\n } else {\n metadata.title = parsed.name;\n }\n } else if (typeof parsed.name === \"string\") {\n metadata.title = parsed.name.trim();\n } else if (typeof parsed.headline === \"string\") {\n metadata.title = parsed.headline.trim();\n }\n if (parsed.author) {\n if (typeof parsed.author.name === \"string\") {\n metadata.byline = parsed.author.name.trim();\n } else if (Array.isArray(parsed.author) && parsed.author[0] && typeof parsed.author[0].name === \"string\") {\n metadata.byline = parsed.author\n .filter(function(author) {\n return author && typeof author.name === \"string\";\n })\n .map(function(author) {\n return author.name.trim();\n })\n .join(\", \");\n }\n }\n if (typeof parsed.description === \"string\") {\n metadata.excerpt = parsed.description.trim();\n }\n if (\n parsed.publisher &&\n typeof parsed.publisher.name === \"string\"\n ) {\n metadata.siteName = parsed.publisher.name.trim();\n }\n return;\n } catch (err) {\n this.log(err.message);\n }\n }\n });\n return metadata ? metadata : {};\n },\n\n /**\n * Attempts to get excerpt and byline metadata for the article.\n *\n * @param {Object} jsonld — object containing any metadata that\n * could be extracted from JSON-LD object.\n *\n * @return Object with optional \"excerpt\" and \"byline\" properties\n */\n _getArticleMetadata: function(jsonld) {\n var metadata = {};\n var values = {};\n var metaElements = this._doc.getElementsByTagName(\"meta\");\n\n // property is a space-separated list of values\n var propertyPattern = /\\s*(dc|dcterm|og|twitter)\\s*:\\s*(author|creator|description|title|site_name)\\s*/gi;\n\n // name is a single value\n var namePattern = /^\\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\\s*[\\.:]\\s*)?(author|creator|description|title|site_name)\\s*$/i;\n\n // Find description tags.\n this._forEachNode(metaElements, function(element) {\n var elementName = element.getAttribute(\"name\");\n var elementProperty = element.getAttribute(\"property\");\n var content = element.getAttribute(\"content\");\n if (!content) {\n return;\n }\n var matches = null;\n var name = null;\n\n if (elementProperty) {\n matches = elementProperty.match(propertyPattern);\n if (matches) {\n // Convert to lowercase, and remove any whitespace\n // so we can match below.\n name = matches[0].toLowerCase().replace(/\\s/g, \"\");\n // multiple authors\n values[name] = content.trim();\n }\n }\n if (!matches && elementName && namePattern.test(elementName)) {\n name = elementName;\n if (content) {\n // Convert to lowercase, remove any whitespace, and convert dots\n // to colons so we can match below.\n name = name.toLowerCase().replace(/\\s/g, \"\").replace(/\\./g, \":\");\n values[name] = content.trim();\n }\n }\n });\n\n // get title\n metadata.title = jsonld.title ||\n values[\"dc:title\"] ||\n values[\"dcterm:title\"] ||\n values[\"og:title\"] ||\n values[\"weibo:article:title\"] ||\n values[\"weibo:webpage:title\"] ||\n values[\"title\"] ||\n values[\"twitter:title\"];\n\n if (!metadata.title) {\n metadata.title = this._getArticleTitle();\n }\n\n // get author\n metadata.byline = jsonld.byline ||\n values[\"dc:creator\"] ||\n values[\"dcterm:creator\"] ||\n values[\"author\"];\n\n // get description\n metadata.excerpt = jsonld.excerpt ||\n values[\"dc:description\"] ||\n values[\"dcterm:description\"] ||\n values[\"og:description\"] ||\n values[\"weibo:article:description\"] ||\n values[\"weibo:webpage:description\"] ||\n values[\"description\"] ||\n values[\"twitter:description\"];\n\n // get site name\n metadata.siteName = jsonld.siteName ||\n values[\"og:site_name\"];\n\n // in many sites the meta value is escaped with HTML entities,\n // so here we need to unescape it\n metadata.title = this._unescapeHtmlEntities(metadata.title);\n metadata.byline = this._unescapeHtmlEntities(metadata.byline);\n metadata.excerpt = this._unescapeHtmlEntities(metadata.excerpt);\n metadata.siteName = this._unescapeHtmlEntities(metadata.siteName);\n\n return metadata;\n },\n\n /**\n * Check if node is image, or if node contains exactly only one image\n * whether as a direct child or as its descendants.\n *\n * @param Element\n **/\n _isSingleImage: function(node) {\n if (node.tagName === \"IMG\") {\n return true;\n }\n\n if (node.children.length !== 1 || node.textContent.trim() !== \"\") {\n return false;\n }\n\n return this._isSingleImage(node.children[0]);\n },\n\n /**\n * Find all