@topwrite/cli 1.0.75-alpha.1 → 1.0.75-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/ttx.js +3 -3
  2. package/package.json +4 -4
package/bin/ttx.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #! /usr/bin/env node
2
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("commander"),n=require("tmp"),i=require("path"),o=require("consola"),a=require("@babel/runtime/helpers/extends"),s=require("@babel/runtime/helpers/inheritsLoose"),c=require("@babel/runtime/helpers/createClass"),u=require("lodash/cloneDeep"),l=require("lodash/get"),f=require("lodash/isEmpty"),h=require("lodash/isEqual"),p=require("lodash/omit"),d=require("lodash/set"),m=require("lodash/toPath"),g=require("lodash/unset"),v=require("lodash/merge"),y=require("lodash/keys"),b=require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),w=require("util"),x=require("stream"),k=require("http"),E=require("https"),S=require("url"),P=require("fs"),C=require("mime-types"),_=require("assert"),A=require("tty"),R=require("os"),F=require("zlib"),O=require("events"),T=require("cross-spawn"),D=require("vm2"),L=require("js-yaml"),j=require("canvas"),I=require("fs-extra"),N=require("pinyin-pro"),z=require("fstream-ignore"),q=require("archiver"),B=require("tar-pack"),M=require("ejs"),U=require("lookpath"),$=require("jsdom"),V=require("constants"),H=require("crypto");function Q(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var G=Q(P),W=o.create({}),K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}};
3
- /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),p=r(o+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),g=r("\\:\\:"+r(p+"\\:")+"{5}"+d),v=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),x=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),k=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),E=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,g,v,y,b,w,x,k,E].join("|")),P=r(r(l+"|"+a)+"+");r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),r(r(a+"|"+t(l,s))+"*");var C=r(a+"|"+t(l,s,"[\\:\\@]"));return r(r(a+"|"+t(l,s,"[\\@]"))+"+"),r(r(C+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=p-d,C=Math.floor,_=String.fromCharCode;function A(e){throw new RangeError(S[e])}function R(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function F(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+R((e=e.replace(E,".")).split("."),t).join(".")}function O(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var T=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},D=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},L=function(e,t,r){var n=0;for(e=r?C(e/v):e>>1,e+=C(e/t);e>P*m>>1;n+=p)e=C(e/P);return C(n+(P+1)*e/(e+g))},j=function(e){var t=[],r=e.length,n=0,i=b,o=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s<a;++s)e.charCodeAt(s)>=128&&A("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c<r;){for(var u=n,l=1,f=p;;f+=p){c>=r&&A("invalid-input");var g=T(e.charCodeAt(c++));(g>=p||g>C((h-n)/l))&&A("overflow"),n+=g*l;var v=f<=o?d:f>=o+m?m:f-o;if(g<v)break;var x=p-v;l>C(h/x)&&A("overflow"),l*=x}var k=t.length+1;o=L(n-u,k,0==u),C(n/k)>h-i&&A("overflow"),i+=C(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},I=function(e){var t=[],r=(e=O(e)).length,n=b,i=0,o=y,a=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var f=u.value;f<128&&t.push(_(f))}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,E=!1,S=void 0;try{for(var P,R=e[Symbol.iterator]();!(k=(P=R.next()).done);k=!0){var F=P.value;F>=n&&F<x&&(x=F)}}catch(e){E=!0,S=e}finally{try{!k&&R.return&&R.return()}finally{if(E)throw S}}var T=v+1;x-n>C((h-i)/T)&&A("overflow"),i+=(x-n)*T,n=x;var j=!0,I=!1,N=void 0;try{for(var z,q=e[Symbol.iterator]();!(j=(z=q.next()).done);j=!0){var B=z.value;if(B<n&&++i>h&&A("overflow"),B==n){for(var M=i,U=p;;U+=p){var $=U<=o?d:U>=o+m?m:U-o;if(M<$)break;var V=M-$,H=p-$;t.push(_(D($+V%H,0))),M=C(V/H)}t.push(_(D(M,0))),o=L(i,T,v==g),i=0,++v}}}catch(e){I=!0,N=e}finally{try{!j&&q.return&&q.return()}finally{if(I)throw N}}++i,++n}return t.join("")},N=function(e){return F(e,(function(e){return x.test(e)?j(e.slice(4).toLowerCase()):e}))},z=function(e){return F(e,(function(e){return k.test(e)?"xn--"+I(e):e}))},q={version:"2.1.0",ucs2:{decode:O,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:j,encode:I,toASCII:z,toUnicode:N},B={};function M(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function U(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function $(e,t){function r(e){var r=U(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,M).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,M).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,M).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,M).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,M).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=l(a,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),v=0;v<d;++v)g[v]=f[v]||h[m+v]||"";p&&(g[d-1]=H(g[d-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return o&&(w+="%"+o),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){W?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=B[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)$(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=q.toASCII(r.host.replace(n.PCT_ENCODED,U).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(r,c)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,Z=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=B[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(r.PCT_ENCODED,U).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}$(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=J(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function oe(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,M)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,U)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},de={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Se=new RegExp(t("[^]",me,we),"g"),Pe=Se;function Ce(e){var t=U(e);return t.match(xe)?t:e}var _e={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,c=a.length;s<c;++s){var u=a[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,o[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=q.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,s=n.length;a<s;++a){var c=String(n[a]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,Ce).replace(ke,i).replace(Ee,M),f=c.slice(u+1);try{f=t.iri?q.toUnicode(f):q.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==de[d]&&p.push(d.replace(ke,Ce).replace(ke,i).replace(Se,M)+"="+h[d].replace(ke,Ce).replace(ke,i).replace(Pe,M));return p.length&&(r.query=p.join("&")),r}},Ae=/^([^\:]+)\:(.*)/,Re={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Ae),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),c=B[s];n.nid=o,n.nss=a,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=B[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},Fe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Fe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};B[ue.scheme]=ue,B[le.scheme]=le,B[he.scheme]=he,B[pe.scheme]=pe,B[_e.scheme]=_e,B[Re.scheme]=Re,B[Oe.scheme]=Oe,e.SCHEMES=B,e.pctEncChar=M,e.pctDecChars=U,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=oe,e.equal=ae,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(Y.exports);var Z=Y.exports,X=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},ee={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:te,checkDataTypes:function(e,t,r){if(1===e.length)return te(e[0],t,r,!0);var n="",i=ne(e);for(var o in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+te(o,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(re[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(re[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:ne,getProperty:ae,escapeQuotes:se,equal:X,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:ce,getPathExpr:function(e,t,r,n){var i=r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return fe(e,i)},getPath:function(e,t,r){var n=ce(r?"/"+he(t):ae(t));return fe(e,n)},getData:function(e,t,r){var n,i,o,a;if(""===e)return"rootData";if("/"==e[0]){if(!ue.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(!(a=e.match(le)))throw new Error("Invalid JSON-pointer: "+e);if(n=+a[1],"#"==(i=a[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(o="data"+(t-n||""),!i)return o}for(var s=o,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(s+=" && "+(o+=ae(pe(l))))}return s},unescapeFragment:function(e){return pe(decodeURIComponent(e))},unescapeJsonPointer:pe,escapeFragment:function(e){return encodeURIComponent(he(e))},escapeJsonPointer:he};function te(e,t,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var re=ne(["string","number","integer","boolean","null"]);function ne(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var ie=/^[a-z$_][a-z$_0-9]*$/i,oe=/'|\\/g;function ae(e){return"number"==typeof e?"["+e+"]":ie.test(e)?"."+e:"['"+se(e)+"']"}function se(e){return e.replace(oe,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function ce(e){return"'"+se(e)+"'"}var ue=/^\/(?:[^~]|~0|~1)*$/,le=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function he(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function pe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var de=ee,me=function(e){de.copy(e,this)};var ge={exports:{}},ve=ge.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),ye(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function ye(e,t,r,n,i,o,a,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,o,a,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in ve.arrayKeywords)for(var h=0;h<f.length;h++)ye(e,t,r,f[h],i+"/"+l+"/"+h,o,i,l,n,h)}else if(l in ve.propsKeywords){if(f&&"object"==typeof f)for(var p in f)ye(e,t,r,f[p],i+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,l,n,p)}else(l in ve.keywords||e.allKeys&&!(l in ve.skipKeywords))&&ye(e,t,r,f,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}ve.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},ve.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},ve.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},ve.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var be=ge.exports,we=Z,xe=X,ke=ee,Ee=me,Se=be,Pe=Ce;function Ce(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return Ce.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Ee)return Te(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,o,a,s=_e.call(this,t,r);return s&&(i=s.schema,t=s.root,a=s.baseId),i instanceof Ee?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=Te(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function _e(e,t){var r=we.parse(t),n=Ie(r),i=je(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var o=ze(n),a=this._refs[o];if("string"==typeof a)return Ae.call(this,e,a,r);if(a instanceof Ee)a.validate||this._compile(a),e=a;else{if(!((a=this._schemas[o])instanceof Ee))return;if(a.validate||this._compile(a),o==ze(t))return{schema:a,root:e,baseId:i};e=a}if(!e.schema)return;i=je(this._getId(e.schema))}return Fe.call(this,r,i,e.schema,e)}function Ae(e,t,r){var n=_e.call(this,e,t);if(n){var i=n.schema,o=n.baseId;e=n.root;var a=this._getId(i);return a&&(o=qe(o,a)),Fe.call(this,r,o,i,e)}}Ce.normalizeId=ze,Ce.fullPath=je,Ce.url=qe,Ce.ids=function(e){var t=ze(this._getId(e)),r={"":t},n={"":je(t,!1)},i={},o=this;return Se(e,{allKeys:!0},(function(e,t,a,s,c,u,l){if(""!==t){var f=o._getId(e),h=r[s],p=n[s]+"/"+c;if(void 0!==l&&(p+="/"+("number"==typeof l?l:ke.escapeFragment(l))),"string"==typeof f){f=h=ze(h?we.resolve(h,f):f);var d=o._refs[f];if("string"==typeof d&&(d=o._refs[d]),d&&d.schema){if(!xe(e,d.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=ze(p))if("#"==f[0]){if(i[f]&&!xe(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else o._refs[f]=p}r[t]=h,n[t]=p}})),i},Ce.inlineRef=Te,Ce.schema=_e;var Re=ke.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Fe(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var a=i[o];if(a){if(void 0===(r=r[a=ke.unescapeFragment(a)]))break;var s;if(!Re[a]&&((s=this._getId(r))&&(t=qe(t,s)),r.$ref)){var c=qe(t,r.$ref),u=_e.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var Oe=ke.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Te(e,t){return!1!==t&&(void 0===t||!0===t?De(e):t?Le(e)<=t:void 0)}function De(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!De(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!De(t))return!1}return!0}function Le(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=Le(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(Oe[i])r++;else if("object"==typeof(t=e[i])&&(r+=Le(t)+1),r==1/0)return 1/0}return r}function je(e,t){return!1!==t&&(e=ze(e)),Ie(we.parse(e))}function Ie(e){return we.serialize(e).split("#")[0]+"#"}var Ne=/#\/?$/;function ze(e){return e?e.replace(Ne,""):""}function qe(e,t){return t=ze(t),we.resolve(e,t)}var Be=Pe,Me={Validation:$e((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:$e(Ue)};function Ue(e,t,r){this.message=r||Ue.message(e,t),this.missingRef=Be.url(e,t),this.missingSchema=Be.normalizeId(Be.fullPath(this.missingRef))}function $e(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Ue.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var Ve=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},o={key:n,value:t[n]};return e(i,o)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,a;if(Array.isArray(t)){for(a="[",o=0;o<t.length;o++)o&&(a+=","),a+=e(t[o])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(a="",o=0;o<c.length;o++){var u=c[o],l=e(t[u]);l&&(a&&(a+=","),a+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)},He=function(e,t,r){var n="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?d=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,d=!e.opts.allErrors;var w="",x="",k=e.schema.type,E=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],E=!0)),E&&1==k.length&&(k=k[0],E=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(S||E||!0===P||P&&!Y(P)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var C=E?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[C](k,m,e.opts.strictNumbers,!0)+") { ",S){var _="dataType"+u,A="coerced"+u;n+=" var "+_+" = typeof "+m+"; var "+A+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+_+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+_+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+A+" = "+m+"; } "),n+=" if ("+A+" !== undefined) ; ";var R=S;if(R)for(var F,O=-1,T=R.length-1;O<T;)"string"==(F=R[O+=1])?n+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+A+" = '' + "+m+"; else if ("+m+" === null) "+A+" = ''; ":"number"==F||"integer"==F?(n+=" else if ("+_+" == 'boolean' || "+m+" === null || ("+_+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==F&&(n+=" && !("+m+" % 1)"),n+=")) "+A+" = +"+m+"; "):"boolean"==F?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+A+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+A+" = true; ":"null"==F?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+A+" = null; ":"array"==e.opts.coerceTypes&&"array"==F&&(n+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+m+" == null) "+A+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+A+" !== undefined) { ";var D=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+A+"; ",l||(n+="if ("+D+" !== undefined)"),n+=" "+D+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+A+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!o)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var L=e.RULES;if(L)for(var j=-1,I=L.length-1;j<I;)if(Y(P=L[j+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var N=Object.keys(f);if(N)for(var z,q=-1,B=N.length-1;q<B;){if(void 0!==($=f[z=N[q+=1]]).default){var M=m+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+M;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+M+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+M+" === null || "+M+" === '' "),n+=" ) "+M+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault($.default)+" ":n+=" "+JSON.stringify($.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var U=e.schema.items;if(U){O=-1;for(var $,V=U.length-1;O<V;)if(void 0!==($=U[O+=1]).default){M=m+"["+O+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+M;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+M+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+M+" === null || "+M+" === '' "),n+=" ) "+M+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault($.default)+" ":n+=" "+JSON.stringify($.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,G=-1,W=H.length-1;G<W;)if(Z(Q=H[G+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",d&&(w+="}"))}if(d&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!S)){n+=" else { ";var J;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}d&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(Z(t[r]))return!0}function Z(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},Qe=Pe,Ge=ee,We=Me,Ke=Ve,Je=He,Ye=Ge.ucs2length,Ze=X,Xe=We.Validation,et=function e(t,r,n,i){var o=this,a=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},p=[];r=r||{schema:t,refVal:s,refs:c};var d=tt.call(this,t,r,i),m=this._compilations[d.index];if(d.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,a.sourceCode&&(b.source=y.source)),y}finally{rt.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(o,t,n,i,l);var d,m=!0===t.$async,y=Je({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:We.MissingRef,RULES:v,validate:Je,util:Ge,resolve:Qe,resolveRef:x,usePattern:S,useDefault:P,useCustomRule:C,opts:a,formats:g,logger:o.logger,self:o});y=ct(s,at)+ct(u,it)+ct(f,ot)+ct(p,st)+y,a.processCode&&(y=a.processCode(y,t));try{d=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(o,v,g,r,s,f,p,Ze,Ye,Xe),s[0]=d}catch(e){throw o.logger.error("Error compiling schema, function code:",y),e}return d.schema=t,d.errors=null,d.refs=c,d.refVal=s,d.root=h?d:n,m&&(d.$async=!0),!0===a.sourceCode&&(d.source={code:y,patterns:u,defaults:f}),d}function x(t,i,u){i=Qe.url(t,i);var l,f,h=c[i];if(void 0!==h)return E(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var p=r.refs[i];if(void 0!==p)return E(l=r.refVal[p],f=k(i,l))}f=k(i);var d=Qe.call(o,w,r,i);if(void 0===d){var m=n&&n[i];m&&(d=Qe.inlineRef(m,a.inlineRefs)?m:e.call(o,m,r,n,t))}if(void 0!==d)return function(e,t){var r=c[e];s[r]=t}(i,d),E(d,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function E(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return Ge.toQuotedString(e);case"object":if(null===e)return"null";var t=Ke(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function C(e,t,r,n){if(!1!==o._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+o.errorsText(s.errors);if("log"!=o._opts.validateSchema)throw new Error(c);o.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(o,t,r,n);else if(h)u=h.call(o,t,r,n),!1!==a.validateSchema&&o.validateSchema(u,!0);else if(f)u=f.call(o,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var d=p.length;return p[d]=u,{code:"customRule"+d,validate:u}}};function tt(e,t,r){var n=nt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function rt(e,t,r){var n=nt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function nt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function it(e,t){return"var pattern"+e+" = new RegExp("+Ge.toQuotedString(t[e])+");"}function ot(e){return"var default"+e+" = defaults["+e+"];"}function at(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function st(e){return"var customRule"+e+" = customRules["+e+"];"}function ct(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var ut={exports:{}},lt=ut.exports=function(){this._cache={}};lt.prototype.put=function(e,t){this._cache[e]=t},lt.prototype.get=function(e){return this._cache[e]},lt.prototype.del=function(e){delete this._cache[e]},lt.prototype.clear=function(){this._cache={}};var ft=ut.exports,ht=ee,pt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,dt=[0,31,28,31,30,31,30,31,31,30,31,30,31],mt=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,gt=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,vt=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,yt=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,bt=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,wt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,xt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,kt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Et=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,St=Pt;function Pt(e){return e="full"==e?"full":"fast",ht.copy(Pt[e])}function Ct(e){var t=e.match(pt);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:dt[n])}function _t(e,t){var r=e.match(mt);if(!r)return!1;var n=r[1],i=r[2],o=r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23==n&&59==i&&60==o)&&(!t||a)}Pt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":yt,url:bt,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:gt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ot,uuid:wt,"json-pointer":xt,"json-pointer-uri-fragment":kt,"relative-json-pointer":Et},Pt.full={date:Ct,time:_t,"date-time":function(e){var t=e.split(At);return 2==t.length&&Ct(t[0])&&_t(t[1],!0)},uri:function(e){return Rt.test(e)&&vt.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":yt,url:bt,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:gt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ot,uuid:wt,"json-pointer":xt,"json-pointer-uri-fragment":kt,"relative-json-pointer":Et};var At=/t|\s/i;var Rt=/\/|:/;var Ft=/[^\\]\\Z/;function Ot(e){if(Ft.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Tt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.$data&&m&&m.$data,v=p?"<":">",y=p?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(g){var w=e.util.getData(m.$data,a,e.dataPathArr),x="exclusive"+o,k="exclType"+o,E="exclIsNumber"+o,S="' + "+(_="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+o)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=d;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var C=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+o+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,u=e.errSchemaPath+"/"+d,n=w,h=g)}else{S=v;if((E="number"==typeof m)&&h){var _="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{E&&void 0===s?(x=!0,b=d,u=e.errSchemaPath+"/"+d,n=m,y+="="):(E&&(n=Math[p?"min":"max"](m,s)),m===(!E||n)?(x=!0,b=d,u=e.errSchemaPath+"/"+d,y+="="):(x=!1,S+="="));_="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";C=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},Dt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Lt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},jt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},It={$ref:function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+a;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(d),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var m=o;o=y.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,d);e.logger.warn(d),l&&(o+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=c,o+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",l&&(o+=" if ("+v+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var b=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(o+=" var "+h+"; "),o+=" try { await "+b+"; ",l&&(o+=" "+h+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(o+=" "+h+" = false; "),o+=" } ",l&&(o+=" if ("+h+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(o+=" else { ")}return o},allOf:function(e,t,r){var n=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,p=i;if(p)for(var d,m=-1,g=p.length-1;m<g;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,c.schema=d,c.schemaPath=o+"["+m+"]",c.errSchemaPath=a+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=p.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=a;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],p.schema=w,p.schemaPath=s+"["+x+"]",p.errSchemaPath=c+"/"+x,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t;e.opts.allErrors;var a=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+a+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(o)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";p.dataPathArr[g]=m;var k=e.validate(p);p.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=w,n+=" if (!"+d+") {"}else n+=" if ("+l+".length == 0) {";var E=E||[];E.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;return n=E.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in a)if("__proto__"!=x){var y=a[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var E=-1,S=k.length-1;E<S;){F=k[E+=1],E&&(n+=" || "),n+=" ( ( "+(L=l+(D=e.util.getProperty(F)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(F)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?F:D)+") ) "}n+=")) { ";var P="missing"+i,C="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var _=_||[];_.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+C+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var A=n;n=_.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var R=b;if(R)for(var F,O=-1,T=R.length-1;O<T;){F=R[O+=1];var D=e.util.getProperty(F),L=(C=e.util.escapeQuotes(F),l+D);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,F,e.opts.jsonPointers)),n+=" if ( "+L+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(F)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+C+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(p+="}",n+=" else { ")}e.errorPath=w;var j=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+d+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=j,n+=" } ",u&&(n+=" if ("+d+") { ",p+="}"))}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&a&&a.$data;h?(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",f="schema"+i):f=a;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+f+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[a])){if("ignore"==p)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(d&&p.indexOf(a)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(a)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(a);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(a),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(a),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(a),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var w;p.createErrors=!1,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,v?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+d+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(a)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+a.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(d+="}",n+=" else { ")}var S=a;if(S)for(var P,C=-1,_=S.length-1;C<_;)if(P=S[C+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+C+") { ";var A=l+"["+C+"]";p.schema=P,p.schemaPath=s+"["+C+"]",p.errSchemaPath=c+"/"+C,p.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,!0),p.dataPathArr[v]=C;var R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,A)+" ":n+=" var "+y+" = "+A+"; "+R+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){p.schema=w,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);A=l+"["+g+"]";p.dataPathArr[v]=g;R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,A)+" ":n+=" var "+y+" = "+A+"; "+R+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);A=l+"["+g+"]";p.dataPathArr[v]=g;R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,A)+" ":n+=" var "+y+" = "+A+"; "+R+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+d+" if ("+h+" == errors) {"),n},maximum:Tt,minimum:Tt,maxItems:Dt,minItems:Dt,maxLength:Lt,minLength:Lt,maxProperties:jt,minProperties:jt,multipleOf:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+o+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+o+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var w=a;if(w)for(var x,k=-1,E=w.length-1;k<E;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(p.schema=x,p.schemaPath=s+"["+k+"]",p.errSchemaPath=c+"/"+k,n+=" "+e.validate(p)+" ",p.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",d+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=p.compositeRule=b,n+=d+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(a||{}).filter(D),x=e.schema.patternProperties||{},k=Object.keys(x).filter(D),E=e.schema.additionalProperties,S=w.length||k.length,P=!1===E,C="object"==typeof E&&Object.keys(E).length,_=e.opts.removeAdditional,A=P||C||_,R=e.opts.ownProperties,F=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var T=e.util.toHash(O);function D(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+d+" = true;",R&&(n+=" var "+b+" = undefined;"),A){if(n+=R?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",S){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var L=w;if(L)for(var j=-1,I=L.length-1;j<I;)K=L[j+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var N=k;if(N)for(var z=-1,q=N.length-1;z<q;)oe=N[z+=1],n+=" || "+e.usePattern(oe)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==_)n+=" delete "+l+"["+m+"]; ";else{var B=e.errorPath,M="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(_)n+=" delete "+l+"["+m+"]; ";else{n+=" "+d+" = false; ";var U=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+M+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var $=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+$+"]); ":n+=" validate.errors = ["+$+"]; return false; ":n+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=U,u&&(n+=" break; ")}else if(C)if("failing"==_){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+d+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; ")}e.errorPath=B}S&&(n+=" } "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var K,J=-1,Y=W.length-1;J<Y;){var Z=a[K=W[J+=1]];if(e.opts.strictKeywords?"object"==typeof Z&&Object.keys(Z).length>0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){var X=e.util.getProperty(K),ee=(H=l+X,G&&void 0!==Z.default);h.schema=Z,h.schemaPath=s+X,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=F,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(T&&T[K]){n+=" if ( "+te+" === undefined ",R&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = false; ";B=e.errorPath,U=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(B,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";$=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+$+"]); ":n+=" validate.errors = ["+$+"]; return false; ":n+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=U,e.errorPath=B,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",R&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",R&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+d+") { ",p+="}")}}if(k.length){var ie=k;if(ie)for(var oe,ae=-1,se=ie.length-1;ae<se;){Z=x[oe=ie[ae+=1]];if(e.opts.strictKeywords?"object"==typeof Z&&Object.keys(Z).length>0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){h.schema=Z,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),n+=R?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(oe)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; "),n+=" } ",u&&(n+=" else "+d+" = true; "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}}}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c;var d="key"+i,m="idx"+i,g="i"+i,v="' + "+d+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+d+" = "+b+"["+m+"]; ":" for (var "+d+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=d,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=x,e.util.varOccurences(S,y)<2?n+=" "+e.util.varReplace(S,y,k)+" ":n+=" var "+y+" = "+k+"; "+S+" ",e.compositeRule=h.compositeRule=E,n+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="schema"+i;if(!h)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=a;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(d[d.length]=g)}}else d=a;if(h||d.length){var w=e.errorPath,x=h||d.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var E="' + "+(R="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,R,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+C+" = 0; "+C+" < "+p+".length; "+C+"++) { "+f+" = "+l+"["+p+"["+C+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+C+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(A=A||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=d;if(P)for(var C=-1,_=P.length-1;C<_;){O=P[C+=1],C&&(n+=" || "),n+=" ( ( "+(j=l+(L=e.util.getProperty(O)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:L)+") ) "}n+=") { ";var A;E="' + "+(R="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,R,!0):w+" + "+R),(A=A||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";S=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var R;E="' + "+(R="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,R,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+C+" = 0; "+C+" < "+p+".length; "+C+"++) { if ("+l+"["+p+"["+C+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+C+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var F=d;if(F)for(var O,T=-1,D=F.length-1;T<D;){O=F[T+=1];var L=e.util.getProperty(O),j=(E=e.util.escapeQuotes(O),l+L);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,O,e.opts.jsonPointers)),n+=" if ( "+j+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h="valid"+o,p=e.opts.$data&&s&&s.$data;if(p?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:He},Nt=It,zt=ee.toHash,qt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Bt=Me.MissingRef,Mt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var o=a(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&o.then((function(e){n(null,e)}),n);return o;function a(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Bt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var o=i._loadingSchemas[n];o||(o=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return o.then((function(e){if(!u(n))return a(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var Ut={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},$t=Ut,Vt={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:$t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:$t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Ht=/^[a-z_$][a-z0-9_$-]*$/i,Qt=function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),p="valid"+a,d="errs__"+a,m=e.opts.$data&&c&&c.$data;m?(o+=" var schema"+a+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+a):i=c;var g,v,y,b,w,x=this,k="definition"+a,E=x.definition,S="";if(m&&E.$data){w="keywordValidate"+a;var P=E.validateSchema;o+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=E.compile,v=E.inline,y=E.macro}var C=w+".errors",_="i"+a,A="ruleErr"+a,R=E.async;if(R&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(o+=C+" = null;"),o+="var "+d+" = errors;var "+p+";",m&&E.$data&&(S+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",P&&(S+="}",o+=" "+p+" = "+k+".validateSchema("+i+"); if ("+p+") { ")),v)E.statements?o+=" "+b.validate+" ":o+=" "+p+" = "+b.validate+"; ";else if(y){var F=e.util.copy(e);S="";F.level++;var O="valid"+F.level;F.schema=b.validate,F.schemaPath="";var T=e.compositeRule;e.compositeRule=F.compositeRule=!0;var D=e.validate(F).replace(/validate\.schema/g,w);e.compositeRule=F.compositeRule=T,o+=" "+D}else{(N=N||[]).push(o),o="",o+=" "+w+".call( ",e.opts.passContext?o+="this":o+="self",g||!1===E.schema?o+=" , "+h+" ":o+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var L=s?"data"+(s-1||""):"parentData",j=s?e.dataPathArr[s]:"parentDataProperty",I=o+=" , "+L+" , "+j+" , rootData ) ";o=N.pop(),!1===E.errors?(o+=" "+p+" = ",R&&(o+="await "),o+=I+"; "):o+=R?" var "+(C="customErrors"+a)+" = null; try { "+p+" = await "+I+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } ":" "+C+" = null; "+p+" = "+I+"; "}if(E.modifying&&(o+=" if ("+L+") "+h+" = "+L+"["+j+"];"),o+=""+S,E.valid)f&&(o+=" if (true) { ");else{var N;o+=" if ( ",void 0===E.valid?(o+=" !",o+=y?""+O:""+p):o+=" "+!E.valid+" ",o+=") { ",n=x.keyword,(N=N||[]).push(o),o="",(N=N||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var z=o;o=N.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+z+"]); ":o+=" validate.errors = ["+z+"]; return false; ":o+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var q=o;o=N.pop(),v?E.errors?"full"!=E.errors&&(o+=" for (var "+_+"="+d+"; "+_+"<errors; "+_+"++) { var "+A+" = vErrors["+_+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } "):!1===E.errors?o+=" "+q+" ":(o+=" if ("+d+" == errors) { "+q+" } else { for (var "+_+"="+d+"; "+_+"<errors; "+_+"++) { var "+A+" = vErrors["+_+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===E.errors?o+=" "+q+" ":(o+=" if (Array.isArray("+C+")) { if (vErrors === null) vErrors = "+C+"; else vErrors = vErrors.concat("+C+"); errors = vErrors.length; for (var "+_+"="+d+"; "+_+"<errors; "+_+"++) { var "+A+" = vErrors["+_+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; "+A+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(o+=" "+A+".schema = "+i+"; "+A+".data = "+h+"; "),o+=" } } else { "+q+" } "),o+=" } ",f&&(o+=" else { ")}return o},Gt=Vt,Wt={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Ht.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)a(e,n[i],t);else a(e,n,t);var o=t.metaSchema;o&&(t.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(o,!0))}function a(e,t,n){for(var i,o=0;o<r.length;o++){var a=r[o];if(a.type==t){i=a;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:Qt,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(Gt,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var Kt={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},Jt=et,Yt=Pe,Zt=ft,Xt=me,er=Ve,tr=St,rr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=zt(t),e.types=zt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Nt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Nt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=zt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},nr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),o=e;for(n=1;n<i.length;n++)o=o[i[n]];for(n=0;n<qt.length;n++){var a=qt[n],s=o[a];s&&(o[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},ir=ee,or=fr;fr.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},fr.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},fr.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return vr(this,t=Yt.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,r,n,!0),this},fr.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},fr.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(cr)?cr:void 0,e._opts.defaultMeta}(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},fr.prototype.getSchema=function(e){var t=hr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=Yt.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,o=r.baseId,a=Jt.call(e,n,i,void 0,o);return e._fragments[t]=new Xt({ref:t,fragment:!0,schema:n,root:i,baseId:o,validate:a}),a}}(this,e)}},fr.prototype.removeSchema=function(e){if(e instanceof RegExp)return pr(this,this._schemas,e),pr(this,this._refs,e),this;switch(typeof e){case"undefined":return pr(this,this._schemas),pr(this,this._refs),this._cache.clear(),this;case"string":var t=hr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=Yt.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},fr.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},fr.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var a=e[o];a&&(i+=n+a.dataPath+" "+a.message+r)}return i.slice(0,-r.length)},fr.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(e):e,a=this._cache.get(o);if(a)return a;n=n||!1!==this._opts.addUsedSchema;var s=Yt.normalizeId(this._getId(e));s&&n&&vr(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==Yt.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=Yt.ids.call(this,e),f=new Xt({id:s,schema:e,localRefs:l,cacheKey:o,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(o,f),u&&c&&this.validateSchema(e,!0);return f},fr.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=Jt.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},fr.prototype.compileAsync=Mt;var ar=Wt;fr.prototype.addKeyword=ar.add,fr.prototype.getKeyword=ar.get,fr.prototype.removeKeyword=ar.remove,fr.prototype.validateKeyword=ar.validate;var sr=Me;fr.ValidationError=sr.Validation,fr.MissingRefError=sr.MissingRef,fr.$dataMetaSchema=nr;var cr="http://json-schema.org/draft-07/schema",ur=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],lr=["/properties"];function fr(e){if(!(this instanceof fr))return new fr(e);e=this._opts=ir.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:yr,warn:yr,error:yr};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=tr(e.format),this._cache=e.cache||new Zt,this._loadingSchemas={},this._compilations=[],this.RULES=rr(),this._getId=function(e){switch(e.schemaId){case"auto":return gr;case"id":return dr;default:return mr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=er),this._metaOpts=function(e){for(var t=ir.copy(e._opts),r=0;r<ur.length;r++)delete t[ur[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=Kt,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=Ut;e._opts.$data&&(r=nr(r,lr));e.addMetaSchema(r,cr,!0),e._refs["http://json-schema.org/schema"]=cr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function hr(e,t){return t=Yt.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function pr(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function dr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function mr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function gr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function vr(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function yr(){}var br=J(or),wr={exports:{}};var xr,kr={exports:{}};function Er(){return xr||(xr=1,kr.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==K&&K.crypto&&(r=K.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=o.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=o.algo={};return o}(Math),e)),kr.exports;var e}var Sr,Pr={exports:{}};function Cr(){return Sr||(Sr=1,Pr.exports=(e=Er(),function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),Pr.exports;var e}var _r,Ar={exports:{}};Ar.exports=(_r=Er(),function(e){var t=_r,r=t.lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var s=o.MD5=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],h=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],P=e[t+14],C=e[t+15],_=o[0],A=o[1],R=o[2],F=o[3];_=c(_,A,R,F,s,7,a[0]),F=c(F,_,A,R,h,12,a[1]),R=c(R,F,_,A,p,17,a[2]),A=c(A,R,F,_,d,22,a[3]),_=c(_,A,R,F,m,7,a[4]),F=c(F,_,A,R,g,12,a[5]),R=c(R,F,_,A,v,17,a[6]),A=c(A,R,F,_,y,22,a[7]),_=c(_,A,R,F,b,7,a[8]),F=c(F,_,A,R,w,12,a[9]),R=c(R,F,_,A,x,17,a[10]),A=c(A,R,F,_,k,22,a[11]),_=c(_,A,R,F,E,7,a[12]),F=c(F,_,A,R,S,12,a[13]),R=c(R,F,_,A,P,17,a[14]),_=u(_,A=c(A,R,F,_,C,22,a[15]),R,F,h,5,a[16]),F=u(F,_,A,R,v,9,a[17]),R=u(R,F,_,A,k,14,a[18]),A=u(A,R,F,_,s,20,a[19]),_=u(_,A,R,F,g,5,a[20]),F=u(F,_,A,R,x,9,a[21]),R=u(R,F,_,A,C,14,a[22]),A=u(A,R,F,_,m,20,a[23]),_=u(_,A,R,F,w,5,a[24]),F=u(F,_,A,R,P,9,a[25]),R=u(R,F,_,A,d,14,a[26]),A=u(A,R,F,_,b,20,a[27]),_=u(_,A,R,F,S,5,a[28]),F=u(F,_,A,R,p,9,a[29]),R=u(R,F,_,A,y,14,a[30]),_=l(_,A=u(A,R,F,_,E,20,a[31]),R,F,g,4,a[32]),F=l(F,_,A,R,b,11,a[33]),R=l(R,F,_,A,k,16,a[34]),A=l(A,R,F,_,P,23,a[35]),_=l(_,A,R,F,h,4,a[36]),F=l(F,_,A,R,m,11,a[37]),R=l(R,F,_,A,y,16,a[38]),A=l(A,R,F,_,x,23,a[39]),_=l(_,A,R,F,S,4,a[40]),F=l(F,_,A,R,s,11,a[41]),R=l(R,F,_,A,d,16,a[42]),A=l(A,R,F,_,v,23,a[43]),_=l(_,A,R,F,w,4,a[44]),F=l(F,_,A,R,E,11,a[45]),R=l(R,F,_,A,C,16,a[46]),_=f(_,A=l(A,R,F,_,p,23,a[47]),R,F,s,6,a[48]),F=f(F,_,A,R,y,10,a[49]),R=f(R,F,_,A,P,15,a[50]),A=f(A,R,F,_,g,21,a[51]),_=f(_,A,R,F,E,6,a[52]),F=f(F,_,A,R,d,10,a[53]),R=f(R,F,_,A,x,15,a[54]),A=f(A,R,F,_,h,21,a[55]),_=f(_,A,R,F,b,6,a[56]),F=f(F,_,A,R,C,10,a[57]),R=f(R,F,_,A,v,15,a[58]),A=f(A,R,F,_,S,21,a[59]),_=f(_,A,R,F,m,6,a[60]),F=f(F,_,A,R,k,10,a[61]),R=f(R,F,_,A,p,15,a[62]),A=f(A,R,F,_,w,21,a[63]),o[0]=o[0]+_|0,o[1]=o[1]+A|0,o[2]=o[2]+R|0,o[3]=o[3]+F|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=i._createHelper(s),t.HmacMD5=i._createHmacHelper(s)}(Math),_r.MD5);var Rr,Fr=Ar.exports,Or=J(Fr),Tr={exports:{}},Dr={exports:{}};function Lr(){return Rr||(Rr=1,Dr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+a[u];f+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,c=s,s=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,o,a,s}(Er())),Dr.exports}var jr,Ir,Nr={exports:{}};function zr(){return Ir||(Ir=1,Tr.exports=function(e){return function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,c=n.keySize,u=n.iterations;s.length<c;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var l=1;l<u;l++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*c,a}});t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}}(),e.EvpKDF}(Er(),Lr(),(jr||(jr=1,Nr.exports=(t=(e=Er()).lib.Base,r=e.enc.Utf8,void(e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))),Nr.exports))),Tr.exports;var e,t,r}var qr,Br={exports:{}};wr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var m=e[r],g=e[m],v=e[g],y=257*e[d]^16843008*d;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[d]=y<<24|y>>>8,f[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<c;d++){var m=n[u>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&h]^r[p++],g=n[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[p++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&f]^r[p++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[p++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[p++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[p++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Er(),Cr(),zr(),qr||(qr=1,Br.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var a=0;a<n;a++)e[r+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),e}(),d=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var c=o.create(a,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=u.create({keySize:t+r,hasher:i}).compute(e,n);else var a=u.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,m.create({key:a,iv:s,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Er(),zr())));var Mr=J(wr.exports),Ur={exports:{}};Ur.exports=function(e){return e.enc.Utf8}(Er());var $r=J(Ur.exports),Vr={},Hr={};function Qr(e,t){for(var r=t,n=0;n<e.length;n++){var i=n===e.length-1,o=e.charAt(n),a=r[o]||(r[o]={chars:{}});i&&(a.self=e),r=a.chars}}function Gr(e){if(0===e.length)return Vr;for(var t={},r=0,n=e;r<n.length;r++){Qr(n[r],t)}return t}function Wr(e){if(0===e.length)return Hr;for(var t={},r=0,n=e;r<n.length;r++){t[n[r]]=!0}return t}var Kr={},Jr={type:"String",optional:!0};function Yr(e){var t={type:"NoArgument",optional:!1};function r(e){if(t.type&&t.type!==e&&"NoArgument"!==t.type)throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(e,'".'));t.type=e}for(var n=0,i=e;n<i.length;n++){var o=i[n];"NoArgument"===o&&(t.optional=!0),"Formula"===o&&r("Formula"),"FormulaOfSelector"===o&&(r("Formula"),t.ofSelector=!0),"String"===o&&r("String"),"Selector"===o&&r("Selector")}return t}function Zr(e){for(var t=function(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){var i=n[r],o=e[i];if(o)for(var a=0,s=o;a<s.length;a++){var c=s[a];(t[c]||(t[c]=[])).push(i)}}return t}(e),r={},n=0,i=Object.keys(t);n<i.length;n++){var o=i[n],a=t[o];a&&(r[o]=Yr(a))}return r}var Xr=function(){return Xr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xr.apply(this,arguments)},en={},tn={wildcard:!0};function rn(e,t){return function(r,n){return!0===n?e:t(!0===r?e:r,n)}}function nn(e){return function(t,r){if(!r||!t)return r;if("object"!=typeof r||null===r)throw new Error("Unexpected syntax definition extension type: ".concat(r,"."));for(var n=Xr({},t),i=0,o=Object.entries(r);i<o.length;i++){var a=o[i],s=a[0],c=a[1],u=e[s];n[s]=u(t[s],c)}return n}}function on(e,t){return void 0!==t?t:e}function an(e,t){return t?e?e.concat(t):t:e}function sn(e,t){if(!t)return e;if(!e)return t;for(var r=Xr({},e),n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],a=o[0],s=o[1];if(s){var c=e[a];r[a]=c?c.concat(s):s}else delete r[a]}return r}var cn=function(e){return function(t,r){var n=e(t,r);if(!n)throw new Error("Syntax definition cannot be null or undefined.");return n}}(nn({baseSyntax:on,tag:rn(tn,nn({wildcard:on})),ids:on,classNames:on,namespace:rn(tn,nn({wildcard:on})),combinators:an,attributes:nn({operators:an,caseSensitivityModifiers:an,unknownCaseSensitivityModifiers:on}),pseudoClasses:nn({unknown:on,definitions:sn}),pseudoElements:nn({unknown:on,notation:on,definitions:function(e,t){return function(r,n){return t(e(r),e(n))}}((function(e){return Array.isArray(e)?{NoArgument:e}:e}),sn)})})),un={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},ln=cn(un,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),fn=cn(ln,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),hn=cn(fn,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has"]}}}),pn={css1:un,css2:ln,css3:fn,"selectors-3":fn,"selectors-4":hn,latest:hn,progressive:cn(hn,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}})};function dn(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e||"\\"===e||e>=" "}function mn(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e||e>=" "}function gn(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var vn={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\"},yn={" ":!0,"\t":!0,"\n":!0,"\r":!0,"\f":!0},bn={'"':!0,"'":!0},wn={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},xn="css-selector-parser parse error: ";var kn=function(){return kn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kn.apply(this,arguments)};function En(e){return function(t,r){var n;return(n={})[t]=function(t){return kn({type:e},t)},n[r]=function(t){return"object"==typeof t&&null!==t&&t.type===e},n}}kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn({},En("Selector")("selector","isSelector")),En("Rule")("rule","isRule")),En("TagName")("tagName","isTagName")),En("Id")("id","isId")),En("ClassName")("className","isClassName")),En("WildcardTag")("wildcardTag","isWildcardTag")),En("NamespaceName")("namespaceName","isNamespaceName")),En("WildcardNamespace")("wildcardNamespace","isWildcardNamespace")),En("NoNamespace")("noNamespace","isNoNamespace")),En("Attribute")("attribute","isAttribute")),En("PseudoClass")("pseudoClass","isPseudoClass")),En("PseudoElement")("pseudoElement","isPseudoElement")),En("String")("string","isString")),En("Formula")("formula","isFormula")),En("FormulaOfSelector")("formulaOfSelector","isFormulaOfSelector")),En("Substitution")("substitution","isSubstitution"));const Sn=function(e){void 0===e&&(e={});var t=e.syntax,r=void 0===t?"latest":t,n=e.substitutes,i=e.strict,o=void 0===i||i,a="object"==typeof r?r:pn[r];a.baseSyntax&&(a=cn(pn[a.baseSyntax],a));var s,c=a.tag?[!0,Boolean((s=a.tag,s?"boolean"==typeof s?tn:s:en).wildcard)]:[!1,!1],u=c[0],l=c[1],f=Boolean(a.ids),h=Boolean(a.classNames),p=Boolean(a.namespace),d=a.namespace&&(!0===a.namespace||!0===a.namespace.wildcard);if(p&&!u)throw new Error("".concat(xn,"Namespaces cannot be enabled while tags are disabled."));var m=Boolean(n),g=a.combinators?Gr(a.combinators):Vr,v=a.attributes?[!0,a.attributes.operators?Gr(a.attributes.operators):Vr,a.attributes.caseSensitivityModifiers?Wr(a.attributes.caseSensitivityModifiers):Hr,"accept"===a.attributes.unknownCaseSensitivityModifiers]:[!1,Vr,Hr,!1],y=v[0],b=v[1],w=v[2],x=v[3],k=x||Object.keys(w).length>0,E=a.pseudoClasses?[!0,a.pseudoClasses.definitions?Zr(a.pseudoClasses.definitions):Kr,"accept"===a.pseudoClasses.unknown]:[!1,Kr,!1],S=E[0],P=E[1],C=E[2],_=a.pseudoElements?[!0,"singleColon"===a.pseudoElements.notation||"both"===a.pseudoElements.notation,!a.pseudoElements.notation||"doubleColon"===a.pseudoElements.notation||"both"===a.pseudoElements.notation,a.pseudoElements.definitions?Zr(Array.isArray(a.pseudoElements.definitions)?{NoArgument:a.pseudoElements.definitions}:a.pseudoElements.definitions):Kr,"accept"===a.pseudoElements.unknown]:[!1,!1,!1,Kr,!1],A=_[0],R=_[1],F=_[2],O=_[3],T=_[4],D="",L=D.length,j=0,I="",N=function(e){return I===e},z=function(){return N("*")||dn(I)},q=function(e){j=e,I=D.charAt(j)},B=function(){j++,I=D.charAt(j)},M=function(){var e=I;return j++,I=D.charAt(j),e};function U(e){var t=Math.min(L-1,j),r=new Error("".concat(xn).concat(e," Pos: ").concat(t,"."));throw r.position=t,r.name="ParserError",r}function $(e,t){if(!e)return U(t)}var V=function(){$(j<L,"Unexpected end of input.")},H=function(){return j>=L},Q=function(e){$(j<L,'Expected "'.concat(e,'" but end of input reached.')),$(I===e,'Expected "'.concat(e,'" but "').concat(I,'" found.')),j++,I=D.charAt(j)};function G(e){var t=W(e,j);if(t)return j+=t.length,I=D.charAt(j),t}function W(e,t){var r=e[D.charAt(t)];if(r){var n=W(r.chars,t+1);if(n)return n;if(r.self)return r.self}}function K(){for(var e=M();gn(I);)e+=M();return N(" ")&&B(),String.fromCharCode(parseInt(e,16))}function J(e){var t="";for(Q(e);j<L;){if(N(e))return B(),t;if(N("\\")){B();var r=void 0;if(N(e))t+=e;else if(void 0!==(r=vn[I]))t+=r;else{if(gn(I)){t+=K();continue}t+=I}}else t+=I;B()}return t}function Y(){if(!dn(I))return null;for(var e="";N("-");)e+=I,B();for(o&&e.length>=2&&U("Identifiers cannot start with two hyphens with strict mode on."),wn[I]&&U("Identifiers cannot start with hyphens followed by digits.");j<L;)if(mn(I))e+=M();else{if(!N("\\"))break;B(),V(),gn(I)?e+=K():e+=M()}return e}function Z(){for(var e="";j<L&&!N(")");)if(N("\\")){if(B(),H()&&!o)return(e+"\\").trim();V(),gn(I)?e+=K():e+=M()}else e+=M();return e.trim()}function X(){for(;yn[I];)B()}function ee(e){void 0===e&&(e=!1),X();for(var t=[se(e)];N(",");)B(),X(),t.push(se(e));return{type:"Selector",rules:t}}function te(){var e;if(Q("["),X(),N("|")){$(p,"Namespaces are not enabled."),B();var t=Y();$(t,"Expected attribute name."),e={type:"Attribute",name:t,namespace:{type:"NoNamespace"}}}else if(N("*")){$(p,"Namespaces are not enabled."),$(d,"Wildcard namespace is not enabled."),B(),Q("|");var r=Y();$(r,"Expected attribute name."),e={type:"Attribute",name:r,namespace:{type:"WildcardNamespace"}}}else{var n=Y();if($(n,"Expected attribute name."),e={type:"Attribute",name:n},N("|")){var i=j;if(B(),dn(I)){$(p,"Namespaces are not enabled.");var a=Y();$(a,"Expected attribute name."),e={type:"Attribute",name:a,namespace:{type:"NamespaceName",name:n}}}else q(i)}}if($(e.name,"Expected attribute name."),X(),H()&&!o)return e;if(N("]"))B();else{if(e.operator=G(b),$(e.operator,"Expected a valid attribute selector operator."),X(),V(),bn[I])e.value={type:"String",value:J(I)};else if(m&&N("$")){B();var s=Y();$(s,"Expected substitute name."),e.value={type:"Substitution",name:s}}else{var c=Y();$(c,"Expected attribute value."),e.value={type:"String",value:c}}if(X(),H()&&!o)return e;if(!N("]")){var u=Y();if($(u,"Expected end of attribute selector."),e.caseSensitivityModifier=u,$(k,"Attribute case sensitivity modifiers are not enabled."),$(x||w[e.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),X(),H()&&!o)return e}Q("]")}return e}function re(){for(var e="";wn[I];)e+=M();return $(""!==e,"Formula parse error."),parseInt(e)}var ne=function(){return N("-")||N("+")||wn[I]};function ie(e,t,r){var n;if(N("(")){if(B(),X(),m&&N("$")){B();var i=Y();$(i,"Expected substitute name."),n={type:"Substitution",name:i}}else if("String"===r.type)$((n={type:"String",value:Z()}).value,"Expected ".concat(t," argument value."));else if("Selector"===r.type)n=ee(!0);else{if("Formula"!==r.type)return U("Invalid ".concat(t," signature."));var a=function(){if(N("e")||N("o")){var e=Y();if("even"===e)return X(),[2,0];if("odd"===e)return X(),[2,1]}var t,r=null,n=1;if(N("-")&&(B(),n=-1),ne()&&(N("+")&&B(),r=re(),!N("\\")&&!N("n")))return[0,r*n];if(null===r&&(r=1),r*=n,N("\\")?(B(),t=gn(I)?K():M()):t=M(),$("n"===t,'Formula parse error: expected "n".'),X(),N("+")||N("-")){var i=N("+")?1:-1;return B(),X(),[r,i*re()]}return[r,0]}(),s=a[0],c=a[1];n={type:"Formula",a:s,b:c},r.ofSelector&&(X(),(N("o")||N("\\"))&&($("of"===Y(),"Formula of selector parse error."),X(),n={type:"FormulaOfSelector",a:s,b:c,selector:se()}))}if(X(),H()&&!o)return n;Q(")")}else $(r.optional,"Argument is required for ".concat(t,' "').concat(e,'".'));return n}function oe(){if(N("*"))return $(l,"Wildcard tag name is not enabled."),B(),{type:"WildcardTag"};if(dn(I)){$(u,"Tag names are not enabled.");var e=Y();return $(e,"Expected tag name."),{type:"TagName",name:e}}return U("Expected tag name.")}function ae(){if(N("*")){var e=j;return B(),N("|")?(B(),z()?($(p,"Namespaces are not enabled."),$(d,"Wildcard namespace is not enabled."),(r=oe()).namespace={type:"WildcardNamespace"},r):(q(e),oe())):(q(e),oe())}if(N("|"))return $(p,"Namespaces are not enabled."),B(),(r=oe()).namespace={type:"NoNamespace"},r;if(dn(I)){var t=Y();if($(t,"Expected tag name."),!N("|"))return $(u,"Tag names are not enabled."),{type:"TagName",name:t};var r;e=j;return B(),z()?($(p,"Namespaces are not enabled."),(r=oe()).namespace={type:"NamespaceName",name:t},r):(q(e),{type:"TagName",name:t})}return U("Expected tag name.")}function se(e){var t,r;void 0===e&&(e=!1);var n={type:"Rule",items:[]};e&&((m=G(g))&&(n.combinator=m,X()));for(;j<L;)if(z())$(0===n.items.length,"Unexpected tag/namespace start."),n.items.push(ae());else if(N("|")){var i=j;if(B(),!z()){q(i);break}$(0===n.items.length,"Unexpected tag/namespace start."),q(i),n.items.push(ae())}else if(N(".")){$(h,"Class names are not enabled."),B();var o=Y();$(o,"Expected class name."),n.items.push({type:"ClassName",name:o})}else if(N("#")){$(f,"IDs are not enabled."),B();var a=Y();$(a,"Expected ID name."),n.items.push({type:"Id",name:a})}else if(N("["))$(y,"Attributes are not enabled."),n.items.push(te());else{if(!N(":"))break;var s=!1;B(),N(":")&&($(A,"Pseudo elements are not enabled."),$(F,"Pseudo elements double colon notation is not enabled."),s=!0,B());var c=Y();if($(s||c,"Expected pseudo-class name."),$(!s||c,"Expected pseudo-element name."),$(c,"Expected pseudo-class name."),$(!s||T||Object.prototype.hasOwnProperty.call(O,c),'Unknown pseudo-element "'.concat(c,'".')),A&&(s||!s&&R&&Object.prototype.hasOwnProperty.call(O,c))){var u={type:"PseudoElement",name:c};(p=ie(c,"pseudo-element",l=null!==(t=O[c])&&void 0!==t?t:T&&Jr))&&($("Formula"!==p.type&&"FormulaOfSelector"!==p.type,"Pseudo-elements cannot have formula argument."),u.argument=p),n.items.push(u)}else{var l;$(S,"Pseudo-classes are not enabled."),$(l=null!==(r=P[c])&&void 0!==r?r:C&&Jr,'Unknown pseudo-class: "'.concat(c,'".'));var p,d={type:"PseudoClass",name:c};(p=ie(c,"pseudo-class",l))&&(d.argument=p),n.items.push(d)}}if(0===n.items.length)return H()?U("Expected rule but end of input reached."):U('Expected rule but "'.concat(I,'" found.'));if(X(),!H()&&!N(",")&&!N(")")){var m=G(g);X(),n.nestedRule=se(),n.nestedRule.combinator=m}return n}return function(e){if("string"!=typeof e)throw new Error("".concat(xn,"Expected string input."));return L=(D=e).length,j=0,I=D.charAt(0),ee()}}({syntax:"selectors-4"});function Pn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return Sn(e)}function Cn(e){return Array.isArray(e.children)}function _n(e,t){const r=t[e.name];if(!e.value)return null!=r;e.value.type;let n=e.value.value,i=null==r?void 0:String(r);if("i"===e.caseSensitivityModifier&&(n=n.toLowerCase(),i&&(i=i.toLowerCase())),void 0!==r)switch(e.operator){case"=":return"string"==typeof i&&n===i;case"$=":return"string"==typeof r&&r.slice(-n.length)===n;case"*=":return"string"==typeof r&&r.includes(n);case"^=":return"string"==typeof r&&n===r.slice(0,n.length);case"~=":return Array.isArray(r)&&r.includes(n)||i===n}return!1}const An=new Set([9,10,12,13,32]),Rn="0".charCodeAt(0),Fn="9".charCodeAt(0);var On=J({trueFunc:function(){return!0},falseFunc:function(){return!1}});function Tn(e){return function(e){const t=e[0],r=e[1]-1;if(r<0&&t<=0)return On.falseFunc;if(-1===t)return e=>e<=r;if(0===t)return e=>e===r;if(1===t)return r<0?On.trueFunc:e=>e>=r;const n=Math.abs(t),i=(r%n+n)%n;return t>1?e=>e>=r&&e%n===i:e=>e<=r&&e%n===i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=o(),i=a();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=o(),s(),i=a()):n=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*i];function o(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function a(){const r=t;let n=0;for(;t<e.length&&e.charCodeAt(t)>=Rn&&e.charCodeAt(t)<=Fn;)n=10*n+(e.charCodeAt(t)-Rn),t++;return t===r?null:n}function s(){for(;t<e.length&&An.has(e.charCodeAt(t));)t++}}(e))}const Dn={}.hasOwnProperty;function Ln(e,t){const r=t||{};function n(t,...r){let i=n.invalid;const o=n.handlers;if(t&&Dn.call(t,e)){const r=String(t[e]);i=Dn.call(o,r)?o[r]:n.unknown}if(i)return i.call(this,t,...r)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const jn=Tn.default||Tn,In=Ln("name",{unknown:function(e){throw new Error("Unknown pseudo-selector `"+e.name+"`")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{is:zn,blank:Nn,empty:Nn,"first-child":function(e,t,r,n,i){return qn(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return qn(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const o=e.argument;!o||o.type;const a={type:"root",children:Cn(t)?t.children:[]},s={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return $n(s,a),s.results.length>0},"last-child":function(e,t,r,n,i){return qn(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return qn(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},not:function(e,t,r,n,i){return!zn(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){const o=Bn(e);return qn(i,e),"number"==typeof i.nodeIndex&&o(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){const o=Bn(e);return qn(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&o(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){const o=Bn(e);return qn(i,e),"number"==typeof i.typeIndex&&o(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){const o=Bn(e);return qn(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&o(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return qn(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return qn(i,e),1===i.typeCount},root:function(e,t,r,n){return t&&!n},scope:function(e,t,r,n,i){return t&&i.scopeNodes.includes(t)}}});function Nn(e,t){return Cn(t)?0===t.children.length:!("value"in t)}function zn(e,t,r,n,i){const o=e.argument;!o||o.type;const a={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return $n(a,t),a.results[0]===t}function qn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function Bn(e){let t=e._cachedFn;if(!t){const r=e.argument;if("Formula"!==r.type)throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=jn(r.a+"n+"+r.b),e._cachedFn=t}return t}function Mn(e,t,r,n,i){for(const o of e.items)if("Attribute"===o.type){if(!_n(o,t))return!1}else{if("Id"===o.type)throw new Error("Invalid selector: id");if("ClassName"===o.type)throw new Error("Invalid selector: class");if("PseudoClass"===o.type){if(!In(o,t,r,n,i))return!1}else{if("PseudoElement"===o.type)throw new Error("Invalid selector: `::"+o.name+"`");if("TagName"===o.type&&o.name!==t.type)return!1}}return!0}const Un=[];function $n(e,t){t&&Vn(e,[],t,void 0,void 0,t)}function Vn(e,t,r,n,i,o){let a={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0},s=e.rootQuery.rules;return i&&i!==o&&(s=e.rootQuery.rules.filter((e=>void 0===e.combinator||">"===e.combinator&&i===o))),a=function(e,t,r,n,i){const o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(Mn(s,r,n,i,e)){const t=s.nestedRule;if(t){Qn(o,"+"===t.combinator?"adjacentSibling":"~"===t.combinator?"generalSibling":">"===t.combinator?"directChild":"descendant",t)}else e.found=!0,e.results.includes(r)||e.results.push(r)}void 0===s.combinator?Qn(o,"descendant",s):"~"===s.combinator&&Qn(o,"generalSibling",s)}return o}(e,Hn(t,s),r,n,i),!Cn(r)||e.shallow||e.one&&e.found||function(e,t,r,n){const i=Hn(t.descendant,t.directChild);let o,a=-1;const s={count:0,types:new Map},c={count:0,types:new Map};for(;++a<r.children.length;)Gn(s,r.children[a]);a=-1;for(;++a<r.children.length;){const t=r.children[a].type.toUpperCase();e.nodeIndex=c.count,e.typeIndex=c.types.get(t)||0,e.nodeCount=s.count,e.typeCount=s.types.get(t);const u=Vn(e,Hn(i,o),r.children[a],a,r,n);if(o=Hn(u.generalSibling,u.adjacentSibling),e.one&&e.found)break;Gn(c,r.children[a])}}(e,a,r,o),a}function Hn(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:Un}function Qn(e,t,r){const n=e[t];n?n.push(r):e[t]=[r]}function Gn(e,t){const r=t.type.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}function Wn(e,t){const r=function(e,t){return{rootQuery:Pn(e),results:[],scopeNodes:t?!Cn(t)||"RootNode"!==t.type&&"root"!==t.type?[t]:t.children:[],one:!1,shallow:!1,found:!1,typeIndex:void 0,nodeIndex:void 0,typeCount:void 0,nodeCount:void 0}}(e,t);return r.one=!0,$n(r,t||void 0),r.results[0]}function Kn(e){if(e)throw e}var Jn=Object.prototype.hasOwnProperty,Yn=Object.prototype.toString,Zn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,ei=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Yn.call(e)},ti=function(e){if(!e||"[object Object]"!==Yn.call(e))return!1;var t,r=Jn.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Jn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Jn.call(e,t)},ri=function(e,t){Zn&&"__proto__"===t.name?Zn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ni=function(e,t){if("__proto__"===t){if(!Jn.call(e,t))return;if(Xn)return Xn(e,t).value}return e[t]},ii=function e(){var t,r,n,i,o,a,s=arguments[0],c=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<u;++c)if(null!=(t=arguments[c]))for(r in t)n=ni(s,r),s!==(i=ni(t,r))&&(l&&i&&(ti(i)||(o=ei(i)))?(o?(o=!1,a=n&&ei(n)?n:[]):a=n&&ti(n)?n:{},ri(s,{name:r,newValue:e(l,a,i)})):void 0!==i&&ri(s,{name:r,newValue:i}));return s},oi=J(ii);function ai(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function si(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(o,...a){const s=e[++r];let c=-1;if(o)n(o);else{for(;++c<t.length;)null!==a[c]&&void 0!==a[c]||(a[c]=t[c]);t=a,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let a;n&&t.push(i);try{a=e.apply(this,t)}catch(e){if(n&&r)throw e;return i(e)}n||(a instanceof Promise?a.then(o,i):a instanceof Error?i(a):o(a))}function i(e,...n){r||(r=!0,t(e,...n))}function o(e){i(null,e)}}(s,i)(...a):n(null,...a)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}function ci(e){return e&&"object"==typeof e?"position"in e||"type"in e?li(e.position):"start"in e||"end"in e?li(e):"line"in e||"column"in e?ui(e):"":""}function ui(e){return fi(e&&e.line)+":"+fi(e&&e.column)}function li(e){return ui(e&&e.start)+"-"+ui(e&&e.end)}function fi(e){return e&&"number"==typeof e?e:1}class hi extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!i.cause&&e&&(o=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof r){const e=r.indexOf(":");-1===e?i.ruleId=r:(i.source=r.slice(0,e),i.ruleId=r.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=ci(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}hi.prototype.file="",hi.prototype.name="",hi.prototype.reason="",hi.prototype.message="",hi.prototype.stack="",hi.prototype.column=void 0,hi.prototype.line=void 0,hi.prototype.ancestors=void 0,hi.prototype.cause=void 0,hi.prototype.fatal=void 0,hi.prototype.place=void 0,hi.prototype.ruleId=void 0,hi.prototype.source=void 0;const pi={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');di(e);let r,n=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else i<0&&(r=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else a<0&&(r=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));n===i?i=a:i<0&&(i=e.length);return e.slice(n,i)},dirname:function(e){if(di(e),0===e.length)return".";let t,r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},extname:function(e){di(e);let t,r=e.length,n=-1,i=0,o=-1,a=0;for(;r--;){const s=e.codePointAt(r);if(47!==s)n<0&&(t=!0,n=r+1),46===s?o<0?o=r:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=r+1;break}}if(o<0||n<0||0===a||1===a&&o===n-1&&o===i+1)return"";return e.slice(o,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)di(e[r]),e[r]&&(t=void 0===t?e[r]:t+"/"+e[r]);return void 0===t?".":function(e){di(e);const t=47===e.codePointAt(0);let r=function(e,t){let r,n,i="",o=0,a=-1,s=0,c=-1;for(;++c<=e.length;){if(c<e.length)r=e.codePointAt(c);else{if(47===r)break;r=47}if(47===r){if(a===c-1||1===s);else if(a!==c-1&&2===s){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(n=i.lastIndexOf("/"),n!==i.length-1){n<0?(i="",o=0):(i=i.slice(0,n),o=i.length-1-i.lastIndexOf("/")),a=c,s=0;continue}}else if(i.length>0){i="",o=0,a=c,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,c):i=e.slice(a+1,c),o=c-a-1;a=c,s=0}else 46===r&&s>-1?s++:s=-1}return i}(e,!t);0!==r.length||t||(r=".");r.length>0&&47===e.codePointAt(e.length-1)&&(r+="/");return t?"/"+r:r}(t)},sep:"/"};function di(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mi={cwd:function(){return"/"}};function gi(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function vi(e){if("string"==typeof e)e=new URL(e);else if(!gi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let r=-1;for(;++r<t.length;)if(37===t.codePointAt(r)&&50===t.codePointAt(r+1)){const e=t.codePointAt(r+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const yi=["history","path","basename","stem","extname","dirname"];class bi{constructor(e){let t;t=e?gi(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd=mi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,n=-1;for(;++n<yi.length;){const e=yi[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)yi.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?pi.basename(this.path):void 0}set basename(e){xi(e,"basename"),wi(e,"basename"),this.path=pi.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?pi.dirname(this.path):void 0}set dirname(e){ki(this.basename,"dirname"),this.path=pi.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?pi.extname(this.path):void 0}set extname(e){if(wi(e,"extname"),ki(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){gi(e)&&(e=vi(e)),xi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?pi.basename(this.path,this.extname):void 0}set stem(e){xi(e,"stem"),wi(e,"stem"),this.path=pi.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){const n=new hi(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function wi(e,t){if(e&&e.includes(pi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pi.sep+"`")}function xi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ki(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ei=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};Object.setPrototypeOf(n,t);const i=Object.getOwnPropertyNames(r);for(const e of i){const t=Object.getOwnPropertyDescriptor(r,e);t&&Object.defineProperty(n,e,t)}return n},Si={}.hasOwnProperty;class Pi extends Ei{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=si()}copy(){const e=new Pi;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(oi(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Ri("data",this.frozen),this.namespace[e]=t,this):Si.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ri("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(!1===r[0])continue;!0===r[0]&&(r[0]=void 0);const n=t.call(e,...r);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Ti(e),r=this.parser||this.Parser;return _i("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),_i("process",this.parser||this.Parser),Ai("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(n,i){const o=Ti(e),a=r.parse(o);function s(e,r){e||!r?i(e):n?n(r):t(void 0,r)}r.run(a,o,(function(e,t,n){if(e||!t||!n)return s(e);const i=t,o=r.stringify(i,n);!function(e){return"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)}(o)?n.result=o:n.value=o,s(e,n)}))}}processSync(e){let t,r=!1;return this.freeze(),_i("processSync",this.parser||this.Parser),Ai("processSync",this.compiler||this.Compiler),this.process(e,(function(e,n){r=!0,Kn(e),t=n})),Oi("processSync","process",r),t}run(e,t,r){Fi(e),this.freeze();const n=this.transformers;return r||"function"!=typeof t||(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(i,o){const a=Ti(t);n.run(e,a,(function(t,n,a){const s=n||e;t?o(t):i?i(s):r(void 0,s,a)}))}}runSync(e,t){let r,n=!1;return this.run(e,t,(function(e,t){Kn(e),r=t,n=!0})),Oi("runSync","run",n),r}stringify(e,t){this.freeze();const r=Ti(t),n=this.compiler||this.Compiler;return Ai("stringify",n),Fi(e),n(e,r)}use(e,...t){const r=this.attachers,n=this.namespace;if(Ri("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;s(t,r)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(n.settings=oi(!0,n.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){i(e[t])}}}function s(e,t){let n=-1,i=-1;for(;++n<r.length;)if(r[n][0]===e){i=n;break}if(-1===i)r.push([e,...t]);else if(t.length>0){let[n,...o]=t;const a=r[i][1];ai(a)&&ai(n)&&(n=oi(!0,a,n)),r[i]=[e,n,...o]}}}}const Ci=(new Pi).freeze();function _i(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ai(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ri(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Fi(e){if(!ai(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Oi(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ti(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new bi(e)}const Di={};function Li(e,t){const r=t||Di;return ji(e,"boolean"!=typeof r.includeImageAlt||r.includeImageAlt,"boolean"!=typeof r.includeHtml||r.includeHtml)}function ji(e,t,r){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ii(e.children,t,r)}return Array.isArray(e)?Ii(e,t,r):""}function Ii(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=ji(e[i],t,r);return n.join("")}const Ni={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",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:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",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:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},zi={}.hasOwnProperty;function qi(e){return!!zi.call(Ni,e)&&Ni[e]}function Bi(e,t,r,n){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Mi(e,t){return e.length>0?(Bi(e,e.length,0,t),e):t}const Ui={}.hasOwnProperty;function $i(e){const t={};let r=-1;for(;++r<e.length;)Vi(t,e[r]);return t}function Vi(e,t){let r;for(r in t){const n=(Ui.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;if(i)for(o in i){Ui.call(n,o)||(n[o]=[]);const e=i[o];Hi(n[o],Array.isArray(e)?e:e?[e]:[])}}}function Hi(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Bi(e,0,0,n)}function Qi(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCodePoint(r)}function Gi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wi=so(/\p{P}/u),Ki=so(/[A-Za-z]/),Ji=so(/[\dA-Za-z]/),Yi=so(/[#-'*+\--9=?A-Z^-~]/);function Zi(e){return null!==e&&(e<32||127===e)}const Xi=so(/\d/),eo=so(/[\dA-Fa-f]/),to=so(/[!-/:-@[-`{-~]/);function ro(e){return null!==e&&e<-2}function no(e){return null!==e&&(e<0||32===e)}function io(e){return-2===e||-1===e||32===e}function oo(e){return to(e)||Wi(e)}const ao=so(/\s/);function so(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function co(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const o=e.charCodeAt(r);let a="";if(37===o&&Ji(e.charCodeAt(r+1))&&Ji(e.charCodeAt(r+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(r+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function uo(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(io(n))return e.enter(r),a(n);return t(n)};function a(n){return io(n)&&o++<i?(e.consume(n),a):(e.exit(r),t(n))}}const lo={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),uo(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):ro(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const fo={tokenize:function(e){const t=this,r=[];let n,i,o,a=0;return s;function s(n){if(a<r.length){const i=r[a];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return Bi(t.events,o+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(a===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ho,l,f)(i)}function l(e){return n&&y(),v(a),h(e)}function f(e){return t.parser.lazy[t.now().line]=a!==r.length,o=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(ho,p,d)(r)}function p(e){return a++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):ro(r)?(e.consume(r),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(a),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;Bi(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},ho={tokenize:function(e,t,r){return uo(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function po(e){return null===e||no(e)||ao(e)?1:oo(e)?2:void 0}function mo(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}const go={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=po(n);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const c=e.exit("attentionSequence"),u=po(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===o?l:l&&(i||!f)),c._close=Boolean(42===o?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,o,a,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);vo(f,-s),vo(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[l][1].start=Object.assign({},a.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Mi(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Mi(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=Mi(c,mo(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=Mi(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=Mi(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,Bi(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function vo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const yo={name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Ki(t)?(e.consume(t),o):c(t)}function o(e){return 43===e||45===e||46===e||Ji(e)?(n=1,a(e)):c(e)}function a(t){return 58===t?(e.consume(t),n=0,s):(43===t||45===t||46===t||Ji(t))&&n++<32?(e.consume(t),a):(n=0,c(t))}function s(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||Zi(n)?r(n):(e.consume(n),s)}function c(t){return 64===t?(e.consume(t),u):Yi(t)?(e.consume(t),c):r(t)}function u(e){return Ji(e)?l(e):r(e)}function l(r){return 46===r?(e.consume(r),n=0,u):62===r?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):f(r)}function f(t){if((45===t||Ji(t))&&n++<63){const r=45===t?f:l;return e.consume(t),r}return r(t)}}};const bo={tokenize:function(e,t,r){return function(t){return io(t)?uo(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||ro(e)?t(e):r(e)}},partial:!0};const wo={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return io(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){const n=this;return function(t){if(io(t))return uo(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(n){return e.attempt(wo,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};const xo={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return to(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const ko={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,o=Ji,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=eo,u):(e.enter("characterReferenceValue"),i=7,o=Xi,u(t))}function u(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==Ji||qi(n.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return o(s)&&a++<i?(e.consume(s),u):r(s)}}};const Eo={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},So={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let i=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c}function c(t){return e.enter("codeFencedFence"),io(t)?uo(e,u,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===o?(e.enter("codeFencedFenceSequence"),l(t)):r(t)}function l(t){return t===o?(i++,e.consume(t),l):i>=s?(e.exit("codeFencedFenceSequence"),io(t)?uo(e,f,"whitespace")(t):f(t)):r(t)}function f(n){return null===n||ro(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let o,a=0,s=0;return function(t){return function(t){const r=n.events[n.events.length-1];return a=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===o?(s++,e.consume(t),c):s<3?r(t):(e.exit("codeFencedFenceSequence"),io(t)?uo(e,u,"whitespace")(t):u(t))}function u(r){return null===r||ro(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(Eo,p,y)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(r))}function l(t){return null===t||ro(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):io(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),uo(e,f,"whitespace")(t)):96===t&&t===o?r(t):(e.consume(t),l)}function f(t){return null===t||ro(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||ro(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===o?r(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&io(t)?uo(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||ro(t)?e.check(Eo,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||ro(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const Po={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),uo(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):r(e)}function o(t){return null===t?s(t):ro(t)?e.attempt(Co,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ro(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(r){return e.exit("codeIndented"),t(r)}}},Co={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):ro(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):uo(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):ro(e)?i(e):r(e)}},partial:!0};const _o={name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):ro(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||ro(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Ao(e){const t={};let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,Ro(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),a=e.slice(n,u),a.unshift(r),Bi(e,n,u-n+1,a))}}return!c}function Ro(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],u={};let l,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=o.pop();c.unshift([r,r+t.length-1]),Bi(e,r,2,t)}for(h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}const Fo={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):ro(t)?e.check(Oo,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return Ao(e),e}},Oo={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),uo(e,i,"linePrefix")};function i(i){if(null===i||ro(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function To(e,t,r,n,i,o,a,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||Zi(t))return r(t);return e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||ro(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return l||null!==i&&41!==i&&!no(i)?l<u&&40===i?(e.consume(i),l++,d):41===i?(e.consume(i),l--,d):null===i||32===i||40===i||Zi(i)?r(i):(e.consume(i),92===i?m:d):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}function Do(e,t,r,n,i,o){const a=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return c>999||null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):ro(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(t){return null===t||91===t||93===t||ro(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!io(t)),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}function Lo(e,t,r,n,i,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s;return r(t)};function s(r){return r===a?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),c(r))}function c(t){return t===a?(e.exit(o),s(a)):null===t?r(t):ro(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),uo(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||ro(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===a||92===t?(e.consume(t),u):u(t)}}function jo(e,t){let r;return function n(i){if(ro(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(io(i))return uo(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}const Io={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),function(t){return Do.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=Gi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):r(t)}function a(t){return no(t)?jo(e,s)(t):s(t)}function s(t){return To(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(No,u,u)(t)}function u(t){return io(t)?uo(e,l,"whitespace")(t):l(t)}function l(o){return null===o||ro(o)?(e.exit("definition"),n.parser.defined.push(i),t(o)):r(o)}}},No={tokenize:function(e,t,r){return function(t){return no(t)?jo(e,n)(t):r(t)};function n(t){return Lo(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return io(t)?uo(e,o,"whitespace")(t):o(t)}function o(e){return null===e||ro(e)?t(e):r(e)}},partial:!0};const zo={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return ro(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}};const qo={name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&n++<6?(e.consume(t),i):null===t||no(t)?(e.exit("atxHeadingSequence"),o(t)):r(t)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),a(r)):null===r||ro(r)?(e.exit("atxHeading"),t(r)):io(r)?uo(e,o,"whitespace")(r):(e.enter("atxHeadingText"),s(r))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||no(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},Bi(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Bo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Mo=["pre","script","style","textarea"],Uo={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,a,s,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),o=!0,p):63===s?(e.consume(s),i=3,n.interrupt?t:L):Ki(s)?(e.consume(s),a=String.fromCharCode(s),d):r(s)}function l(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,s=0,h):Ki(o)?(e.consume(o),i=4,n.interrupt?t:L):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:L):r(i)}function h(i){const o="CDATA[";return i===o.charCodeAt(s++)?(e.consume(i),6===s?n.interrupt?t:C:h):r(i)}function p(t){return Ki(t)?(e.consume(t),a=String.fromCharCode(t),d):r(t)}function d(s){if(null===s||47===s||62===s||no(s)){const c=47===s,u=a.toLowerCase();return c||o||!Mo.includes(u)?Bo.includes(a.toLowerCase())?(i=6,c?(e.consume(s),m):n.interrupt?t(s):C(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):o?g(s):v(s)):(i=1,n.interrupt?t(s):C(s))}return 45===s||Ji(s)?(e.consume(s),a+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:C):r(i)}function g(t){return io(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||Ki(t)?(e.consume(t),y):io(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||Ji(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):io(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):io(t)?(e.consume(t),w):k(t)}function x(t){return t===c?(e.consume(t),c=null,E):null===t||ro(t)?r(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||no(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||io(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return null===t||ro(t)?C(t):io(t)?(e.consume(t),P):r(t)}function C(t){return 45===t&&2===i?(e.consume(t),F):60===t&&1===i?(e.consume(t),O):62===t&&4===i?(e.consume(t),j):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),D):!ro(t)||6!==i&&7!==i?null===t||ro(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check($o,I,_)(t))}function _(t){return e.check(Vo,A,I)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return null===t||ro(t)?_(t):(e.enter("htmlFlowData"),C(t))}function F(t){return 45===t?(e.consume(t),L):C(t)}function O(t){return 47===t?(e.consume(t),a="",T):C(t)}function T(t){if(62===t){const r=a.toLowerCase();return Mo.includes(r)?(e.consume(t),j):C(t)}return Ki(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):C(t)}function D(t){return 93===t?(e.consume(t),L):C(t)}function L(t){return 62===t?(e.consume(t),j):45===t&&2===i?(e.consume(t),L):C(t)}function j(t){return null===t||ro(t)?(e.exit("htmlFlowData"),I(t)):(e.consume(t),j)}function I(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},$o={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(bo,t,r)}},partial:!0},Vo={tokenize:function(e,t,r){const n=this;return function(t){if(ro(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const Ho={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Ki(t)?(e.consume(t),E):r(t)}function c(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o=0,p):Ki(t)?(e.consume(t),v):r(t)}function u(t){return 45===t?(e.consume(t),h):r(t)}function l(t){return null===t?r(t):45===t?(e.consume(t),f):ro(t)?(a=l,T(t)):(e.consume(t),l)}function f(t){return 45===t?(e.consume(t),h):l(t)}function h(e){return 62===e?O(e):45===e?f(e):l(e)}function p(t){const n="CDATA[";return t===n.charCodeAt(o++)?(e.consume(t),6===o?d:p):r(t)}function d(t){return null===t?r(t):93===t?(e.consume(t),m):ro(t)?(a=d,T(t)):(e.consume(t),d)}function m(t){return 93===t?(e.consume(t),g):d(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):d(t)}function v(t){return null===t||62===t?O(t):ro(t)?(a=v,T(t)):(e.consume(t),v)}function y(t){return null===t?r(t):63===t?(e.consume(t),b):ro(t)?(a=y,T(t)):(e.consume(t),y)}function b(e){return 62===e?O(e):y(e)}function w(t){return Ki(t)?(e.consume(t),x):r(t)}function x(t){return 45===t||Ji(t)?(e.consume(t),x):k(t)}function k(t){return ro(t)?(a=k,T(t)):io(t)?(e.consume(t),k):O(t)}function E(t){return 45===t||Ji(t)?(e.consume(t),E):47===t||62===t||no(t)?S(t):r(t)}function S(t){return 47===t?(e.consume(t),O):58===t||95===t||Ki(t)?(e.consume(t),P):ro(t)?(a=S,T(t)):io(t)?(e.consume(t),S):O(t)}function P(t){return 45===t||46===t||58===t||95===t||Ji(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),_):ro(t)?(a=C,T(t)):io(t)?(e.consume(t),C):S(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,A):ro(t)?(a=_,T(t)):io(t)?(e.consume(t),_):(e.consume(t),R)}function A(t){return t===i?(e.consume(t),i=void 0,F):null===t?r(t):ro(t)?(a=A,T(t)):(e.consume(t),A)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||no(t)?S(t):(e.consume(t),R)}function F(e){return 47===e||62===e||no(e)?S(e):r(e)}function O(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),D}function D(t){return io(t)?uo(e,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),a(t)}}};const Qo={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if(("labelImage"===n.events[a][1].type||"labelLink"===n.events[a][1].type)&&!n.events[a][1]._balanced){i=n.events[a][1];break}return function(t){if(!i)return r(t);if(i._inactive)return l(t);return o=n.parser.defined.includes(Gi(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Go,u,o?u:l)(t):91===t?e.attempt(Wo,u,o?c:l)(t):o?u(t):l(t)}function c(t){return e.attempt(Ko,u,l)(t)}function u(e){return t(e)}function l(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,a=e.length,s=0;for(;a--;)if(r=e[a][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[a][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=a,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=a);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",u,t]],o=Mi(o,e.slice(n+1,n+s+3)),o=Mi(o,[["enter",l,t]]),o=Mi(o,mo(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),o=Mi(o,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),o=Mi(o,e.slice(i+1)),o=Mi(o,[["exit",c,t]]),Bi(e,n,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const r=e[t][1];"labelImage"!==r.type&&"labelLink"!==r.type&&"labelEnd"!==r.type||(e.splice(t+1,"labelImage"===r.type?4:2),r.type="data",t++)}return e}},Go={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return no(t)?jo(e,i)(t):i(t)}function i(t){return 41===t?u(t):To(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return no(t)?jo(e,s)(t):u(t)}function a(e){return r(e)}function s(t){return 34===t||39===t||40===t?Lo(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function c(t){return no(t)?jo(e,u)(t):u(t)}function u(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Wo={tokenize:function(e,t,r){const n=this;return function(t){return Do.call(n,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(Gi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},Ko={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Jo={name:"labelStartImage",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:Qo.resolveAll};const Yo={name:"labelStartLink",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:Qo.resolveAll};const Zo={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),uo(e,t,"linePrefix")}}};const Xo={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),function(e){return n=e,o(e)}(t)};function o(o){return o===n?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||ro(o))?(e.exit("thematicBreak"),t(o)):r(o)}function a(t){return t===n?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),io(t)?uo(e,o,"whitespace")(t):o(t))}}};const ea={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:Xi(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Xo,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return Xi(t)&&++a<10?(e.consume(t),s):(!n.interrupt||a<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(bo,n.interrupt?r:u,e.attempt(ta,f,l))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function l(t){return io(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(bo,i,o);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,uo(e,t,"listItemIndent",n.containerState.size+1)(r)}function o(r){return n.containerState.furtherBlankLines||!io(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(ra,t,a)(r))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,uo(e,e.attempt(ea,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},ta={tokenize:function(e,t,r){const n=this;return uo(e,(function(e){const i=n.events[n.events.length-1];return!io(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},ra={tokenize:function(e,t,r){const n=this;return uo(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const na={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i;return function(t){let a,s=n.events.length;for(;s--;)if("lineEnding"!==n.events[s][1].type&&"linePrefix"!==n.events[s][1].type&&"content"!==n.events[s][1].type){a="paragraph"===n.events[s][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||a))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return r(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),io(t)?uo(e,a,"lineSuffix")(t):a(t))}function a(n){return null===n||ro(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a;return e.push(["exit",a,t]),e}};const ia={tokenize:function(e){const t=this,r=e.attempt(bo,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,uo(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Fo,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const oa={resolveAll:ua()},aa=ca("string"),sa=ca("text");function ca(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,a);return o;function o(e){return c(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:ua("text"===e?la:void 0)}}function ua(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function la(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let o,a=i.length,s=-1,c=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)o=!0,c++;else if(-1!==e){a++;break}}if(c){const i={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+a,_bufferIndex:a?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function fa(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const c={consume:function(e){ro(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,n.push(a)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=Mi(a,e),p(),null!==a[a.length-1])return[];return v(t,0),u.events=mo(o,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function h(){const{line:e,column:t,offset:r,_index:i,_bufferIndex:o}=n;return{line:e,column:t,offset:r,_index:i,_bufferIndex:o}}function p(){let e;for(;n._index<a.length;){const t=a[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,o){let a,l,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return a=e,l=0,0===e.length?o:m(e[l])}function m(e){return function(r){p=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,o=Array.from(s);return{restore:a,from:i};function a(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=o,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++l<a.length?m(a[l]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Bi(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const ha={42:ea,43:ea,45:ea,48:ea,49:ea,50:ea,51:ea,52:ea,53:ea,54:ea,55:ea,56:ea,57:ea,62:wo},pa={91:Io},da={[-2]:Po,[-1]:Po,32:Po},ma={35:qo,42:Xo,45:[na,Xo],60:Uo,61:na,95:Xo,96:So,126:So},ga={38:ko,92:xo},va={[-5]:Zo,[-4]:Zo,[-3]:Zo,33:Jo,38:ko,42:go,60:[yo,Ho],91:Yo,92:[zo,xo],93:Qo,95:go,96:_o},ya={null:[go,oa]};var ba=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:pa,disable:{null:[]},document:ha,flow:ma,flowInitial:da,insideSpan:ya,string:ga,text:va});const wa=/[\0\t\n\r]/g;const xa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ka(e){return e.replace(xa,Ea)}function Ea(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Qi(r.slice(t?2:1),t?16:10)}return qi(r)||e}const Sa={}.hasOwnProperty;function Pa(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ee),autolinkProtocol:P,autolinkEmail:P,atxHeading:o(J),blockQuote:o(H),characterEscape:P,characterReference:P,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(G,a),codeTextData:P,data:P,codeFlowValue:P,definition:o(W),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(K),hardBreakEscape:o(Y),hardBreakTrailing:o(Y),htmlFlow:o(Z,a),htmlFlowData:P,htmlText:o(Z,a),htmlTextData:P,image:o(X),label:a,link:o(ee),listItem:o(re),listItemValue:h,listOrdered:o(te,f),listUnordered:o(te),paragraph:o(ne),reference:q,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(J),strong:o(ie),thematicBreak:o(ae)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:V,autolinkProtocol:$,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:M,characterReferenceMarkerNumeric:M,characterReferenceValue:U,codeFenced:c(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(v),codeText:c(O),codeTextData:C,data:C,definition:c(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(A),hardBreakTrailing:c(A),htmlFlow:c(R),htmlFlowData:C,htmlText:c(F),htmlTextData:C,image:c(D),label:j,labelText:L,lineEnding:_,link:c(T),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:I,resourceTitleString:N,resource:z,setextHeading:c(S),setextHeadingLineSequence:E,setextHeadingText:k,strong:c(),thematicBreak:c()}};_a(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const o={stack:[n],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:l,data:r},c=[];let f=-1;for(;++f<e.length;)if("listOrdered"===e[f][1].type||"listUnordered"===e[f][1].type)if("enter"===e[f][0])c.push(f);else{f=i(e,c.pop(),f)}for(f=-1;++f<e.length;){const r=t[e[f][0]];Sa.call(r,e[f][1].type)&&r[e[f][1].type].call(Object.assign({sliceSerialize:e[f][2].sliceSerialize},o),e[f][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Ra).call(o,void 0,e[0])}for(n.position={start:Ca(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ca(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)n=t.transforms[f](n)||n;return n}function i(e,t,r){let n,i,o,a,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?c++:c--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||a||c||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=i,e.splice(s,0,["enter",i,t[2]]),s++,r++,o=void 0,a=!0}}}return e[t][1]._spread=u,r}function o(e,t){return r;function r(r){s.call(this,e(r),r),t&&t.call(this,r)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:Ca(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+ci({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||Ra).call(this,e,n[0])}r.position.end=Ca(e.end)}function l(){return Li(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function d(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Gi(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let r=t[t.length-1];r&&"text"===r.type||(r=oe(),r.position={start:Ca(e.start),end:void 0},t.push(r)),this.stack.push(r)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ca(e.end)}function _(e){const r=this.stack[this.stack.length-1];if(this.data.atHardBreak){return r.children[r.children.length-1].position.end=Ca(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(P.call(this,e),C.call(this,e))}function A(){this.data.atHardBreak=!0}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=ka(t),r.identifier=Gi(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function I(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function z(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function M(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),r=this.data.characterReferenceType;let n;if(r)n=Qi(t,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0;else{n=qi(t)}const i=this.stack.pop();i.value+=n,i.position.end=Ca(e.end)}function $(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function H(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function W(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Y(){return{type:"break"}}function Z(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function te(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ne(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(r)(function(e){for(;!Ao(e););return e}(function(e){const t={defined:[],lazy:{},constructs:$i([ba,...(e||{}).extensions||[]]),content:r(lo),document:r(fo),flow:r(ia),string:r(aa),text:r(sa)};return t;function r(e){return function(r){return fa(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,a){const s=[];let c,u,l,f,h;for(i=r+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(wa.lastIndex=l,c=wa.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return a&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))}function Ca(e){return{line:e.line,column:e.column,offset:e.offset}}function _a(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?_a(e,n):Aa(e,n)}}function Aa(e,t){let r;for(r in t)if(Sa.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Ra(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ci({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is still open")}const Fa={}.hasOwnProperty;function Oa(e,t){let r,n=-1;if(t.extensions)for(;++n<t.extensions.length;)Oa(e,t.extensions[n]);for(r in t)if(Fa.call(t,r))switch(r){case"extensions":break;case"unsafe":case"join":Ta(e[r],t[r]);break;case"handlers":Da(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function Ta(e,t){t&&e.push(...t)}function Da(e,t){t&&Object.assign(e,t)}function La(e,t,r){return">"+(r?"":" ")+e}function ja(e,t){return Ia(e,t.inConstruct,!0)&&!Ia(e,t.notInConstruct,!1)}function Ia(e,t,r){if("string"==typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Na(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if("\n"===r.unsafe[i].character&&ja(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return"\\\n"}function za(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function qa(e,t,r){return(r?"":" ")+e}function Ba(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ma(e,t,r,n){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(r),o=r.enter("emphasis"),a=r.createTracker(n);let s=a.move(i);return s+=a.move(r.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}Ma.peek=function(e,t,r){return r.options.emphasis||"*"};const Ua=function(e,t,r,n,i){const o=$a(t);if(null!=r&&("number"!=typeof r||r<0||r===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==n||Ua(n)&&n.children))throw new Error("Expected parent node");if(null==n!=(null==r))throw new Error("Expected both parent and index");return!!Qa(e)&&o.call(i,e,r,n)},$a=function(e){if(null==e)return Ha;if("function"==typeof e)return Va(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=$a(e[r]);return Va(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Va(r);function r(r){const n=r;let i;for(i in e)if(n[i]!==t[i])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Va(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Va(e){return function(t,r,n){return Boolean(Qa(t)&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function Ha(){return!0}function Qa(e){return null!==e&&"object"==typeof e&&"type"in e}const Ga=[],Wa=!0,Ka=!1,Ja="skip";function Ya(e,t,r,n){let i;"function"==typeof t&&"function"!=typeof r?(n=r,r=t):i=t;const o=$a(i),a=n?-1:1;!function e(i,s,c){const u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(l,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return l;function l(){let u,l,f,h=Ga;if((!t||o(i,s,c[c.length-1]||void 0))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Wa,e];return null==e?Ga:[e]}(r(i,c)),h[0]===Ka))return h;if("children"in i&&i.children){const t=i;if(t.children&&h[0]!==Ja)for(l=(n?t.children.length:-1)+a,f=c.concat(t);l>-1&&l<t.children.length;){const r=t.children[l];if(u=e(r,l,f)(),u[0]===Ka)return u;l="number"==typeof u[1]?u[1]:l+a}}return h}}(e,void 0,[])()}function Za(e,t,r,n){let i,o,a;"function"==typeof t&&"function"!=typeof r?(o=void 0,a=t,i=r):(o=t,a=r,i=n),Ya(e,o,(function(e,t){const r=t[t.length-1],n=r?r.children.indexOf(e):void 0;return a(e,n,r)}),i)}function Xa(e,t){let r=!1;return Za(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,Ka})),Boolean((!e.depth||e.depth<3)&&Li(e)&&(t.options.setext||r))}function es(e){return e.value||""}function ts(e,t,r,n){const i=Ba(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("![");return u+=c.move(r.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),u+=c.move(")"),a(),u}function rs(e,t,r,n){const i=e.referenceType,o=r.enter("imageReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("![");const u=r.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),a();const l=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=l,o(),"full"!==i&&u&&u===f?"shortcut"===i?c=c.slice(0,-1):c+=s.move("]"):c+=s.move(f+"]"),c}function ns(e,t,r){let n=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){const e=r.unsafe[o],t=r.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function is(e,t){const r=Li(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function os(e,t,r,n){const i=Ba(r),o='"'===i?"Quote":"Apostrophe",a=r.createTracker(n);let s,c;if(is(e,r)){const t=r.stack;r.stack=[],s=r.enter("autolink");let n=a.move("<");return n+=a.move(r.containerPhrasing(e,{before:n,after:">",...a.current()})),n+=a.move(">"),s(),r.stack=t,n}s=r.enter("link"),c=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=r.enter("destinationRaw"),u+=a.move(r.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=r.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(r.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),s(),u}function as(e,t,r,n){const i=e.referenceType,o=r.enter("linkReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("[");const u=r.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),a();const l=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=l,o(),"full"!==i&&u&&u===f?"shortcut"===i?c=c.slice(0,-1):c+=s.move("]"):c+=s.move(f+"]"),c}function ss(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function cs(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}es.peek=function(){return"<"},ts.peek=function(){return"!"},rs.peek=function(){return"!"},ns.peek=function(){return"`"},os.peek=function(e,t,r){return is(e,r)?"<":"["},as.peek=function(){return"["};const us=$a(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function ls(e,t,r,n){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(r),o=r.enter("strong"),a=r.createTracker(n);let s=a.move(i+i);return s+=a.move(r.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}ls.peek=function(e,t,r){return r.options.strong||"*"};const fs={blockquote:function(e,t,r,n){const i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);const a=r.indentLines(r.containerFlow(e,o.current()),La);return i(),a},break:Na,code:function(e,t,r,n){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(r),o=e.value||"",a="`"===i?"GraveAccent":"Tilde";if(za(e,r)){const e=r.enter("codeIndented"),t=r.indentLines(o,qa);return e(),t}const s=r.createTracker(n),c=i.repeat(Math.max(function(e,t){const r=String(e);let n=r.indexOf(t),i=n,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==n;)n===i?++o>a&&(a=o):o=1,i=n+t.length,n=r.indexOf(t,i);return a}(o,i)+1,3)),u=r.enter("codeFenced");let l=s.move(c);if(e.lang){const t=r.enter(`codeFencedLang${a}`);l+=s.move(r.safe(e.lang,{before:l,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=r.enter(`codeFencedMeta${a}`);l+=s.move(" "),l+=s.move(r.safe(e.meta,{before:l,after:"\n",encode:["`"],...s.current()})),t()}return l+=s.move("\n"),o&&(l+=s.move(o+"\n")),l+=s.move(c),u(),l},definition:function(e,t,r,n){const i=Ba(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("definition");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("[");return u+=c.move(r.safe(r.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":"\n",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),a(),u},emphasis:Ma,hardBreak:Na,heading:function(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(Xa(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),a=r.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return n(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=r.enter("headingAtx"),c=r.enter("phrasing");o.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),s(),u},html:es,image:ts,imageReference:rs,inlineCode:ns,link:os,linkReference:as,list:function(e,t,r,n){const i=r.enter("list"),o=r.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(r):ss(r);const s=e.ordered?"."===a?")":".":function(e){const t=ss(e),r=e.options.bulletOther;if(!r)return"*"===t?"-":"*";if("*"!==r&&"+"!==r&&"-"!==r)throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}(r);let c=!(!t||!r.bulletLastUsed)&&a===r.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==r.stack[r.stack.length-1]||"listItem"!==r.stack[r.stack.length-2]||"list"!==r.stack[r.stack.length-3]||"listItem"!==r.stack[r.stack.length-4]||0!==r.indexStack[r.indexStack.length-1]||0!==r.indexStack[r.indexStack.length-2]||0!==r.indexStack[r.indexStack.length-3]||(c=!0),cs(r)===a&&t){let t=-1;for(;++t<e.children.length;){const r=e.children[t];if(r&&"listItem"===r.type&&r.children&&r.children[0]&&"thematicBreak"===r.children[0].type){c=!0;break}}}}c&&(a=s),r.bulletCurrent=a;const u=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=o,i(),u},listItem:function(e,t,r,n){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let o=r.bulletCurrent||ss(r);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);const c=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?o:o+" ".repeat(a-o.length))+e}));return c(),u},paragraph:function(e,t,r,n){const i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a},root:function(e,t,r,n){const i=e.children.some((function(e){return us(e)}));return(i?r.containerPhrasing:r.containerFlow).call(r,e,n)},strong:ls,text:function(e,t,r,n){return r.safe(e.value,n)},thematicBreak:function(e,t,r){const n=(cs(r)+(r.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(r));return r.options.ruleSpaces?n.slice(0,-1):n}},hs=[function(e,t,r,n){if("code"===t.type&&za(t,n)&&("list"===e.type||e.type===t.type&&za(e,n)))return!1;if("spread"in r&&"boolean"==typeof r.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&Xa(t,n)))return;return r.spread?1:0}}];const ps=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],ds=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ps},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ps},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:ps},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ps},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ps},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ps},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ps},{atBreak:!0,character:"~"}];function ms(e){return e.label||!e.identifier?e.label||"":ka(e.identifier)}function gs(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function vs(e,t,r,n){let i=n.join.length;for(;i--;){const o=n.join[i](e,t,r,n);if(!0===o||1===o)break;if("number"==typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const ys=/\r?\n|\r/g;function bs(e,t){const r=[];let n,i=0,o=0;for(;n=ys.exec(e);)a(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return a(e.slice(i)),r.join("");function a(e){r.push(t(e,o,!e))}}function ws(e,t){return e-t}function xs(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t;let a,s=-1,c=0;for(;a=r.exec(o);)n.push(a.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}function ks(e){const t=e||{},r=t.now||{};let n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:function(e){const t=e||"",r=t.split(/\r?\n|\r/g),a=r[r.length-1];return i+=r.length-1,o=1===r.length?o+a.length:1+a.length+n,t},current:function(){return{now:{line:i,column:o},lineShift:n}},shift:function(e){n+=e}}}function Es(e,t={}){const r={enter:function(e){return r.stack.push(e),function(){r.stack.pop()}},indentLines:bs,associationId:ms,containerPhrasing:_s,containerFlow:As,createTracker:ks,compilePattern:gs,safe:Rs,stack:[],unsafe:[...ds],join:[...hs],handlers:{...fs},options:{},indexStack:[],handle:void 0};Oa(r,t),r.options.tightDefinitions&&r.join.push(Cs),r.handle=Ln("type",{invalid:Ss,unknown:Ps,handlers:r.handlers});let n=r.handle(e,void 0,r,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return n&&10!==n.charCodeAt(n.length-1)&&13!==n.charCodeAt(n.length-1)&&(n+="\n"),n}function Ss(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Ps(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function Cs(e,t){if("definition"===e.type&&e.type===t.type)return 0}function _s(e,t){return function(e,t,r){const n=t.indexStack,i=e.children||[],o=[];let a=-1,s=r.before;n.push(-1);let c=t.createTracker(r);for(;++a<i.length;){const u=i[a];let l;if(n[n.length-1]=a,a+1<i.length){let r=t.handle.handlers[i[a+1].type];r&&r.peek&&(r=r.peek),l=r?r(i[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===s||"\n"===s)&&"html"===u.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",c=t.createTracker(r),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:s,after:l}))),s=o[o.length-1].slice(-1)}return n.pop(),o.join("")}(e,this,t)}function As(e,t){return function(e,t,r){const n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[];let s=-1;for(n.push(-1);++s<i.length;){const r=i[s];n[n.length-1]=s,a.push(o.move(t.handle(r,e,t,{before:"\n",after:"\n",...o.current()}))),"list"!==r.type&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(vs(r,i[s+1],e,t)))}return n.pop(),a.join("")}(e,this,t)}function Rs(e,t){return function(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!ja(e.stack,t))continue;const r=e.compilePattern(t);let o;for(;o=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=o.index+(e?o[1].length:0);i.includes(n)?(a[n].before&&!e&&(a[n].before=!1),a[n].after&&!r&&(a[n].after=!1)):(i.push(n),a[n]={before:e,after:r})}}i.sort(ws);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||e+1<u&&i[s+1]===e+1&&a[e].after&&!a[e+1].before&&!a[e+1].after||i[s-1]===e-1&&a[e].before&&!a[e-1].before&&!a[e-1].after||(c!==e&&o.push(xs(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(o.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):o.push("\\"))}return o.push(xs(n.slice(c,u),r.after)),o.join("")}(this,e,t)}function Fs(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}function Os(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ts(e,t,r){const n=$a((r||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const e=r[n];t.push([Ds(e[0]),Ls(e[1])])}return t}(t);let o=-1;for(;++o<i.length;)Ya(e,"text",a);function a(e,t){let r,a=-1;for(;++a<t.length;){const e=t[a],i=r?r.children:void 0;if(n(e,i?i.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=t[t.length-1],n=i[o][0],a=i[o][1];let s=0;const c=r.children,u=c.indexOf(e);let l=!1,f=[];n.lastIndex=0;let h=n.exec(e.value);for(;h;){const r=h.index,i={index:h.index,input:h.input,stack:[...t,e]};let o=a(...h,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?n.lastIndex=r+1:(s!==r&&f.push({type:"text",value:e.value.slice(s,r)}),Array.isArray(o)?f.push(...o):o&&f.push(o),s=r+h[0].length,l=!0),!n.global)break;h=n.exec(e.value)}l?(s<e.value.length&&f.push({type:"text",value:e.value.slice(s)}),r.children.splice(u,1,...f)):f=[e];return u+f.length}(e,t)}}function Ds(e){return"string"==typeof e?new RegExp(Os(e),"g"):e}function Ls(e){return"function"==typeof e?e:function(){return e}}const js="phrasing",Is=["autolink","link","image","label"];function Ns(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zs(e){this.config.enter.autolinkProtocol.call(this,e)}function qs(e){this.config.exit.autolinkProtocol.call(this,e)}function Bs(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ms(e){this.config.exit.autolinkEmail.call(this,e)}function Us(e){this.exit(e)}function $s(e){Ts(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Vs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Hs]],{ignore:["link","linkReference"]})}function Vs(e,t,r,n,i){let o="";if(!Qs(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Fs(e,"(");let o=Fs(e,")");for(;-1!==n&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}(r+n);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Hs(e,t,r,n){return!(!Qs(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Qs(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||ao(r)||oo(r))&&(!t||47!==r)}function Gs(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ws(){this.buffer()}function Ks(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Gi(this.sliceSerialize(e)).toLowerCase()}function Js(e){this.exit(e)}function Ys(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zs(){this.buffer()}function Xs(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Gi(this.sliceSerialize(e)).toLowerCase()}function ec(e){this.exit(e)}function tc(e,t,r,n){const i=r.createTracker(n);let o=i.move("[^");const a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function rc(e,t,r,n){const i=r.createTracker(n);let o=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(r.indentLines(r.containerFlow(e,i.current()),nc)),a(),o}function nc(e,t,r){return 0===t?e:(r?"":" ")+e}tc.peek=function(){return"["};const ic=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function oc(e){this.enter({type:"delete",children:[]},e)}function ac(e){this.exit(e)}function sc(e,t,r,n){const i=r.createTracker(n),o=r.enter("strikethrough");let a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function cc(e){return null==e?"":String(e)}function uc(e){return e.length}function lc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function fc(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function hc(e){this.exit(e),this.data.inTable=void 0}function pc(e){this.enter({type:"tableRow",children:[]},e)}function dc(e){this.exit(e)}function mc(e){this.enter({type:"tableCell",children:[]},e)}function gc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vc));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function vc(e,t){return"|"===t?t:e}function yc(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let n=fs.inlineCode(e,t,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n},table:function(e,t,r,n){return s(function(e,t,r){const n=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<n.length;)o[i]=c(n[i],t,r);return a(),o}(e,r,n),e.align)},tableCell:a,tableRow:function(e,t,r,n){const i=c(e,r,n),o=s([i]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,r,n){const i=r.enter("tableCell"),a=r.enter("phrasing"),s=r.containerPhrasing(e,{...n,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t={}){const r=(t.align||[]).concat(),n=t.stringLength||uc,i=[],o=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const r=[],i=[];let l=-1;for(e[u].length>c&&(c=e[u].length);++l<e[u].length;){const o=cc(e[u][l]);if(!1!==t.alignDelimiters){const e=n(o);i[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}r.push(o)}o[u]=r,a[u]=i}let l=-1;if("object"==typeof r&&"length"in r)for(;++l<c;)i[l]=lc(r[l]);else{const e=lc(r);for(;++l<c;)i[l]=e}l=-1;const f=[],h=[];for(;++l<c;){const e=i[l];let r="",n="";99===e?(r=":",n=":"):108===e?r=":":114===e&&(n=":");let o=!1===t.alignDelimiters?1:Math.max(1,s[l]-r.length-n.length);const a=r+"-".repeat(o)+n;!1!==t.alignDelimiters&&(o=r.length+o+n.length,o>s[l]&&(s[l]=o),h[l]=o),f[l]=a}o.splice(1,0,f),a.splice(1,0,h),u=-1;const p=[];for(;++u<o.length;){const e=o[u],r=a[u];l=-1;const n=[];for(;++l<c;){const o=e[l]||"";let a="",u="";if(!1!==t.alignDelimiters){const e=s[l]-(r[l]||0),t=i[l];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),u=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),u=a):u=" ".repeat(e)}!1===t.delimiterStart||l||n.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===o||!1===t.delimiterStart&&!l||n.push(" "),!1!==t.alignDelimiters&&n.push(a),n.push(o),!1!==t.alignDelimiters&&n.push(u),!1!==t.padding&&n.push(" "),!1===t.delimiterEnd&&l===c-1||n.push("|")}p.push(!1===t.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t,r){const n=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<n.length;)o[i]=a(n[i],0,t,r);return s(),o}}function bc(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function wc(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const r=e.children[0];if(r&&"text"===r.type){const n=t.children;let i,o=-1;for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){i=e;break}}i===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xc(e,t,r,n){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let c=fs.listItem(e,t,r,{...n,...s.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),c}sc.peek=function(){return"~"};const kc={tokenize:function(e,t,r){let n=0;return function t(o){if((87===o||119===o)&&n<3)return n++,e.consume(o),t;if(46===o&&3===n)return e.consume(o),i;return r(o)};function i(e){return null===e?r(e):t(e)}},partial:!0},Ec={tokenize:function(e,t,r){let n,i,o;return a;function a(t){return 46===t||95===t?e.check(Pc,c,s)(t):null===t||no(t)||ao(t)||45!==t&&oo(t)?c(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?n=!0:(i=n,n=void 0),e.consume(t),a}function c(e){return i||n||!o?r(e):t(e)}},partial:!0},Sc={tokenize:function(e,t){let r=0,n=0;return i;function i(a){return 40===a?(r++,e.consume(a),i):41===a&&n<r?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Pc,t,o)(a):null===a||no(a)||ao(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&n++,e.consume(t),i}},partial:!0},Pc={tokenize:function(e,t,r){return n;function n(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),n):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||no(a)||ao(a)?t(a):r(a)}function i(e){return null===e||40===e||91===e||no(e)||ao(e)?t(e):n(e)}function o(e){return Ki(e)?a(e):r(e)}function a(t){return 59===t?(e.consume(t),n):Ki(t)?(e.consume(t),a):r(t)}},partial:!0},Cc={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(e){return Ji(e)?r(e):t(e)}},partial:!0},_c={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!Tc.call(n,n.previous)||Ic(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(kc,e.attempt(Ec,e.attempt(Sc,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:Tc},Ac={tokenize:function(e,t,r){const n=this;let i="",o=!1;return function(t){if((72===t||104===t)&&Dc.call(n,n.previous)&&!Ic(n.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a;return r(t)};function a(t){if(Ki(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const r=i.toLowerCase();if("http"===r||"https"===r)return e.consume(t),s}return r(t)}function s(t){return 47===t?(e.consume(t),o?c:(o=!0,s)):r(t)}function c(t){return null===t||Zi(t)||no(t)||ao(t)||oo(t)?r(t):e.attempt(Ec,e.attempt(Sc,u),r)(t)}function u(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:Dc},Rc={tokenize:function(e,t,r){const n=this;let i,o;return function(t){if(!jc(t)||!Lc.call(n,n.previous)||Ic(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return jc(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(Cc,u,c)(t):45===t||95===t||Ji(t)?(o=!0,e.consume(t),s):u(t)}function c(t){return e.consume(t),i=!0,s}function u(a){return o&&i&&Ki(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):r(a)}},previous:Lc},Fc={};let Oc=48;for(;Oc<123;)Fc[Oc]=Rc,Oc++,58===Oc?Oc=65:91===Oc&&(Oc=97);function Tc(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||no(e)}function Dc(e){return!Ki(e)}function Lc(e){return!(47===e||jc(e))}function jc(e){return 43===e||45===e||46===e||95===e||Ji(e)}function Ic(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Fc[43]=Rc,Fc[45]=Rc,Fc[46]=Rc,Fc[95]=Rc,Fc[72]=[Rc,Ac],Fc[104]=[Rc,Ac],Fc[87]=[Rc,_c],Fc[119]=[Rc,_c];const Nc={tokenize:function(e,t,r){const n=this;return uo(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function zc(e,t,r){const n=this;let i=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return r(i);const s=Gi(n.sliceSerialize({start:a.end,end:n.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function qc(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function Bc(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){if(a>999||93===s&&!o||null===s||91===s||no(s))return r(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(Gi(n.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(s)}return no(s)||(o=!0),a++,e.consume(s),92===s?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}}function Mc(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(t)}function u(t){if(s>999||93===t&&!a||null===t||91===t||no(t))return r(t);if(93===t){e.exit("chunkString");const r=e.exit("gfmFootnoteDefinitionLabelString");return o=Gi(n.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return no(t)||(a=!0),s++,e.consume(t),92===t?l:u}function l(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),uo(e,h,"gfmFootnoteDefinitionWhitespace")):r(t)}function h(e){return t(e)}}function Uc(e,t,r){return e.check(bo,t,e.attempt(Nc,t,r))}function $c(e){e.exit("gfmFootnoteDefinition")}function Vc(e){let t=(e||{}).singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,o=this.events;let a=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const c=po(i);if(126===o)return a>1?n(o):(e.consume(o),a++,s);if(a<2&&!t)return n(o);const u=e.exit("strikethroughSequenceTemporary"),l=po(o);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(o)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},o={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},a=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&Bi(a,a.length,0,mo(s,e.slice(n+1,r),t)),Bi(a,a.length,0,[["exit",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Bi(e,n-1,r-n+3,a),r=n+a.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}class Hc{constructor(){this.map=[]}add(e,t,r){!function(e,t,r,n){let i=0;if(0===r&&0===n.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=r,void e.map[i][2].push(...n);i+=1}e.map.push([t,r,n])}(this,e,t,r)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}}function Qc(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if("enter"===i[0])"tableContent"===i[1].type&&n.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=n.length-1;n[e]="left"===n[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(r=!0);t+=1}return n}function Gc(e,t,r){const n=this;let i,o=0,a=0;return function(e){let t=n.events.length-1;for(;t>-1;){const e=n.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?n.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?w:s;if(o===w&&n.parser.lazy[n.now().line])return r(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return c(e);return i=!0,a+=1,c(e)}(t)}function c(t){return null===t?r(t):ro(t)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):r(t):io(t)?uo(e,c,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),u(t)))}function u(t){return null===t||124===t||no(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return 92===t||124===t?(e.consume(t),u):u(t)}function f(t){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(t):(e.enter("tableDelimiterRow"),i=!1,io(t)?uo(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?d(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return io(t)?uo(e,d,"whitespace")(t):d(t)}function d(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||ro(t)?y(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return io(t)?uo(e,y,"whitespace")(t):y(t)}function y(r){return 124===r?h(r):(null===r||ro(r))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(r)):b(r)}function b(e){return r(e)}function w(t){return e.enter("tableRow"),x(t)}function x(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),x):null===r||ro(r)?(e.exit("tableRow"),t(r)):io(r)?uo(e,x,"whitespace")(r):(e.enter("data"),k(r))}function k(t){return null===t||124===t||no(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:k)}function E(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function Wc(e,t){let r,n,i,o=-1,a=!0,s=0,c=[0,0,0,0],u=[0,0,0,0],l=!1,f=0;const h=new Hc;for(;++o<e.length;){const p=e[o],d=p[1];"enter"===p[0]?"tableHead"===d.type?(l=!1,0!==f&&(Jc(h,t,f,r,n),n=void 0,f=0),r={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(o,0,[["enter",r,t]])):"tableRow"===d.type||"tableDelimiterRow"===d.type?(a=!0,i=void 0,c=[0,0,0,0],u=[0,o+1,0,0],l&&(l=!1,n={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(o,0,[["enter",n,t]])),s="tableDelimiterRow"===d.type?2:n?3:1):!s||"data"!==d.type&&"tableDelimiterMarker"!==d.type&&"tableDelimiterFiller"!==d.type?"tableCellDivider"===d.type&&(a?a=!1:(0!==c[1]&&(u[0]=u[1],i=Kc(h,t,c,s,void 0,i)),c=u,u=[c[1],o,0,0])):(a=!1,0===u[2]&&(0!==c[1]&&(u[0]=u[1],i=Kc(h,t,c,s,void 0,i),c=[0,0,0,0]),u[2]=o)):"tableHead"===d.type?(l=!0,f=o):"tableRow"===d.type||"tableDelimiterRow"===d.type?(f=o,0!==c[1]?(u[0]=u[1],i=Kc(h,t,c,s,o,i)):0!==u[1]&&(i=Kc(h,t,u,s,o,i)),s=0):!s||"data"!==d.type&&"tableDelimiterMarker"!==d.type&&"tableDelimiterFiller"!==d.type||(u[3]=o)}for(0!==f&&Jc(h,t,f,r,n),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Qc(t.events,o))}return e}function Kc(e,t,r,n,i,o){const a=1===n?"tableHeader":2===n?"tableDelimiter":"tableData";0!==r[0]&&(o.end=Object.assign({},Yc(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const s=Yc(t.events,r[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(r[1],0,[["enter",o,t]]),0!==r[2]){const i=Yc(t.events,r[2]),o=Yc(t.events,r[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(r[2],0,[["enter",a,t]]),2!==n){const n=t.events[r[2]],i=t.events[r[3]];if(n[1].end=Object.assign({},i[1].end),n[1].type="chunkText",n[1].contentType="text",r[3]>r[2]+1){const t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},Yc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Jc(e,t,r,n,i){const o=[],a=Yc(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function Yc(e,t){const r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}const Zc={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return no(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):r(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):r(t)}function a(n){return ro(n)?t(n):io(n)?e.check({tokenize:Xc},t,r)(n):r(n)}}};function Xc(e,t,r){return uo(e,(function(e){return null===e?r(e):t(e)}),"whitespace")}const eu={};function tu(){return{type:"break"}}const ru=null,nu=34,iu=39,ou=40,au=41,su=61,cu=62,uu=91,lu=93,fu=94,hu=120,pu=32,du=4,mu="whitespace",gu="linePrefix",vu="labelLink",yu="labelImage",bu="labelMarker",wu="labelEnd",xu="reference",ku="referenceMarker",Eu="referenceString",Su="resource",Pu="resourceDestination",Cu="resourceDestinationLiteral",_u="resourceDestinationLiteralMarker",Au="resourceDestinationRaw",Ru="resourceDestinationString",Fu="resourceMarker",Ou="resourceTitle",Tu="resourceTitleMarker",Du="resourceTitleString",Lu="blockQuote",ju="blockQuotePrefix",Iu="blockQuoteMarker",Nu="blockQuotePrefixWhitespace",zu="chunkString";function qu(e,t){const r=t.referenceType;let n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=n:i.push({type:"text",value:n}),i}function Bu(e){const t=e.spread;return null==t?e.children.length>1:t}const Mu=$u("end"),Uu=$u("start");function $u(e){return function(t){const r=t&&t.position&&t.position[e]||{};if("number"==typeof r.line&&r.line>0&&"number"==typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"==typeof r.offset&&r.offset>-1?r.offset:void 0}}}const Vu=9,Hu=32;function Qu(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const o=[];for(;n;)o.push(Gu(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return o.push(Gu(t.slice(i),i>0,!1)),o.join("")}function Gu(e,t,r){let n=0,i=e.length;if(t){let t=e.codePointAt(n);for(;t===Vu||t===Hu;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(i-1);for(;t===Vu||t===Hu;)i--,t=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}const Wu={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){const r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=co(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let a,s=e.footnoteCounts.get(n);void 0===s?(s=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(n,s);const c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return qu(e,t);const i={src:co(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const r={src:co(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return qu(e,t);const i={href:co(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const r={href:co(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),i=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=Bu(r[n])}return t}(r):Bu(t),o={},a=[];if("boolean"==typeof t.checked){const e=n[0];let r;e&&"element"===e.type&&"p"===e.tagName?r=e:(r={type:"element",tagName:"p",properties:{},children:[]},n.unshift(r)),r.children.length>0&&r.children.unshift({type:"text",value:" "}),r.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const e=n[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const c=n[n.length-1];c&&(i||"element"!==c.type||"p"!==c.tagName)&&a.push({type:"text",value:"\n"});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){const r={},n=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(r.start=t.start);++i<n.length;){const e=n[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const r={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],r),i.push(r)}if(r.length>0){const n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Uu(t.children[1]),a=Mu(t.children[t.children.length-1]);o&&a&&(n.position={start:o,end:a}),i.push(n)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,i=0===(n?n.indexOf(t):1)?"th":"td",o=r&&"table"===r.type?r.align:void 0,a=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<a;){const r=t.children[s],n={},a=o?o[s]:void 0;a&&(n.align=a);let u={type:"element",tagName:i,properties:n,children:[]};r&&(u.children=e.all(r),e.patch(r,u),u=e.applyData(r,u)),c.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const r={type:"text",value:Qu(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:Ku,yaml:Ku,definition:Ku,footnoteDefinition:Ku};function Ku(){}var Ju,Yu={exports:{}};Ju=Yu,function(){var e;function t(e){for(var t,r,n,i,o=1,a=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return a[o++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):null};s<c;++s)if(t=e[s],l)switch(l=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=p(),t){case"b":u+=parseInt(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=Ju.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var Zu=J(Yu.exports);const Xu=Object.assign(el(Error),{eval:el(EvalError),range:el(RangeError),reference:el(ReferenceError),syntax:el(SyntaxError),type:el(TypeError),uri:el(URIError)});function el(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?Zu(t,...r):t;return new e(n)}}const tl={}.hasOwnProperty,rl={yaml:"-",toml:"+"};function nl(e){const t=[];let r=-1;const n=Array.isArray(e)?e:e?[e]:["yaml"];for(;++r<n.length;)t[r]=il(n[r]);return t}function il(e){let t=e;if("string"==typeof t){if(!tl.call(rl,t))throw Xu("Missing matter definition for `%s`",t);t={type:t,marker:rl[t]}}else if("object"!=typeof t)throw Xu("Expected matter to be an object, not `%j`",t);if(!tl.call(t,"type"))throw Xu("Missing `type` in matter `%j`",t);if(!tl.call(t,"fence")&&!tl.call(t,"marker"))throw Xu("Missing `marker` or `fence` in matter `%j`",t);return t}function ol(e){const t=e.anywhere,r=e.type,n=r+"Fence",i=n+"Sequence",o=r+"Value",a={tokenize:function(e,t,r){let o=0;return function(t){if(t===s.charCodeAt(o))return e.enter(n),e.enter(i),a(t);return r(t)};function a(t){return o===s.length?(e.exit(i),io(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(o++)?(e.consume(t),a):r(t)}function c(t){return io(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(i){return null===i||ro(i)?(e.exit(n),t(i)):r(i)}},partial:!0};let s,c=0;return{tokenize:function(u,l,f){const h=this;return function(o){const a=h.now();if(1===a.column&&(1===a.line||t)&&(s=al(e,"open"),c=0,o===s.charCodeAt(c)))return u.enter(r),u.enter(n),u.enter(i),p(o);return f(o)};function p(e){return c===s.length?(u.exit(i),io(e)?(u.enter("whitespace"),d(e)):m(e)):e===s.charCodeAt(c++)?(u.consume(e),p):f(e)}function d(e){return io(e)?(u.consume(e),d):(u.exit("whitespace"),m(e))}function m(t){return ro(t)?(u.exit(n),u.enter("lineEnding"),u.consume(t),u.exit("lineEnding"),s=al(e,"close"),c=0,u.attempt(a,b,g)):f(t)}function g(e){return null===e||ro(e)?y(e):(u.enter(o),v(e))}function v(e){return null===e||ro(e)?(u.exit(o),y(e)):(u.consume(e),v)}function y(e){return null===e?f(e):(u.enter("lineEnding"),u.consume(e),u.exit("lineEnding"),u.attempt(a,b,g))}function b(e){return u.exit(r),l(e)}},concrete:!0}}function al(e,t){return e.marker?sl(e.marker,t).repeat(3):sl(e.fence,t)}function sl(e,t){return"string"==typeof e?e:e[t]}function cl(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function ul(e){const t=this.resume(),r=this.stack[this.stack.length-1];this.exit(e),r.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function ll(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function fl(e){const t=hl(e,"open"),r=hl(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function hl(e,t){return e.marker?pl(e.marker,t).repeat(3):pl(e.fence,t)}function pl(e,t){return"string"==typeof e?e:e[t]}const dl=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ml={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function gl(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function vl(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function yl(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||gl(e)}const bl=String.fromCharCode,wl=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function xl(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,o,a=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(o=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=p();for(a--;++a<=e.length;)if(10===u&&(f=(o?o[s]:0)||1),u=e.charCodeAt(a),38===u){const i=e.charCodeAt(a+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=bl(u),f++;continue}const o=a+1;let s,l=o,g=o;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?yl:"decimal"===s?gl:vl;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=bl(t),"named"===s&&dl.includes(b)&&(v=b,y=qi(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&qi(b);e&&(v=b,y=e)}let k=1+g-o,E="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)d(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(d(r,k),y=""):yl(t)?y="":d(r,k)}else d(r,k)}E=y}else{x||d(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if(kl(e))d(7,k),E=bl(65533);else if(e in ml)d(6,k),E=ml[e];else{let t="";El(e)&&d(6,k),e>65535&&(e-=65536,t+=bl(e>>>10|55296),e=56320|1023&e),E=t+bl(e)}}else"named"!==s&&d(4,k);else;if(E){m(),h=p(),a=g-1,f+=g-o+1,n.push(E);const r=p();r.offset++,t.reference&&t.reference.call(t.referenceContext,E,{start:h,end:r},e.slice(o-1,g)),h=r}else b=e.slice(o-1,g),c+=b,f+=b.length,a=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=bl(u),f++);return n.join("");function p(){return{line:l,column:f,offset:a+((i?i.offset:0)||0)}}function d(e,r){let n;t.warning&&(n=p(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,wl[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:p()}),c="")}}function kl(e){return e>=55296&&e<=57343||e>1114111}function El(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Sl(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Pl(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Cl={}.hasOwnProperty,_l=/^[^\t\n\r "#'.<=>`}]+$/;function Al(e){Ol.call(this,"containerDirective",e)}function Rl(e){Ol.call(this,"leafDirective",e)}function Fl(e){Ol.call(this,"textDirective",e)}function Ol(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function Tl(e){const t=this.stack[this.stack.length-1];"containerDirective"===t.type||"leafDirective"===t.type||t.type,t.name=this.sliceSerialize(e)}function Dl(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function Ll(e){this.exit(e)}function jl(){this.data.directiveAttributes=[],this.buffer()}function Il(e){this.data.directiveAttributes.push(["id",xl(this.sliceSerialize(e),{attribute:!0})])}function Nl(e){this.data.directiveAttributes.push(["class",xl(this.sliceSerialize(e),{attribute:!0})])}function zl(e){const t=this.data.directiveAttributes;t[t.length-1][1]=xl(this.sliceSerialize(e),{attribute:!0})}function ql(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Bl(){const e=this.data.directiveAttributes,t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.data.directiveAttributes=void 0,this.resume();const n=this.stack[this.stack.length-1];"containerDirective"===n.type||"leafDirective"===n.type||n.type,n.attributes=t}function Ml(e){this.exit(e)}function Ul(e,t,r,n){const i=r.createTracker(n),o=function(e){let t=0;"containerDirective"===e.type?(Ya(e,(function(e,r){if("containerDirective"===e.type){let e=r.length,n=0;for(;e--;)"containerDirective"===r[e].type&&n++;n>t&&(t=n)}})),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t)}(e),a=r.enter(e.type);let s,c=i.move(o+(e.name||""));if("containerDirective"===e.type){const t=(e.children||[])[0];s=$l(t)?t:void 0}else s=e;if(s&&s.children&&s.children.length>0){const t=r.enter("label"),n=`${e.type}Label`,o=r.enter(n);c+=i.move("["),c+=i.move(r.containerPhrasing(s,{...i.current(),before:c,after:"]"})),c+=i.move("]"),o(),t()}if(c+=i.move(function(e,t){const r=t.options.quote||'"',n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},o=[];let a,s,c,u;for(u in i)if(Cl.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=_l.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(_l.test(t[i])?n:r).push(t[i]);a=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else o.push(l(u,e))}a&&o.unshift(a);s&&o.unshift(s);c&&o.unshift(c);return o.length>0?"{"+o.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Sl(e,Object.assign({format:Pl},t))}(t,{subset:n})+r:"")}}(e,r)),"containerDirective"===e.type){let t=e;$l((e.children||[])[0])&&(t=Object.assign({},e,{children:e.children.slice(1)})),t&&t.children&&t.children.length>0&&(c+=i.move("\n"),c+=i.move(r.containerFlow(t,i.current()))),c+=i.move("\n"+o)}return a(),c}function $l(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}function Vl(e,t,r,n,i,o,a,s,c,u,l,f,h,p,d){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=a,y(t)):46===t?(m=s,y(t)):58===t||95===t||Ki(t)?(e.enter(o),e.enter(c),e.consume(t),x):d&&io(t)?uo(e,v,"whitespace")(t):!d&&no(t)?jo(e,v)(t):R(t)}function y(t){const r=m+"Marker";return e.enter(o),e.enter(m),e.enter(r),e.consume(t),e.exit(r),b}function b(t){if(null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||no(t))return r(t);const n=m+"Value";return e.enter(n),e.consume(t),w}function w(t){if(null===t||34===t||39===t||60===t||61===t||62===t||96===t)return r(t);if(35===t||46===t||125===t||no(t)){const r=m+"Value";return e.exit(r),e.exit(m),e.exit(o),v(t)}return e.consume(t),w}function x(t){return 45===t||46===t||58===t||95===t||Ji(t)?(e.consume(t),x):(e.exit(c),d&&io(t)?uo(e,k,"whitespace")(t):!d&&no(t)?jo(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),E):(e.exit(o),v(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||d&&ro(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):d&&io(t)?uo(e,E,"whitespace")(t):!d&&no(t)?jo(e,E)(t):(e.enter(f),e.enter(p),e.consume(t),g=void 0,S)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||no(t)?(e.exit(p),e.exit(f),e.exit(o),v(t)):(e.consume(t),S)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(o),A):(e.enter(f),C(t))}function C(t){return t===g?(e.exit(f),P(t)):null===t?r(t):ro(t)?d?r(t):jo(e,C)(t):(e.enter(p),e.consume(t),_)}function _(t){return t===g||null===t||ro(t)?(e.exit(p),C(t)):(e.consume(t),_)}function A(e){return 125===e||no(e)?v(e):R(e)}function R(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(n),t):r(o)}}function Hl(e,t,r,n,i,o,a){let s,c=0,u=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),l};function l(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),f(r))}function f(t){if(93===t&&!u)return d(t);const r=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=r),s=r,h(t)}function h(t){return null===t||c>999||91===t&&++u>32?r(t):93!==t||u--?ro(t)?a?r(t):(e.consume(t),e.exit("chunkText"),f):(e.consume(t),92===t?p:h):(e.exit("chunkText"),d(t))}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,h):h(t)}function d(r){return e.exit(o),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}}function Ql(e,t,r,n){const i=this;return function(t){if(Ki(t))return e.enter(n),e.consume(t),o;return r(t)};function o(a){return 45===a||95===a||Ji(a)?(e.consume(a),o):(e.exit(n),45===i.previous||95===i.previous?r(a):t(a))}}Ul.peek=function(){return":"};const Gl={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),Ql.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(Wl,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(Kl,f,f)(t):f(t)}function f(t){return uo(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?p(i):ro(i)?n.interrupt?t(i):e.attempt(Jl,d,p)(i):r(i)}function p(r){return e.exit("directiveContainer"),t(r)}function d(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,o?uo(e,g,"linePrefix",o+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=r),a=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return ro(t)?e.check(Jl,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return uo(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),uo(e,o,"whitespace")(t))}function o(n){return null===n||ro(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},Wl={tokenize:function(e,t,r){return Hl(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},Kl={tokenize:function(e,t,r){return Vl(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},Jl={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const Yl={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),Ql.call(n,e,o,r,"directiveLeafName")):r(t)}function o(t){return 91===t?e.attempt(Zl,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(Xl,s,s)(t):s(t)}function s(t){return uo(e,c,"whitespace")(t)}function c(n){return null===n||ro(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},Zl={tokenize:function(e,t,r){return Hl(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},Xl={tokenize:function(e,t,r){return Vl(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const ef={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),Ql.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(tf,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(rf,a,a)(t):a(t)}function a(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},tf={tokenize:function(e,t,r){return Hl(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},rf={tokenize:function(e,t,r){return Vl(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const nf=function(e){if(null==e)return af;if("string"==typeof e)return function(e){return of(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=nf(e[r]);return of(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return of(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return of(e);throw new Error("Expected function, string, or object as test")};function of(e){return function(t,...r){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...r)))}}function af(){return!0}function sf(e){return""+e+""}const cf=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=nf(t),o=n?-1:1;!function e(a,s,c){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(l,"name",{value:"node ("+sf(a.type+(e?"<"+e+">":""))+")"})}return l;function l(){let u,l,f,h=[];if((!t||i(a,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(a,c)),false===h[0]))return h;if(a.children&&"skip"!==h[0])for(l=(n?a.children.length:-1)+o,f=c.concat(a);l>-1&&l<a.children.length;){if(u=e(a.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+o}return h}}(e,void 0,[])()};const uf=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),cf(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)},lf={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};function ff(e,t){return function(){return e.apply(t,arguments)}}const{toString:hf}=Object.prototype,{getPrototypeOf:pf}=Object,df=(e=>t=>{const r=hf.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),mf=e=>(e=e.toLowerCase(),t=>df(t)===e),gf=e=>t=>typeof t===e,{isArray:vf}=Array,yf=gf("undefined");const bf=mf("ArrayBuffer");const wf=gf("string"),xf=gf("function"),kf=gf("number"),Ef=e=>null!==e&&"object"==typeof e,Sf=e=>{if("object"!==df(e))return!1;const t=pf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Pf=mf("Date"),Cf=mf("File"),_f=mf("Blob"),Af=mf("FileList"),Rf=mf("URLSearchParams");function Ff(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),vf(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function Of(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const Tf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Df=e=>!yf(e)&&e!==Tf;const Lf=(jf="undefined"!=typeof Uint8Array&&pf(Uint8Array),e=>jf&&e instanceof jf);var jf;const If=mf("HTMLFormElement"),Nf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),zf=mf("RegExp"),qf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ff(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},Bf="abcdefghijklmnopqrstuvwxyz",Mf="0123456789",Uf={DIGIT:Mf,ALPHA:Bf,ALPHA_DIGIT:Bf+Bf.toUpperCase()+Mf};const $f=mf("AsyncFunction");var Vf={isArray:vf,isArrayBuffer:bf,isBuffer:function(e){return null!==e&&!yf(e)&&null!==e.constructor&&!yf(e.constructor)&&xf(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||xf(e.append)&&("formdata"===(t=df(e))||"object"===t&&xf(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bf(e.buffer),t},isString:wf,isNumber:kf,isBoolean:e=>!0===e||!1===e,isObject:Ef,isPlainObject:Sf,isUndefined:yf,isDate:Pf,isFile:Cf,isBlob:_f,isRegExp:zf,isFunction:xf,isStream:e=>Ef(e)&&xf(e.pipe),isURLSearchParams:Rf,isTypedArray:Lf,isFileList:Af,forEach:Ff,merge:function e(){const{caseless:t}=Df(this)&&this||{},r={},n=(n,i)=>{const o=t&&Of(r,i)||i;Sf(r[o])&&Sf(n)?r[o]=e(r[o],n):Sf(n)?r[o]=e({},n):vf(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ff(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(Ff(t,((t,n)=>{r&&xf(t)?e[n]=ff(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&pf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:df,kindOfTest:mf,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(vf(e))return e;let t=e.length;if(!kf(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:If,hasOwnProperty:Nf,hasOwnProp:Nf,reduceDescriptors:qf,freezeMethods:e=>{qf(e,((t,r)=>{if(xf(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];xf(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return vf(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Of,global:Tf,isContextDefined:Df,ALPHABET:Uf,generateString:(e=16,t=Uf.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&xf(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ef(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=vf(e)?[]:{};return Ff(e,((e,t)=>{const o=r(e,n+1);!yf(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:$f,isThenable:e=>e&&(Ef(e)||xf(e))&&xf(e.then)&&xf(e.catch)};function Hf(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}Vf.inherits(Hf,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:Vf.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Qf=Hf.prototype,Gf={};["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","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Gf[e]={value:e}})),Object.defineProperties(Hf,Gf),Object.defineProperty(Qf,"isAxiosError",{value:!0}),Hf.from=(e,t,r,n,i,o)=>{const a=Object.create(Qf);return Vf.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Hf.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Wf=x.Stream,Kf=Jf;function Jf(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}w.inherits(Jf,Wf),Jf.create=function(e,t){var r=new this;for(var n in t=t||{})r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),r.pauseStream&&e.pause(),r},Object.defineProperty(Jf.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),Jf.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},Jf.prototype.resume=function(){this._released||this.release(),this.source.resume()},Jf.prototype.pause=function(){this.source.pause()},Jf.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},Jf.prototype.pipe=function(){var e=Wf.prototype.pipe.apply(this,arguments);return this.resume(),e},Jf.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},Jf.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}};var Yf=w,Zf=x.Stream,Xf=Kf,eh=th;function th(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Yf.inherits(th,Zf),th.create=function(e){var t=new this;for(var r in e=e||{})t[r]=e[r];return t},th.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},th.prototype.append=function(e){if(th.isStreamLike(e)){if(!(e instanceof Xf)){var t=Xf.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},th.prototype.pipe=function(e,t){return Zf.prototype.pipe.call(this,e,t),this.resume(),e},th.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},th.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){th.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},th.prototype._pipeNext=function(e){if(this._currentStream=e,th.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},th.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},th.prototype.write=function(e){this.emit("data",e)},th.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},th.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},th.prototype.end=function(){this._reset(),this.emit("end")},th.prototype.destroy=function(){this._reset(),this.emit("close")},th.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},th.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},th.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},th.prototype._emitError=function(e){this._reset(),this.emit("error",e)};var rh=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)},nh=function(e){var t=!1;return rh((function(){t=!0})),function(r,n){t?e(r,n):rh((function(){e(r,n)}))}};var ih=function(e){Object.keys(e.jobs).forEach(oh.bind(e)),e.jobs={}};function oh(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var ah=nh,sh=ih,ch=function(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=function(e,t,r,n){var i;i=2==e.length?e(r,ah(n)):e(r,t,ah(n));return i}(t,i,e[i],(function(e,t){i in r.jobs&&(delete r.jobs[i],e?sh(r):r.results[i]=t,n(e,r.results))}))};var uh=function(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};t&&n.keyedList.sort(r?t:function(r,n){return t(e[r],e[n])});return n};var lh=ih,fh=nh,hh=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,lh(this),fh(e)(null,this.results)};var ph=ch,dh=uh,mh=hh,gh=function(e,t,r){var n=dh(e);for(;n.index<(n.keyedList||e).length;)ph(e,t,n,(function(e,t){e?r(e,t):0!==Object.keys(n.jobs).length||r(null,n.results)})),n.index++;return mh.bind(n,r)};var vh={exports:{}},yh=ch,bh=uh,wh=hh;function xh(e,t){return e<t?-1:e>t?1:0}vh.exports=function(e,t,r,n){var i=bh(e,r);return yh(e,t,i,(function r(o,a){o?n(o,a):(i.index++,i.index<(i.keyedList||e).length?yh(e,t,i,r):n(null,i.results))})),wh.bind(i,n)},vh.exports.ascending=xh,vh.exports.descending=function(e,t){return-1*xh(e,t)};var kh=vh.exports,Eh=kh,Sh=function(e,t,r){return Eh(e,t,null,r)};var Ph={parallel:gh,serial:Sh,serialOrdered:kh},Ch=eh,_h=w,Ah=i,Rh=k,Fh=E,Oh=S.parse,Th=P,Dh=x.Stream,Lh=C,jh=Ph,Ih=function(e,t){return Object.keys(t).forEach((function(r){e[r]=e[r]||t[r]})),e},Nh=zh;function zh(e){if(!(this instanceof zh))return new zh(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ch.call(this),e=e||{})this[t]=e[t]}_h.inherits(zh,Ch),zh.LINE_BREAK="\r\n",zh.DEFAULT_CONTENT_TYPE="application/octet-stream",zh.prototype.append=function(e,t,r){"string"==typeof(r=r||{})&&(r={filename:r});var n=Ch.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),_h.isArray(t))this._error(new Error("Arrays are not supported."));else{var i=this._multiPartHeader(e,t,r),o=this._multiPartFooter();n(i),n(t),n(o),this._trackLength(i,t,r)}},zh.prototype._trackLength=function(e,t,r){var n=0;null!=r.knownLength?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:"string"==typeof t&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+zh.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof Dh)&&(r.knownLength||this._valuesToMeasure.push(t))},zh.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):Th.stat(e.path,(function(r,n){var i;r?t(r):(i=n.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(r){e.pause(),t(null,+r.headers["content-length"])})),e.resume()):t("Unknown stream")},zh.prototype._multiPartHeader=function(e,t,r){if("string"==typeof r.header)return r.header;var n,i=this._getContentDisposition(t,r),o=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof r.header&&Ih(s,r.header),s)s.hasOwnProperty(c)&&null!=(n=s[c])&&(Array.isArray(n)||(n=[n]),n.length&&(a+=c+": "+n.join("; ")+zh.LINE_BREAK));return"--"+this.getBoundary()+zh.LINE_BREAK+a+zh.LINE_BREAK},zh.prototype._getContentDisposition=function(e,t){var r,n;return"string"==typeof t.filepath?r=Ah.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Ah.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Ah.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n},zh.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=Lh.lookup(e.name)),!r&&e.path&&(r=Lh.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),r||!t.filepath&&!t.filename||(r=Lh.lookup(t.filepath||t.filename)),r||"object"!=typeof e||(r=zh.DEFAULT_CONTENT_TYPE),r},zh.prototype._multiPartFooter=function(){return function(e){var t=zh.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},zh.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+zh.LINE_BREAK},zh.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r},zh.prototype.setBoundary=function(e){this._boundary=e},zh.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},zh.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)"function"!=typeof this._streams[r]&&(e=Buffer.isBuffer(this._streams[r])?Buffer.concat([e,this._streams[r]]):Buffer.concat([e,Buffer.from(this._streams[r])]),"string"==typeof this._streams[r]&&this._streams[r].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(zh.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},zh.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},zh.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},zh.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},zh.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?jh.parallel(this._valuesToMeasure,this._lengthRetriever,(function(r,n){r?e(r):(n.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},zh.prototype.submit=function(e,t){var r,n,i={method:"post"};return"string"==typeof e?(e=Oh(e),n=Ih({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=Ih(e,i)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(e.headers),r="https:"==n.protocol?Fh.request(n):Rh.request(n),this.getLength(function(e,n){if(e&&"Unknown stream"!==e)this._error(e);else if(n&&r.setHeader("Content-Length",n),this.pipe(r),t){var i,o=function(e,n){return r.removeListener("error",o),r.removeListener("response",i),t.call(this,e,n)};i=o.bind(this,null),r.on("error",o),r.on("response",i)}}.bind(this)),r},zh.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},zh.prototype.toString=function(){return"[object FormData]"};var qh=J(Nh);function Bh(e){return Vf.isPlainObject(e)||Vf.isArray(e)}function Mh(e){return Vf.endsWith(e,"[]")?e.slice(0,-2):e}function Uh(e,t,r){return e?e.concat(t).map((function(e,t){return e=Mh(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const $h=Vf.toFlatObject(Vf,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Vh(e,t,r){if(!Vf.isObject(e))throw new TypeError("target must be an object");t=t||new(qh||FormData);const n=(r=Vf.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Vf.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Vf.isSpecCompliantForm(t);if(!Vf.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Vf.isDate(e))return e.toISOString();if(!s&&Vf.isBlob(e))throw new Hf("Blob is not supported. Use a Buffer instead.");return Vf.isArrayBuffer(e)||Vf.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(Vf.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Vf.isArray(e)&&function(e){return Vf.isArray(e)&&!e.some(Bh)}(e)||(Vf.isFileList(e)||Vf.endsWith(r,"[]"))&&(s=Vf.toArray(e)))return r=Mh(r),s.forEach((function(e,n){!Vf.isUndefined(e)&&null!==e&&t.append(!0===a?Uh([r],n,o):null===a?r:r+"[]",c(e))})),!1;return!!Bh(e)||(t.append(Uh(i,r,o),c(e)),!1)}const l=[],f=Object.assign($h,{defaultVisitor:u,convertValue:c,isVisitable:Bh});if(!Vf.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Vf.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Vf.forEach(r,(function(r,o){!0===(!(Vf.isUndefined(r)||null===r)&&i.call(t,r,Vf.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])})),l.pop()}}(e),t}function Hh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Qh(e,t){this._pairs=[],e&&Vh(e,this,t)}const Gh=Qh.prototype;function Wh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kh(e,t,r){if(!t)return e;const n=r&&r.encode||Wh,i=r&&r.serialize;let o;if(o=i?i(t,r):Vf.isURLSearchParams(t)?t.toString():new Qh(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Gh.append=function(e,t){this._pairs.push([e,t])},Gh.toString=function(e){const t=e?function(t){return e.call(this,t,Hh)}:Hh;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Jh=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Vf.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Yh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zh={isNode:!0,classes:{URLSearchParams:S.URLSearchParams,FormData:qh,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const Xh="undefined"!=typeof window&&"undefined"!=typeof document,ep=(tp="undefined"!=typeof navigator&&navigator.product,Xh&&["ReactNative","NativeScript","NS"].indexOf(tp)<0);var tp;const rp="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var np={...Object.freeze({__proto__:null,hasBrowserEnv:Xh,hasStandardBrowserEnv:ep,hasStandardBrowserWebWorkerEnv:rp}),...Zh};function ip(e){function t(e,r,n,i){let o=e[i++];const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&Vf.isArray(n)?n.length:o,s)return Vf.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a;n[o]&&Vf.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&Vf.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!a}if(Vf.isFormData(e)&&Vf.isFunction(e.entries)){const r={};return Vf.forEachEntry(e,((e,n)=>{t(function(e){return Vf.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const op={transitional:Yh,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Vf.isObject(e);i&&Vf.isHTMLForm(e)&&(e=new FormData(e));if(Vf.isFormData(e))return n&&n?JSON.stringify(ip(e)):e;if(Vf.isArrayBuffer(e)||Vf.isBuffer(e)||Vf.isStream(e)||Vf.isFile(e)||Vf.isBlob(e))return e;if(Vf.isArrayBufferView(e))return e.buffer;if(Vf.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Vh(e,new np.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return np.isNode&&Vf.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Vf.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Vh(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(Vf.isString(e))try{return(t||JSON.parse)(e),Vf.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||op.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&Vf.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Hf.from(e,Hf.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:np.classes.FormData,Blob:np.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vf.forEach(["delete","get","head","post","put","patch"],(e=>{op.headers[e]={}}));var ap=op;const sp=Vf.toObjectSet(["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"]);const cp=Symbol("internals");function up(e){return e&&String(e).trim().toLowerCase()}function lp(e){return!1===e||null==e?e:Vf.isArray(e)?e.map(lp):String(e)}function fp(e,t,r,n,i){return Vf.isFunction(n)?n.call(this,t,r):(i&&(t=r),Vf.isString(t)?Vf.isString(n)?-1!==t.indexOf(n):Vf.isRegExp(n)?n.test(t):void 0:void 0)}let hp=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=up(t);if(!i)throw new Error("header name must be a non-empty string");const o=Vf.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=lp(e))}const o=(e,t)=>Vf.forEach(e,((e,r)=>i(e,r,t)));return Vf.isPlainObject(e)||e instanceof this.constructor?o(e,t):Vf.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&sp[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=up(e)){const r=Vf.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Vf.isFunction(t))return t.call(this,e,r);if(Vf.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=up(e)){const r=Vf.findKey(this,e);return!(!r||void 0===this[r]||t&&!fp(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=up(e)){const i=Vf.findKey(r,e);!i||t&&!fp(0,r[i],i,t)||(delete r[i],n=!0)}}return Vf.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!fp(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Vf.forEach(this,((n,i)=>{const o=Vf.findKey(r,i);if(o)return t[o]=lp(n),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();a!==i&&delete t[i],t[a]=lp(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vf.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Vf.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[cp]=this[cp]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=up(e);t[n]||(!function(e,t){const r=Vf.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return Vf.isArray(e)?e.forEach(n):n(e),this}};hp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vf.reduceDescriptors(hp.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Vf.freezeMethods(hp);var pp=hp;function dp(e,t){const r=this||ap,n=t||r,i=pp.from(n.headers);let o=n.data;return Vf.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function mp(e){return!(!e||!e.__CANCEL__)}function gp(e,t,r){Hf.call(this,null==e?"canceled":e,Hf.ERR_CANCELED,t,r),this.name="CanceledError"}function vp(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Hf("Request failed with status code "+r.status,[Hf.ERR_BAD_REQUEST,Hf.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function yp(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}Vf.inherits(gp,Hf,{__CANCEL__:!0});var bp=S.parse,wp={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},xp=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function kp(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var Ep,Sp,Pp,Cp,_p,Ap,Rp,Fp,Op,Tp=function(e){var t="string"==typeof e?bp(e):e||{},r=t.protocol,n=t.host,i=t.port;if("string"!=typeof n||!n||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(kp("npm_config_no_proxy")||kp("no_proxy")).toLowerCase();if(!r)return!0;if("*"===r)return!1;return r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),i=n?n[1]:r,o=n?parseInt(n[2]):0;return!(!o||o===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!xp.call(e,i)):e!==i)}))}(n=n.replace(/:\d*$/,""),i=parseInt(i)||wp[r]||0))return"";var o=kp("npm_config_"+r+"_proxy")||kp(r+"_proxy")||kp("npm_config_proxy")||kp("all_proxy");return o&&-1===o.indexOf("://")&&(o=r+"://"+o),o},Dp={exports:{}},Lp={exports:{}},jp={exports:{}};function Ip(){return Sp?Ep:(Sp=1,Ep=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)})}function Np(){if(Cp)return Pp;Cp=1;const e=R,t=Ip(),r=process.env;let n;function i(i){const o=function(i){if(!1===n)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!i.isTTY&&!0!==n)return 0;const o=n?1:0;if("win32"===process.platform){const t=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in r))||"codeship"===r.CI_NAME?1:o;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM,o)}(i);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?n=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(n=!0),"FORCE_COLOR"in r&&(n=0===r.FORCE_COLOR.length||0!==parseInt(r.FORCE_COLOR,10)),Pp={supportsColor:i,stdout:i(process.stdout),stderr:i(process.stderr)}}function zp(){if(Ap)return _p;Ap=1;var e=1e3,t=60*e,r=60*t,n=24*r,i=7*n,o=365.25*n;function a(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return _p=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(i){var o=Math.abs(i);if(o>=n)return a(i,o,n,"day");if(o>=r)return a(i,o,r,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=n)return Math.round(i/n)+"d";if(o>=r)return Math.round(i/r)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},_p}function qp(){if(Fp)return Rp;return Fp=1,Rp=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=zp(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},Rp}function Bp(){return Op||(Op=1,function(e,t){const r=A,n=w;t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${n} `;r[0]=o+r[0].split("\n").join("\n"+o),r.push(i+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=Np();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=qp()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}}(jp,jp.exports)),jp.exports}var Mp,Up,$p,Vp={exports:{}};function Hp(){return Up||(Up=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Lp.exports=(Mp||(Mp=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=qp()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Vp,Vp.exports)),Vp.exports):Lp.exports=Bp()),Lp.exports}var Qp=S,Gp=Qp.URL,Wp=k,Kp=E,Jp=x.Writable,Yp=_,Zp=function(){if(!$p){try{$p=Hp()("follow-redirects")}catch(e){}"function"!=typeof $p&&($p=function(){})}$p.apply(null,arguments)},Xp=["abort","aborted","connect","error","socket","timeout"],ed=Object.create(null);Xp.forEach((function(e){ed[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var td=fd("ERR_INVALID_URL","Invalid URL",TypeError),rd=fd("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),nd=fd("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),id=fd("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),od=fd("ERR_STREAM_WRITE_AFTER_END","write after end");function ad(e,t){Jp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function sd(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",o=r[i]=e[n],a=t[n]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,n,o){if(pd(e)){var a;try{a=ud(new Gp(e))}catch(t){a=Qp.parse(e)}if(!pd(a.protocol))throw new td({input:e});e=a}else Gp&&e instanceof Gp?e=ud(e):(o=n,n=e,e={protocol:i});return dd(n)&&(o=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,pd(n.host)||pd(n.hostname)||(n.hostname="::1"),Yp.equal(n.protocol,i,"protocol mismatch"),Zp("options",n),new ad(n,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=a.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function cd(){}function ud(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function ld(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function fd(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function hd(e){for(var t of Xp)e.removeListener(t,ed[t]);e.on("error",cd),e.abort()}function pd(e){return"string"==typeof e||e instanceof String}function dd(e){return"function"==typeof e}ad.prototype=Object.create(Jp.prototype),ad.prototype.abort=function(){hd(this._currentRequest),this.emit("abort")},ad.prototype.write=function(e,t,r){if(this._ending)throw new od;if(!pd(e)&&!function(e){return"object"==typeof e&&"length"in e}(e))throw new TypeError("data should be a string, Buffer or Uint8Array");dd(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new id),this.abort()):r&&r()},ad.prototype.end=function(e,t,r){if(dd(e)?(r=e,e=t=null):dd(t)&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},ad.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},ad.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},ad.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),o()}),e),n(t)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){ad.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(ad.prototype,e,{get:function(){return this._currentRequest[e]}})})),ad.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},ad.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(n._redirectable=this,Xp))n.on(i,ed[i]);if(this._currentUrl=/^\//.test(this._options.path)?Qp.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(n===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var r=s[o++];n.finished||n.write(r.data,r.encoding,e)}else a._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},ad.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(hd(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new nd);else{var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ld(/^content-/i,this._options.headers));var a,s=ld(/^host$/i,this._options.headers),c=Qp.parse(this._currentUrl),u=s||c.host,l=/^\w+:/.test(r)?this._currentUrl:Qp.format(Object.assign(c,{host:u}));try{a=Qp.resolve(l,r)}catch(e){return void this.emit("error",new rd({cause:e}))}Zp("redirecting to",a),this._isRedirect=!0;var f=Qp.parse(a);if(Object.assign(this._options,f),(f.protocol!==c.protocol&&"https:"!==f.protocol||f.host!==u&&!function(e,t){Yp(pd(e)&&pd(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(f.host,u))&&ld(/^(?:authorization|cookie)$/i,this._options.headers),dd(i)){var h={headers:e.headers,statusCode:t},p={url:l,method:o,headers:n};try{i(this._options,h,p)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new rd({cause:e}))}}},Dp.exports=sd({http:Wp,https:Kp}),Dp.exports.wrap=sd;var md=J(Dp.exports);const gd="1.6.2";function vd(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const yd=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function bd(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];i||(i=c),r[o]=s,n[o]=c;let l=a,f=0;for(;l!==o;)f+=r[l++],l%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}const wd=Symbol("internals");class xd extends x.Transform{constructor(e){super({readableHighWaterMark:(e=Vf.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!Vf.isUndefined(t[e])))).chunkSize});const t=this,r=this[wd]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=bd(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let i=0;r.updateProgress=function(e,t){let r=0;const n=1e3/t;let i=null;return function(t,o){const a=Date.now();if(t||a-r>n)return i&&(clearTimeout(i),i=null),r=a,e.apply(null,o);i||(i=setTimeout((()=>(i=null,r=Date.now(),e.apply(null,o))),n-(a-r)))}}((function(){const e=r.length,o=r.bytesSeen,a=o-i;if(!a||t.destroyed)return;const s=n(a);i=o,process.nextTick((()=>{t.emit("progress",{loaded:o,total:e,progress:e?o/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&o<=e?(e-o)/s:void 0})}))}),r.ticksRate);const o=()=>{r.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(e){const t=this[wd];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,i=this[wd],o=i.maxRate,a=this.readableHighWaterMark,s=i.timeWindow,c=o/(1e3/s),u=!1!==i.minChunkSize?Math.max(i.minChunkSize,.01*c):0;const l=(e,t)=>{const r=Buffer.byteLength(e);let l,f=null,h=a,p=0;if(o){const e=Date.now();(!i.ts||(p=e-i.ts)>=s)&&(i.ts=e,l=c-i.bytes,i.bytes=l<0?-l:0,p=0),l=c-i.bytes}if(o){if(l<=0)return setTimeout((()=>{t(null,e)}),s-p);l<h&&(h=l)}h&&r>h&&r-h>u&&(f=e.subarray(h),e=e.subarray(0,h)),function(e,t){const r=Buffer.byteLength(e);i.bytesSeen+=r,i.bytes+=r,i.isCaptured&&i.updateProgress(),n.push(e)?process.nextTick(t):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(t)}}(e,f?()=>{process.nextTick(t,null,f)}:t)};l(e,(function e(t,n){if(t)return r(t);n?l(n,e):r(null)}))}setLength(e){return this[wd].length=+e,this}}var kd=xd;const{asyncIterator:Ed}=Symbol;var Sd=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Ed]?yield*e[Ed]():yield e};const Pd=Vf.ALPHABET.ALPHA_DIGIT+"-_",Cd=new w.TextEncoder,_d="\r\n",Ad=Cd.encode(_d);class Rd{constructor(e,t){const{escapeName:r}=this.constructor,n=Vf.isString(t);let i=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${_d}`;n?t=Cd.encode(String(t).replace(/\r?\n|\r\n?/g,_d)):i+=`Content-Type: ${t.type||"application/octet-stream"}${_d}`,this.headers=Cd.encode(i+_d),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;Vf.isTypedArray(e)?yield e:yield*Sd(e),yield Ad}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}var Fd=(e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:o=n+"-"+Vf.generateString(i,Pd)}=r||{};if(!Vf.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");const a=Cd.encode("--"+o+_d),s=Cd.encode("--"+o+"--"+_d+_d);let c=s.byteLength;const u=Array.from(e.entries()).map((([e,t])=>{const r=new Rd(e,t);return c+=r.size,r}));c+=a.byteLength*u.length,c=Vf.toFiniteNumber(c);const l={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),x.Readable.from(async function*(){for(const e of u)yield a,yield*e.encode();yield s}())};class Od extends x.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}var Td=Od;var Dd=(e,t)=>Vf.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e;const Ld={flush:F.constants.Z_SYNC_FLUSH,finishFlush:F.constants.Z_SYNC_FLUSH},jd={flush:F.constants.BROTLI_OPERATION_FLUSH,finishFlush:F.constants.BROTLI_OPERATION_FLUSH},Id=Vf.isFunction(F.createBrotliDecompress),{http:Nd,https:zd}=md,qd=/https:?/,Bd=np.protocols.map((e=>e+":"));function Md(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function Ud(e,t,r){let n=t;if(!n&&!1!==n){const e=Tp(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(e){Ud(e,t,e.href)}}const $d="undefined"!=typeof process&&"process"===Vf.kindOf(process),Vd=(e,t)=>(({address:e,family:t})=>{if(!Vf.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(Vf.isObject(e)?e:{address:e,family:t});var Hd=$d&&function(e){return t=async function(t,r,n){let{data:i,lookup:o,family:a}=e;const{responseType:s,responseEncoding:c}=e,u=e.method.toUpperCase();let l,f,h=!1;if(o){const e=Dd(o,(e=>Vf.isArray(e)?e:[e]));o=(t,r,n)=>{e(t,r,((e,t,i)=>{const o=Vf.isArray(t)?t.map((e=>Vd(e))):[Vd(t,i)];r.all?n(e,o):n(e,o[0].address,o[0].family)}))}}const p=new O,d=()=>{e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m),p.removeAllListeners()};function m(t){p.emit("abort",!t||t.type?new gp(null,e,f):t)}n(((e,t)=>{l=!0,t&&(h=!0,d())})),p.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m)));const g=yp(e.baseURL,e.url),v=new URL(g,"http://localhost"),y=v.protocol||Bd[0];if("data:"===y){let n;if("GET"!==u)return vp(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=function(e,t,r){const n=r&&r.Blob||np.classes.Blob,i=vd(e);if(void 0===t&&n&&(t=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const r=yd.exec(e);if(!r)throw new Hf("Invalid URL",Hf.ERR_INVALID_URL);const o=r[1],a=r[2],s=r[3],c=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!n)throw new Hf("Blob is not supported",Hf.ERR_NOT_SUPPORT);return new n([c],{type:o})}return c}throw new Hf("Unsupported protocol "+i,Hf.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw Hf.from(t,Hf.ERR_BAD_REQUEST,e)}return"text"===s?(n=n.toString(c),c&&"utf8"!==c||(n=Vf.stripBOM(n))):"stream"===s&&(n=x.Readable.from(n)),vp(t,r,{data:n,status:200,statusText:"OK",headers:new pp,config:e})}if(-1===Bd.indexOf(y))return r(new Hf("Unsupported protocol "+y,Hf.ERR_BAD_REQUEST,e));const b=pp.from(e.headers).normalize();b.set("User-Agent","axios/"+gd,!1);const S=e.onDownloadProgress,P=e.onUploadProgress,C=e.maxRate;let _,A;if(Vf.isSpecCompliantForm(i)){const e=b.getContentType(/boundary=([-_\w\d]{10,70})/i);i=Fd(i,(e=>{b.set(e)}),{tag:`axios-${gd}-boundary`,boundary:e&&e[1]||void 0})}else if(Vf.isFormData(i)&&Vf.isFunction(i.getHeaders)){if(b.set(i.getHeaders()),!b.hasContentLength())try{const e=await w.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&b.setContentLength(e)}catch(e){}}else if(Vf.isBlob(i))i.size&&b.setContentType(i.type||"application/octet-stream"),b.setContentLength(i.size||0),i=x.Readable.from(Sd(i));else if(i&&!Vf.isStream(i)){if(Buffer.isBuffer(i));else if(Vf.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!Vf.isString(i))return r(new Hf("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Hf.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(b.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return r(new Hf("Request body larger than maxBodyLength limit",Hf.ERR_BAD_REQUEST,e))}const R=Vf.toFiniteNumber(b.getContentLength());let T,D;Vf.isArray(C)?(_=C[0],A=C[1]):_=A=C,i&&(P||_)&&(Vf.isStream(i)||(i=x.Readable.from(i,{objectMode:!1})),i=x.pipeline([i,new kd({length:R,maxRate:Vf.toFiniteNumber(_)})],Vf.noop),P&&i.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(T=(e.auth.username||"")+":"+(e.auth.password||"")),!T&&v.username&&(T=v.username+":"+v.password),T&&b.delete("authorization");try{D=Kh(v.pathname+v.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=new Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}b.set("Accept-Encoding","gzip, compress, deflate"+(Id?", br":""),!1);const L={path:D,method:u,headers:b.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:T,protocol:y,family:a,beforeRedirect:Md,beforeRedirects:{}};let j;!Vf.isUndefined(o)&&(L.lookup=o),e.socketPath?L.socketPath=e.socketPath:(L.hostname=v.hostname,L.port=v.port,Ud(L,e.proxy,y+"//"+v.hostname+(v.port?":"+v.port:"")+L.path));const I=qd.test(L.protocol);if(L.agent=I?e.httpsAgent:e.httpAgent,e.transport?j=e.transport:0===e.maxRedirects?j=I?E:k:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),e.beforeRedirect&&(L.beforeRedirects.config=e.beforeRedirect),j=I?zd:Nd),e.maxBodyLength>-1?L.maxBodyLength=e.maxBodyLength:L.maxBodyLength=1/0,e.insecureHTTPParser&&(L.insecureHTTPParser=e.insecureHTTPParser),f=j.request(L,(function(n){if(f.destroyed)return;const i=[n],o=+n.headers["content-length"];if(S){const e=new kd({length:Vf.toFiniteNumber(o),maxRate:Vf.toFiniteNumber(A)});S&&e.on("progress",(e=>{S(Object.assign(e,{download:!0}))})),i.push(e)}let a=n;const l=n.req||f;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==u&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(F.createUnzip(Ld)),delete n.headers["content-encoding"];break;case"deflate":i.push(new Td),i.push(F.createUnzip(Ld)),delete n.headers["content-encoding"];break;case"br":Id&&(i.push(F.createBrotliDecompress(jd)),delete n.headers["content-encoding"])}a=i.length>1?x.pipeline(i,Vf.noop):i[0];const m=x.finished(a,(()=>{m(),d()})),g={status:n.statusCode,statusText:n.statusMessage,headers:new pp(n.headers),config:e,request:l};if("stream"===s)g.data=a,vp(t,r,g);else{const n=[];let i=0;a.on("data",(function(t){n.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(h=!0,a.destroy(),r(new Hf("maxContentLength size of "+e.maxContentLength+" exceeded",Hf.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(h)return;const t=new Hf("maxContentLength size of "+e.maxContentLength+" exceeded",Hf.ERR_BAD_RESPONSE,e,l);a.destroy(t),r(t)})),a.on("error",(function(t){f.destroyed||r(Hf.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==s&&(e=e.toString(c),c&&"utf8"!==c||(e=Vf.stripBOM(e))),g.data=e}catch(t){return r(Hf.from(t,null,e,g.request,g))}vp(t,r,g)}))}p.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),p.once("abort",(e=>{r(e),f.destroy(e)})),f.on("error",(function(t){r(Hf.from(t,null,e,f))})),f.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new Hf("error trying to parse `config.timeout` to int",Hf.ERR_BAD_OPTION_VALUE,e,f));f.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Yh;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new Hf(t,n.clarifyTimeoutError?Hf.ETIMEDOUT:Hf.ECONNABORTED,e,f)),m()}))}if(Vf.isStream(i)){let t=!1,r=!1;i.on("end",(()=>{t=!0})),i.once("error",(e=>{r=!0,f.destroy(e)})),i.on("close",(()=>{t||r||m(new gp("Request stream has been aborted",e,f))})),i.pipe(f)}else f.end(i)},new Promise(((e,r)=>{let n,i;const o=(e,t)=>{i||(i=!0,n&&n(e,t))},a=e=>{o(e,!0),r(e)};t((t=>{o(t),e(t)}),a,(e=>n=e)).catch(a)}));var t},Qd=np.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const a=[e+"="+encodeURIComponent(t)];Vf.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Vf.isString(n)&&a.push("path="+n),Vf.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},Gd=np.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=Vf.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Wd(e,t){let r=0;const n=bd(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-r,c=n(s);r=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var Kd="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=pp.from(e.headers).normalize();let o,a,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(Vf.isFormData(n))if(np.hasStandardBrowserEnv||np.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(a=i.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const f=yp(e.baseURL,e.url);function h(){if(!l)return;const n=pp.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());vp((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Kh(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(r(new Hf("Request aborted",Hf.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new Hf("Network Error",Hf.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Yh;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new Hf(t,n.clarifyTimeoutError?Hf.ETIMEDOUT:Hf.ECONNABORTED,e,l)),l=null},np.hasStandardBrowserEnv&&(c&&Vf.isFunction(c)&&(c=c(e)),c||!1!==c&&Gd(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Qd.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&Vf.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),Vf.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Wd(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Wd(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{l&&(r(!t||t.type?new gp(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=vd(f);p&&-1===np.protocols.indexOf(p)?r(new Hf("Unsupported protocol "+p+":",Hf.ERR_BAD_REQUEST,e)):l.send(n||null)}))};const Jd={http:Hd,xhr:Kd};Vf.forEach(Jd,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Yd=e=>`- ${e}`,Zd=e=>Vf.isFunction(e)||null===e||!1===e;var Xd=e=>{e=Vf.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Zd(r)&&(n=Jd[(t=String(r)).toLowerCase()],void 0===n))throw new Hf(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Hf("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Yd).join("\n"):" "+Yd(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function em(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gp(null,e)}function tm(e){em(e),e.headers=pp.from(e.headers),e.data=dp.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Xd(e.adapter||ap.adapter)(e).then((function(t){return em(e),t.data=dp.call(e,e.transformResponse,t),t.headers=pp.from(t.headers),t}),(function(t){return mp(t)||(em(e),t&&t.response&&(t.response.data=dp.call(e,e.transformResponse,t.response),t.response.headers=pp.from(t.response.headers))),Promise.reject(t)}))}const rm=e=>e instanceof pp?e.toJSON():e;function nm(e,t){t=t||{};const r={};function n(e,t,r){return Vf.isPlainObject(e)&&Vf.isPlainObject(t)?Vf.merge.call({caseless:r},e,t):Vf.isPlainObject(t)?Vf.merge({},t):Vf.isArray(t)?t.slice():t}function i(e,t,r){return Vf.isUndefined(t)?Vf.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!Vf.isUndefined(t))return n(void 0,t)}function a(e,t){return Vf.isUndefined(t)?Vf.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(rm(e),rm(t),!0)};return Vf.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,a=o(e[n],t[n],n);Vf.isUndefined(a)&&o!==s||(r[n]=a)})),r}const im={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{im[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const om={};im.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new Hf(n(i," has been removed"+(t?" in "+t:"")),Hf.ERR_DEPRECATED);return t&&!om[i]&&(om[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var am={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Hf("options must be an object",Hf.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],a=t[o];if(a){const t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new Hf("option "+o+" must be "+r,Hf.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Hf("Unknown option "+o,Hf.ERR_BAD_OPTION)}},validators:im};const sm=am.validators;let cm=class{constructor(e){this.defaults=e,this.interceptors={request:new Jh,response:new Jh}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=nm(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&am.assertOptions(r,{silentJSONParsing:sm.transitional(sm.boolean),forcedJSONParsing:sm.transitional(sm.boolean),clarifyTimeoutError:sm.transitional(sm.boolean)},!1),null!=n&&(Vf.isFunction(n)?t.paramsSerializer={serialize:n}:am.assertOptions(n,{encode:sm.function,serialize:sm.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Vf.merge(i.common,i[t.method]);i&&Vf.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=pp.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!s){const e=[tm.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let h=t;for(f=0;f<l;){const e=a[f++],t=a[f++];try{h=e(h)}catch(e){t.call(this,e);break}}try{u=tm.call(this,h)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Kh(yp((e=nm(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};Vf.forEach(["delete","get","head","options"],(function(e){cm.prototype[e]=function(t,r){return this.request(nm(r||{},{method:e,url:t,data:(r||{}).data}))}})),Vf.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(nm(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}cm.prototype[e]=t(),cm.prototype[e+"Form"]=t(!0)}));var um=cm;var lm=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new gp(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let t;const r=new e((function(e){t=e}));return{token:r,cancel:t}}};const fm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fm).forEach((([e,t])=>{fm[t]=e}));var hm=fm;const pm=function e(t){const r=new um(t),n=ff(um.prototype.request,r);return Vf.extend(n,um.prototype,r,{allOwnKeys:!0}),Vf.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(nm(t,r))},n}(ap);pm.Axios=um,pm.CanceledError=gp,pm.CancelToken=lm,pm.isCancel=mp,pm.VERSION=gd,pm.toFormData=Vh,pm.AxiosError=Hf,pm.Cancel=pm.CanceledError,pm.all=function(e){return Promise.all(e)},pm.spread=function(e){return function(t){return e.apply(null,t)}},pm.isAxiosError=function(e){return Vf.isObject(e)&&!0===e.isAxiosError},pm.mergeConfig=nm,pm.AxiosHeaders=pp,pm.formToJSON=e=>ip(Vf.isHTMLForm(e)?new FormData(e):e),pm.getAdapter=Xd,pm.HttpStatusCode=hm,pm.default=pm;var dm=pm;const{Axios:mm,AxiosError:gm,CanceledError:vm,isCancel:ym,CancelToken:bm,VERSION:wm,all:xm,Cancel:km,isAxiosError:Em,spread:Sm,toFormData:Pm,AxiosHeaders:Cm,HttpStatusCode:_m,formToJSON:Am,getAdapter:Rm,mergeConfig:Fm}=dm;function Om(e){return e}function Tm(e){const t=[];if(e){if(Array.isArray(e))return e;if("object"==typeof e)for(const r of Object.keys(e)){const n=Number.parseInt(r,10);Number.isNaN(n)||(t[n]=e[r])}return t}}function Dm(e){const t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config?.method||!t.httpMethodsToRetry.includes(e.config.method.toUpperCase()))return!1;if(e.response?.status){let r=!1;for(const[n,i]of t.statusCodesToRetry){const{status:t}=e.response;if(t>=n&&t<=i){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}var Lm=function(){function e(e,t,r,n){this.id=void 0,this.sha=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.sha=n,this.summary=r,this.config=t}return c(e,[{key:"config",get:function(){return this._config},set:function(e){e.setKey(this.id+":config"),this._config=e}}]),e}();Lm.style=".topwrite/style.css",Lm.logo="logo.png",Lm.readme="README.md";function jm(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function Im(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Nm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var zm=function(){function e(e,t,r,n){this.key=void 0,this.values=void 0,this.presetValues=void 0,this.schema=void 0,this.values=v(e,n),this.presetValues=n,this.schema=t,this.key=r}var t=e.prototype;return t.setKey=function(e){this.key=e},t.getValues=function(){return this.values},t.setValues=function(e){var t=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"}).compile(this.schema);if(!t(e=u(e)))for(var r,n=Im(t.errors);!(r=n()).done;){var i=r.value;e=p(e,i.dataPath.substr(1).split("/"))}this.values=e},t.getPresetValues=function(){return this.presetValues},t.getValue=function(e,t){return l(this.values,e,t)},t.setValue=function(e,t){return d(this.values,e,t)},t.toObject=function(){var e=this,t=u(this.values);this.presetValues&&(t=p(t,y(this.presetValues)));var r=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});return r.removeKeyword("default"),r.addKeyword("default",{validate:function(e,t,r,n,i,o,a){return h(e,t)&&(delete i[o],f(i)&&function(e,t){for(var r=[],n=e,i=0;i<t.length-1;i++)r.push(n),n=n[t[i]];for(var o=t.length-2;o>=0;o--)f(r[o][t[o]])&&delete r[o][t[o]]}(a,m(n.substring(1)))),!0},modifying:!0,errors:!1}),r.addKeyword("encrypt",{validate:function(t,r,n,i,o,a){return e.key&&t&&!jm(r)&&o&&a&&d(o,a,"@encrypted:"+function(e,t){return Mr.encrypt(e,t).toString()}(r,e.key)),!0},modifying:!0,errors:!1}),r.compile(this.schema)(t),t},e.createFromObject=function(e,t,r,n){var i=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});i.addKeyword("encrypt",{validate:function(e,t,n,i,o,a){return r&&e&&jm(t)&&o&&a&&d(o,a,function(e,t){try{return Mr.decrypt(e,t).toString($r)}catch(e){return""}}(t.substring(11),r)),!0},modifying:!0,errors:!1});var o=i.compile(t);if(!o(e))for(var a,s=Im(o.errors);!(a=s()).done;){var c=a.value;e=p(e,c.dataPath.substring(1).split("/"))}return new this(e,t,r,n)},e}(),qm=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).pluginsConfig={},t.presetPlugins={},t}s(t,e);var r=t.prototype;return r.setPresetPlugins=function(e){this.presetPlugins=e},r.getPresetPluginConfig=function(e){return this.presetPlugins[e]},r.getPlugins=function(){return Array.from(new Set([].concat(this.getValue("plugins"),Object.keys(this.presetPlugins))))},r.getPluginConfig=function(e,t){if(!this.pluginsConfig[e]){var r=this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=zm.createFromObject(u(r),t,this.key+":"+e,this.presetPlugins[e])}return this.pluginsConfig[e]},r.setPluginConfig=function(e,t){var r=t.toObject();f(r)?g(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],r),delete this.pluginsConfig[e]},t.createFromObject=function(r){return e.createFromObject.call(this,r,t.schema)},t}(zm);qm.file="book.json",qm.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode",default:"light"},primaryColor:{type:"string",title:"Primary Color",format:"color",default:"#3c60ff"},expandLevel:{type:"integer",title:"Expand level",default:0},navs:{type:"array",title:"Nav configures",items:{type:"object",properties:{title:{title:"Label",type:"string"},url:{title:"Link",type:"string"}},required:["title","url"],additionalProperties:!1},default:[]}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}},release:{type:"object",title:"Release specific configurations",properties:{pathEncode:{type:"boolean",title:"Whether to encode the chapter path",default:!0}},default:{}}},required:[]};var Bm=function(){function e(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((function(e){return parseInt(e,10)})):e}var t=e.prototype;return t.getRoot=function(){return new e(this.data.slice(0,1))},t.getParent=function(){return new e(this.data.slice(0,-1))},t.createChild=function(t){return new e(this.data.concat(t))},t.isDescendant=function(e){return e.toString().startsWith(this.toString()+".")},t.getNext=function(){var t=[].concat(this.data);return t[t.length-1]++,new e(t)},t.getDepth=function(){return this.data.length-1},t.eq=function(e){return this.toString()===e.toString()},t.getLeafIndex=function(){return this.data[this.data.length-1]-1},t.toString=function(e){return e?this.data.slice(e.data.length).join("."):this.data.join(".")},e.compare=function(e,t){for(var r=0;r<Math.max(e.data.length,t.data.length);r++){var n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0},e}();function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Um=function(){function e(e){var t=e.title,r=e.ref,n=void 0===r?"":r,o=e.path,s=e.children,c=void 0===s?[]:s,u=e.metadata;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.metadata=void 0,this.hasPath=!1,this.title=t,this.ref=n,o?(this.hasPath=!0,this.path=o):this.path=n?i.posix.format(a({},i.posix.parse(n),{ext:".html",base:""})):"",this.children=c,this.level=new Bm,this.metadata=u}var t=e.prototype;return t.getMetadata=function(e,t){return this.metadata?l(this.metadata,e,t):t},t.getLevel=function(){return this.level},t.getTitle=function(){return this.title},t.getRef=function(){return this.ref},t.getPath=function(){return this.path},t.getArticles=function(){return this.children},t.getDescendants=function(){var t=[];return e.findArticle(this,(function(e){return t.push(e),!1})),t},t.getDepth=function(){return this.getLevel().getDepth()},t.createChildLevel=function(){return this.level.createChild(this.children.length+1)},t.indexLevels=function(e){e?this.level=e:e=this.level;for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.children.entries());!(t=r()).done;){var n=t.value,i=n[0];n[1].indexLevels(e.createChild(i+1))}},t.toObject=function(){var e=this.children.map((function(e){return e.toObject()}));return{title:this.title,ref:this.ref,path:this.hasPath?this.path:void 0,metadata:this.metadata,children:f(e)?void 0:e}},e.findArticle=function(t,r){return t.getArticles().reduce((function(t,n){return t||(r(n)?n:e.findArticle(n,r))}),void 0)},e.createFromObject=function(t){var r,n=null==(r=t.children)?void 0:r.filter((function(e){return!!e.title})).map((function(t){return e.createFromObject(t)}));return new e(a({},t,{children:n}))},e}();function $m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Vm,Hm=function(){function e(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.title=void 0,this.articles=void 0,this.metadata=void 0,this.level=new Bm,this.title=e,this.articles=t,this.metadata=r}var t=e.prototype;return t.getMetadata=function(e,t){return this.metadata?l(this.metadata,e,t):t},t.getLevel=function(){return this.level},t.getTitle=function(){return this.title},t.getArticles=function(){return this.articles},t.getFirstArticle=function(){return Um.findArticle(this,(function(){return!0}))},t.getDescendants=function(){var e=[];return Um.findArticle(this,(function(t){return e.push(t),!1})),e},t.createChildLevel=function(){return this.level.createChild(this.articles.length+1)},t.indexLevels=function(e){e?this.level=e:e=this.level;for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return $m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.articles.entries());!(t=r()).done;){var n=t.value,i=n[0];n[1].indexLevels(e.createChild(i+1))}},t.toObject=function(){var e=this.articles.map((function(e){return e.toObject()}));return{title:this.title,metadata:this.metadata,articles:f(e)?void 0:e}},e.createFromObject=function(t){var r,n=null==(r=t.articles)?void 0:r.filter((function(e){return!!e.title})).map((function(e){return Um.createFromObject(e)}));return new e(t.title,n,t.metadata)},e}(),Qm={name:"labelEnd",tokenize:function(e,t,r){for(var n,i,o=this,a=o.events.length;a--;)if((o.events[a][1].type===yu||o.events[a][1].type===vu)&&!o.events[a][1]._balanced){n=o.events[a][1];break}return function(t){return n?n._inactive?l(t):(i=o.parser.defined.includes(Gi(o.sliceSerialize({start:n.end,end:o.now()}))),e.enter(wu),e.enter(bu),e.consume(t),e.exit(bu),e.exit(wu),s):r(t)};function s(t){return t===ou?e.attempt(Gm,u,i?u:l)(t):t===uu?e.attempt(Wm,u,i?c:l)(t):i?u(t):l(t)}function c(t){return e.attempt(Km,u,l)(t)}function u(e){return t(e)}function l(e){return n._balanced=!0,r(e)}},resolveTo:Qo.resolveTo,resolveAll:Qo.resolveAll},Gm={tokenize:function(e,t,r){return function(t){return e.enter(Su),e.enter(Fu),e.consume(t),e.exit(Fu),n};function n(t){return no(t)?jo(e,i)(t):i(t)}function i(t){return t===au?d(t):To(e,o,a,Pu,Cu,_u,Au,Ru,pu)(t)}function o(t){return no(t)?jo(e,s)(t):d(t)}function a(e){return r(e)}function s(t){return t===nu||t===iu||t===ou?Lo(e,c,r,Ou,Tu,Du)(t):u(t)}function c(t){return no(t)?jo(e,d)(t):u(t)}function u(t){return t===su?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),l):d(t)}function l(t){return t===hu?(e.enter("resourceSizeXMarker"),e.consume(t),e.exit("resourceSizeXMarker"),h):t===au||no(t)?(e.exit("resourceSize"),jo(e,d)(t)):(e.enter("resourceSizeWidth"),e.enter(zu,{contentType:"string"}),f(t))}function f(t){return t===au||no(t)?(e.exit(zu),e.exit("resourceSizeWidth"),e.exit("resourceSize"),jo(e,d)(t)):t===hu?(e.exit(zu),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),h):(e.consume(t),f)}function h(t){return t===au||no(t)?(e.exit("resourceSize"),jo(e,d)(t)):(e.enter("resourceSizeHeight"),e.enter(zu,{contentType:"string"}),p(t))}function p(t){return t===au||no(t)?(e.exit(zu),e.exit("resourceSizeHeight"),e.exit("resourceSize"),jo(e,d)(t)):(e.consume(t),p)}function d(n){return n===au?(e.enter(Fu),e.consume(n),e.exit(Fu),e.exit(Su),t):r(n)}}},Wm={tokenize:function(e,t,r){var n=this;return function(t){return Do.call(n,e,i,o,xu,ku,Eu)(t)};function i(e){return n.parser.defined.includes(Gi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},Km={tokenize:function(e,t,r){return function(t){return e.enter(xu),e.enter(ku),e.consume(t),e.exit(ku),n};function n(n){return n===lu?(e.enter(ku),e.consume(n),e.exit(ku),e.exit(xu),t):r(n)}}};function Jm(e){var t=e.micromark,r=e.toMarkdown,n=e.fromMarkdown,i=e.toHast,o=e.handler;return function(){var e=this.data(),a=e.micromarkExtensions||(e.micromarkExtensions=[]),s=e.toMarkdownExtensions||(e.toMarkdownExtensions=[]),c=e.fromMarkdownExtensions||(e.fromMarkdownExtensions=[]),u=e.toHastExtensions||(e.toHastExtensions=[]);return t&&a.push(t),r&&s.push(r),n&&c.push(n),i&&u.push(i),o}}var Ym=function(e,t,r,n){var i=fs.image(e,t,r,n);return e.width||e.height?i.replace(/\)$/," ="+(e.width||"")+(e.height?"x"+e.height:"")+")"):i};Ym.peek=fs.image.peek;var Zm,Xm,eg=Jm({micromark:{text:(Vm={},Vm[lu]=Qm,Vm)},fromMarkdown:{enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){var e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){var e=this.resume();this.stack[this.stack.length-1].height=e}}},toMarkdown:{handlers:{image:Ym}},toHast:{image:function(e,t){var r=Wu.image(e,t);if(r&&!Array.isArray(r)&&"element"===r.type)return r.properties.width=t.width,r.properties.height=t.height,r}}}),tg=fs.paragraph,rg=fs.heading,ng=function(e){var t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},ig=Jm({toMarkdown:{handlers:{paragraph:function(e,t,r,n){var i=tg(e,t,r,n);return ng(e.align)+i},heading:function(e,t,r,n){return rg(e,t,r,n).replace(/^#+\s/,"$&"+ng(e.align))}}},handler:function(e){Za(e,(function(e,t,r){if(function(e){return"paragraph"===e.type||"heading"===e.type}(e)){var n=Wn("text",e);if(n){var i=n.value;i.startsWith("--: ")?e.align="right":i.startsWith(":-: ")?e.align="center":i.startsWith(":-- ")&&(e.align="left"),e.align&&(n.value=i.substr(4),r&&"listItem"===r.type?r.data=a({},r.data,{hProperties:{className:"align-"+e.align}}):e.data=a({},e.data,{hProperties:{className:"align-"+e.align}}))}}}))}}),og={tokenize:function(e,t,r){function n(t){return t===lu?r(t):(e.enter("blockQuoteType"),e.enter(zu,{contentType:"string"}),i(t))}function i(t){return t===lu?(e.exit(zu),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),o):no(t)||!Ki(t)?r(t):(e.consume(t),i)}function o(e){return e===ou?r(e):t(e)}return function(t){return e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),n}},partial:!0},ag={name:"blockQuote",tokenize:function(e,t,r){var n=this;return function(t){if(t===cu){var o=n.containerState;return o.open||(e.enter(Lu,{_container:!0}),o.open=!0),e.enter(ju),e.enter(Iu),e.consume(t),e.exit(Iu),uo(e,i,mu)}return r(t)};function i(t){return t===uu?e.attempt(og,o,o)(t):o(t)}function o(r){return io(r)?(e.enter(Nu),e.consume(r),e.exit(Nu),e.exit(ju),t):(e.exit(ju),t(r))}},continuation:{tokenize:function(e,t,r){var n=this;return function(t){return io(t)?(n.parser.constructs.disable.null,uo(e,i,gu,n.parser.constructs.disable.null.includes("codeIndented")?void 0:du)(t)):i(t)};function i(n){return e.attempt(ag,t,r)(n)}}},exit:wo.exit},sg=fs.blockquote,cg=Jm({micromark:{document:(Zm={},Zm[cu]=ag,Zm)},toMarkdown:{handlers:{blockquote:function(e,t,r,n){var i=sg(e,t,r,n);return e.variant?i.replace(/(^|\s+)>\s/,"$1> ["+e.variant+"] "):i}}},fromMarkdown:{enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){var e=this.resume();this.stack[this.stack.length-1].variant=e}}},handler:function(e){Za(e,"blockquote",(function(e){e.variant&&(e.data=a({},e.data,{hProperties:{className:e.variant}}))}))}}),ug="blankLine",lg="blankLineSequence",fg={name:"blankLine",tokenize:function(e,t,r){var n,i=function t(r){return r===n?(e.consume(r),t):(e.exit(lg),o(r))},o=function o(a){return a===n?(e.enter(lg),i(a)):io(a)?uo(e,o,mu)(a):a===ru||ro(a)?(e.exit(ug),t(a)):r(a)};return function(t){return e.enter(ug),n=t,o(t)}}},hg=Jm({toHast:{blankLine:function(){return{type:"element",tagName:"p",properties:{},children:[{type:"element",tagName:"br",properties:{},children:[]}]}}},micromark:{flow:(Xm={},Xm[fu]=fg,Xm)},toMarkdown:{handlers:{blankLine:function(){return"^"}}},fromMarkdown:{enter:{blankLine:function(e){this.enter({type:"blankLine"},e)}},exit:{blankLine:function(e){this.exit(e)}}}}),pg=function(e,t){void 0===t&&(t="text");var r="";return Za(e,t,(function(e){r+=e.value})),r},dg=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,mg=Jm({handler:function(e){Za(e,(function(e,t,r){if(r&&"root"===r.type&&void 0!==t&&pg(e).match(dg))return r.children.splice(t,1),[Ja,t]}))}}),gg=Jm({toHast:{xBlock:function(e,t){return{type:"element",tagName:"x-block",properties:{name:t.name,value:t.value,parameter:t.parameter},children:[]}},xInline:function(e,t){return{type:"element",tagName:"x-inline",properties:{name:t.name,value:t.value},children:[]}}},handler:function(e){Za(e,(function(e,t,r){if(void 0!==t&&void 0!==r)if(function(e){return"code"===e.type}(e)&&e.lang){var n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){var i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if(function(e){return"inlineCode"===e.type}(e)){var o=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(o){var a={type:"xInline",name:o[1],value:o[2],position:e.position};r.children.splice(t,1,a)}}}))}}),vg=Ci().use((function(e){const t=this;t.parser=function(r){return Pa(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}})).use((function(e){const t=this;t.compiler=function(r){return Es(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}),{bullet:"*",listItemIndent:"one",fences:!0,join:[function(e,t){if("blankLine"===e.type&&e.type===t.type)return 0}]}).use((function(){const e=this.data(),t=e.micromarkExtensions||(e.micromarkExtensions=[]),r=e.fromMarkdownExtensions||(e.fromMarkdownExtensions=[]),n=e.toMarkdownExtensions||(e.toMarkdownExtensions=[]);t.push({text:{58:ef},flow:{58:[Gl,Yl]}}),r.push({canContainEols:["textDirective"],enter:{directiveContainer:Al,directiveContainerAttributes:jl,directiveContainerLabel:Dl,directiveLeaf:Rl,directiveLeafAttributes:jl,directiveText:Fl,directiveTextAttributes:jl},exit:{directiveContainer:Ml,directiveContainerAttributeClassValue:Nl,directiveContainerAttributeIdValue:Il,directiveContainerAttributeName:ql,directiveContainerAttributeValue:zl,directiveContainerAttributes:Bl,directiveContainerLabel:Ll,directiveContainerName:Tl,directiveLeaf:Ml,directiveLeafAttributeClassValue:Nl,directiveLeafAttributeIdValue:Il,directiveLeafAttributeName:ql,directiveLeafAttributeValue:zl,directiveLeafAttributes:Bl,directiveLeafName:Tl,directiveText:Ml,directiveTextAttributeClassValue:Nl,directiveTextAttributeIdValue:Il,directiveTextAttributeName:ql,directiveTextAttributeValue:zl,directiveTextAttributes:Bl,directiveTextName:Tl}}),n.push({unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:Ul,leafDirective:Ul,textDirective:Ul}})})).use((function(e){const t=e||"yaml",r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){const t=nl(e),r={};let n=-1;for(;++n<t.length;){const e=t[n],i=al(e,"open").charCodeAt(0),o=ol(e),a=r[i];Array.isArray(a)?a.push(o):r[i]=[o]}return{flow:r}}(t)),i.push(function(e){const t=nl(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=cl(e),n[e.type]=ul,n[e.type+"Value"]=ll}return{enter:r,exit:n}}(t)),o.push(function(e){const t=[],r={},n=nl(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=fl(e);const o=hl(e,"open");t.push({atBreak:!0,character:o.charAt(0),after:Os(o.charAt(1))})}return{unsafe:t,handlers:r}}(t))}),["yaml"]).use((function(e){const t=e||eu,r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){return $i([{text:Fc},{document:{91:{tokenize:Mc,continuation:{tokenize:Uc},exit:$c}},text:{91:{tokenize:Bc},93:{add:"after",tokenize:zc,resolveTo:qc}}},Vc(e),{flow:{null:{tokenize:Gc,resolveAll:Wc}}},{text:{91:Zc}}])}(t)),i.push([{transforms:[$s],enter:{literalAutolink:Ns,literalAutolinkEmail:zs,literalAutolinkHttp:zs,literalAutolinkWww:zs},exit:{literalAutolink:Us,literalAutolinkEmail:Ms,literalAutolinkHttp:qs,literalAutolinkWww:Bs}},{enter:{gfmFootnoteDefinition:Gs,gfmFootnoteDefinitionLabelString:Ws,gfmFootnoteCall:Ys,gfmFootnoteCallString:Zs},exit:{gfmFootnoteDefinition:Js,gfmFootnoteDefinitionLabelString:Ks,gfmFootnoteCall:ec,gfmFootnoteCallString:Xs}},{canContainEols:["delete"],enter:{strikethrough:oc},exit:{strikethrough:ac}},{enter:{table:fc,tableData:mc,tableHeader:mc,tableRow:pc},exit:{codeText:gc,table:hc,tableData:dc,tableHeader:dc,tableRow:dc}},{exit:{taskListCheckValueChecked:bc,taskListCheckValueUnchecked:bc,paragraph:wc}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:js,notInConstruct:Is},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:js,notInConstruct:Is},{character:":",before:"[ps]",after:"\\/",inConstruct:js,notInConstruct:Is}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:rc,footnoteReference:tc}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ic}],handlers:{delete:sc}},yc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xc}}]}}(t))})).use((function(){return function(e){!function(e){Ts(e,[/\r?\n|\r/g,tu])}(e)}})).use((function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[lf.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==lf.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==lf.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[lf.carriageReturn,lf.lineFeed,lf.carriageReturnLineFeed,null,lf.backslash,lf.leftCurlyBrace].includes(n)?r(n):n===lf.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){uf(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),uf(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}})).use(gg).use(eg).use(ig).use(cg).use(hg).use(mg);function yg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wg(e){for(var t,r=[],n=yg(e.children);!(t=n()).done;){var i=t.value,o=i.children,a=Wn("paragraph:first-child>*",i);if(a){var s=pg(a);if(s){var c="";a.url&&(c=decodeURI(a.url)).match(/[\\:*?"<>|]/)&&(c="");var u={title:s,ref:c};if(o.length>1){var l=o[o.length-1];Ua(l,"list")&&(u.children=wg(l))}r.push(u)}}}return r}var xg=vg();function kg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Eg=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1),this.parts=void 0,this.json=void 0,this.parts=e,this.json=t,this.indexLevels()}var t=e.prototype;return t.hasMetadata=function(){var e=!1;return this.getArticle((function(t){return!!e||!f(t.metadata)&&(e=!0,!0)}),(function(t){return f(t.metadata)||(e=!0),!0})),e},t.isJson=function(){return this.json},t.getParts=function(){return this.parts},t.getPart=function(e){return this.parts[e]},t.getLastPart=function(){return this.parts[this.parts.length-1]},t.getArticles=function(){var e=[];return this.getArticle((function(t){return e.push(t),!1})),e},t.getArticle=function(e,t){return this.parts.reduce((function(r,n){return r||(!t||t(n)?Um.findArticle(n,e):void 0)}),void 0)},t.getArticlePart=function(e){var t=e.getLevel().getRoot();return this.getByLevel(t)},t.getFirstPath=function(){var e=this.getArticle((function(e){return!!e.getPath()}));if(e)return e.getPath()},t.getByLevel=function(e){var t=function(t){return t.getLevel().eq(e)};return this.parts.reduce((function(e,r){return e||(t(r)?r:Um.findArticle(r,t))}),void 0)},t.getFirstArticle=function(){return this.getArticle((function(){return!0}))},t.getNextArticle=function(e){var t=e instanceof Um?e.getLevel():e,r=!1;return this.getArticle((function(e){return!!r||(r=e.getLevel()==t,!1)}))},t.getPrevArticle=function(e){var t=e instanceof Um?e.getLevel():e,r=void 0;return this.getArticle((function(e){return e.getLevel()==t||(r=e,!1)})),r},t.getParent=function(e){var t=(e instanceof Um?e.getLevel():e).getParent();if(t)return this.getByLevel(t)},t.indexLevels=function(){for(var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return kg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kg(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.parts.entries());!(e=t()).done;){var r=e.value,n=r[0],i=r[1],o=new Bm(String(n+1));i.indexLevels(o)}},t.isSinglePart=function(){return 1===this.parts.length&&!this.parts[0].title},t.isEmpty=function(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length},t.toObject=function(){return this.parts.map((function(e){return e.toObject()}))},e.createFromObject=function(t){return new e(t.map((function(e){return Hm.createFromObject(e)})),!0)},e.createFromText=function(t){return new e(function(e){for(var t,r,n=[],i=yg(xg.parse(e).children);!(r=i()).done;){var o=r.value;if(Ua(o,"heading")&&[2,3].includes(o.depth)&&(t&&n.push(t),t={title:pg(o).trim()}),Ua(o,"list")){var a=wg(o);t?t.articles=(t.articles||[]).concat(a):t={title:"",articles:a}}}return t?n.push(t):n.push({title:""}),n}(t).map((function(e){return Hm.createFromObject(e)})))},e.create=function(t){return"object"==typeof t?e.createFromObject(t):e.createFromText(t)},e}();Eg.file={json:"SUMMARY.json",markdown:"SUMMARY.md"};var Sg=function(){function e(e){var t=e.path,r=e.content,n=e.meta,i=void 0===n?{}:n;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=i}var t=e.prototype;return t.getMeta=function(e,t){return l(this.meta,e,t)},t.relative=function(e){var t="/"===e.slice(-1);return(e=i.posix.relative(i.posix.dirname(this.path),e)||".")+(t?"/":"")},t.resolve=function(e){return i.posix.join(i.posix.dirname(this.path),e)},e}(),Pg=["page"],Cg=function(){function r(e){var t=e.host,r=e.preset;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}var n=r.prototype;return n.getBuyUrl=function(e,t){return this.host+"/api/buy?book="+e.id+"&plugin="+t.name},n.bought=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dm.get(this.host+"/api/bought?book="+r.id+"&plugin="+n.name);case 3:return e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(e,t){return r.apply(this,arguments)}}(),n.trial=function(){var r=e(t.mark((function e(r,n){var i,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dm.get(this.host+"/api/trial?book="+r.id+"&plugin="+n.name);case 3:return i=e.sent,o=i.data,e.abrupt("return",o);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(e,t){return r.apply(this,arguments)}}(),n.queryPlugins=function(){var r=e(t.mark((function e(r){var n,i,o,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.page,i=void 0===n?1:n,o=b(r,Pg),e.next=3,dm.get(this.host+"/api/query",{params:a({},o,{page:i})});case 3:return s=e.sent,c=s.data,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.getInstalled=function(){var r=e(t.mark((function e(r){var n,i,o,a,s,c=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.config,i=n.getValue("theme"),o=["theme-"+i].concat(n.getValue("plugins")),this.preset&&(o.push.apply(o,Object.keys(this.preset)),n.setPresetPlugins(this.preset)),e.next=6,dm.get(this.host+"/api/installed",{params:{book:r.id,plugins:o.join(",")}}).catch((function(e){throw new Error("Plugins Check Failed:"+e.message)}));case 6:return a=e.sent,s=a.data,e.abrupt("return",s.flatMap((function(e){var t,r;return!e.builtin||null!=(t=c.preset)&&t[e.name]?(e.preset=!(null==(r=c.preset)||!r[e.name]),[e]):[]})));case 9:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),r}();function _g(e){return new Cg(e)}var Ag,Rg=function(){function e(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}var t=e.prototype;return t.toDataUrl=function(){return this.canvas.toDataURL()},t.generate=function(){var e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");var t=this.size/10;if(e.beginPath(),e.arc(this.size-t,this.size-t,t,0,Math.PI/2),e.lineTo(t,this.size),e.arc(t,this.size-t,t,Math.PI/2,Math.PI),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2),e.lineTo(this.size-t,0),e.arc(this.size-t,t,t,3*Math.PI/2,2*Math.PI),e.lineTo(this.size,this.size-t),e.closePath(),this.letter.length>0){var r=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[r.charCodeAt(0)%this.flatColors.length],e.fill(),e.restore(),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}else e.fillStyle=this.flatColors[0],e.fill()},e.create=function(t,r,n){return n||(n=function(e){var t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(r)),new e(t,r,n)},e}(),Fg=/^(?:\w+:)?\/\/(\S+)$/,Og=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Tg=/^[^\s\.]+\.\S{2,}$/;function Dg(e){var t=e.match(Fg);if(!t)return!1;var r=t[1];return!!r&&(Og.test(r)||Tg.test(r))}function Lg(e){return Or(e).toString()}(Ag=Ag||dm).interceptors.response.use(Om,(async e=>async function(e,t){if(ym(t))throw t;const r=function(e){if(e?.config)return e.config.raxConfig}(t)||{};r.currentRetryAttempt=r.currentRetryAttempt||0,r.retry="number"==typeof r.retry?r.retry:3,r.retryDelay="number"==typeof r.retryDelay?r.retryDelay:100,r.instance=r.instance||e,r.backoffType=r.backoffType||"exponential",r.httpMethodsToRetry=Tm(r.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],r.noResponseRetries="number"==typeof r.noResponseRetries?r.noResponseRetries:2,r.checkRetryAfter="boolean"!=typeof r.checkRetryAfter||r.checkRetryAfter,r.maxRetryAfter="number"==typeof r.maxRetryAfter?r.maxRetryAfter:3e5;const n=[[100,199],[429,429],[500,599]];r.statusCodesToRetry=Tm(r.statusCodesToRetry)||n;const i=t;if(i.config=i.config||{},i.config.raxConfig={...r},!(r.shouldRetry||Dm)(i))throw i;const o=new Promise(((e,t)=>{let n=0;if(r.checkRetryAfter&&i.response?.headers["retry-after"]){const e=function(e){const t=Number(e);if(!Number.isNaN(t))return 1e3*t;const r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(i.response.headers["retry-after"]);if(!(e&&e>0&&e<=r.maxRetryAfter))return void t(i);n=e}i.config.raxConfig.currentRetryAttempt+=1;const o=i.config.raxConfig.currentRetryAttempt;0===n&&(n="linear"===r.backoffType?1e3*o:"static"===r.backoffType?r.retryDelay:(2**o-1)/2*1e3,"number"==typeof r.maxRetryDelay&&(n=Math.min(n,r.maxRetryDelay))),setTimeout(e,n)}));r.onRetryAttempt&&r.onRetryAttempt(i);const a=Promise.resolve();return Promise.resolve().then((async()=>o)).then((async()=>a)).then((async()=>r.instance.request(i.config)))}(Ag,e))),dm.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:function(e){var t,r=e.config,n=e.response,i=(null==r?void 0:r.raxConfig)||{};return!(null!=i&&i.retryDecider&&!i.retryDecider()||null==r||!r.method||null==(t=i.httpMethodsToRetry)||!t.includes(r.method.toUpperCase())||449!==(null==n?void 0:n.status))}},dm.defaults.maxContentLength=1/0,dm.defaults.maxBodyLength=1/0,dm.isAxiosError;var jg=function(){function e(e){var t=e.name,r=e.version,n=e.path,i=e.hooks,o=e.config;this.name=void 0,this.version=void 0,this.path=void 0,this.hooks=void 0,this.config=void 0,this.name=t,this.version=r,this.path=n,this.hooks=i,this.config=o}var t=e.prototype;return t.getHook=function(e){return this.hooks[e]},t.getContext=function(e){var t=this;return a({},e,{getConfig:function(){return e.book.config.getPluginConfig(t.name,t.config)}})},e}();function Ig(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ng(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ng(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ng(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zg(e,t){return qg.apply(this,arguments)}function qg(){return(qg=e(t.mark((function e(r,n){var o,a,s,c,u,l,f,h,p;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W.info('installing plugin "'+r.name+'"'),o="npm install "+r.host+".tgz",a=T.sync(o,{stdio:["inherit"],cwd:n,shell:!0}),!(s=a.error)){e.next=5;break}throw s;case 5:return c=i.join(n,"node_modules","topwrite-plugin-"+r.name),u=i.join(c,"dist","hooks.js"),l={},G.existsSync(u)&&(f=new D.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}),l=f.runFile(u)),h=i.join(c,"config.json"),p={},G.existsSync(h)&&(p=require(h)),W.info('plugin "'+r.name+"@"+r.version+'" installed with success'),e.abrupt("return",new jg({name:r.name,version:r.version,path:c,hooks:l,config:p}));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bg(e,t,r){return Mg.apply(this,arguments)}function Mg(){return(Mg=e(t.mark((function e(r,n,i){var o,a,s,c,u,l,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=_g(i),e.next=3,o.getInstalled(r);case 3:a=e.sent,s=[],c=r.config.getValue("theme"),W.info("installing "+a.length+" plugins from registry"),u=Ig(a);case 8:if((l=u()).done){e.next=22;break}if(!(f=l.value).disabled){e.next=12;break}throw new Error('plugin "'+f.name+'" has been disabled');case 12:if("theme"===f.type||"ebook"!==c||f.ebook){e.next=15;break}return W.info('plugin "'+f.name+'" ignored in ebook'),e.abrupt("continue",20);case 15:return e.t0=s,e.next=18,zg(f,n);case 18:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 20:e.next=8;break;case 22:return e.abrupt("return",s);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ug(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $g(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Vg=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/,Hg=function(){var r=e(t.mark((function e(r,n){var i,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=Ug(r);case 1:if((o=i()).done){e.next=9;break}return a=o.value,e.next=5,n(a);case 5:if(e.sent){e.next=7;break}return e.abrupt("return",!1);case 7:e.next=1;break;case 9:return e.abrupt("return",!0);case 10:case"end":return e.stop()}}),e)})));return function(e,t){return r.apply(this,arguments)}}(),Qg=function(){function r(e,t,r,n,i,o){this.book=void 0,this.sourceFS=void 0,this.tmpFS=void 0,this.dest=void 0,this.version=void 0,this.options=void 0,this.plugins=[],this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.version=o}var n=r.prototype;return n.getContext=function(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:dm,logger:W,format:this.format}},n.generate=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initLfs();case 2:return e.next=4,this.initPlugins();case 4:return e.next=6,this.onInit();case 6:return e.next=8,this.callHook("init");case 8:return e.next=10,this.checkStyle();case 10:return e.next=12,this.generateLogo();case 12:return e.next=14,this.onReadme();case 14:return e.next=16,this.callHook("readme");case 16:return e.next=18,this.generateArticles();case 18:return e.next=20,this.callHook("articles");case 20:return e.next=22,this.onSummary();case 22:return e.next=24,this.callHook("summary");case 24:return e.next=26,this.callHook("beforeFinish");case 26:if(!e.sent){e.next=31;break}return e.next=29,this.onFinish();case 29:return e.next=31,this.callHook("finish");case 31:W.success("generation finished with success!");case 32:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.checkStyle=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(Lm.style)){e.next=3;break}return e.next=3,this.tmpFS.writeFile(Lm.style,"");case 3:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.initLfs=function(){var r=e(t.mark((function e(){var r,n,o,a,s,c,u,l=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.options.lfs&&(W.info("generate lfs files..."),r="git lfs ls-files -l",n=this.book.config,(o=n.getValue("root",""))&&(r+=" --include "+o),a=T.sync(r,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),s=a.error,c=a.stdout,u={},s||c.trim().split("\n").forEach((function(e){if(e){var t=e.trim().split(/\s[-*]\s/),r=t[0],n=t[1];if(r&&n){var a=n.trim();o&&(a=i.relative(o,a)),u[a]=r.trim(),l.tmpFS.unlink(a)}}})),this.options.lfs.files=u,W.info("found "+Object.keys(u).length+" files"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.initPlugins=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bg(this.book,this.tmpFS.root,this.options.plugins);case 2:this.plugins=e.sent;case 3:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.generateLogo=function(){var r=e(t.mark((function e(){var r,n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(Lm.logo)){e.next=7;break}return r=this.book.config.getValue("title","Untitled"),n=j.createCanvas(60,60),Rg.create(r,60,n),i=n.toBuffer("image/png"),e.next=7,this.tmpFS.writeFile(Lm.logo,i);case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.generateArticles=function(){var r=e(t.mark((function e(){var r,n,i,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:W.info("generate articles ..."),r=this.book.summary.getArticles(),W.info("found "+r.length+" articles"),n=Ug(r);case 4:if((i=n()).done){e.next=20;break}if(!(o=i.value).ref){e.next=18;break}return W.info('generate article "'+o.getRef()+'"'),e.prev=8,e.next=11,this.onArticle(o);case 11:return e.next=13,this.callHook("article",o);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(8),"ENOENT"===e.t0.code?W.warn("article file ["+o.ref+"] not exist"):W.warn("generate article ["+o.ref+"] failed: "+e.t0.message);case 18:e.next=4;break;case 20:case"end":return e.stop()}}),e,this,[[8,15]])})));return function(){return r.apply(this,arguments)}}(),n.callHook=function(){var r=e(t.mark((function r(n){var i,o,a,s=this,c=arguments;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(i=c.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=c[a];return W.debug('calling hook "'+n+'"'),r.next=4,Hg(this.plugins,function(){var r=e(t.mark((function e(r){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=r.getHook(n))){e.next=5;break}return e.next=4,i.apply(r.getContext(s.getContext()),o);case 4:return e.abrupt("return",e.sent);case 5:return e.abrupt("return",!0);case 6:case"end":return e.stop()}}),e)})));return function(e){return r.apply(this,arguments)}}());case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})));return function(e){return r.apply(this,arguments)}}(),n.makeFile=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tmpFS.readAsString(r.ref);case 2:return n=e.sent,i=this.parseFileMeta(r.ref,n),e.abrupt("return",new Sg(a({path:r.path},i)));case 5:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.parseFileMeta=function(e,t){var r=t.match(Vg),n={};if(r){if(void 0!==r[2])try{n=L.load(r[2])||{}}catch(e){}t=void 0!==r[3]?r[3]:""}var o=i.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(o),{meta:n,content:t}},r}();function Gg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Kg=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).format="json",e.scripts=[],e}s(n,r);var o=n.prototype;return o.onInit=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.processSummary(),e.next=3,this.installCommonAssets();case 3:return e.next=5,this.installReader();case 5:return e.next=7,this.copyPluginsAssets();case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.processSummary=function(){var e=this;this.book.summary.getArticle((function(t){return e.book.config.getValue(["release","pathEncode"],!0)&&(t.path=N.pinyin(t.path,{toneType:"none",nonZh:"consecutive",type:"array",v:!0}).join("")),t.hasPath=!0,!1}))},o.installCommonAssets=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("installing common assets ..."),e.next=3,this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js");case 3:return e.next=5,this.installPackage("react","umd/react.production.min.js","react/react.production.min.js");case 5:return e.next=7,this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js");case 7:W.info("common assets installed with success");case 8:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.installReader=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("installing package @topwrite/reader ..."),e.next=3,this.installPackage("@topwrite/reader","dist/","reader");case 3:r=e.sent,W.info("package @topwrite/reader@"+r.version+" installed with success");case 5:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.installPackage=function(){var r=e(t.mark((function e(r,n,o){var a,s,c,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=require.resolve(r+"/package.json"),s=require(a),!this.useCdn()){e.next=7;break}n.endsWith("/")&&(n+="index.js"),this.scripts.push("https://jsdelivr.topthink.com/npm/"+r+"@"+s.version+"/"+n),e.next=13;break;case 7:return c=i.join(i.dirname(a),n),u=i.join(this.tmpFS.root,"asset",o),e.next=11,I.copy(c,u);case 11:n.endsWith("/")&&(o+="/index.js"),this.scripts.push("asset/"+o+"?v="+s.version);case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),o.copyPluginsAssets=function(){var r=e(t.mark((function e(){var r,n,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Gg(this.plugins);case 1:if((n=r()).done){e.next=13;break}if(o=n.value,!this.useCdn()){e.next=8;break}a=this.options.plugins.host,this.scripts.push(a+"/plugins/"+o.name+"/"+o.version+"/dist/index.js"),e.next=11;break;case 8:return e.next=10,I.copy(i.join(o.path,"dist"),i.join(this.tmpFS.root,"asset","plugins",o.name));case 10:this.scripts.push("asset/plugins/"+o.name+"/index.js?v="+o.version);case 11:e.next=1;break;case 13:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.useCdn=function(){return"cdn"===this.options.asset},o.onReadme=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeFile({path:"index.html",ref:"README.md"});case 2:return r=e.sent,e.next=5,this.tmpFS.unlink("README.md");case 5:return e.next=7,this.tmpFS.writeFile("index.html.json",this.stringify(r));case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onArticle=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.path+".json",this.tmpFS.exist(n)){e.next=10;break}return e.next=4,this.makeFile(r);case 4:return i=e.sent,r.metadata=a({},i.meta,r.metadata),e.next=8,this.tmpFS.unlink(r.ref);case 8:return e.next=10,this.tmpFS.writeFile(n,this.stringify(i));case 10:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.onSummary=function(){var r=e(t.mark((function e(){var r,n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.book.summary,e.next=3,this.tmpFS.unlink(Eg.file.json);case 3:return e.next=5,this.tmpFS.unlink(Eg.file.markdown);case 5:return e.next=7,this.tmpFS.writeFile(Eg.file.json,this.stringify(r.toObject()));case 7:return n={id:this.book.id,sha:this.book.sha,lfs:this.options.lfs,scripts:this.scripts,poweredBy:this.options.poweredBy,mtime:this.sourceFS.readFileMTime()},e.next=10,this.tmpFS.writeFile("context.json",this.stringify(n));case 10:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onFinish=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.packBook();case 2:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.packBook=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("pack book ..."),r=I.createWriteStream(this.dest),e.next=4,this.tmpFS.archive(r,"tar");case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.stringify=function(e){return JSON.stringify(e,null,4)},n}(Qg);function Jg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Yg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yg(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Zg=function(){function r(e){this.root=void 0,this.root=e}var n=r.prototype;return n.readFileMTime=function(e){void 0===e&&(e="");var t="git log --pretty=format:%cI -1 -- "+e,r=T.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0}),n=r.error,i=r.stdout;if(!n)return i||void 0},n.createReadStream=function(e,t){return I.createReadStream(this.resolve(e),t)},n.readFile=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I.readFile(this.resolve(r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.readAsObject=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n={}),e.prev=1,e.next=4,I.readJSON(this.resolve(r));case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(e,t){return r.apply(this,arguments)}}(),n.readAsString=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,I.readFile(this.resolve(r),"utf-8");case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return","");case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(e){return r.apply(this,arguments)}}(),n.writeFile=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.resolve(r),I.ensureDirSync(i.dirname(r)),e.abrupt("return",I.writeFile(r,n));case 3:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.createWriteStream=function(e,t){return e=this.resolve(e),I.ensureDirSync(i.dirname(e)),I.createWriteStream(e,t)},n.appendFile=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",I.appendFile(this.resolve(r),n));case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.exist=function(e){return I.pathExistsSync(this.resolve(e))},n.unlink=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,I.unlink(this.resolve(r));case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(e){return r.apply(this,arguments)}}(),n.readDir=function(){var r=e(t.mark((function e(r){var n,i=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=""),n=[],e.abrupt("return",new Promise((function(e){z({path:i.resolve(r),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){n.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(function(){e(n)}))})));case 3:case"end":return e.stop()}}),e)})));return function(e){return r.apply(this,arguments)}}(),n.resolve=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.join.apply(i,[this.root].concat(t))},n.archive=function(){var r=e(t.mark((function e(r,n){var i,o=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===n&&(n="tar"),"tar"!=n){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){B.pack(o.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(r).on("error",(function(e){t(e)})).on("close",(function(){e()}))})));case 5:return e.next=7,this.readDir();case 7:return i=e.sent,e.abrupt("return",new Promise((function(e,t){r.on("error",(function(e){t(e)})),r.on("close",(function(){e()}));var a=q(n,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});a.pipe(r);for(var s,c=Jg(i);!(s=c()).done;){var u=s.value;"File"===u.type&&a.append(o.createReadStream(u.path),{name:u.path})}a.finalize()})));case 9:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),r}(),Xg=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).template=void 0,e.format="html",e}s(n,r);var o=n.prototype;return o.onInit=function(){var n=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.prototype.onInit.call(this);case 2:return e.next=4,this.initTemplate();case 4:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),o.initTemplate=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I.readFile(i.resolve(__dirname,"../templates/html.ejs"),"utf-8");case 2:r=e.sent,this.template=M.compile(r);case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.useCdn=function(){return!1},o.onReadme=function(){var r=e(t.mark((function e(){var r,n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeFile({path:"index.html",ref:"README.md"});case 2:return r=e.sent,e.next=5,this.renderFile(r);case 5:return n=e.sent,e.next=8,this.tmpFS.unlink("README.md");case 8:return e.next=10,this.tmpFS.writeFile("index.html",n);case 10:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onArticle=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(r.path)){e.next=12;break}return e.next=3,this.makeFile(r);case 3:return n=e.sent,r.metadata=a({},n.meta,r.metadata),e.next=7,this.renderFile(n,r.title);case 7:return i=e.sent,e.next=10,this.tmpFS.unlink(r.ref);case 10:return e.next=12,this.tmpFS.writeFile(r.path,i);case 12:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.onSummary=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tmpFS.unlink(Eg.file.json);case 2:return e.next=4,this.tmpFS.unlink(Eg.file.markdown);case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.renderFile=function(){var r=e(t.mark((function e(r,n){var i,o,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={id:this.book.id,sha:this.book.sha,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:r,lfs:this.options.lfs,options:{poweredBy:this.options.poweredBy}},o=this.scripts.map((function(e){return Dg(e)?e:r.relative(e)})),a=this.book.config.getValue("title","Untitled"),s=r.getMeta("title",n),e.abrupt("return",this.template({title:(s?s+" - ":"")+a,keywords:r.getMeta("keywords"),description:r.getMeta("description"),scripts:o,payload:JSON.stringify(i).replace(/\//g,"\\/")}));case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n}(Kg);const ev=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));function tv(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const o=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",o=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+o,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},a=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=o;if((!Array.isArray(t.excludes)||!ev(t.excludes,r))&&(!Array.isArray(t.includes)||ev(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=a),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}function rv(r,n){var i=n.tryEvery,o=n.stopAfter,a=Date.now();return new Promise((function n(s,c){setTimeout(e(t.mark((function e(){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r();case 3:i=e.sent,s(i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Date.now()-a>o?c(e.t0):n(s,c);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),i)}))}var nv=function(r){function n(){return r.apply(this,arguments)||this}return s(n,r),n.prototype.fetch=function(){var n=e(t.mark((function e(n,i){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o=i.element)||"IMG"!==o.nodeName){e.next=3;break}return e.abrupt("return",null);case 3:return e.abrupt("return",r.prototype.fetch.call(this,n,i));case 4:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),n}($.ResourceLoader);const iv=/\s+at.*[(\s](.*)\)?/,ov=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,av=void 0===R.homedir?"":R.homedir().replace(/\\/g,"/");class sv extends Error{#e;name="AggregateError";constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=e.map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>{return"string"==typeof e.stack&&e.stack.length>0?(t=function(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${Os(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(iv);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||ov.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(iv,((e,t)=>e.replace(t,t.replace(av,"~"))))),e))).join("\n")}(e.stack),t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"")):String(e);var t})).join("\n");t="\n"+function(e,t=1,r={}){const{indent:n=" ",includeEmptyLines:i=!1}=r;if("string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if("string"!=typeof n)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(0===t)return e;const o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}(t,4),super(t),this.#e=e}get errors(){return this.#e.slice()}}class cv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const uv=e=>void 0===globalThis.DOMException?new cv(e):new DOMException(e),lv=e=>{const t=void 0===e.reason?uv("This operation was aborted."):e.reason;return t instanceof Error?t:uv(t)};async function fv(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise(((o,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if("function"!=typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(r)&&r!==Number.POSITIVE_INFINITY||!(r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const s=[],c=[],u=new Map;let l=!1,f=!1,h=!1,p=0,d=0;const m=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{l=!0,f=!0,a(e)};i&&(i.aborted&&g(lv(i)),i.addEventListener("abort",(()=>{g(lv(i))})));const v=async()=>{if(f)return;const e=await m.next(),r=d;if(d++,e.done){if(h=!0,0===p&&!f){if(!n&&c.length>0)return void g(new sv(c));if(f=!0,0===u.size)return void o(s);const e=[];for(const[t,r]of s.entries())u.get(t)!==hv&&e.push(r);o(e)}}else p++,(async()=>{try{const n=await e.value;if(f)return;const i=await t(n,r);i===hv&&u.set(r,i),s[r]=i,p--,await v()}catch(e){if(n)g(e);else{c.push(e),p--;try{await v()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<r;e++){try{await v()}catch(e){g(e);break}if(h||l)break}})()}))}const hv=Symbol("skip");function pv(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return dv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var gv=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).format="ebook",e}s(n,r);var o=n.prototype;return o.initPlugins=function(){var n=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},e.next=4,r.prototype.initPlugins.call(this);case 4:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),o.createDOM=function(){var r=e(t.mark((function e(r,n){var i,o,a,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new nv,(o=new $.VirtualConsole).on("error",(function(e){W.error(e)})),a=!1,s=0,c=new $.JSDOM(r,{virtualConsole:o,url:"file:///"+this.tmpFS.resolve(n.path),runScripts:"dangerously",resources:i,pretendToBeVisual:!0,beforeParse:function(e){e.SC_DISABLE_SPEEDY=!0;var t=e.document,r={attributes:!0,childList:!0,subtree:!0};e.addEventListener("load",(function(){var n=new e.MutationObserver((function(e){for(var t,r=pv(e);!(t=r()).done;){var n=t.value;"childList"===n.type&&n.addedNodes.forEach((function(e){"SCRIPT"===e.nodeName&&(++s,e.addEventListener("load",(function(){--s})))}))}}));n.observe(t.head,r)})),e.addEventListener("bootstrapped",(function(){a=!0}))}}),e.next=7,rv((function(){if(!a||s>0)throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100});case 7:return e.abrupt("return",c);case 8:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),o.renderFile=function(){var n=e(t.mark((function n(i,o){var a,s,c,u,l=this;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.prototype.renderFile.call(this,i,o);case 2:return a=n.sent,n.next=5,this.createDOM(a,i);case 5:return s=n.sent,n.next=8,fv(Array.from(s.window.document.images),function(){var r=e(t.mark((function e(r,n){var o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.src){e.next=14;break}if(a=S.parse(r.src),null==(o=a.protocol)||!o.startsWith("http")){e.next=14;break}return e.prev=3,W.info("fetch image#"+n+": "+r.src),e.next=7,l.fetchImage(i,r.src);case 7:r.src=e.sent,W.info("image#"+n+" fetch succeed"),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),W.warn("image#"+n+" "+r.src+" fetch failed");case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(e,t){return r.apply(this,arguments)}}(),{concurrency:3});case 8:for(c=0,u=Array.from(s.window.document.scripts);c<u.length;c++)u[c].remove();return n.abrupt("return",s.serialize());case 10:case"end":return n.stop()}}),n,this)})));return function(e,t){return n.apply(this,arguments)}}(),o.fetchImage=function(){var r=e(t.mark((function e(r,n){var i,o,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dm.get(n,{responseType:"stream",timeout:5e3,headers:{"User-Agent":"TopWriteBuilder/"+this.version}});case 2:return i=e.sent,o="_images/"+Lg(n),(a=C.extension(i.headers["content-type"]))&&(o+="."+a),s=this.tmpFS.createWriteStream(o),e.abrupt("return",new Promise((function(e,t){i.data.pipe(s),s.on("error",(function(e){s.close(),t(e)})),s.on("close",(function(){e(r.relative(o))}))})));case 8:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),o.getConvertOptions=function(){var r=e(t.mark((function e(r){var n,o,a,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.book.config,o={title:n.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0},e.t0=r,e.next="docx"===e.t0?5:"epub"===e.t0?7:"pdf"===e.t0?9:31;break;case 5:return o["docx-no-toc"]=!0,e.abrupt("break",31);case 7:return o["dont-split-on-page-breaks"]=!0,e.abrupt("break",31);case 9:return a={poweredBy:this.options.poweredBy},e.next=12,M.renderFile(i.resolve(__dirname,"../templates/pdf-header.ejs"),a,{rmWhitespace:!0});case 12:return s=e.sent,e.next=15,M.renderFile(i.resolve(__dirname,"../templates/pdf-footer.ejs"),a,{rmWhitespace:!0});case 15:return c=e.sent,o["chapter-mark"]=n.getValue(["pdf","chapterMark"]),o["page-breaks-before"]=n.getValue(["pdf","pageBreaksBefore"]),o["pdf-page-margin-left"]=n.getValue(["pdf","margin","left"]),o["pdf-page-margin-right"]=n.getValue(["pdf","margin","right"]),o["pdf-page-margin-top"]=n.getValue(["pdf","margin","top"]),o["pdf-page-margin-bottom"]=n.getValue(["pdf","margin","bottom"]),o["pdf-serif-family"]=n.getValue(["pdf","fontFamily"]),o["paper-size"]=n.getValue(["pdf","paperSize"]),o["pdf-custom-size"]=n.getValue(["pdf","customSize"]),o.unit="millimeter",o["pdf-page-numbers"]=n.getValue(["pdf","pageNumbers"]),o["preserve-cover-aspect-ratio"]=!0,o["pdf-header-template"]=s,o["pdf-footer-template"]=c,e.abrupt("break",31);case 31:return e.abrupt("return",o);case 32:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.packBook=function(){var n=e(t.mark((function e(){var n,o,a,s,c,u=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.extname(this.dest).substr(1),["pdf","docx","epub"].includes(n)){e.next=3;break}return e.abrupt("return",r.prototype.packBook.call(this));case 3:return e.next=5,U.lookpath("ebook-convert");case 5:if(o=e.sent){e.next=8;break}throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");case 8:return e.next=10,this.getConvertOptions(n);case 10:return a=e.sent,s=tv(a),c=this.tmpFS.resolve("index.html"),s.unshift(c,this.dest),e.abrupt("return",new Promise((function(e,t){var r,n;W.info("convert book ...");var i=T(o,s,{stdio:["inherit"],cwd:u.tmpFS.root}),a=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^Ignoring internal ","^CSSStyleDeclaration: ","^CSSStylesheet: ","^PropertyValue: ","^CSSVariable: ",mv(c),mv(u.dest)].map((function(e){return"("+e+")"})).join("|"),l=new RegExp("("+a+")");null==(r=i.stdout)||r.on("data",(function(e){e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((function(e){if(e){var t=e.trim();e.match(l)?W.debug({message:t,type:"log"}):W.log(t)}}))})),null==(n=i.stderr)||n.on("data",(function(e){W.error(e.toString().trimEnd())})),i.on("close",(function(r){0!==r?t("Convert failed"):e()}))})));case 15:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),n}(Xg),vv=V,yv=process.cwd,bv=null,wv=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return bv||(bv=yv.call(process)),bv};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var xv=process.chdir;process.chdir=function(e){bv=null,xv.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,xv)}var kv=function(e){vv.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,vv.O_WRONLY|vv.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,vv.O_WRONLY|vv.O_SYMLINK,r),o=!0;try{n=e.fchmodSync(i,r),o=!1}finally{if(o)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){vv.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,n,i){e.open(t,vv.O_SYMLINK,(function(t,o){t?i&&i(t):e.futimes(o,r,n,(function(t){e.close(o,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,o=e.openSync(t,vv.O_SYMLINK),a=!0;try{i=e.futimesSync(o,r,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=a(e.statSync),e.fstatSync=a(e.fstatSync),e.lstatSync=a(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===wv&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),a),void(a<100&&(a+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){s(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!s(e))throw e}}:t}function n(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function i(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function a(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,o,a,c);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c};var Ev=x.Stream,Sv=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Ev.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,s=o.length;a<s;a++){var c=o[a];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Ev.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),o=0,a=i.length;o<a;o++){var s=i[o];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Pv=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:Cv(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},Cv=Object.getPrototypeOf||function(e){return e.__proto__};var _v,Av,Rv=P,Fv=kv,Ov=Sv,Tv=Pv,Dv=w;function Lv(e,t){Object.defineProperty(e,_v,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(_v=Symbol.for("graceful-fs.queue"),Av=Symbol.for("graceful-fs.previous")):(_v="___graceful-fs.queue",Av="___graceful-fs.previous");var jv=function(){};if(Dv.debuglog?jv=Dv.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(jv=function(){var e=Dv.format.apply(Dv,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Rv[_v]){var Iv=K[_v]||[];Lv(Rv,Iv),Rv.close=function(e){function t(t,r){return e.call(Rv,t,(function(e){e||Mv(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Av,{value:e}),t}(Rv.close),Rv.closeSync=function(e){function t(t){e.apply(Rv,arguments),Mv()}return Object.defineProperty(t,Av,{value:e}),t}(Rv.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){jv(Rv[_v]),_.equal(Rv[_v].length,0)}))}K[_v]||Lv(K,Rv[_v]);var Nv,zv=qv(Tv(Rv));function qv(e){Fv(e),e.gracefulify=qv,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):Bv([e,[r,n,i],t,o||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,o,a){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):Bv([e,[t,n,i,o],r,a||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,o,a){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):Bv([e,[t,r,i,o],n,a||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,o,a){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof o&&o.apply(this,arguments):Bv([e,[t,r,n,o],i,a||Date.now(),Date.now()])}))}(e,t,r,n)});var o=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=a.test(process.version)?function(e,t,r,n){return o(e,i(e,t,r,n))}:function(e,t,r,n){return o(e,t,i(e,t,r,n))};return n(e,t,r);function i(e,t,r,i){return function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(a&&a.sort&&a.sort(),"function"==typeof r&&r.call(this,o,a)):Bv([n,[e,t,r],o,i||Date.now(),Date.now()])}}};var a=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=Ov(e);h=s.ReadStream,p=s.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(p.prototype=Object.create(u.prototype),p.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var l=h;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=p;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function p(e,t){return this instanceof p?(u.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var d=e.open;function m(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,o){return d(t,r,n,(function(a,s){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof i&&i.apply(this,arguments):Bv([e,[t,r,n,i],a,o||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=m,e}function Bv(e){jv("ENQUEUE",e[0].name,e[1]),Rv[_v].push(e),Uv()}function Mv(){for(var e=Date.now(),t=0;t<Rv[_v].length;++t)Rv[_v][t].length>2&&(Rv[_v][t][3]=e,Rv[_v][t][4]=e);Uv()}function Uv(){if(clearTimeout(Nv),Nv=void 0,0!==Rv[_v].length){var e=Rv[_v].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(void 0===i)jv("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){jv("TIMEOUT",t.name,r);var a=r.pop();"function"==typeof a&&a.call(null,n)}else{var s=Date.now()-o,c=Math.max(o-i,1);s>=Math.min(1.2*c,100)?(jv("RETRY",t.name,r),t.apply(null,r.concat([i]))):Rv[_v].push(e)}void 0===Nv&&(Nv=setTimeout(Uv,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Rv.__patched&&(zv=qv(Rv),Rv.__patched=!0);var $v=J(zv);const Vv=R.homedir(),{env:Hv}=process,Qv=Hv.XDG_DATA_HOME||(Vv?i.join(Vv,".local","share"):void 0),Gv=Hv.XDG_CONFIG_HOME||(Vv?i.join(Vv,".config"):void 0);Hv.XDG_STATE_HOME||Vv&&i.join(Vv,".local","state"),Hv.XDG_CACHE_HOME||Vv&&i.join(Vv,".cache"),Hv.XDG_RUNTIME_DIR;const Wv=(Hv.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Qv&&Wv.unshift(Qv);const Kv=(Hv.XDG_CONFIG_DIRS||"/etc/xdg").split(":");Gv&&Kv.unshift(Gv);var Jv={exports:{}},Yv={exports:{}};
2
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("commander"),n=require("tmp"),i=require("path"),o=require("consola"),a=require("@babel/runtime/helpers/extends"),s=require("@babel/runtime/helpers/inheritsLoose"),c=require("@babel/runtime/helpers/createClass"),u=require("lodash/cloneDeep"),l=require("lodash/get"),f=require("lodash/isEmpty"),h=require("lodash/isEqual"),p=require("lodash/omit"),d=require("lodash/set"),m=require("lodash/toPath"),g=require("lodash/unset"),v=require("lodash/merge"),y=require("lodash/keys"),b=require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),w=require("util"),x=require("stream"),k=require("http"),S=require("https"),E=require("url"),P=require("fs"),C=require("mime-types"),A=require("assert"),_=require("tty"),R=require("os"),F=require("zlib"),O=require("events"),T=require("cross-spawn"),D=require("vm2"),L=require("js-yaml"),I=require("canvas"),j=require("fs-extra"),N=require("pinyin-pro"),q=require("fstream-ignore"),z=require("archiver"),M=require("tar-pack"),B=require("ejs"),U=require("lookpath"),$=require("jsdom"),V=require("constants"),H=require("crypto");function Q(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var G=Q(P),W=o.create({}),K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}};
3
+ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),p=r(o+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),g=r("\\:\\:"+r(p+"\\:")+"{5}"+d),v=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),x=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),k=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),S=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),E=r([m,g,v,y,b,w,x,k,S].join("|")),P=r(r(l+"|"+a)+"+");r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),r(r(a+"|"+t(l,s))+"*");var C=r(a+"|"+t(l,s,"[\\:\\@]"));return r(r(a+"|"+t(l,s,"[\\@]"))+"+"),r(r(C+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=p-d,C=Math.floor,A=String.fromCharCode;function _(e){throw new RangeError(E[e])}function R(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function F(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+R((e=e.replace(S,".")).split("."),t).join(".")}function O(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var T=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},D=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},L=function(e,t,r){var n=0;for(e=r?C(e/v):e>>1,e+=C(e/t);e>P*m>>1;n+=p)e=C(e/P);return C(n+(P+1)*e/(e+g))},I=function(e){var t=[],r=e.length,n=0,i=b,o=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s<a;++s)e.charCodeAt(s)>=128&&_("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c<r;){for(var u=n,l=1,f=p;;f+=p){c>=r&&_("invalid-input");var g=T(e.charCodeAt(c++));(g>=p||g>C((h-n)/l))&&_("overflow"),n+=g*l;var v=f<=o?d:f>=o+m?m:f-o;if(g<v)break;var x=p-v;l>C(h/x)&&_("overflow"),l*=x}var k=t.length+1;o=L(n-u,k,0==u),C(n/k)>h-i&&_("overflow"),i+=C(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},j=function(e){var t=[],r=(e=O(e)).length,n=b,i=0,o=y,a=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var f=u.value;f<128&&t.push(A(f))}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,S=!1,E=void 0;try{for(var P,R=e[Symbol.iterator]();!(k=(P=R.next()).done);k=!0){var F=P.value;F>=n&&F<x&&(x=F)}}catch(e){S=!0,E=e}finally{try{!k&&R.return&&R.return()}finally{if(S)throw E}}var T=v+1;x-n>C((h-i)/T)&&_("overflow"),i+=(x-n)*T,n=x;var I=!0,j=!1,N=void 0;try{for(var q,z=e[Symbol.iterator]();!(I=(q=z.next()).done);I=!0){var M=q.value;if(M<n&&++i>h&&_("overflow"),M==n){for(var B=i,U=p;;U+=p){var $=U<=o?d:U>=o+m?m:U-o;if(B<$)break;var V=B-$,H=p-$;t.push(A(D($+V%H,0))),B=C(V/H)}t.push(A(D(B,0))),o=L(i,T,v==g),i=0,++v}}}catch(e){j=!0,N=e}finally{try{!I&&z.return&&z.return()}finally{if(j)throw N}}++i,++n}return t.join("")},N=function(e){return F(e,(function(e){return x.test(e)?I(e.slice(4).toLowerCase()):e}))},q=function(e){return F(e,(function(e){return k.test(e)?"xn--"+j(e):e}))},z={version:"2.1.0",ucs2:{decode:O,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:I,encode:j,toASCII:q,toUnicode:N},M={};function B(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function U(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function $(e,t){function r(e){var r=U(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,B).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,B).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,B).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,B).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,B).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=l(a,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),v=0;v<d;++v)g[v]=f[v]||h[m+v]||"";p&&(g[d-1]=H(g[d-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return o&&(w+="%"+o),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){W?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=M[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)$(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=z.toASCII(r.host.replace(n.PCT_ENCODED,U).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(r,c)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,Z=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=M[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?z.toUnicode(e.host):z.toASCII(e.host.replace(r.PCT_ENCODED,U).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}$(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=J(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function oe(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,B)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,U)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},de={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Se=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Ee=new RegExp(t("[^]",me,we),"g"),Pe=Ee;function Ce(e){var t=U(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,c=a.length;s<c;++s){var u=a[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,o[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=z.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,s=n.length;a<s;++a){var c=String(n[a]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,Ce).replace(ke,i).replace(Se,B),f=c.slice(u+1);try{f=t.iri?z.toUnicode(f):z.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==de[d]&&p.push(d.replace(ke,Ce).replace(ke,i).replace(Ee,B)+"="+h[d].replace(ke,Ce).replace(ke,i).replace(Pe,B));return p.length&&(r.query=p.join("&")),r}},_e=/^([^\:]+)\:(.*)/,Re={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(_e),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),c=M[s];n.nid=o,n.nss=a,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=M[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},Fe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Fe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};M[ue.scheme]=ue,M[le.scheme]=le,M[he.scheme]=he,M[pe.scheme]=pe,M[Ae.scheme]=Ae,M[Re.scheme]=Re,M[Oe.scheme]=Oe,e.SCHEMES=M,e.pctEncChar=B,e.pctDecChars=U,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=oe,e.equal=ae,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(Y.exports);var Z=Y.exports,X=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},ee={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:te,checkDataTypes:function(e,t,r){if(1===e.length)return te(e[0],t,r,!0);var n="",i=ne(e);for(var o in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+te(o,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(re[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(re[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:ne,getProperty:ae,escapeQuotes:se,equal:X,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:ce,getPathExpr:function(e,t,r,n){var i=r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return fe(e,i)},getPath:function(e,t,r){var n=ce(r?"/"+he(t):ae(t));return fe(e,n)},getData:function(e,t,r){var n,i,o,a;if(""===e)return"rootData";if("/"==e[0]){if(!ue.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(!(a=e.match(le)))throw new Error("Invalid JSON-pointer: "+e);if(n=+a[1],"#"==(i=a[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(o="data"+(t-n||""),!i)return o}for(var s=o,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(s+=" && "+(o+=ae(pe(l))))}return s},unescapeFragment:function(e){return pe(decodeURIComponent(e))},unescapeJsonPointer:pe,escapeFragment:function(e){return encodeURIComponent(he(e))},escapeJsonPointer:he};function te(e,t,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var re=ne(["string","number","integer","boolean","null"]);function ne(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var ie=/^[a-z$_][a-z$_0-9]*$/i,oe=/'|\\/g;function ae(e){return"number"==typeof e?"["+e+"]":ie.test(e)?"."+e:"['"+se(e)+"']"}function se(e){return e.replace(oe,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function ce(e){return"'"+se(e)+"'"}var ue=/^\/(?:[^~]|~0|~1)*$/,le=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function he(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function pe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var de=ee,me=function(e){de.copy(e,this)};var ge={exports:{}},ve=ge.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),ye(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function ye(e,t,r,n,i,o,a,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,o,a,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in ve.arrayKeywords)for(var h=0;h<f.length;h++)ye(e,t,r,f[h],i+"/"+l+"/"+h,o,i,l,n,h)}else if(l in ve.propsKeywords){if(f&&"object"==typeof f)for(var p in f)ye(e,t,r,f[p],i+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,l,n,p)}else(l in ve.keywords||e.allKeys&&!(l in ve.skipKeywords))&&ye(e,t,r,f,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}ve.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},ve.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},ve.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},ve.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var be=ge.exports,we=Z,xe=X,ke=ee,Se=me,Ee=be,Pe=Ce;function Ce(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return Ce.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Se)return Te(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,o,a,s=Ae.call(this,t,r);return s&&(i=s.schema,t=s.root,a=s.baseId),i instanceof Se?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=Te(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function Ae(e,t){var r=we.parse(t),n=je(r),i=Ie(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var o=qe(n),a=this._refs[o];if("string"==typeof a)return _e.call(this,e,a,r);if(a instanceof Se)a.validate||this._compile(a),e=a;else{if(!((a=this._schemas[o])instanceof Se))return;if(a.validate||this._compile(a),o==qe(t))return{schema:a,root:e,baseId:i};e=a}if(!e.schema)return;i=Ie(this._getId(e.schema))}return Fe.call(this,r,i,e.schema,e)}function _e(e,t,r){var n=Ae.call(this,e,t);if(n){var i=n.schema,o=n.baseId;e=n.root;var a=this._getId(i);return a&&(o=ze(o,a)),Fe.call(this,r,o,i,e)}}Ce.normalizeId=qe,Ce.fullPath=Ie,Ce.url=ze,Ce.ids=function(e){var t=qe(this._getId(e)),r={"":t},n={"":Ie(t,!1)},i={},o=this;return Ee(e,{allKeys:!0},(function(e,t,a,s,c,u,l){if(""!==t){var f=o._getId(e),h=r[s],p=n[s]+"/"+c;if(void 0!==l&&(p+="/"+("number"==typeof l?l:ke.escapeFragment(l))),"string"==typeof f){f=h=qe(h?we.resolve(h,f):f);var d=o._refs[f];if("string"==typeof d&&(d=o._refs[d]),d&&d.schema){if(!xe(e,d.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=qe(p))if("#"==f[0]){if(i[f]&&!xe(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else o._refs[f]=p}r[t]=h,n[t]=p}})),i},Ce.inlineRef=Te,Ce.schema=Ae;var Re=ke.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Fe(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var a=i[o];if(a){if(void 0===(r=r[a=ke.unescapeFragment(a)]))break;var s;if(!Re[a]&&((s=this._getId(r))&&(t=ze(t,s)),r.$ref)){var c=ze(t,r.$ref),u=Ae.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var Oe=ke.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Te(e,t){return!1!==t&&(void 0===t||!0===t?De(e):t?Le(e)<=t:void 0)}function De(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!De(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!De(t))return!1}return!0}function Le(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=Le(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(Oe[i])r++;else if("object"==typeof(t=e[i])&&(r+=Le(t)+1),r==1/0)return 1/0}return r}function Ie(e,t){return!1!==t&&(e=qe(e)),je(we.parse(e))}function je(e){return we.serialize(e).split("#")[0]+"#"}var Ne=/#\/?$/;function qe(e){return e?e.replace(Ne,""):""}function ze(e,t){return t=qe(t),we.resolve(e,t)}var Me=Pe,Be={Validation:$e((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:$e(Ue)};function Ue(e,t,r){this.message=r||Ue.message(e,t),this.missingRef=Me.url(e,t),this.missingSchema=Me.normalizeId(Me.fullPath(this.missingRef))}function $e(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Ue.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var Ve=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},o={key:n,value:t[n]};return e(i,o)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,a;if(Array.isArray(t)){for(a="[",o=0;o<t.length;o++)o&&(a+=","),a+=e(t[o])||"null";return a+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(a="",o=0;o<c.length;o++){var u=c[o],l=e(t[u]);l&&(a&&(a+=","),a+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+a+"}"}}(e)},He=function(e,t,r){var n="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?d=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,d=!e.opts.allErrors;var w="",x="",k=e.schema.type,S=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],S=!0)),S&&1==k.length&&(k=k[0],S=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var E=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(E||S||!0===P||P&&!Y(P)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var C=S?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[C](k,m,e.opts.strictNumbers,!0)+") { ",E){var A="dataType"+u,_="coerced"+u;n+=" var "+A+" = typeof "+m+"; var "+_+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+_+" = "+m+"; } "),n+=" if ("+_+" !== undefined) ; ";var R=E;if(R)for(var F,O=-1,T=R.length-1;O<T;)"string"==(F=R[O+=1])?n+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+_+" = '' + "+m+"; else if ("+m+" === null) "+_+" = ''; ":"number"==F||"integer"==F?(n+=" else if ("+A+" == 'boolean' || "+m+" === null || ("+A+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==F&&(n+=" && !("+m+" % 1)"),n+=")) "+_+" = +"+m+"; "):"boolean"==F?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+_+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+_+" = true; ":"null"==F?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+_+" = null; ":"array"==e.opts.coerceTypes&&"array"==F&&(n+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+m+" == null) "+_+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=S?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=S?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+_+" !== undefined) { ";var D=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+_+"; ",l||(n+="if ("+D+" !== undefined)"),n+=" "+D+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+_+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=S?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=S?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!o)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var L=e.RULES;if(L)for(var I=-1,j=L.length-1;I<j;)if(Y(P=L[I+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var N=Object.keys(f);if(N)for(var q,z=-1,M=N.length-1;z<M;){if(void 0!==($=f[q=N[z+=1]]).default){var B=m+e.util.getProperty(q);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault($.default)+" ":n+=" "+JSON.stringify($.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var U=e.schema.items;if(U){O=-1;for(var $,V=U.length-1;O<V;)if(void 0!==($=U[O+=1]).default){B=m+"["+O+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault($.default)+" ":n+=" "+JSON.stringify($.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,G=-1,W=H.length-1;G<W;)if(Z(Q=H[G+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",d&&(w+="}"))}if(d&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!E)){n+=" else { ";var J;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=S?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=S?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}d&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(Z(t[r]))return!0}function Z(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},Qe=Pe,Ge=ee,We=Be,Ke=Ve,Je=He,Ye=Ge.ucs2length,Ze=X,Xe=We.Validation,et=function e(t,r,n,i){var o=this,a=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},p=[];r=r||{schema:t,refVal:s,refs:c};var d=tt.call(this,t,r,i),m=this._compilations[d.index];if(d.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,a.sourceCode&&(b.source=y.source)),y}finally{rt.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(o,t,n,i,l);var d,m=!0===t.$async,y=Je({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:We.MissingRef,RULES:v,validate:Je,util:Ge,resolve:Qe,resolveRef:x,usePattern:E,useDefault:P,useCustomRule:C,opts:a,formats:g,logger:o.logger,self:o});y=ct(s,at)+ct(u,it)+ct(f,ot)+ct(p,st)+y,a.processCode&&(y=a.processCode(y,t));try{d=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(o,v,g,r,s,f,p,Ze,Ye,Xe),s[0]=d}catch(e){throw o.logger.error("Error compiling schema, function code:",y),e}return d.schema=t,d.errors=null,d.refs=c,d.refVal=s,d.root=h?d:n,m&&(d.$async=!0),!0===a.sourceCode&&(d.source={code:y,patterns:u,defaults:f}),d}function x(t,i,u){i=Qe.url(t,i);var l,f,h=c[i];if(void 0!==h)return S(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var p=r.refs[i];if(void 0!==p)return S(l=r.refVal[p],f=k(i,l))}f=k(i);var d=Qe.call(o,w,r,i);if(void 0===d){var m=n&&n[i];m&&(d=Qe.inlineRef(m,a.inlineRefs)?m:e.call(o,m,r,n,t))}if(void 0!==d)return function(e,t){var r=c[e];s[r]=t}(i,d),S(d,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function S(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function E(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return Ge.toQuotedString(e);case"object":if(null===e)return"null";var t=Ke(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function C(e,t,r,n){if(!1!==o._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+o.errorsText(s.errors);if("log"!=o._opts.validateSchema)throw new Error(c);o.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(o,t,r,n);else if(h)u=h.call(o,t,r,n),!1!==a.validateSchema&&o.validateSchema(u,!0);else if(f)u=f.call(o,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var d=p.length;return p[d]=u,{code:"customRule"+d,validate:u}}};function tt(e,t,r){var n=nt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function rt(e,t,r){var n=nt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function nt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function it(e,t){return"var pattern"+e+" = new RegExp("+Ge.toQuotedString(t[e])+");"}function ot(e){return"var default"+e+" = defaults["+e+"];"}function at(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function st(e){return"var customRule"+e+" = customRules["+e+"];"}function ct(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var ut={exports:{}},lt=ut.exports=function(){this._cache={}};lt.prototype.put=function(e,t){this._cache[e]=t},lt.prototype.get=function(e){return this._cache[e]},lt.prototype.del=function(e){delete this._cache[e]},lt.prototype.clear=function(){this._cache={}};var ft=ut.exports,ht=ee,pt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,dt=[0,31,28,31,30,31,30,31,31,30,31,30,31],mt=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,gt=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,vt=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,yt=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,bt=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,wt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,xt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,kt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,St=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Et=Pt;function Pt(e){return e="full"==e?"full":"fast",ht.copy(Pt[e])}function Ct(e){var t=e.match(pt);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:dt[n])}function At(e,t){var r=e.match(mt);if(!r)return!1;var n=r[1],i=r[2],o=r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23==n&&59==i&&60==o)&&(!t||a)}Pt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":yt,url:bt,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:gt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ot,uuid:wt,"json-pointer":xt,"json-pointer-uri-fragment":kt,"relative-json-pointer":St},Pt.full={date:Ct,time:At,"date-time":function(e){var t=e.split(_t);return 2==t.length&&Ct(t[0])&&At(t[1],!0)},uri:function(e){return Rt.test(e)&&vt.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":yt,url:bt,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:gt,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ot,uuid:wt,"json-pointer":xt,"json-pointer-uri-fragment":kt,"relative-json-pointer":St};var _t=/t|\s/i;var Rt=/\/|:/;var Ft=/[^\\]\\Z/;function Ot(e){if(Ft.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Tt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.$data&&m&&m.$data,v=p?"<":">",y=p?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(g){var w=e.util.getData(m.$data,a,e.dataPathArr),x="exclusive"+o,k="exclType"+o,S="exclIsNumber"+o,E="' + "+(A="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+o)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=d;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var C=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+o+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,u=e.errSchemaPath+"/"+d,n=w,h=g)}else{E=v;if((S="number"==typeof m)&&h){var A="'"+E+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{S&&void 0===s?(x=!0,b=d,u=e.errSchemaPath+"/"+d,n=m,y+="="):(S&&(n=Math[p?"min":"max"](m,s)),m===(!S||n)?(x=!0,b=d,u=e.errSchemaPath+"/"+d,y+="="):(x=!1,E+="="));A="'"+E+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+A+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+E+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";C=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},Dt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Lt=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},It=function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},jt={$ref:function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+a;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(d),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var m=o;o=y.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,d);e.logger.warn(d),l&&(o+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=c,o+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",l&&(o+=" if ("+v+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var b=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(o+=" var "+h+"; "),o+=" try { await "+b+"; ",l&&(o+=" "+h+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(o+=" "+h+" = false; "),o+=" } ",l&&(o+=" if ("+h+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(o+=" else { ")}return o},allOf:function(e,t,r){var n=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,p=i;if(p)for(var d,m=-1,g=p.length-1;m<g;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,c.schema=d,c.schemaPath=o+"["+m+"]",c.errSchemaPath=a+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=p.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=a;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],p.schema=w,p.schemaPath=s+"["+x+"]",p.errSchemaPath=c+"/"+x,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t;e.opts.allErrors;var a=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+a+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(o)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";p.dataPathArr[g]=m;var k=e.validate(p);p.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=w,n+=" if (!"+d+") {"}else n+=" if ("+l+".length == 0) {";var S=S||[];S.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;return n=S.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in a)if("__proto__"!=x){var y=a[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var S=-1,E=k.length-1;S<E;){F=k[S+=1],S&&(n+=" || "),n+=" ( ( "+(L=l+(D=e.util.getProperty(F)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(F)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?F:D)+") ) "}n+=")) { ";var P="missing"+i,C="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var A=A||[];A.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+C+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var _=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+_+"]); ":n+=" validate.errors = ["+_+"]; return false; ":n+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var R=b;if(R)for(var F,O=-1,T=R.length-1;O<T;){F=R[O+=1];var D=e.util.getProperty(F),L=(C=e.util.escapeQuotes(F),l+D);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,F,e.opts.jsonPointers)),n+=" if ( "+L+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(F)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+C+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(p+="}",n+=" else { ")}e.errorPath=w;var I=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+d+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=I,n+=" } ",u&&(n+=" if ("+d+") { ",p+="}"))}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&a&&a.$data;h?(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",f="schema"+i):f=a;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+f+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[a])){if("ignore"==p)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(d&&p.indexOf(a)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(a)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(a);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(a),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(a),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(a),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var w;p.createErrors=!1,p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,v?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+d+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(a)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+a.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(d+="}",n+=" else { ")}var E=a;if(E)for(var P,C=-1,A=E.length-1;C<A;)if(P=E[C+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+C+") { ";var _=l+"["+C+"]";p.schema=P,p.schemaPath=s+"["+C+"]",p.errSchemaPath=c+"/"+C,p.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,!0),p.dataPathArr[v]=C;var R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,_)+" ":n+=" var "+y+" = "+_+"; "+R+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){p.schema=w,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);_=l+"["+g+"]";p.dataPathArr[v]=g;R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,_)+" ":n+=" var "+y+" = "+_+"; "+R+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=s,p.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);_=l+"["+g+"]";p.dataPathArr[v]=g;R=e.validate(p);p.baseId=b,e.util.varOccurences(R,y)<2?n+=" "+e.util.varReplace(R,y,_)+" ":n+=" var "+y+" = "+_+"; "+R+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+d+" if ("+h+" == errors) {"),n},maximum:Tt,minimum:Tt,maxItems:Dt,minItems:Dt,maxLength:Lt,minLength:Lt,maxProperties:It,minProperties:It,multipleOf:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+o+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+o+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var w=a;if(w)for(var x,k=-1,S=w.length-1;k<S;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(p.schema=x,p.schemaPath=s+"["+k+"]",p.errSchemaPath=c+"/"+k,n+=" "+e.validate(p)+" ",p.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",d+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=p.compositeRule=b,n+=d+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(a||{}).filter(D),x=e.schema.patternProperties||{},k=Object.keys(x).filter(D),S=e.schema.additionalProperties,E=w.length||k.length,P=!1===S,C="object"==typeof S&&Object.keys(S).length,A=e.opts.removeAdditional,_=P||C||A,R=e.opts.ownProperties,F=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var T=e.util.toHash(O);function D(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+d+" = true;",R&&(n+=" var "+b+" = undefined;"),_){if(n+=R?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",E){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var L=w;if(L)for(var I=-1,j=L.length-1;I<j;)K=L[I+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var N=k;if(N)for(var q=-1,z=N.length-1;q<z;)oe=N[q+=1],n+=" || "+e.usePattern(oe)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==A)n+=" delete "+l+"["+m+"]; ";else{var M=e.errorPath,B="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(A)n+=" delete "+l+"["+m+"]; ";else{n+=" "+d+" = false; ";var U=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+B+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var $=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+$+"]); ":n+=" validate.errors = ["+$+"]; return false; ":n+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=U,u&&(n+=" break; ")}else if(C)if("failing"==A){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=S,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+d+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=S,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; ")}e.errorPath=M}E&&(n+=" } "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var K,J=-1,Y=W.length-1;J<Y;){var Z=a[K=W[J+=1]];if(e.opts.strictKeywords?"object"==typeof Z&&Object.keys(Z).length>0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){var X=e.util.getProperty(K),ee=(H=l+X,G&&void 0!==Z.default);h.schema=Z,h.schemaPath=s+X,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=F,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(T&&T[K]){n+=" if ( "+te+" === undefined ",R&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = false; ";M=e.errorPath,U=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(M,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";$=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+$+"]); ":n+=" validate.errors = ["+$+"]; return false; ":n+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=U,e.errorPath=M,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",R&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",R&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+d+") { ",p+="}")}}if(k.length){var ie=k;if(ie)for(var oe,ae=-1,se=ie.length-1;ae<se;){Z=x[oe=ie[ae+=1]];if(e.opts.strictKeywords?"object"==typeof Z&&Object.keys(Z).length>0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){h.schema=Z,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),n+=R?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(oe)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=F,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; "),n+=" } ",u&&(n+=" else "+d+" = true; "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}}}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=s,h.errSchemaPath=c;var d="key"+i,m="idx"+i,g="i"+i,v="' + "+d+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+d+" = "+b+"["+m+"]; ":" for (var "+d+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=d,S=e.compositeRule;e.compositeRule=h.compositeRule=!0;var E=e.validate(h);h.baseId=x,e.util.varOccurences(E,y)<2?n+=" "+e.util.varReplace(E,y,k)+" ":n+=" var "+y+" = "+k+"; "+E+" ",e.compositeRule=h.compositeRule=S,n+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),f="valid"+i,h=e.opts.$data&&a&&a.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="schema"+i;if(!h)if(a.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=a;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(d[d.length]=g)}}else d=a;if(h||d.length){var w=e.errorPath,x=h||d.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(R="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,R,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+C+" = 0; "+C+" < "+p+".length; "+C+"++) { "+f+" = "+l+"["+p+"["+C+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+C+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(_=_||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=_.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=d;if(P)for(var C=-1,A=P.length-1;C<A;){O=P[C+=1],C&&(n+=" || "),n+=" ( ( "+(I=l+(L=e.util.getProperty(O)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:L)+") ) "}n+=") { ";var _;S="' + "+(R="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,R,!0):w+" + "+R),(_=_||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";E=n;n=_.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var R;S="' + "+(R="schema"+i+"["+(C="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,R,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+C+" = 0; "+C+" < "+p+".length; "+C+"++) { if ("+l+"["+p+"["+C+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+C+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var F=d;if(F)for(var O,T=-1,D=F.length-1;T<D;){O=F[T+=1];var L=e.util.getProperty(O),I=(S=e.util.escapeQuotes(O),l+L);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,O,e.opts.jsonPointers)),n+=" if ( "+I+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(a||""),h="valid"+o,p=e.opts.$data&&s&&s.$data;if(p?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",n="schema"+o):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:He},Nt=jt,qt=ee.toHash,zt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Mt=Be.MissingRef,Bt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var o=a(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&o.then((function(e){n(null,e)}),n);return o;function a(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Mt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var o=i._loadingSchemas[n];o||(o=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return o.then((function(e){if(!u(n))return a(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var Ut={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},$t=Ut,Vt={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:$t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:$t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Ht=/^[a-z_$][a-z0-9_$-]*$/i,Qt=function(e,t,r){var n,i,o=" ",a=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),p="valid"+a,d="errs__"+a,m=e.opts.$data&&c&&c.$data;m?(o+=" var schema"+a+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+a):i=c;var g,v,y,b,w,x=this,k="definition"+a,S=x.definition,E="";if(m&&S.$data){w="keywordValidate"+a;var P=S.validateSchema;o+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=S.compile,v=S.inline,y=S.macro}var C=w+".errors",A="i"+a,_="ruleErr"+a,R=S.async;if(R&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(o+=C+" = null;"),o+="var "+d+" = errors;var "+p+";",m&&S.$data&&(E+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",P&&(E+="}",o+=" "+p+" = "+k+".validateSchema("+i+"); if ("+p+") { ")),v)S.statements?o+=" "+b.validate+" ":o+=" "+p+" = "+b.validate+"; ";else if(y){var F=e.util.copy(e);E="";F.level++;var O="valid"+F.level;F.schema=b.validate,F.schemaPath="";var T=e.compositeRule;e.compositeRule=F.compositeRule=!0;var D=e.validate(F).replace(/validate\.schema/g,w);e.compositeRule=F.compositeRule=T,o+=" "+D}else{(N=N||[]).push(o),o="",o+=" "+w+".call( ",e.opts.passContext?o+="this":o+="self",g||!1===S.schema?o+=" , "+h+" ":o+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var L=s?"data"+(s-1||""):"parentData",I=s?e.dataPathArr[s]:"parentDataProperty",j=o+=" , "+L+" , "+I+" , rootData ) ";o=N.pop(),!1===S.errors?(o+=" "+p+" = ",R&&(o+="await "),o+=j+"; "):o+=R?" var "+(C="customErrors"+a)+" = null; try { "+p+" = await "+j+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } ":" "+C+" = null; "+p+" = "+j+"; "}if(S.modifying&&(o+=" if ("+L+") "+h+" = "+L+"["+I+"];"),o+=""+E,S.valid)f&&(o+=" if (true) { ");else{var N;o+=" if ( ",void 0===S.valid?(o+=" !",o+=y?""+O:""+p):o+=" "+!S.valid+" ",o+=") { ",n=x.keyword,(N=N||[]).push(o),o="",(N=N||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var q=o;o=N.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+q+"]); ":o+=" validate.errors = ["+q+"]; return false; ":o+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var z=o;o=N.pop(),v?S.errors?"full"!=S.errors&&(o+=" for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+_+" = vErrors["+A+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+_+".schema = "+i+"; "+_+".data = "+h+"; "),o+=" } "):!1===S.errors?o+=" "+z+" ":(o+=" if ("+d+" == errors) { "+z+" } else { for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+_+" = vErrors["+A+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(o+=" "+_+".schema = "+i+"; "+_+".data = "+h+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===S.errors?o+=" "+z+" ":(o+=" if (Array.isArray("+C+")) { if (vErrors === null) vErrors = "+C+"; else vErrors = vErrors.concat("+C+"); errors = vErrors.length; for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+_+" = vErrors["+A+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(o+=" "+_+".schema = "+i+"; "+_+".data = "+h+"; "),o+=" } } else { "+z+" } "),o+=" } ",f&&(o+=" else { ")}return o},Gt=Vt,Wt={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Ht.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)a(e,n[i],t);else a(e,n,t);var o=t.metaSchema;o&&(t.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(o,!0))}function a(e,t,n){for(var i,o=0;o<r.length;o++){var a=r[o];if(a.type==t){i=a;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:Qt,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(Gt,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var Kt={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},Jt=et,Yt=Pe,Zt=ft,Xt=me,er=Ve,tr=Et,rr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=qt(t),e.types=qt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Nt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Nt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=qt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},nr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),o=e;for(n=1;n<i.length;n++)o=o[i[n]];for(n=0;n<zt.length;n++){var a=zt[n],s=o[a];s&&(o[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},ir=ee,or=fr;fr.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},fr.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},fr.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return vr(this,t=Yt.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,r,n,!0),this},fr.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},fr.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(cr)?cr:void 0,e._opts.defaultMeta}(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},fr.prototype.getSchema=function(e){var t=hr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=Yt.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,o=r.baseId,a=Jt.call(e,n,i,void 0,o);return e._fragments[t]=new Xt({ref:t,fragment:!0,schema:n,root:i,baseId:o,validate:a}),a}}(this,e)}},fr.prototype.removeSchema=function(e){if(e instanceof RegExp)return pr(this,this._schemas,e),pr(this,this._refs,e),this;switch(typeof e){case"undefined":return pr(this,this._schemas),pr(this,this._refs),this._cache.clear(),this;case"string":var t=hr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=Yt.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},fr.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},fr.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var a=e[o];a&&(i+=n+a.dataPath+" "+a.message+r)}return i.slice(0,-r.length)},fr.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(e):e,a=this._cache.get(o);if(a)return a;n=n||!1!==this._opts.addUsedSchema;var s=Yt.normalizeId(this._getId(e));s&&n&&vr(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==Yt.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=Yt.ids.call(this,e),f=new Xt({id:s,schema:e,localRefs:l,cacheKey:o,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(o,f),u&&c&&this.validateSchema(e,!0);return f},fr.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=Jt.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},fr.prototype.compileAsync=Bt;var ar=Wt;fr.prototype.addKeyword=ar.add,fr.prototype.getKeyword=ar.get,fr.prototype.removeKeyword=ar.remove,fr.prototype.validateKeyword=ar.validate;var sr=Be;fr.ValidationError=sr.Validation,fr.MissingRefError=sr.MissingRef,fr.$dataMetaSchema=nr;var cr="http://json-schema.org/draft-07/schema",ur=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],lr=["/properties"];function fr(e){if(!(this instanceof fr))return new fr(e);e=this._opts=ir.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:yr,warn:yr,error:yr};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=tr(e.format),this._cache=e.cache||new Zt,this._loadingSchemas={},this._compilations=[],this.RULES=rr(),this._getId=function(e){switch(e.schemaId){case"auto":return gr;case"id":return dr;default:return mr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=er),this._metaOpts=function(e){for(var t=ir.copy(e._opts),r=0;r<ur.length;r++)delete t[ur[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=Kt,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=Ut;e._opts.$data&&(r=nr(r,lr));e.addMetaSchema(r,cr,!0),e._refs["http://json-schema.org/schema"]=cr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function hr(e,t){return t=Yt.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function pr(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function dr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function mr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function gr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function vr(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function yr(){}var br=J(or),wr={exports:{}};var xr,kr={exports:{}};function Sr(){return xr||(xr=1,kr.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==K&&K.crypto&&(r=K.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=o.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=o.algo={};return o}(Math),e)),kr.exports;var e}var Er,Pr={exports:{}};function Cr(){return Er||(Er=1,Pr.exports=(e=Sr(),function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),Pr.exports;var e}var Ar,_r={exports:{}};_r.exports=(Ar=Sr(),function(e){var t=Ar,r=t.lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var s=o.MD5=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],h=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],S=e[t+12],E=e[t+13],P=e[t+14],C=e[t+15],A=o[0],_=o[1],R=o[2],F=o[3];A=c(A,_,R,F,s,7,a[0]),F=c(F,A,_,R,h,12,a[1]),R=c(R,F,A,_,p,17,a[2]),_=c(_,R,F,A,d,22,a[3]),A=c(A,_,R,F,m,7,a[4]),F=c(F,A,_,R,g,12,a[5]),R=c(R,F,A,_,v,17,a[6]),_=c(_,R,F,A,y,22,a[7]),A=c(A,_,R,F,b,7,a[8]),F=c(F,A,_,R,w,12,a[9]),R=c(R,F,A,_,x,17,a[10]),_=c(_,R,F,A,k,22,a[11]),A=c(A,_,R,F,S,7,a[12]),F=c(F,A,_,R,E,12,a[13]),R=c(R,F,A,_,P,17,a[14]),A=u(A,_=c(_,R,F,A,C,22,a[15]),R,F,h,5,a[16]),F=u(F,A,_,R,v,9,a[17]),R=u(R,F,A,_,k,14,a[18]),_=u(_,R,F,A,s,20,a[19]),A=u(A,_,R,F,g,5,a[20]),F=u(F,A,_,R,x,9,a[21]),R=u(R,F,A,_,C,14,a[22]),_=u(_,R,F,A,m,20,a[23]),A=u(A,_,R,F,w,5,a[24]),F=u(F,A,_,R,P,9,a[25]),R=u(R,F,A,_,d,14,a[26]),_=u(_,R,F,A,b,20,a[27]),A=u(A,_,R,F,E,5,a[28]),F=u(F,A,_,R,p,9,a[29]),R=u(R,F,A,_,y,14,a[30]),A=l(A,_=u(_,R,F,A,S,20,a[31]),R,F,g,4,a[32]),F=l(F,A,_,R,b,11,a[33]),R=l(R,F,A,_,k,16,a[34]),_=l(_,R,F,A,P,23,a[35]),A=l(A,_,R,F,h,4,a[36]),F=l(F,A,_,R,m,11,a[37]),R=l(R,F,A,_,y,16,a[38]),_=l(_,R,F,A,x,23,a[39]),A=l(A,_,R,F,E,4,a[40]),F=l(F,A,_,R,s,11,a[41]),R=l(R,F,A,_,d,16,a[42]),_=l(_,R,F,A,v,23,a[43]),A=l(A,_,R,F,w,4,a[44]),F=l(F,A,_,R,S,11,a[45]),R=l(R,F,A,_,C,16,a[46]),A=f(A,_=l(_,R,F,A,p,23,a[47]),R,F,s,6,a[48]),F=f(F,A,_,R,y,10,a[49]),R=f(R,F,A,_,P,15,a[50]),_=f(_,R,F,A,g,21,a[51]),A=f(A,_,R,F,S,6,a[52]),F=f(F,A,_,R,d,10,a[53]),R=f(R,F,A,_,x,15,a[54]),_=f(_,R,F,A,h,21,a[55]),A=f(A,_,R,F,b,6,a[56]),F=f(F,A,_,R,C,10,a[57]),R=f(R,F,A,_,v,15,a[58]),_=f(_,R,F,A,E,21,a[59]),A=f(A,_,R,F,m,6,a[60]),F=f(F,A,_,R,k,10,a[61]),R=f(R,F,A,_,p,15,a[62]),_=f(_,R,F,A,w,21,a[63]),o[0]=o[0]+A|0,o[1]=o[1]+_|0,o[2]=o[2]+R|0,o[3]=o[3]+F|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=i._createHelper(s),t.HmacMD5=i._createHmacHelper(s)}(Math),Ar.MD5);var Rr,Fr=_r.exports,Or=J(Fr),Tr={exports:{}},Dr={exports:{}};function Lr(){return Rr||(Rr=1,Dr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+a[u];f+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,c=s,s=o,o=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,o,a,s}(Sr())),Dr.exports}var Ir,jr,Nr={exports:{}};function qr(){return jr||(jr=1,Tr.exports=function(e){return function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,c=n.keySize,u=n.iterations;s.length<c;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var l=1;l<u;l++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*c,a}});t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}}(),e.EvpKDF}(Sr(),Lr(),(Ir||(Ir=1,Nr.exports=(t=(e=Sr()).lib.Base,r=e.enc.Utf8,void(e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))),Nr.exports))),Tr.exports;var e,t,r}var zr,Mr={exports:{}};wr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var m=e[r],g=e[m],v=e[g],y=257*e[d]^16843008*d;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[d]=y<<24|y>>>8,f[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<c;d++){var m=n[u>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&h]^r[p++],g=n[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[p++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&f]^r[p++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[p++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[p++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[p++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Sr(),Cr(),qr(),zr||(zr=1,Mr.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var a=0;a<n;a++)e[r+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),e}(),d=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var c=o.create(a,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=u.create({keySize:t+r,hasher:i}).compute(e,n);else var a=u.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,m.create({key:a,iv:s,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Sr(),qr())));var Br=J(wr.exports),Ur={exports:{}};Ur.exports=function(e){return e.enc.Utf8}(Sr());var $r=J(Ur.exports),Vr={},Hr={};function Qr(e,t){for(var r=t,n=0;n<e.length;n++){var i=n===e.length-1,o=e.charAt(n),a=r[o]||(r[o]={chars:{}});i&&(a.self=e),r=a.chars}}function Gr(e){if(0===e.length)return Vr;for(var t={},r=0,n=e;r<n.length;r++){Qr(n[r],t)}return t}function Wr(e){if(0===e.length)return Hr;for(var t={},r=0,n=e;r<n.length;r++){t[n[r]]=!0}return t}var Kr={},Jr={type:"String",optional:!0};function Yr(e){var t={type:"NoArgument",optional:!1};function r(e){if(t.type&&t.type!==e&&"NoArgument"!==t.type)throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(e,'".'));t.type=e}for(var n=0,i=e;n<i.length;n++){var o=i[n];"NoArgument"===o&&(t.optional=!0),"Formula"===o&&r("Formula"),"FormulaOfSelector"===o&&(r("Formula"),t.ofSelector=!0),"String"===o&&r("String"),"Selector"===o&&r("Selector")}return t}function Zr(e){for(var t=function(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){var i=n[r],o=e[i];if(o)for(var a=0,s=o;a<s.length;a++){var c=s[a];(t[c]||(t[c]=[])).push(i)}}return t}(e),r={},n=0,i=Object.keys(t);n<i.length;n++){var o=i[n],a=t[o];a&&(r[o]=Yr(a))}return r}var Xr=function(){return Xr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xr.apply(this,arguments)},en={},tn={wildcard:!0};function rn(e,t){return function(r,n){return!0===n?e:t(!0===r?e:r,n)}}function nn(e){return function(t,r){if(!r||!t)return r;if("object"!=typeof r||null===r)throw new Error("Unexpected syntax definition extension type: ".concat(r,"."));for(var n=Xr({},t),i=0,o=Object.entries(r);i<o.length;i++){var a=o[i],s=a[0],c=a[1],u=e[s];n[s]=u(t[s],c)}return n}}function on(e,t){return void 0!==t?t:e}function an(e,t){return t?e?e.concat(t):t:e}function sn(e,t){if(!t)return e;if(!e)return t;for(var r=Xr({},e),n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],a=o[0],s=o[1];if(s){var c=e[a];r[a]=c?c.concat(s):s}else delete r[a]}return r}var cn=function(e){return function(t,r){var n=e(t,r);if(!n)throw new Error("Syntax definition cannot be null or undefined.");return n}}(nn({baseSyntax:on,tag:rn(tn,nn({wildcard:on})),ids:on,classNames:on,namespace:rn(tn,nn({wildcard:on})),combinators:an,attributes:nn({operators:an,caseSensitivityModifiers:an,unknownCaseSensitivityModifiers:on}),pseudoClasses:nn({unknown:on,definitions:sn}),pseudoElements:nn({unknown:on,notation:on,definitions:function(e,t){return function(r,n){return t(e(r),e(n))}}((function(e){return Array.isArray(e)?{NoArgument:e}:e}),sn)})})),un={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},ln=cn(un,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),fn=cn(ln,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),hn=cn(fn,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has"]}}}),pn={css1:un,css2:ln,css3:fn,"selectors-3":fn,"selectors-4":hn,latest:hn,progressive:cn(hn,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}})};function dn(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e||"\\"===e||e>=" "}function mn(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e||e>=" "}function gn(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var vn={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\"},yn={" ":!0,"\t":!0,"\n":!0,"\r":!0,"\f":!0},bn={'"':!0,"'":!0},wn={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},xn="css-selector-parser parse error: ";var kn=function(){return kn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kn.apply(this,arguments)};function Sn(e){return function(t,r){var n;return(n={})[t]=function(t){return kn({type:e},t)},n[r]=function(t){return"object"==typeof t&&null!==t&&t.type===e},n}}kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn(kn({},Sn("Selector")("selector","isSelector")),Sn("Rule")("rule","isRule")),Sn("TagName")("tagName","isTagName")),Sn("Id")("id","isId")),Sn("ClassName")("className","isClassName")),Sn("WildcardTag")("wildcardTag","isWildcardTag")),Sn("NamespaceName")("namespaceName","isNamespaceName")),Sn("WildcardNamespace")("wildcardNamespace","isWildcardNamespace")),Sn("NoNamespace")("noNamespace","isNoNamespace")),Sn("Attribute")("attribute","isAttribute")),Sn("PseudoClass")("pseudoClass","isPseudoClass")),Sn("PseudoElement")("pseudoElement","isPseudoElement")),Sn("String")("string","isString")),Sn("Formula")("formula","isFormula")),Sn("FormulaOfSelector")("formulaOfSelector","isFormulaOfSelector")),Sn("Substitution")("substitution","isSubstitution"));const En=function(e){void 0===e&&(e={});var t=e.syntax,r=void 0===t?"latest":t,n=e.substitutes,i=e.strict,o=void 0===i||i,a="object"==typeof r?r:pn[r];a.baseSyntax&&(a=cn(pn[a.baseSyntax],a));var s,c=a.tag?[!0,Boolean((s=a.tag,s?"boolean"==typeof s?tn:s:en).wildcard)]:[!1,!1],u=c[0],l=c[1],f=Boolean(a.ids),h=Boolean(a.classNames),p=Boolean(a.namespace),d=a.namespace&&(!0===a.namespace||!0===a.namespace.wildcard);if(p&&!u)throw new Error("".concat(xn,"Namespaces cannot be enabled while tags are disabled."));var m=Boolean(n),g=a.combinators?Gr(a.combinators):Vr,v=a.attributes?[!0,a.attributes.operators?Gr(a.attributes.operators):Vr,a.attributes.caseSensitivityModifiers?Wr(a.attributes.caseSensitivityModifiers):Hr,"accept"===a.attributes.unknownCaseSensitivityModifiers]:[!1,Vr,Hr,!1],y=v[0],b=v[1],w=v[2],x=v[3],k=x||Object.keys(w).length>0,S=a.pseudoClasses?[!0,a.pseudoClasses.definitions?Zr(a.pseudoClasses.definitions):Kr,"accept"===a.pseudoClasses.unknown]:[!1,Kr,!1],E=S[0],P=S[1],C=S[2],A=a.pseudoElements?[!0,"singleColon"===a.pseudoElements.notation||"both"===a.pseudoElements.notation,!a.pseudoElements.notation||"doubleColon"===a.pseudoElements.notation||"both"===a.pseudoElements.notation,a.pseudoElements.definitions?Zr(Array.isArray(a.pseudoElements.definitions)?{NoArgument:a.pseudoElements.definitions}:a.pseudoElements.definitions):Kr,"accept"===a.pseudoElements.unknown]:[!1,!1,!1,Kr,!1],_=A[0],R=A[1],F=A[2],O=A[3],T=A[4],D="",L=D.length,I=0,j="",N=function(e){return j===e},q=function(){return N("*")||dn(j)},z=function(e){I=e,j=D.charAt(I)},M=function(){I++,j=D.charAt(I)},B=function(){var e=j;return I++,j=D.charAt(I),e};function U(e){var t=Math.min(L-1,I),r=new Error("".concat(xn).concat(e," Pos: ").concat(t,"."));throw r.position=t,r.name="ParserError",r}function $(e,t){if(!e)return U(t)}var V=function(){$(I<L,"Unexpected end of input.")},H=function(){return I>=L},Q=function(e){$(I<L,'Expected "'.concat(e,'" but end of input reached.')),$(j===e,'Expected "'.concat(e,'" but "').concat(j,'" found.')),I++,j=D.charAt(I)};function G(e){var t=W(e,I);if(t)return I+=t.length,j=D.charAt(I),t}function W(e,t){var r=e[D.charAt(t)];if(r){var n=W(r.chars,t+1);if(n)return n;if(r.self)return r.self}}function K(){for(var e=B();gn(j);)e+=B();return N(" ")&&M(),String.fromCharCode(parseInt(e,16))}function J(e){var t="";for(Q(e);I<L;){if(N(e))return M(),t;if(N("\\")){M();var r=void 0;if(N(e))t+=e;else if(void 0!==(r=vn[j]))t+=r;else{if(gn(j)){t+=K();continue}t+=j}}else t+=j;M()}return t}function Y(){if(!dn(j))return null;for(var e="";N("-");)e+=j,M();for(o&&e.length>=2&&U("Identifiers cannot start with two hyphens with strict mode on."),wn[j]&&U("Identifiers cannot start with hyphens followed by digits.");I<L;)if(mn(j))e+=B();else{if(!N("\\"))break;M(),V(),gn(j)?e+=K():e+=B()}return e}function Z(){for(var e="";I<L&&!N(")");)if(N("\\")){if(M(),H()&&!o)return(e+"\\").trim();V(),gn(j)?e+=K():e+=B()}else e+=B();return e.trim()}function X(){for(;yn[j];)M()}function ee(e){void 0===e&&(e=!1),X();for(var t=[se(e)];N(",");)M(),X(),t.push(se(e));return{type:"Selector",rules:t}}function te(){var e;if(Q("["),X(),N("|")){$(p,"Namespaces are not enabled."),M();var t=Y();$(t,"Expected attribute name."),e={type:"Attribute",name:t,namespace:{type:"NoNamespace"}}}else if(N("*")){$(p,"Namespaces are not enabled."),$(d,"Wildcard namespace is not enabled."),M(),Q("|");var r=Y();$(r,"Expected attribute name."),e={type:"Attribute",name:r,namespace:{type:"WildcardNamespace"}}}else{var n=Y();if($(n,"Expected attribute name."),e={type:"Attribute",name:n},N("|")){var i=I;if(M(),dn(j)){$(p,"Namespaces are not enabled.");var a=Y();$(a,"Expected attribute name."),e={type:"Attribute",name:a,namespace:{type:"NamespaceName",name:n}}}else z(i)}}if($(e.name,"Expected attribute name."),X(),H()&&!o)return e;if(N("]"))M();else{if(e.operator=G(b),$(e.operator,"Expected a valid attribute selector operator."),X(),V(),bn[j])e.value={type:"String",value:J(j)};else if(m&&N("$")){M();var s=Y();$(s,"Expected substitute name."),e.value={type:"Substitution",name:s}}else{var c=Y();$(c,"Expected attribute value."),e.value={type:"String",value:c}}if(X(),H()&&!o)return e;if(!N("]")){var u=Y();if($(u,"Expected end of attribute selector."),e.caseSensitivityModifier=u,$(k,"Attribute case sensitivity modifiers are not enabled."),$(x||w[e.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),X(),H()&&!o)return e}Q("]")}return e}function re(){for(var e="";wn[j];)e+=B();return $(""!==e,"Formula parse error."),parseInt(e)}var ne=function(){return N("-")||N("+")||wn[j]};function ie(e,t,r){var n;if(N("(")){if(M(),X(),m&&N("$")){M();var i=Y();$(i,"Expected substitute name."),n={type:"Substitution",name:i}}else if("String"===r.type)$((n={type:"String",value:Z()}).value,"Expected ".concat(t," argument value."));else if("Selector"===r.type)n=ee(!0);else{if("Formula"!==r.type)return U("Invalid ".concat(t," signature."));var a=function(){if(N("e")||N("o")){var e=Y();if("even"===e)return X(),[2,0];if("odd"===e)return X(),[2,1]}var t,r=null,n=1;if(N("-")&&(M(),n=-1),ne()&&(N("+")&&M(),r=re(),!N("\\")&&!N("n")))return[0,r*n];if(null===r&&(r=1),r*=n,N("\\")?(M(),t=gn(j)?K():B()):t=B(),$("n"===t,'Formula parse error: expected "n".'),X(),N("+")||N("-")){var i=N("+")?1:-1;return M(),X(),[r,i*re()]}return[r,0]}(),s=a[0],c=a[1];n={type:"Formula",a:s,b:c},r.ofSelector&&(X(),(N("o")||N("\\"))&&($("of"===Y(),"Formula of selector parse error."),X(),n={type:"FormulaOfSelector",a:s,b:c,selector:se()}))}if(X(),H()&&!o)return n;Q(")")}else $(r.optional,"Argument is required for ".concat(t,' "').concat(e,'".'));return n}function oe(){if(N("*"))return $(l,"Wildcard tag name is not enabled."),M(),{type:"WildcardTag"};if(dn(j)){$(u,"Tag names are not enabled.");var e=Y();return $(e,"Expected tag name."),{type:"TagName",name:e}}return U("Expected tag name.")}function ae(){if(N("*")){var e=I;return M(),N("|")?(M(),q()?($(p,"Namespaces are not enabled."),$(d,"Wildcard namespace is not enabled."),(r=oe()).namespace={type:"WildcardNamespace"},r):(z(e),oe())):(z(e),oe())}if(N("|"))return $(p,"Namespaces are not enabled."),M(),(r=oe()).namespace={type:"NoNamespace"},r;if(dn(j)){var t=Y();if($(t,"Expected tag name."),!N("|"))return $(u,"Tag names are not enabled."),{type:"TagName",name:t};var r;e=I;return M(),q()?($(p,"Namespaces are not enabled."),(r=oe()).namespace={type:"NamespaceName",name:t},r):(z(e),{type:"TagName",name:t})}return U("Expected tag name.")}function se(e){var t,r;void 0===e&&(e=!1);var n={type:"Rule",items:[]};e&&((m=G(g))&&(n.combinator=m,X()));for(;I<L;)if(q())$(0===n.items.length,"Unexpected tag/namespace start."),n.items.push(ae());else if(N("|")){var i=I;if(M(),!q()){z(i);break}$(0===n.items.length,"Unexpected tag/namespace start."),z(i),n.items.push(ae())}else if(N(".")){$(h,"Class names are not enabled."),M();var o=Y();$(o,"Expected class name."),n.items.push({type:"ClassName",name:o})}else if(N("#")){$(f,"IDs are not enabled."),M();var a=Y();$(a,"Expected ID name."),n.items.push({type:"Id",name:a})}else if(N("["))$(y,"Attributes are not enabled."),n.items.push(te());else{if(!N(":"))break;var s=!1;M(),N(":")&&($(_,"Pseudo elements are not enabled."),$(F,"Pseudo elements double colon notation is not enabled."),s=!0,M());var c=Y();if($(s||c,"Expected pseudo-class name."),$(!s||c,"Expected pseudo-element name."),$(c,"Expected pseudo-class name."),$(!s||T||Object.prototype.hasOwnProperty.call(O,c),'Unknown pseudo-element "'.concat(c,'".')),_&&(s||!s&&R&&Object.prototype.hasOwnProperty.call(O,c))){var u={type:"PseudoElement",name:c};(p=ie(c,"pseudo-element",l=null!==(t=O[c])&&void 0!==t?t:T&&Jr))&&($("Formula"!==p.type&&"FormulaOfSelector"!==p.type,"Pseudo-elements cannot have formula argument."),u.argument=p),n.items.push(u)}else{var l;$(E,"Pseudo-classes are not enabled."),$(l=null!==(r=P[c])&&void 0!==r?r:C&&Jr,'Unknown pseudo-class: "'.concat(c,'".'));var p,d={type:"PseudoClass",name:c};(p=ie(c,"pseudo-class",l))&&(d.argument=p),n.items.push(d)}}if(0===n.items.length)return H()?U("Expected rule but end of input reached."):U('Expected rule but "'.concat(j,'" found.'));if(X(),!H()&&!N(",")&&!N(")")){var m=G(g);X(),n.nestedRule=se(),n.nestedRule.combinator=m}return n}return function(e){if("string"!=typeof e)throw new Error("".concat(xn,"Expected string input."));return L=(D=e).length,I=0,j=D.charAt(0),ee()}}({syntax:"selectors-4"});function Pn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return En(e)}function Cn(){}function An(e){return Array.isArray(e.children)}function _n(e,t){const r=t[e.name];if(!e.value)return null!=r;e.value.type;let n=e.value.value,i=null==r?void 0:String(r);if("i"===e.caseSensitivityModifier&&(n=n.toLowerCase(),i&&(i=i.toLowerCase())),void 0!==r)switch(e.operator){case"=":return"string"==typeof i&&n===i;case"$=":return"string"==typeof r&&r.slice(-n.length)===n;case"*=":return"string"==typeof r&&r.includes(n);case"^=":return"string"==typeof r&&n===r.slice(0,n.length);case"~=":return Array.isArray(r)&&r.includes(n)||i===n}return!1}const Rn=new Set([9,10,12,13,32]),Fn="0".charCodeAt(0),On="9".charCodeAt(0);var Tn=J({trueFunc:function(){return!0},falseFunc:function(){return!1}});function Dn(e){return function(e){const t=e[0],r=e[1]-1;if(r<0&&t<=0)return Tn.falseFunc;if(-1===t)return e=>e<=r;if(0===t)return e=>e===r;if(1===t)return r<0?Tn.trueFunc:e=>e>=r;const n=Math.abs(t),i=(r%n+n)%n;return t>1?e=>e>=r&&e%n===i:e=>e<=r&&e%n===i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=o(),i=a();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=o(),s(),i=a()):n=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*i];function o(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function a(){const r=t;let n=0;for(;t<e.length&&e.charCodeAt(t)>=Fn&&e.charCodeAt(t)<=On;)n=10*n+(e.charCodeAt(t)-Fn),t++;return t===r?null:n}function s(){for(;t<e.length&&Rn.has(e.charCodeAt(t));)t++}}(e))}const Ln={}.hasOwnProperty;function In(e,t){const r=t||{};function n(t,...r){let i=n.invalid;const o=n.handlers;if(t&&Ln.call(t,e)){const r=String(t[e]);i=Ln.call(o,r)?o[r]:n.unknown}if(i)return i.call(this,t,...r)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const jn=Dn.default||Dn,Nn=In("name",{unknown:function(e){throw new Error("Unknown pseudo-selector `"+e.name+"`")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{is:zn,blank:qn,empty:qn,"first-child":function(e,t,r,n,i){return Mn(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return Mn(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const o=e.argument;!o||o.type;const a={type:"root",children:An(t)?t.children:[]},s={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return Vn(s,a),s.results.length>0},"last-child":function(e,t,r,n,i){return Mn(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return Mn(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},not:function(e,t,r,n,i){return!zn(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){const o=Bn(e);return Mn(i,e),"number"==typeof i.nodeIndex&&o(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){const o=Bn(e);return Mn(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&o(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){const o=Bn(e);return Mn(i,e),"number"==typeof i.typeIndex&&o(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){const o=Bn(e);return Mn(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&o(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return Mn(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return Mn(i,e),1===i.typeCount},root:function(e,t,r,n){return t&&!n},scope:function(e,t,r,n,i){return t&&i.scopeNodes.includes(t)}}});function qn(e,t){return An(t)?0===t.children.length:!("value"in t)}function zn(e,t,r,n,i){const o=e.argument;!o||o.type;const a={...i,found:!1,shallow:!1,one:!0,scopeNodes:[t],results:[],rootQuery:o};return Vn(a,t),a.results[0]===t}function Mn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function Bn(e){let t=e._cachedFn;if(!t){const r=e.argument;if("Formula"!==r.type)throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=jn(r.a+"n+"+r.b),e._cachedFn=t}return t}function Un(e,t,r,n,i){for(const o of e.items)if("Attribute"===o.type){if(!_n(o,t))return!1}else{if("Id"===o.type)throw new Error("Invalid selector: id");if("ClassName"===o.type)throw new Error("Invalid selector: class");if("PseudoClass"===o.type){if(!Nn(o,t,r,n,i))return!1}else{if("PseudoElement"===o.type)throw new Error("Invalid selector: `::"+o.name+"`");if("TagName"===o.type&&o.name!==t.type)return!1}}return!0}const $n=[];function Vn(e,t){t&&Hn(e,[],t,void 0,void 0,t)}function Hn(e,t,r,n,i,o){let a={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0},s=e.rootQuery.rules;return i&&i!==o&&(s=e.rootQuery.rules.filter((e=>void 0===e.combinator||">"===e.combinator&&i===o))),a=function(e,t,r,n,i){const o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(Un(s,r,n,i,e)){const t=s.nestedRule;if(t){Gn(o,"+"===t.combinator?"adjacentSibling":"~"===t.combinator?"generalSibling":">"===t.combinator?"directChild":"descendant",t)}else e.found=!0,e.results.includes(r)||e.results.push(r)}void 0===s.combinator?Gn(o,"descendant",s):"~"===s.combinator&&Gn(o,"generalSibling",s)}return o}(e,Qn(t,s),r,n,i),!An(r)||e.shallow||e.one&&e.found||function(e,t,r,n){const i=Qn(t.descendant,t.directChild);let o,a=-1;const s={count:0,types:new Map},c={count:0,types:new Map};for(;++a<r.children.length;)Wn(s,r.children[a]);a=-1;for(;++a<r.children.length;){const t=r.children[a].type.toUpperCase();e.nodeIndex=c.count,e.typeIndex=c.types.get(t)||0,e.nodeCount=s.count,e.typeCount=s.types.get(t);const u=Hn(e,Qn(i,o),r.children[a],a,r,n);if(o=Qn(u.generalSibling,u.adjacentSibling),e.one&&e.found)break;Wn(c,r.children[a])}}(e,a,r,o),a}function Qn(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:$n}function Gn(e,t,r){const n=e[t];n?n.push(r):e[t]=[r]}function Wn(e,t){const r=t.type.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}function Kn(e,t){const r=function(e,t){return{rootQuery:Pn(e),results:[],scopeNodes:t?!An(t)||"RootNode"!==t.type&&"root"!==t.type?[t]:t.children:[],one:!1,shallow:!1,found:!1,typeIndex:void 0,nodeIndex:void 0,typeCount:void 0,nodeCount:void 0}}(e,t);return r.one=!0,Vn(r,t||void 0),r.results[0]}function Jn(e){if(e)throw e}var Yn=Object.prototype.hasOwnProperty,Zn=Object.prototype.toString,Xn=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ti=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Zn.call(e)},ri=function(e){if(!e||"[object Object]"!==Zn.call(e))return!1;var t,r=Yn.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Yn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Yn.call(e,t)},ni=function(e,t){Xn&&"__proto__"===t.name?Xn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ii=function(e,t){if("__proto__"===t){if(!Yn.call(e,t))return;if(ei)return ei(e,t).value}return e[t]},oi=function e(){var t,r,n,i,o,a,s=arguments[0],c=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<u;++c)if(null!=(t=arguments[c]))for(r in t)n=ii(s,r),s!==(i=ii(t,r))&&(l&&i&&(ri(i)||(o=ti(i)))?(o?(o=!1,a=n&&ti(n)?n:[]):a=n&&ri(n)?n:{},ni(s,{name:r,newValue:e(l,a,i)})):void 0!==i&&ni(s,{name:r,newValue:i}));return s},ai=J(oi);function si(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function ci(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(o,...a){const s=e[++r];let c=-1;if(o)n(o);else{for(;++c<t.length;)null!==a[c]&&void 0!==a[c]||(a[c]=t[c]);t=a,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let a;n&&t.push(i);try{a=e.apply(this,t)}catch(e){if(n&&r)throw e;return i(e)}n||(a instanceof Promise?a.then(o,i):a instanceof Error?i(a):o(a))}function i(e,...n){r||(r=!0,t(e,...n))}function o(e){i(null,e)}}(s,i)(...a):n(null,...a)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}function ui(e){return e&&"object"==typeof e?"position"in e||"type"in e?fi(e.position):"start"in e||"end"in e?fi(e):"line"in e||"column"in e?li(e):"":""}function li(e){return hi(e&&e.line)+":"+hi(e&&e.column)}function fi(e){return li(e&&e.start)+"-"+li(e&&e.end)}function hi(e){return e&&"number"==typeof e?e:1}class pi extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!i.cause&&e&&(o=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof r){const e=r.indexOf(":");-1===e?i.ruleId=r:(i.source=r.slice(0,e),i.ruleId=r.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=ui(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}pi.prototype.file="",pi.prototype.name="",pi.prototype.reason="",pi.prototype.message="",pi.prototype.stack="",pi.prototype.column=void 0,pi.prototype.line=void 0,pi.prototype.ancestors=void 0,pi.prototype.cause=void 0,pi.prototype.fatal=void 0,pi.prototype.place=void 0,pi.prototype.ruleId=void 0,pi.prototype.source=void 0;const di={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');mi(e);let r,n=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else i<0&&(r=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else a<0&&(r=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));n===i?i=a:i<0&&(i=e.length);return e.slice(n,i)},dirname:function(e){if(mi(e),0===e.length)return".";let t,r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},extname:function(e){mi(e);let t,r=e.length,n=-1,i=0,o=-1,a=0;for(;r--;){const s=e.codePointAt(r);if(47!==s)n<0&&(t=!0,n=r+1),46===s?o<0?o=r:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=r+1;break}}if(o<0||n<0||0===a||1===a&&o===n-1&&o===i+1)return"";return e.slice(o,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)mi(e[r]),e[r]&&(t=void 0===t?e[r]:t+"/"+e[r]);return void 0===t?".":function(e){mi(e);const t=47===e.codePointAt(0);let r=function(e,t){let r,n,i="",o=0,a=-1,s=0,c=-1;for(;++c<=e.length;){if(c<e.length)r=e.codePointAt(c);else{if(47===r)break;r=47}if(47===r){if(a===c-1||1===s);else if(a!==c-1&&2===s){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(n=i.lastIndexOf("/"),n!==i.length-1){n<0?(i="",o=0):(i=i.slice(0,n),o=i.length-1-i.lastIndexOf("/")),a=c,s=0;continue}}else if(i.length>0){i="",o=0,a=c,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,c):i=e.slice(a+1,c),o=c-a-1;a=c,s=0}else 46===r&&s>-1?s++:s=-1}return i}(e,!t);0!==r.length||t||(r=".");r.length>0&&47===e.codePointAt(e.length-1)&&(r+="/");return t?"/"+r:r}(t)},sep:"/"};function mi(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const gi={cwd:function(){return"/"}};function vi(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function yi(e){if("string"==typeof e)e=new URL(e);else if(!vi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let r=-1;for(;++r<t.length;)if(37===t.codePointAt(r)&&50===t.codePointAt(r+1)){const e=t.codePointAt(r+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const bi=["history","path","basename","stem","extname","dirname"];class wi{constructor(e){let t;t=e?vi(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd=gi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,n=-1;for(;++n<bi.length;){const e=bi[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)bi.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?di.basename(this.path):void 0}set basename(e){ki(e,"basename"),xi(e,"basename"),this.path=di.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?di.dirname(this.path):void 0}set dirname(e){Si(this.basename,"dirname"),this.path=di.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?di.extname(this.path):void 0}set extname(e){if(xi(e,"extname"),Si(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=di.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){vi(e)&&(e=yi(e)),ki(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?di.basename(this.path,this.extname):void 0}set stem(e){ki(e,"stem"),xi(e,"stem"),this.path=di.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){const n=new pi(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function xi(e,t){if(e&&e.includes(di.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+di.sep+"`")}function ki(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Si(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ei=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};Object.setPrototypeOf(n,t);const i=Object.getOwnPropertyNames(r);for(const e of i){const t=Object.getOwnPropertyDescriptor(r,e);t&&Object.defineProperty(n,e,t)}return n},Pi={}.hasOwnProperty;class Ci extends Ei{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ci()}copy(){const e=new Ci;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(ai(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Fi("data",this.frozen),this.namespace[e]=t,this):Pi.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Fi("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(!1===r[0])continue;!0===r[0]&&(r[0]=void 0);const n=t.call(e,...r);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Di(e),r=this.parser||this.Parser;return _i("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),_i("process",this.parser||this.Parser),Ri("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(n,i){const o=Di(e),a=r.parse(o);function s(e,r){e||!r?i(e):n?n(r):t(void 0,r)}r.run(a,o,(function(e,t,n){if(e||!t||!n)return s(e);const i=t,o=r.stringify(i,n);!function(e){return"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)}(o)?n.result=o:n.value=o,s(e,n)}))}}processSync(e){let t,r=!1;return this.freeze(),_i("processSync",this.parser||this.Parser),Ri("processSync",this.compiler||this.Compiler),this.process(e,(function(e,n){r=!0,Jn(e),t=n})),Ti("processSync","process",r),t}run(e,t,r){Oi(e),this.freeze();const n=this.transformers;return r||"function"!=typeof t||(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(i,o){const a=Di(t);n.run(e,a,(function(t,n,a){const s=n||e;t?o(t):i?i(s):r(void 0,s,a)}))}}runSync(e,t){let r,n=!1;return this.run(e,t,(function(e,t){Jn(e),r=t,n=!0})),Ti("runSync","run",n),r}stringify(e,t){this.freeze();const r=Di(t),n=this.compiler||this.Compiler;return Ri("stringify",n),Oi(e),n(e,r)}use(e,...t){const r=this.attachers,n=this.namespace;if(Fi("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;s(t,r)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(n.settings=ai(!0,n.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){i(e[t])}}}function s(e,t){let n=-1,i=-1;for(;++n<r.length;)if(r[n][0]===e){i=n;break}if(-1===i)r.push([e,...t]);else if(t.length>0){let[n,...o]=t;const a=r[i][1];si(a)&&si(n)&&(n=ai(!0,a,n)),r[i]=[e,n,...o]}}}}const Ai=(new Ci).freeze();function _i(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ri(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oi(e){if(!si(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ti(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Di(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new wi(e)}const Li={};function Ii(e,t){const r=t||Li;return ji(e,"boolean"!=typeof r.includeImageAlt||r.includeImageAlt,"boolean"!=typeof r.includeHtml||r.includeHtml)}function ji(e,t,r){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ni(e.children,t,r)}return Array.isArray(e)?Ni(e,t,r):""}function Ni(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=ji(e[i],t,r);return n.join("")}const qi={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",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:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",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:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},zi={}.hasOwnProperty;function Mi(e){return!!zi.call(qi,e)&&qi[e]}function Bi(e,t,r,n){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Ui(e,t){return e.length>0?(Bi(e,e.length,0,t),e):t}const $i={}.hasOwnProperty;function Vi(e){const t={};let r=-1;for(;++r<e.length;)Hi(t,e[r]);return t}function Hi(e,t){let r;for(r in t){const n=($i.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;if(i)for(o in i){$i.call(n,o)||(n[o]=[]);const e=i[o];Qi(n[o],Array.isArray(e)?e:e?[e]:[])}}}function Qi(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Bi(e,0,0,n)}function Gi(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCodePoint(r)}function Wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ki=co(/\p{P}/u),Ji=co(/[A-Za-z]/),Yi=co(/[\dA-Za-z]/),Zi=co(/[#-'*+\--9=?A-Z^-~]/);function Xi(e){return null!==e&&(e<32||127===e)}const eo=co(/\d/),to=co(/[\dA-Fa-f]/),ro=co(/[!-/:-@[-`{-~]/);function no(e){return null!==e&&e<-2}function io(e){return null!==e&&(e<0||32===e)}function oo(e){return-2===e||-1===e||32===e}function ao(e){return ro(e)||Ki(e)}const so=co(/\s/);function co(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}var uo=Object.freeze({__proto__:null,asciiAlpha:Ji,asciiAlphanumeric:Yi,asciiAtext:Zi,asciiControl:Xi,asciiDigit:eo,asciiHexDigit:to,asciiPunctuation:ro,markdownLineEnding:no,markdownLineEndingOrSpace:io,markdownSpace:oo,unicodePunctuation:ao,unicodeWhitespace:so});function lo(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const o=e.charCodeAt(r);let a="";if(37===o&&Yi(e.charCodeAt(r+1))&&Yi(e.charCodeAt(r+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(r+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function fo(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(oo(n))return e.enter(r),a(n);return t(n)};function a(n){return oo(n)&&o++<i?(e.consume(n),a):(e.exit(r),t(n))}}const ho={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fo(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):no(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const po={tokenize:function(e){const t=this,r=[];let n,i,o,a=0;return s;function s(n){if(a<r.length){const i=r[a];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return Bi(t.events,o+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(a===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mo,l,f)(i)}function l(e){return n&&y(),v(a),h(e)}function f(e){return t.parser.lazy[t.now().line]=a!==r.length,o=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(mo,p,d)(r)}function p(e){return a++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):no(r)?(e.consume(r),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(a),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;Bi(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},mo={tokenize:function(e,t,r){return fo(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function go(e){return null===e||io(e)||so(e)?1:ao(e)?2:void 0}function vo(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}const yo={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=go(n);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const c=e.exit("attentionSequence"),u=go(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===o?l:l&&(i||!f)),c._close=Boolean(42===o?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,o,a,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);bo(f,-s),bo(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[l][1].start=Object.assign({},a.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ui(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ui(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=Ui(c,vo(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=Ui(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=Ui(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,Bi(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function bo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wo={name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Ji(t)?(e.consume(t),o):c(t)}function o(e){return 43===e||45===e||46===e||Yi(e)?(n=1,a(e)):c(e)}function a(t){return 58===t?(e.consume(t),n=0,s):(43===t||45===t||46===t||Yi(t))&&n++<32?(e.consume(t),a):(n=0,c(t))}function s(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||Xi(n)?r(n):(e.consume(n),s)}function c(t){return 64===t?(e.consume(t),u):Zi(t)?(e.consume(t),c):r(t)}function u(e){return Yi(e)?l(e):r(e)}function l(r){return 46===r?(e.consume(r),n=0,u):62===r?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):f(r)}function f(t){if((45===t||Yi(t))&&n++<63){const r=45===t?f:l;return e.consume(t),r}return r(t)}}};const xo={tokenize:function(e,t,r){return function(t){return oo(t)?fo(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||no(e)?t(e):r(e)}},partial:!0};const ko={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return oo(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){const n=this;return function(t){if(oo(t))return fo(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(n){return e.attempt(ko,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};const So={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return ro(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const Eo={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,o=Yi,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=to,u):(e.enter("characterReferenceValue"),i=7,o=eo,u(t))}function u(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==Yi||Mi(n.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return o(s)&&a++<i?(e.consume(s),u):r(s)}}};const Po={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},Co={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let i=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c}function c(t){return e.enter("codeFencedFence"),oo(t)?fo(e,u,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===o?(e.enter("codeFencedFenceSequence"),l(t)):r(t)}function l(t){return t===o?(i++,e.consume(t),l):i>=s?(e.exit("codeFencedFenceSequence"),oo(t)?fo(e,f,"whitespace")(t):f(t)):r(t)}function f(n){return null===n||no(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let o,a=0,s=0;return function(t){return function(t){const r=n.events[n.events.length-1];return a=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===o?(s++,e.consume(t),c):s<3?r(t):(e.exit("codeFencedFenceSequence"),oo(t)?fo(e,u,"whitespace")(t):u(t))}function u(r){return null===r||no(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(Po,p,y)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(r))}function l(t){return null===t||no(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):oo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fo(e,f,"whitespace")(t)):96===t&&t===o?r(t):(e.consume(t),l)}function f(t){return null===t||no(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||no(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===o?r(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&oo(t)?fo(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||no(t)?e.check(Po,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||no(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const Ao={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),fo(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):r(e)}function o(t){return null===t?s(t):no(t)?e.attempt(_o,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||no(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(r){return e.exit("codeIndented"),t(r)}}},_o={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):no(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):fo(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):no(e)?i(e):r(e)}},partial:!0};const Ro={name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):no(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||no(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Fo(e){const t={};let r,n,i,o,a,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,Oo(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),a=e.slice(n,u),a.unshift(r),Bi(e,n,u-n+1,a))}}return!c}function Oo(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],u={};let l,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=o.pop();c.unshift([r,r+t.length-1]),Bi(e,r,2,t)}for(h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}const To={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):no(t)?e.check(Do,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return Fo(e),e}},Do={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),fo(e,i,"linePrefix")};function i(i){if(null===i||no(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function Lo(e,t,r,n,i,o,a,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||Xi(t))return r(t);return e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||no(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return l||null!==i&&41!==i&&!io(i)?l<u&&40===i?(e.consume(i),l++,d):41===i?(e.consume(i),l--,d):null===i||32===i||40===i||Xi(i)?r(i):(e.consume(i),92===i?m:d):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}function Io(e,t,r,n,i,o){const a=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return c>999||null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):no(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(t){return null===t||91===t||93===t||no(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!oo(t)),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}function jo(e,t,r,n,i,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s;return r(t)};function s(r){return r===a?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),c(r))}function c(t){return t===a?(e.exit(o),s(a)):null===t?r(t):no(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),fo(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||no(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===a||92===t?(e.consume(t),u):u(t)}}function No(e,t){let r;return function n(i){if(no(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(oo(i))return fo(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}const qo={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),function(t){return Io.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=Wi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):r(t)}function a(t){return io(t)?No(e,s)(t):s(t)}function s(t){return Lo(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(zo,u,u)(t)}function u(t){return oo(t)?fo(e,l,"whitespace")(t):l(t)}function l(o){return null===o||no(o)?(e.exit("definition"),n.parser.defined.push(i),t(o)):r(o)}}},zo={tokenize:function(e,t,r){return function(t){return io(t)?No(e,n)(t):r(t)};function n(t){return jo(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return oo(t)?fo(e,o,"whitespace")(t):o(t)}function o(e){return null===e||no(e)?t(e):r(e)}},partial:!0};const Mo={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return no(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}};const Bo={name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&n++<6?(e.consume(t),i):null===t||io(t)?(e.exit("atxHeadingSequence"),o(t)):r(t)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),a(r)):null===r||no(r)?(e.exit("atxHeading"),t(r)):oo(r)?fo(e,o,"whitespace")(r):(e.enter("atxHeadingText"),s(r))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||io(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},Bi(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Uo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$o=["pre","script","style","textarea"],Vo={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,a,s,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),o=!0,p):63===s?(e.consume(s),i=3,n.interrupt?t:L):Ji(s)?(e.consume(s),a=String.fromCharCode(s),d):r(s)}function l(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,s=0,h):Ji(o)?(e.consume(o),i=4,n.interrupt?t:L):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:L):r(i)}function h(i){const o="CDATA[";return i===o.charCodeAt(s++)?(e.consume(i),6===s?n.interrupt?t:C:h):r(i)}function p(t){return Ji(t)?(e.consume(t),a=String.fromCharCode(t),d):r(t)}function d(s){if(null===s||47===s||62===s||io(s)){const c=47===s,u=a.toLowerCase();return c||o||!$o.includes(u)?Uo.includes(a.toLowerCase())?(i=6,c?(e.consume(s),m):n.interrupt?t(s):C(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):o?g(s):v(s)):(i=1,n.interrupt?t(s):C(s))}return 45===s||Yi(s)?(e.consume(s),a+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:C):r(i)}function g(t){return oo(t)?(e.consume(t),g):E(t)}function v(t){return 47===t?(e.consume(t),E):58===t||95===t||Ji(t)?(e.consume(t),y):oo(t)?(e.consume(t),v):E(t)}function y(t){return 45===t||46===t||58===t||95===t||Yi(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):oo(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):oo(t)?(e.consume(t),w):k(t)}function x(t){return t===c?(e.consume(t),c=null,S):null===t||no(t)?r(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||io(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||oo(e)?v(e):r(e)}function E(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return null===t||no(t)?C(t):oo(t)?(e.consume(t),P):r(t)}function C(t){return 45===t&&2===i?(e.consume(t),F):60===t&&1===i?(e.consume(t),O):62===t&&4===i?(e.consume(t),I):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),D):!no(t)||6!==i&&7!==i?null===t||no(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Ho,j,A)(t))}function A(t){return e.check(Qo,_,j)(t)}function _(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return null===t||no(t)?A(t):(e.enter("htmlFlowData"),C(t))}function F(t){return 45===t?(e.consume(t),L):C(t)}function O(t){return 47===t?(e.consume(t),a="",T):C(t)}function T(t){if(62===t){const r=a.toLowerCase();return $o.includes(r)?(e.consume(t),I):C(t)}return Ji(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):C(t)}function D(t){return 93===t?(e.consume(t),L):C(t)}function L(t){return 62===t?(e.consume(t),I):45===t&&2===i?(e.consume(t),L):C(t)}function I(t){return null===t||no(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),I)}function j(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},Ho={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(xo,t,r)}},partial:!0},Qo={tokenize:function(e,t,r){const n=this;return function(t){if(no(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const Go={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Ji(t)?(e.consume(t),S):r(t)}function c(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o=0,p):Ji(t)?(e.consume(t),v):r(t)}function u(t){return 45===t?(e.consume(t),h):r(t)}function l(t){return null===t?r(t):45===t?(e.consume(t),f):no(t)?(a=l,T(t)):(e.consume(t),l)}function f(t){return 45===t?(e.consume(t),h):l(t)}function h(e){return 62===e?O(e):45===e?f(e):l(e)}function p(t){const n="CDATA[";return t===n.charCodeAt(o++)?(e.consume(t),6===o?d:p):r(t)}function d(t){return null===t?r(t):93===t?(e.consume(t),m):no(t)?(a=d,T(t)):(e.consume(t),d)}function m(t){return 93===t?(e.consume(t),g):d(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):d(t)}function v(t){return null===t||62===t?O(t):no(t)?(a=v,T(t)):(e.consume(t),v)}function y(t){return null===t?r(t):63===t?(e.consume(t),b):no(t)?(a=y,T(t)):(e.consume(t),y)}function b(e){return 62===e?O(e):y(e)}function w(t){return Ji(t)?(e.consume(t),x):r(t)}function x(t){return 45===t||Yi(t)?(e.consume(t),x):k(t)}function k(t){return no(t)?(a=k,T(t)):oo(t)?(e.consume(t),k):O(t)}function S(t){return 45===t||Yi(t)?(e.consume(t),S):47===t||62===t||io(t)?E(t):r(t)}function E(t){return 47===t?(e.consume(t),O):58===t||95===t||Ji(t)?(e.consume(t),P):no(t)?(a=E,T(t)):oo(t)?(e.consume(t),E):O(t)}function P(t){return 45===t||46===t||58===t||95===t||Yi(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),A):no(t)?(a=C,T(t)):oo(t)?(e.consume(t),C):E(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,_):no(t)?(a=A,T(t)):oo(t)?(e.consume(t),A):(e.consume(t),R)}function _(t){return t===i?(e.consume(t),i=void 0,F):null===t?r(t):no(t)?(a=_,T(t)):(e.consume(t),_)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||io(t)?E(t):(e.consume(t),R)}function F(e){return 47===e||62===e||io(e)?E(e):r(e)}function O(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),D}function D(t){return oo(t)?fo(e,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),a(t)}}};const Wo={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,a=n.events.length;for(;a--;)if(("labelImage"===n.events[a][1].type||"labelLink"===n.events[a][1].type)&&!n.events[a][1]._balanced){i=n.events[a][1];break}return function(t){if(!i)return r(t);if(i._inactive)return l(t);return o=n.parser.defined.includes(Wi(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Ko,u,o?u:l)(t):91===t?e.attempt(Jo,u,o?c:l)(t):o?u(t):l(t)}function c(t){return e.attempt(Yo,u,l)(t)}function u(e){return t(e)}function l(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,a=e.length,s=0;for(;a--;)if(r=e[a][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[a][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=a,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=a);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",u,t]],o=Ui(o,e.slice(n+1,n+s+3)),o=Ui(o,[["enter",l,t]]),o=Ui(o,vo(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),o=Ui(o,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),o=Ui(o,e.slice(i+1)),o=Ui(o,[["exit",c,t]]),Bi(e,n,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const r=e[t][1];"labelImage"!==r.type&&"labelLink"!==r.type&&"labelEnd"!==r.type||(e.splice(t+1,"labelImage"===r.type?4:2),r.type="data",t++)}return e}},Ko={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return io(t)?No(e,i)(t):i(t)}function i(t){return 41===t?u(t):Lo(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return io(t)?No(e,s)(t):u(t)}function a(e){return r(e)}function s(t){return 34===t||39===t||40===t?jo(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function c(t){return io(t)?No(e,u)(t):u(t)}function u(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Jo={tokenize:function(e,t,r){const n=this;return function(t){return Io.call(n,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(Wi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},Yo={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Zo={name:"labelStartImage",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:Wo.resolveAll};const Xo={name:"labelStartLink",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:Wo.resolveAll};const ea={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fo(e,t,"linePrefix")}}};const ta={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),function(e){return n=e,o(e)}(t)};function o(o){return o===n?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||no(o))?(e.exit("thematicBreak"),t(o)):r(o)}function a(t){return t===n?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),oo(t)?fo(e,o,"whitespace")(t):o(t))}}};const ra={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:eo(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(ta,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return eo(t)&&++a<10?(e.consume(t),s):(!n.interrupt||a<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(xo,n.interrupt?r:u,e.attempt(na,f,l))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function l(t){return oo(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(xo,i,o);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,fo(e,t,"listItemIndent",n.containerState.size+1)(r)}function o(r){return n.containerState.furtherBlankLines||!oo(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(ia,t,a)(r))}function a(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,fo(e,e.attempt(ra,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},na={tokenize:function(e,t,r){const n=this;return fo(e,(function(e){const i=n.events[n.events.length-1];return!oo(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},ia={tokenize:function(e,t,r){const n=this;return fo(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const oa={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i;return function(t){let a,s=n.events.length;for(;s--;)if("lineEnding"!==n.events[s][1].type&&"linePrefix"!==n.events[s][1].type&&"content"!==n.events[s][1].type){a="paragraph"===n.events[s][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||a))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return r(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),oo(t)?fo(e,a,"lineSuffix")(t):a(t))}function a(n){return null===n||no(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a;return e.push(["exit",a,t]),e}};const aa={tokenize:function(e){const t=this,r=e.attempt(xo,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,fo(e,e.attempt(this.parser.constructs.flow,n,e.attempt(To,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const sa={resolveAll:fa()},ca=la("string"),ua=la("text");function la(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,a);return o;function o(e){return c(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:fa("text"===e?ha:void 0)}}function fa(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function ha(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let o,a=i.length,s=-1,c=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)o=!0,c++;else if(-1!==e){a++;break}}if(c){const i={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+a,_bufferIndex:a?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function pa(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const c={consume:function(e){no(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,n.push(a)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=Ui(a,e),p(),null!==a[a.length-1])return[];return v(t,0),u.events=vo(o,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function h(){const{line:e,column:t,offset:r,_index:i,_bufferIndex:o}=n;return{line:e,column:t,offset:r,_index:i,_bufferIndex:o}}function p(){let e;for(;n._index<a.length;){const t=a[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,o){let a,l,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return a=e,l=0,0===e.length?o:m(e[l])}function m(e){return function(r){p=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,o=Array.from(s);return{restore:a,from:i};function a(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=o,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++l<a.length?m(a[l]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Bi(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const da={42:ra,43:ra,45:ra,48:ra,49:ra,50:ra,51:ra,52:ra,53:ra,54:ra,55:ra,56:ra,57:ra,62:ko},ma={91:qo},ga={[-2]:Ao,[-1]:Ao,32:Ao},va={35:Bo,42:ta,45:[oa,ta],60:Vo,61:oa,95:ta,96:Co,126:Co},ya={38:Eo,92:So},ba={[-5]:ea,[-4]:ea,[-3]:ea,33:Zo,38:Eo,42:yo,60:[wo,Go],91:Xo,92:[Mo,So],93:Wo,95:yo,96:Ro},wa={null:[yo,sa]};var xa=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:ma,disable:{null:[]},document:da,flow:va,flowInitial:ga,insideSpan:wa,string:ya,text:ba});const ka=/[\0\t\n\r]/g;const Sa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ea(e){return e.replace(Sa,Pa)}function Pa(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Gi(r.slice(t?2:1),t?16:10)}return Mi(r)||e}const Ca={}.hasOwnProperty;function Aa(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ee),autolinkProtocol:P,autolinkEmail:P,atxHeading:o(J),blockQuote:o(H),characterEscape:P,characterReference:P,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(G,a),codeTextData:P,data:P,codeFlowValue:P,definition:o(W),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(K),hardBreakEscape:o(Y),hardBreakTrailing:o(Y),htmlFlow:o(Z,a),htmlFlowData:P,htmlText:o(Z,a),htmlTextData:P,image:o(X),label:a,link:o(ee),listItem:o(re),listItemValue:h,listOrdered:o(te,f),listUnordered:o(te),paragraph:o(ne),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(J),strong:o(ie),thematicBreak:o(ae)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:V,autolinkProtocol:$,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:U,codeFenced:c(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:C,codeIndented:c(v),codeText:c(O),codeTextData:C,data:C,definition:c(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(_),hardBreakTrailing:c(_),htmlFlow:c(R),htmlFlowData:C,htmlText:c(F),htmlTextData:C,image:c(D),label:I,labelText:L,lineEnding:A,link:c(T),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:M,resourceDestinationString:j,resourceTitleString:N,resource:q,setextHeading:c(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:c(),thematicBreak:c()}};Ra(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const o={stack:[n],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:l,data:r},c=[];let f=-1;for(;++f<e.length;)if("listOrdered"===e[f][1].type||"listUnordered"===e[f][1].type)if("enter"===e[f][0])c.push(f);else{f=i(e,c.pop(),f)}for(f=-1;++f<e.length;){const r=t[e[f][0]];Ca.call(r,e[f][1].type)&&r[e[f][1].type].call(Object.assign({sliceSerialize:e[f][2].sliceSerialize},o),e[f][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Oa).call(o,void 0,e[0])}for(n.position={start:_a(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:_a(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)n=t.transforms[f](n)||n;return n}function i(e,t,r){let n,i,o,a,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?c++:c--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||a||c||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=i,e.splice(s,0,["enter",i,t[2]]),s++,r++,o=void 0,a=!0}}}return e[t][1]._spread=u,r}function o(e,t){return r;function r(r){s.call(this,e(r),r),t&&t.call(this,r)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:_a(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+ui({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||Oa).call(this,e,n[0])}r.position.end=_a(e.end)}function l(){return Ii(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function d(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Wi(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let r=t[t.length-1];r&&"text"===r.type||(r=oe(),r.position={start:_a(e.start),end:void 0},t.push(r)),this.stack.push(r)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=_a(e.end)}function A(e){const r=this.stack[this.stack.length-1];if(this.data.atHardBreak){return r.children[r.children.length-1].position.end=_a(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(P.call(this,e),C.call(this,e))}function _(){this.data.atHardBreak=!0}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=Ea(t),r.identifier=Wi(t).toLowerCase()}function I(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function j(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function q(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function M(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Wi(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),r=this.data.characterReferenceType;let n;if(r)n=Gi(t,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0;else{n=Mi(t)}const i=this.stack.pop();i.value+=n,i.position.end=_a(e.end)}function $(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function H(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function W(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Y(){return{type:"break"}}function Z(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function te(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ne(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(r)(function(e){for(;!Fo(e););return e}(function(e){const t={defined:[],lazy:{},constructs:Vi([xa,...(e||{}).extensions||[]]),content:r(ho),document:r(po),flow:r(aa),string:r(ca),text:r(ua)};return t;function r(e){return function(r){return pa(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,a){const s=[];let c,u,l,f,h;for(i=r+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(ka.lastIndex=l,c=ka.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return a&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))}function _a(e){return{line:e.line,column:e.column,offset:e.offset}}function Ra(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?Ra(e,n):Fa(e,n)}}function Fa(e,t){let r;for(r in t)if(Ca.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Oa(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ui({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ui({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ui({start:t.start,end:t.end})+") is still open")}const Ta={}.hasOwnProperty;function Da(e,t){let r,n=-1;if(t.extensions)for(;++n<t.extensions.length;)Da(e,t.extensions[n]);for(r in t)if(Ta.call(t,r))switch(r){case"extensions":break;case"unsafe":case"join":La(e[r],t[r]);break;case"handlers":Ia(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function La(e,t){t&&e.push(...t)}function Ia(e,t){t&&Object.assign(e,t)}function ja(e,t,r){return">"+(r?"":" ")+e}function Na(e,t){return qa(e,t.inConstruct,!0)&&!qa(e,t.notInConstruct,!1)}function qa(e,t,r){if("string"==typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function za(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if("\n"===r.unsafe[i].character&&Na(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return"\\\n"}function Ma(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Ba(e,t,r){return(r?"":" ")+e}function Ua(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $a(e,t,r,n){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(r),o=r.enter("emphasis"),a=r.createTracker(n);let s=a.move(i);return s+=a.move(r.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}$a.peek=function(e,t,r){return r.options.emphasis||"*"};const Va=function(e,t,r,n,i){const o=Ha(t);if(null!=r&&("number"!=typeof r||r<0||r===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==n||Va(n)&&n.children))throw new Error("Expected parent node");if(null==n!=(null==r))throw new Error("Expected both parent and index");return!!Wa(e)&&o.call(i,e,r,n)},Ha=function(e){if(null==e)return Ga;if("function"==typeof e)return Qa(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Ha(e[r]);return Qa(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Qa(r);function r(r){const n=r;let i;for(i in e)if(n[i]!==t[i])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Qa(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Qa(e){return function(t,r,n){return Boolean(Wa(t)&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function Ga(){return!0}function Wa(e){return null!==e&&"object"==typeof e&&"type"in e}const Ka=[],Ja=!0,Ya=!1,Za="skip";function Xa(e,t,r,n){let i;"function"==typeof t&&"function"!=typeof r?(n=r,r=t):i=t;const o=Ha(i),a=n?-1:1;!function e(i,s,c){const u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(l,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return l;function l(){let u,l,f,h=Ka;if((!t||o(i,s,c[c.length-1]||void 0))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Ja,e];return null==e?Ka:[e]}(r(i,c)),h[0]===Ya))return h;if("children"in i&&i.children){const t=i;if(t.children&&h[0]!==Za)for(l=(n?t.children.length:-1)+a,f=c.concat(t);l>-1&&l<t.children.length;){const r=t.children[l];if(u=e(r,l,f)(),u[0]===Ya)return u;l="number"==typeof u[1]?u[1]:l+a}}return h}}(e,void 0,[])()}function es(e,t,r,n){let i,o,a;"function"==typeof t&&"function"!=typeof r?(o=void 0,a=t,i=r):(o=t,a=r,i=n),Xa(e,o,(function(e,t){const r=t[t.length-1],n=r?r.children.indexOf(e):void 0;return a(e,n,r)}),i)}function ts(e,t){let r=!1;return es(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,Ya})),Boolean((!e.depth||e.depth<3)&&Ii(e)&&(t.options.setext||r))}function rs(e){return e.value||""}function ns(e,t,r,n){const i=Ua(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("![");return u+=c.move(r.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),u+=c.move(")"),a(),u}function is(e,t,r,n){const i=e.referenceType,o=r.enter("imageReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("![");const u=r.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),a();const l=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=l,o(),"full"!==i&&u&&u===f?"shortcut"===i?c=c.slice(0,-1):c+=s.move("]"):c+=s.move(f+"]"),c}function os(e,t,r){let n=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){const e=r.unsafe[o],t=r.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function as(e,t){const r=Ii(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function ss(e,t,r,n){const i=Ua(r),o='"'===i?"Quote":"Apostrophe",a=r.createTracker(n);let s,c;if(as(e,r)){const t=r.stack;r.stack=[],s=r.enter("autolink");let n=a.move("<");return n+=a.move(r.containerPhrasing(e,{before:n,after:">",...a.current()})),n+=a.move(">"),s(),r.stack=t,n}s=r.enter("link"),c=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=r.enter("destinationRaw"),u+=a.move(r.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=r.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(r.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),s(),u}function cs(e,t,r,n){const i=e.referenceType,o=r.enter("linkReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("[");const u=r.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),a();const l=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=l,o(),"full"!==i&&u&&u===f?"shortcut"===i?c=c.slice(0,-1):c+=s.move("]"):c+=s.move(f+"]"),c}function us(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ls(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}rs.peek=function(){return"<"},ns.peek=function(){return"!"},is.peek=function(){return"!"},os.peek=function(){return"`"},ss.peek=function(e,t,r){return as(e,r)?"<":"["},cs.peek=function(){return"["};const fs=Ha(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function hs(e,t,r,n){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(r),o=r.enter("strong"),a=r.createTracker(n);let s=a.move(i+i);return s+=a.move(r.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}hs.peek=function(e,t,r){return r.options.strong||"*"};const ps={blockquote:function(e,t,r,n){const i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);const a=r.indentLines(r.containerFlow(e,o.current()),ja);return i(),a},break:za,code:function(e,t,r,n){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(r),o=e.value||"",a="`"===i?"GraveAccent":"Tilde";if(Ma(e,r)){const e=r.enter("codeIndented"),t=r.indentLines(o,Ba);return e(),t}const s=r.createTracker(n),c=i.repeat(Math.max(function(e,t){const r=String(e);let n=r.indexOf(t),i=n,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==n;)n===i?++o>a&&(a=o):o=1,i=n+t.length,n=r.indexOf(t,i);return a}(o,i)+1,3)),u=r.enter("codeFenced");let l=s.move(c);if(e.lang){const t=r.enter(`codeFencedLang${a}`);l+=s.move(r.safe(e.lang,{before:l,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=r.enter(`codeFencedMeta${a}`);l+=s.move(" "),l+=s.move(r.safe(e.meta,{before:l,after:"\n",encode:["`"],...s.current()})),t()}return l+=s.move("\n"),o&&(l+=s.move(o+"\n")),l+=s.move(c),u(),l},definition:function(e,t,r,n){const i=Ua(r),o='"'===i?"Quote":"Apostrophe",a=r.enter("definition");let s=r.enter("label");const c=r.createTracker(n);let u=c.move("[");return u+=c.move(r.safe(r.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(r.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=r.enter("destinationRaw"),u+=c.move(r.safe(e.url,{before:u,after:e.title?" ":"\n",...c.current()}))),s(),e.title&&(s=r.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(r.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),a(),u},emphasis:$a,hardBreak:za,heading:function(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(ts(e,r)){const t=r.enter("headingSetext"),n=r.enter("phrasing"),a=r.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return n(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=r.enter("headingAtx"),c=r.enter("phrasing");o.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),c(),s(),u},html:rs,image:ns,imageReference:is,inlineCode:os,link:ss,linkReference:cs,list:function(e,t,r,n){const i=r.enter("list"),o=r.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(r):us(r);const s=e.ordered?"."===a?")":".":function(e){const t=us(e),r=e.options.bulletOther;if(!r)return"*"===t?"-":"*";if("*"!==r&&"+"!==r&&"-"!==r)throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}(r);let c=!(!t||!r.bulletLastUsed)&&a===r.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==r.stack[r.stack.length-1]||"listItem"!==r.stack[r.stack.length-2]||"list"!==r.stack[r.stack.length-3]||"listItem"!==r.stack[r.stack.length-4]||0!==r.indexStack[r.indexStack.length-1]||0!==r.indexStack[r.indexStack.length-2]||0!==r.indexStack[r.indexStack.length-3]||(c=!0),ls(r)===a&&t){let t=-1;for(;++t<e.children.length;){const r=e.children[t];if(r&&"listItem"===r.type&&r.children&&r.children[0]&&"thematicBreak"===r.children[0].type){c=!0;break}}}}c&&(a=s),r.bulletCurrent=a;const u=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=o,i(),u},listItem:function(e,t,r,n){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let o=r.bulletCurrent||us(r);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);const c=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?o:o+" ".repeat(a-o.length))+e}));return c(),u},paragraph:function(e,t,r,n){const i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a},root:function(e,t,r,n){const i=e.children.some((function(e){return fs(e)}));return(i?r.containerPhrasing:r.containerFlow).call(r,e,n)},strong:hs,text:function(e,t,r,n){return r.safe(e.value,n)},thematicBreak:function(e,t,r){const n=(ls(r)+(r.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(r));return r.options.ruleSpaces?n.slice(0,-1):n}},ds=[function(e,t,r,n){if("code"===t.type&&Ma(t,n)&&("list"===e.type||e.type===t.type&&Ma(e,n)))return!1;if("spread"in r&&"boolean"==typeof r.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&ts(t,n)))return;return r.spread?1:0}}];const ms=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],gs=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ms},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ms},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:ms},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ms},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ms},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ms},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ms},{atBreak:!0,character:"~"}];function vs(e){return e.label||!e.identifier?e.label||"":Ea(e.identifier)}function ys(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function bs(e,t,r,n){let i=n.join.length;for(;i--;){const o=n.join[i](e,t,r,n);if(!0===o||1===o)break;if("number"==typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const ws=/\r?\n|\r/g;function xs(e,t){const r=[];let n,i=0,o=0;for(;n=ws.exec(e);)a(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return a(e.slice(i)),r.join("");function a(e){r.push(t(e,o,!e))}}function ks(e,t){return e-t}function Ss(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t;let a,s=-1,c=0;for(;a=r.exec(o);)n.push(a.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}function Es(e){const t=e||{},r=t.now||{};let n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:function(e){const t=e||"",r=t.split(/\r?\n|\r/g),a=r[r.length-1];return i+=r.length-1,o=1===r.length?o+a.length:1+a.length+n,t},current:function(){return{now:{line:i,column:o},lineShift:n}},shift:function(e){n+=e}}}function Ps(e,t={}){const r={enter:function(e){return r.stack.push(e),function(){r.stack.pop()}},indentLines:xs,associationId:vs,containerPhrasing:Rs,containerFlow:Fs,createTracker:Es,compilePattern:ys,safe:Os,stack:[],unsafe:[...gs],join:[...ds],handlers:{...ps},options:{},indexStack:[],handle:void 0};Da(r,t),r.options.tightDefinitions&&r.join.push(_s),r.handle=In("type",{invalid:Cs,unknown:As,handlers:r.handlers});let n=r.handle(e,void 0,r,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return n&&10!==n.charCodeAt(n.length-1)&&13!==n.charCodeAt(n.length-1)&&(n+="\n"),n}function Cs(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function As(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function _s(e,t){if("definition"===e.type&&e.type===t.type)return 0}function Rs(e,t){return function(e,t,r){const n=t.indexStack,i=e.children||[],o=[];let a=-1,s=r.before;n.push(-1);let c=t.createTracker(r);for(;++a<i.length;){const u=i[a];let l;if(n[n.length-1]=a,a+1<i.length){let r=t.handle.handlers[i[a+1].type];r&&r.peek&&(r=r.peek),l=r?r(i[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===s||"\n"===s)&&"html"===u.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",c=t.createTracker(r),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:s,after:l}))),s=o[o.length-1].slice(-1)}return n.pop(),o.join("")}(e,this,t)}function Fs(e,t){return function(e,t,r){const n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[];let s=-1;for(n.push(-1);++s<i.length;){const r=i[s];n[n.length-1]=s,a.push(o.move(t.handle(r,e,t,{before:"\n",after:"\n",...o.current()}))),"list"!==r.type&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(bs(r,i[s+1],e,t)))}return n.pop(),a.join("")}(e,this,t)}function Os(e,t){return function(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!Na(e.stack,t))continue;const r=e.compilePattern(t);let o;for(;o=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=o.index+(e?o[1].length:0);i.includes(n)?(a[n].before&&!e&&(a[n].before=!1),a[n].after&&!r&&(a[n].after=!1)):(i.push(n),a[n]={before:e,after:r})}}i.sort(ks);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||e+1<u&&i[s+1]===e+1&&a[e].after&&!a[e+1].before&&!a[e+1].after||i[s-1]===e-1&&a[e].before&&!a[e-1].before&&!a[e-1].after||(c!==e&&o.push(Ss(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(o.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):o.push("\\"))}return o.push(Ss(n.slice(c,u),r.after)),o.join("")}(this,e,t)}function Ts(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}function Ds(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ls(e,t,r){const n=Ha((r||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const e=r[n];t.push([Is(e[0]),js(e[1])])}return t}(t);let o=-1;for(;++o<i.length;)Xa(e,"text",a);function a(e,t){let r,a=-1;for(;++a<t.length;){const e=t[a],i=r?r.children:void 0;if(n(e,i?i.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=t[t.length-1],n=i[o][0],a=i[o][1];let s=0;const c=r.children,u=c.indexOf(e);let l=!1,f=[];n.lastIndex=0;let h=n.exec(e.value);for(;h;){const r=h.index,i={index:h.index,input:h.input,stack:[...t,e]};let o=a(...h,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?n.lastIndex=r+1:(s!==r&&f.push({type:"text",value:e.value.slice(s,r)}),Array.isArray(o)?f.push(...o):o&&f.push(o),s=r+h[0].length,l=!0),!n.global)break;h=n.exec(e.value)}l?(s<e.value.length&&f.push({type:"text",value:e.value.slice(s)}),r.children.splice(u,1,...f)):f=[e];return u+f.length}(e,t)}}function Is(e){return"string"==typeof e?new RegExp(Ds(e),"g"):e}function js(e){return"function"==typeof e?e:function(){return e}}const Ns="phrasing",qs=["autolink","link","image","label"];function zs(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ms(e){this.config.enter.autolinkProtocol.call(this,e)}function Bs(e){this.config.exit.autolinkProtocol.call(this,e)}function Us(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function $s(e){this.config.exit.autolinkEmail.call(this,e)}function Vs(e){this.exit(e)}function Hs(e){Ls(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Qs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Gs]],{ignore:["link","linkReference"]})}function Qs(e,t,r,n,i){let o="";if(!Ws(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Ts(e,"(");let o=Ts(e,")");for(;-1!==n&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}(r+n);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Gs(e,t,r,n){return!(!Ws(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Ws(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||so(r)||ao(r))&&(!t||47!==r)}function Ks(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Js(){this.buffer()}function Ys(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Wi(this.sliceSerialize(e)).toLowerCase()}function Zs(e){this.exit(e)}function Xs(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ec(){this.buffer()}function tc(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Wi(this.sliceSerialize(e)).toLowerCase()}function rc(e){this.exit(e)}function nc(e,t,r,n){const i=r.createTracker(n);let o=i.move("[^");const a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function ic(e,t,r,n){const i=r.createTracker(n);let o=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(r.indentLines(r.containerFlow(e,i.current()),oc)),a(),o}function oc(e,t,r){return 0===t?e:(r?"":" ")+e}nc.peek=function(){return"["};const ac=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sc(e){this.enter({type:"delete",children:[]},e)}function cc(e){this.exit(e)}function uc(e,t,r,n){const i=r.createTracker(n),o=r.enter("strikethrough");let a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function lc(e){return null==e?"":String(e)}function fc(e){return e.length}function hc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function pc(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function dc(e){this.exit(e),this.data.inTable=void 0}function mc(e){this.enter({type:"tableRow",children:[]},e)}function gc(e){this.exit(e)}function vc(e){this.enter({type:"tableCell",children:[]},e)}function yc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bc));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function bc(e,t){return"|"===t?t:e}function wc(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,r){let n=ps.inlineCode(e,t,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n},table:function(e,t,r,n){return s(function(e,t,r){const n=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<n.length;)o[i]=c(n[i],t,r);return a(),o}(e,r,n),e.align)},tableCell:a,tableRow:function(e,t,r,n){const i=c(e,r,n),o=s([i]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,r,n){const i=r.enter("tableCell"),a=r.enter("phrasing"),s=r.containerPhrasing(e,{...n,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t={}){const r=(t.align||[]).concat(),n=t.stringLength||fc,i=[],o=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const r=[],i=[];let l=-1;for(e[u].length>c&&(c=e[u].length);++l<e[u].length;){const o=lc(e[u][l]);if(!1!==t.alignDelimiters){const e=n(o);i[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}r.push(o)}o[u]=r,a[u]=i}let l=-1;if("object"==typeof r&&"length"in r)for(;++l<c;)i[l]=hc(r[l]);else{const e=hc(r);for(;++l<c;)i[l]=e}l=-1;const f=[],h=[];for(;++l<c;){const e=i[l];let r="",n="";99===e?(r=":",n=":"):108===e?r=":":114===e&&(n=":");let o=!1===t.alignDelimiters?1:Math.max(1,s[l]-r.length-n.length);const a=r+"-".repeat(o)+n;!1!==t.alignDelimiters&&(o=r.length+o+n.length,o>s[l]&&(s[l]=o),h[l]=o),f[l]=a}o.splice(1,0,f),a.splice(1,0,h),u=-1;const p=[];for(;++u<o.length;){const e=o[u],r=a[u];l=-1;const n=[];for(;++l<c;){const o=e[l]||"";let a="",u="";if(!1!==t.alignDelimiters){const e=s[l]-(r[l]||0),t=i[l];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),u=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),u=a):u=" ".repeat(e)}!1===t.delimiterStart||l||n.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===o||!1===t.delimiterStart&&!l||n.push(" "),!1!==t.alignDelimiters&&n.push(a),n.push(o),!1!==t.alignDelimiters&&n.push(u),!1!==t.padding&&n.push(" "),!1===t.delimiterEnd&&l===c-1||n.push("|")}p.push(!1===t.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t,r){const n=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<n.length;)o[i]=a(n[i],0,t,r);return s(),o}}function xc(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function kc(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const r=e.children[0];if(r&&"text"===r.type){const n=t.children;let i,o=-1;for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){i=e;break}}i===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Sc(e,t,r,n){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let c=ps.listItem(e,t,r,{...n,...s.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),c}uc.peek=function(){return"~"};const Ec={tokenize:function(e,t,r){let n=0;return function t(o){if((87===o||119===o)&&n<3)return n++,e.consume(o),t;if(46===o&&3===n)return e.consume(o),i;return r(o)};function i(e){return null===e?r(e):t(e)}},partial:!0},Pc={tokenize:function(e,t,r){let n,i,o;return a;function a(t){return 46===t||95===t?e.check(Ac,c,s)(t):null===t||io(t)||so(t)||45!==t&&ao(t)?c(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?n=!0:(i=n,n=void 0),e.consume(t),a}function c(e){return i||n||!o?r(e):t(e)}},partial:!0},Cc={tokenize:function(e,t){let r=0,n=0;return i;function i(a){return 40===a?(r++,e.consume(a),i):41===a&&n<r?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Ac,t,o)(a):null===a||io(a)||so(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&n++,e.consume(t),i}},partial:!0},Ac={tokenize:function(e,t,r){return n;function n(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),n):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||io(a)||so(a)?t(a):r(a)}function i(e){return null===e||40===e||91===e||io(e)||so(e)?t(e):n(e)}function o(e){return Ji(e)?a(e):r(e)}function a(t){return 59===t?(e.consume(t),n):Ji(t)?(e.consume(t),a):r(t)}},partial:!0},_c={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(e){return Yi(e)?r(e):t(e)}},partial:!0},Rc={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!Lc.call(n,n.previous)||qc(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ec,e.attempt(Pc,e.attempt(Cc,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:Lc},Fc={tokenize:function(e,t,r){const n=this;let i="",o=!1;return function(t){if((72===t||104===t)&&Ic.call(n,n.previous)&&!qc(n.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a;return r(t)};function a(t){if(Ji(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const r=i.toLowerCase();if("http"===r||"https"===r)return e.consume(t),s}return r(t)}function s(t){return 47===t?(e.consume(t),o?c:(o=!0,s)):r(t)}function c(t){return null===t||Xi(t)||io(t)||so(t)||ao(t)?r(t):e.attempt(Pc,e.attempt(Cc,u),r)(t)}function u(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:Ic},Oc={tokenize:function(e,t,r){const n=this;let i,o;return function(t){if(!Nc(t)||!jc.call(n,n.previous)||qc(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return Nc(t)?(e.consume(t),a):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(_c,u,c)(t):45===t||95===t||Yi(t)?(o=!0,e.consume(t),s):u(t)}function c(t){return e.consume(t),i=!0,s}function u(a){return o&&i&&Ji(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):r(a)}},previous:jc},Tc={};let Dc=48;for(;Dc<123;)Tc[Dc]=Oc,Dc++,58===Dc?Dc=65:91===Dc&&(Dc=97);function Lc(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||io(e)}function Ic(e){return!Ji(e)}function jc(e){return!(47===e||Nc(e))}function Nc(e){return 43===e||45===e||46===e||95===e||Yi(e)}function qc(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Tc[43]=Oc,Tc[45]=Oc,Tc[46]=Oc,Tc[95]=Oc,Tc[72]=[Oc,Fc],Tc[104]=[Oc,Fc],Tc[87]=[Oc,Rc],Tc[119]=[Oc,Rc];const zc={tokenize:function(e,t,r){const n=this;return fo(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Mc(e,t,r){const n=this;let i=n.events.length;const o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return r(i);const s=Wi(n.sliceSerialize({start:a.end,end:n.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function Bc(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function Uc(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){if(a>999||93===s&&!o||null===s||91===s||io(s))return r(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(Wi(n.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(s)}return io(s)||(o=!0),a++,e.consume(s),92===s?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}}function $c(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(t)}function u(t){if(s>999||93===t&&!a||null===t||91===t||io(t))return r(t);if(93===t){e.exit("chunkString");const r=e.exit("gfmFootnoteDefinitionLabelString");return o=Wi(n.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return io(t)||(a=!0),s++,e.consume(t),92===t?l:u}function l(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),fo(e,h,"gfmFootnoteDefinitionWhitespace")):r(t)}function h(e){return t(e)}}function Vc(e,t,r){return e.check(xo,t,e.attempt(zc,t,r))}function Hc(e){e.exit("gfmFootnoteDefinition")}function Qc(e){let t=(e||{}).singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,o=this.events;let a=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const c=go(i);if(126===o)return a>1?n(o):(e.consume(o),a++,s);if(a<2&&!t)return n(o);const u=e.exit("strikethroughSequenceTemporary"),l=go(o);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(o)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},o={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},a=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&Bi(a,a.length,0,vo(s,e.slice(n+1,r),t)),Bi(a,a.length,0,[["exit",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Bi(e,n-1,r-n+3,a),r=n+a.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}class Gc{constructor(){this.map=[]}add(e,t,r){!function(e,t,r,n){let i=0;if(0===r&&0===n.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=r,void e.map[i][2].push(...n);i+=1}e.map.push([t,r,n])}(this,e,t,r)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}}function Wc(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if("enter"===i[0])"tableContent"===i[1].type&&n.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=n.length-1;n[e]="left"===n[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(r=!0);t+=1}return n}function Kc(e,t,r){const n=this;let i,o=0,a=0;return function(e){let t=n.events.length-1;for(;t>-1;){const e=n.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?n.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?w:s;if(o===w&&n.parser.lazy[n.now().line])return r(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return c(e);return i=!0,a+=1,c(e)}(t)}function c(t){return null===t?r(t):no(t)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):r(t):oo(t)?fo(e,c,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),u(t)))}function u(t){return null===t||124===t||io(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return 92===t||124===t?(e.consume(t),u):u(t)}function f(t){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(t):(e.enter("tableDelimiterRow"),i=!1,oo(t)?fo(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?d(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return oo(t)?fo(e,d,"whitespace")(t):d(t)}function d(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||no(t)?y(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return oo(t)?fo(e,y,"whitespace")(t):y(t)}function y(r){return 124===r?h(r):(null===r||no(r))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(r)):b(r)}function b(e){return r(e)}function w(t){return e.enter("tableRow"),x(t)}function x(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),x):null===r||no(r)?(e.exit("tableRow"),t(r)):oo(r)?fo(e,x,"whitespace")(r):(e.enter("data"),k(r))}function k(t){return null===t||124===t||io(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function Jc(e,t){let r,n,i,o=-1,a=!0,s=0,c=[0,0,0,0],u=[0,0,0,0],l=!1,f=0;const h=new Gc;for(;++o<e.length;){const p=e[o],d=p[1];"enter"===p[0]?"tableHead"===d.type?(l=!1,0!==f&&(Zc(h,t,f,r,n),n=void 0,f=0),r={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(o,0,[["enter",r,t]])):"tableRow"===d.type||"tableDelimiterRow"===d.type?(a=!0,i=void 0,c=[0,0,0,0],u=[0,o+1,0,0],l&&(l=!1,n={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(o,0,[["enter",n,t]])),s="tableDelimiterRow"===d.type?2:n?3:1):!s||"data"!==d.type&&"tableDelimiterMarker"!==d.type&&"tableDelimiterFiller"!==d.type?"tableCellDivider"===d.type&&(a?a=!1:(0!==c[1]&&(u[0]=u[1],i=Yc(h,t,c,s,void 0,i)),c=u,u=[c[1],o,0,0])):(a=!1,0===u[2]&&(0!==c[1]&&(u[0]=u[1],i=Yc(h,t,c,s,void 0,i),c=[0,0,0,0]),u[2]=o)):"tableHead"===d.type?(l=!0,f=o):"tableRow"===d.type||"tableDelimiterRow"===d.type?(f=o,0!==c[1]?(u[0]=u[1],i=Yc(h,t,c,s,o,i)):0!==u[1]&&(i=Yc(h,t,u,s,o,i)),s=0):!s||"data"!==d.type&&"tableDelimiterMarker"!==d.type&&"tableDelimiterFiller"!==d.type||(u[3]=o)}for(0!==f&&Zc(h,t,f,r,n),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Wc(t.events,o))}return e}function Yc(e,t,r,n,i,o){const a=1===n?"tableHeader":2===n?"tableDelimiter":"tableData";0!==r[0]&&(o.end=Object.assign({},Xc(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const s=Xc(t.events,r[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(r[1],0,[["enter",o,t]]),0!==r[2]){const i=Xc(t.events,r[2]),o=Xc(t.events,r[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(r[2],0,[["enter",a,t]]),2!==n){const n=t.events[r[2]],i=t.events[r[3]];if(n[1].end=Object.assign({},i[1].end),n[1].type="chunkText",n[1].contentType="text",r[3]>r[2]+1){const t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},Xc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Zc(e,t,r,n,i){const o=[],a=Xc(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function Xc(e,t){const r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}const eu={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return io(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):r(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):r(t)}function a(n){return no(n)?t(n):oo(n)?e.check({tokenize:tu},t,r)(n):r(n)}}};function tu(e,t,r){return fo(e,(function(e){return null===e?r(e):t(e)}),"whitespace")}const ru={};function nu(){return{type:"break"}}const iu={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},ou={attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},au={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"};var su=Object.freeze({__proto__:null,codes:iu,constants:ou,types:au,values:{ht:"\t",lf:"\n",cr:"\r",space:" ",exclamationMark:"!",quotationMark:'"',numberSign:"#",dollarSign:"$",percentSign:"%",ampersand:"&",apostrophe:"'",leftParenthesis:"(",rightParenthesis:")",asterisk:"*",plusSign:"+",comma:",",dash:"-",dot:".",slash:"/",digit0:"0",digit1:"1",digit2:"2",digit3:"3",digit4:"4",digit5:"5",digit6:"6",digit7:"7",digit8:"8",digit9:"9",colon:":",semicolon:";",lessThan:"<",equalsTo:"=",greaterThan:">",questionMark:"?",atSign:"@",uppercaseA:"A",uppercaseB:"B",uppercaseC:"C",uppercaseD:"D",uppercaseE:"E",uppercaseF:"F",uppercaseG:"G",uppercaseH:"H",uppercaseI:"I",uppercaseJ:"J",uppercaseK:"K",uppercaseL:"L",uppercaseM:"M",uppercaseN:"N",uppercaseO:"O",uppercaseP:"P",uppercaseQ:"Q",uppercaseR:"R",uppercaseS:"S",uppercaseT:"T",uppercaseU:"U",uppercaseV:"V",uppercaseW:"W",uppercaseX:"X",uppercaseY:"Y",uppercaseZ:"Z",leftSquareBracket:"[",backslash:"\\",rightSquareBracket:"]",caret:"^",underscore:"_",graveAccent:"`",lowercaseA:"a",lowercaseB:"b",lowercaseC:"c",lowercaseD:"d",lowercaseE:"e",lowercaseF:"f",lowercaseG:"g",lowercaseH:"h",lowercaseI:"i",lowercaseJ:"j",lowercaseK:"k",lowercaseL:"l",lowercaseM:"m",lowercaseN:"n",lowercaseO:"o",lowercaseP:"p",lowercaseQ:"q",lowercaseR:"r",lowercaseS:"s",lowercaseT:"t",lowercaseU:"u",lowercaseV:"v",lowercaseW:"w",lowercaseX:"x",lowercaseY:"y",lowercaseZ:"z",leftCurlyBrace:"{",verticalBar:"|",rightCurlyBrace:"}",tilde:"~",replacementCharacter:"�"}});function cu(e,t){const r=t.referenceType;let n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=n:i.push({type:"text",value:n}),i}function uu(e){const t=e.spread;return null==t?e.children.length>1:t}const lu=hu("end"),fu=hu("start");function hu(e){return function(t){const r=t&&t.position&&t.position[e]||{};if("number"==typeof r.line&&r.line>0&&"number"==typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"==typeof r.offset&&r.offset>-1?r.offset:void 0}}}const pu=9,du=32;function mu(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const o=[];for(;n;)o.push(gu(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return o.push(gu(t.slice(i),i>0,!1)),o.join("")}function gu(e,t,r){let n=0,i=e.length;if(t){let t=e.codePointAt(n);for(;t===pu||t===du;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(i-1);for(;t===pu||t===du;)i--,t=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}const vu={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){const r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=lo(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let a,s=e.footnoteCounts.get(n);void 0===s?(s=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(n,s);const c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cu(e,t);const i={src:lo(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const r={src:lo(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cu(e,t);const i={href:lo(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const r={href:lo(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),i=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=uu(r[n])}return t}(r):uu(t),o={},a=[];if("boolean"==typeof t.checked){const e=n[0];let r;e&&"element"===e.type&&"p"===e.tagName?r=e:(r={type:"element",tagName:"p",properties:{},children:[]},n.unshift(r)),r.children.length>0&&r.children.unshift({type:"text",value:" "}),r.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const e=n[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const c=n[n.length-1];c&&(i||"element"!==c.type||"p"!==c.tagName)&&a.push({type:"text",value:"\n"});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){const r={},n=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(r.start=t.start);++i<n.length;){const e=n[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const r={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],r),i.push(r)}if(r.length>0){const n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=fu(t.children[1]),a=lu(t.children[t.children.length-1]);o&&a&&(n.position={start:o,end:a}),i.push(n)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,i=0===(n?n.indexOf(t):1)?"th":"td",o=r&&"table"===r.type?r.align:void 0,a=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<a;){const r=t.children[s],n={},a=o?o[s]:void 0;a&&(n.align=a);let u={type:"element",tagName:i,properties:n,children:[]};r&&(u.children=e.all(r),e.patch(r,u),u=e.applyData(r,u)),c.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const r={type:"text",value:mu(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:yu,yaml:yu,definition:yu,footnoteDefinition:yu};function yu(){}var bu,wu={exports:{}};bu=wu,function(){var e;function t(e){for(var t,r,n,i,o=1,a=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return a[o++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):null};s<c;++s)if(t=e[s],l)switch(l=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=p(),t){case"b":u+=parseInt(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=bu.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var xu=J(wu.exports);const ku=Object.assign(Su(Error),{eval:Su(EvalError),range:Su(RangeError),reference:Su(ReferenceError),syntax:Su(SyntaxError),type:Su(TypeError),uri:Su(URIError)});function Su(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?xu(t,...r):t;return new e(n)}}const Eu={}.hasOwnProperty,Pu={yaml:"-",toml:"+"};function Cu(e){const t=[];let r=-1;const n=Array.isArray(e)?e:e?[e]:["yaml"];for(;++r<n.length;)t[r]=Au(n[r]);return t}function Au(e){let t=e;if("string"==typeof t){if(!Eu.call(Pu,t))throw ku("Missing matter definition for `%s`",t);t={type:t,marker:Pu[t]}}else if("object"!=typeof t)throw ku("Expected matter to be an object, not `%j`",t);if(!Eu.call(t,"type"))throw ku("Missing `type` in matter `%j`",t);if(!Eu.call(t,"fence")&&!Eu.call(t,"marker"))throw ku("Missing `marker` or `fence` in matter `%j`",t);return t}function _u(e){const t=e.anywhere,r=e.type,n=r+"Fence",i=n+"Sequence",o=r+"Value",a={tokenize:function(e,t,r){let o=0;return function(t){if(t===s.charCodeAt(o))return e.enter(n),e.enter(i),a(t);return r(t)};function a(t){return o===s.length?(e.exit(i),oo(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(o++)?(e.consume(t),a):r(t)}function c(t){return oo(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(i){return null===i||no(i)?(e.exit(n),t(i)):r(i)}},partial:!0};let s,c=0;return{tokenize:function(u,l,f){const h=this;return function(o){const a=h.now();if(1===a.column&&(1===a.line||t)&&(s=Ru(e,"open"),c=0,o===s.charCodeAt(c)))return u.enter(r),u.enter(n),u.enter(i),p(o);return f(o)};function p(e){return c===s.length?(u.exit(i),oo(e)?(u.enter("whitespace"),d(e)):m(e)):e===s.charCodeAt(c++)?(u.consume(e),p):f(e)}function d(e){return oo(e)?(u.consume(e),d):(u.exit("whitespace"),m(e))}function m(t){return no(t)?(u.exit(n),u.enter("lineEnding"),u.consume(t),u.exit("lineEnding"),s=Ru(e,"close"),c=0,u.attempt(a,b,g)):f(t)}function g(e){return null===e||no(e)?y(e):(u.enter(o),v(e))}function v(e){return null===e||no(e)?(u.exit(o),y(e)):(u.consume(e),v)}function y(e){return null===e?f(e):(u.enter("lineEnding"),u.consume(e),u.exit("lineEnding"),u.attempt(a,b,g))}function b(e){return u.exit(r),l(e)}},concrete:!0}}function Ru(e,t){return e.marker?Fu(e.marker,t).repeat(3):Fu(e.fence,t)}function Fu(e,t){return"string"==typeof e?e:e[t]}function Ou(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Tu(e){const t=this.resume(),r=this.stack[this.stack.length-1];this.exit(e),r.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Du(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Lu(e){const t=Iu(e,"open"),r=Iu(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function Iu(e,t){return e.marker?ju(e.marker,t).repeat(3):ju(e.fence,t)}function ju(e,t){return"string"==typeof e?e:e[t]}const Nu=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],qu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function zu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function Mu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Bu(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||zu(e)}const Uu=String.fromCharCode,$u=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Vu(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,o,a=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(o=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=p();for(a--;++a<=e.length;)if(10===u&&(f=(o?o[s]:0)||1),u=e.charCodeAt(a),38===u){const i=e.charCodeAt(a+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=Uu(u),f++;continue}const o=a+1;let s,l=o,g=o;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?Bu:"decimal"===s?zu:Mu;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=Uu(t),"named"===s&&Nu.includes(b)&&(v=b,y=Mi(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&Mi(b);e&&(v=b,y=e)}let k=1+g-o,S="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)d(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(d(r,k),y=""):Bu(t)?y="":d(r,k)}else d(r,k)}S=y}else{x||d(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if(Hu(e))d(7,k),S=Uu(65533);else if(e in qu)d(6,k),S=qu[e];else{let t="";Qu(e)&&d(6,k),e>65535&&(e-=65536,t+=Uu(e>>>10|55296),e=56320|1023&e),S=t+Uu(e)}}else"named"!==s&&d(4,k);else;if(S){m(),h=p(),a=g-1,f+=g-o+1,n.push(S);const r=p();r.offset++,t.reference&&t.reference.call(t.referenceContext,S,{start:h,end:r},e.slice(o-1,g)),h=r}else b=e.slice(o-1,g),c+=b,f+=b.length,a=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=Uu(u),f++);return n.join("");function p(){return{line:l,column:f,offset:a+((i?i.offset:0)||0)}}function d(e,r){let n;t.warning&&(n=p(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,$u[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:p()}),c="")}}function Hu(e){return e>=55296&&e<=57343||e>1114111}function Qu(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Gu(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Wu(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Ku={}.hasOwnProperty,Ju=/^[^\t\n\r "#'.<=>`}]+$/;function Yu(e){el.call(this,"containerDirective",e)}function Zu(e){el.call(this,"leafDirective",e)}function Xu(e){el.call(this,"textDirective",e)}function el(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function tl(e){const t=this.stack[this.stack.length-1];"containerDirective"===t.type||"leafDirective"===t.type||t.type,t.name=this.sliceSerialize(e)}function rl(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function nl(e){this.exit(e)}function il(){this.data.directiveAttributes=[],this.buffer()}function ol(e){this.data.directiveAttributes.push(["id",Vu(this.sliceSerialize(e),{attribute:!0})])}function al(e){this.data.directiveAttributes.push(["class",Vu(this.sliceSerialize(e),{attribute:!0})])}function sl(e){const t=this.data.directiveAttributes;t[t.length-1][1]=Vu(this.sliceSerialize(e),{attribute:!0})}function cl(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function ul(){const e=this.data.directiveAttributes,t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.data.directiveAttributes=void 0,this.resume();const n=this.stack[this.stack.length-1];"containerDirective"===n.type||"leafDirective"===n.type||n.type,n.attributes=t}function ll(e){this.exit(e)}function fl(e,t,r,n){const i=r.createTracker(n),o=function(e){let t=0;"containerDirective"===e.type?(Xa(e,(function(e,r){if("containerDirective"===e.type){let e=r.length,n=0;for(;e--;)"containerDirective"===r[e].type&&n++;n>t&&(t=n)}})),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t)}(e),a=r.enter(e.type);let s,c=i.move(o+(e.name||""));if("containerDirective"===e.type){const t=(e.children||[])[0];s=hl(t)?t:void 0}else s=e;if(s&&s.children&&s.children.length>0){const t=r.enter("label"),n=`${e.type}Label`,o=r.enter(n);c+=i.move("["),c+=i.move(r.containerPhrasing(s,{...i.current(),before:c,after:"]"})),c+=i.move("]"),o(),t()}if(c+=i.move(function(e,t){const r=t.options.quote||'"',n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},o=[];let a,s,c,u;for(u in i)if(Ku.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=Ju.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(Ju.test(t[i])?n:r).push(t[i]);a=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else o.push(l(u,e))}a&&o.unshift(a);s&&o.unshift(s);c&&o.unshift(c);return o.length>0?"{"+o.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Gu(e,Object.assign({format:Wu},t))}(t,{subset:n})+r:"")}}(e,r)),"containerDirective"===e.type){let t=e;hl((e.children||[])[0])&&(t=Object.assign({},e,{children:e.children.slice(1)})),t&&t.children&&t.children.length>0&&(c+=i.move("\n"),c+=i.move(r.containerFlow(t,i.current()))),c+=i.move("\n"+o)}return a(),c}function hl(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}function pl(e,t,r,n,i,o,a,s,c,u,l,f,h,p,d){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=a,y(t)):46===t?(m=s,y(t)):58===t||95===t||Ji(t)?(e.enter(o),e.enter(c),e.consume(t),x):d&&oo(t)?fo(e,v,"whitespace")(t):!d&&io(t)?No(e,v)(t):R(t)}function y(t){const r=m+"Marker";return e.enter(o),e.enter(m),e.enter(r),e.consume(t),e.exit(r),b}function b(t){if(null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||io(t))return r(t);const n=m+"Value";return e.enter(n),e.consume(t),w}function w(t){if(null===t||34===t||39===t||60===t||61===t||62===t||96===t)return r(t);if(35===t||46===t||125===t||io(t)){const r=m+"Value";return e.exit(r),e.exit(m),e.exit(o),v(t)}return e.consume(t),w}function x(t){return 45===t||46===t||58===t||95===t||Yi(t)?(e.consume(t),x):(e.exit(c),d&&oo(t)?fo(e,k,"whitespace")(t):!d&&io(t)?No(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),S):(e.exit(o),v(t))}function S(t){return null===t||60===t||61===t||62===t||96===t||125===t||d&&no(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):d&&oo(t)?fo(e,S,"whitespace")(t):!d&&io(t)?No(e,S)(t):(e.enter(f),e.enter(p),e.consume(t),g=void 0,E)}function E(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||io(t)?(e.exit(p),e.exit(f),e.exit(o),v(t)):(e.consume(t),E)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(o),_):(e.enter(f),C(t))}function C(t){return t===g?(e.exit(f),P(t)):null===t?r(t):no(t)?d?r(t):No(e,C)(t):(e.enter(p),e.consume(t),A)}function A(t){return t===g||null===t||no(t)?(e.exit(p),C(t)):(e.consume(t),A)}function _(e){return 125===e||io(e)?v(e):R(e)}function R(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(n),t):r(o)}}function dl(e,t,r,n,i,o,a){let s,c=0,u=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),l};function l(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),f(r))}function f(t){if(93===t&&!u)return d(t);const r=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=r),s=r,h(t)}function h(t){return null===t||c>999||91===t&&++u>32?r(t):93!==t||u--?no(t)?a?r(t):(e.consume(t),e.exit("chunkText"),f):(e.consume(t),92===t?p:h):(e.exit("chunkText"),d(t))}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,h):h(t)}function d(r){return e.exit(o),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}}function ml(e,t,r,n){const i=this;return function(t){if(Ji(t))return e.enter(n),e.consume(t),o;return r(t)};function o(a){return 45===a||95===a||Yi(a)?(e.consume(a),o):(e.exit(n),45===i.previous||95===i.previous?r(a):t(a))}}fl.peek=function(){return":"};const gl={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),ml.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(vl,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(yl,f,f)(t):f(t)}function f(t){return fo(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?p(i):no(i)?n.interrupt?t(i):e.attempt(bl,d,p)(i):r(i)}function p(r){return e.exit("directiveContainer"),t(r)}function d(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,o?fo(e,g,"linePrefix",o+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=r),a=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return no(t)?e.check(bl,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return fo(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),fo(e,o,"whitespace")(t))}function o(n){return null===n||no(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},vl={tokenize:function(e,t,r){return dl(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},yl={tokenize:function(e,t,r){return pl(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},bl={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const wl={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),ml.call(n,e,o,r,"directiveLeafName")):r(t)}function o(t){return 91===t?e.attempt(xl,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(kl,s,s)(t):s(t)}function s(t){return fo(e,c,"whitespace")(t)}function c(n){return null===n||no(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},xl={tokenize:function(e,t,r){return dl(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},kl={tokenize:function(e,t,r){return pl(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const Sl={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),ml.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(El,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(Pl,a,a)(t):a(t)}function a(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},El={tokenize:function(e,t,r){return dl(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},Pl={tokenize:function(e,t,r){return pl(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const Cl=function(e){if(null==e)return _l;if("string"==typeof e)return function(e){return Al(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Cl(e[r]);return Al(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return Al(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return Al(e);throw new Error("Expected function, string, or object as test")};function Al(e){return function(t,...r){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...r)))}}function _l(){return!0}function Rl(e){return""+e+""}const Fl=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Cl(t),o=n?-1:1;!function e(a,s,c){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(l,"name",{value:"node ("+Rl(a.type+(e?"<"+e+">":""))+")"})}return l;function l(){let u,l,f,h=[];if((!t||i(a,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(a,c)),false===h[0]))return h;if(a.children&&"skip"!==h[0])for(l=(n?a.children.length:-1)+o,f=c.concat(a);l>-1&&l<a.children.length;){if(u=e(a.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+o}return h}}(e,void 0,[])()};const Ol=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),Fl(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)},Tl={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};function Dl(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ll}=Object.prototype,{getPrototypeOf:Il}=Object,jl=(e=>t=>{const r=Ll.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Nl=e=>(e=e.toLowerCase(),t=>jl(t)===e),ql=e=>t=>typeof t===e,{isArray:zl}=Array,Ml=ql("undefined");const Bl=Nl("ArrayBuffer");const Ul=ql("string"),$l=ql("function"),Vl=ql("number"),Hl=e=>null!==e&&"object"==typeof e,Ql=e=>{if("object"!==jl(e))return!1;const t=Il(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Gl=Nl("Date"),Wl=Nl("File"),Kl=Nl("Blob"),Jl=Nl("FileList"),Yl=Nl("URLSearchParams");function Zl(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),zl(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function Xl(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const ef="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,tf=e=>!Ml(e)&&e!==ef;const rf=(nf="undefined"!=typeof Uint8Array&&Il(Uint8Array),e=>nf&&e instanceof nf);var nf;const of=Nl("HTMLFormElement"),af=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),sf=Nl("RegExp"),cf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Zl(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},uf="abcdefghijklmnopqrstuvwxyz",lf="0123456789",ff={DIGIT:lf,ALPHA:uf,ALPHA_DIGIT:uf+uf.toUpperCase()+lf};const hf=Nl("AsyncFunction");var pf={isArray:zl,isArrayBuffer:Bl,isBuffer:function(e){return null!==e&&!Ml(e)&&null!==e.constructor&&!Ml(e.constructor)&&$l(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||$l(e.append)&&("formdata"===(t=jl(e))||"object"===t&&$l(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Bl(e.buffer),t},isString:Ul,isNumber:Vl,isBoolean:e=>!0===e||!1===e,isObject:Hl,isPlainObject:Ql,isUndefined:Ml,isDate:Gl,isFile:Wl,isBlob:Kl,isRegExp:sf,isFunction:$l,isStream:e=>Hl(e)&&$l(e.pipe),isURLSearchParams:Yl,isTypedArray:rf,isFileList:Jl,forEach:Zl,merge:function e(){const{caseless:t}=tf(this)&&this||{},r={},n=(n,i)=>{const o=t&&Xl(r,i)||i;Ql(r[o])&&Ql(n)?r[o]=e(r[o],n):Ql(n)?r[o]=e({},n):zl(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Zl(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(Zl(t,((t,n)=>{r&&$l(t)?e[n]=Dl(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Il(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:jl,kindOfTest:Nl,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(zl(e))return e;let t=e.length;if(!Vl(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:of,hasOwnProperty:af,hasOwnProp:af,reduceDescriptors:cf,freezeMethods:e=>{cf(e,((t,r)=>{if($l(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];$l(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return zl(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Xl,global:ef,isContextDefined:tf,ALPHABET:ff,generateString:(e=16,t=ff.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&$l(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Hl(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=zl(e)?[]:{};return Zl(e,((e,t)=>{const o=r(e,n+1);!Ml(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:hf,isThenable:e=>e&&(Hl(e)||$l(e))&&$l(e.then)&&$l(e.catch)};function df(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}pf.inherits(df,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:pf.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const mf=df.prototype,gf={};["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","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{gf[e]={value:e}})),Object.defineProperties(df,gf),Object.defineProperty(mf,"isAxiosError",{value:!0}),df.from=(e,t,r,n,i,o)=>{const a=Object.create(mf);return pf.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),df.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var vf=x.Stream,yf=bf;function bf(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}w.inherits(bf,vf),bf.create=function(e,t){var r=new this;for(var n in t=t||{})r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),r.pauseStream&&e.pause(),r},Object.defineProperty(bf.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),bf.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},bf.prototype.resume=function(){this._released||this.release(),this.source.resume()},bf.prototype.pause=function(){this.source.pause()},bf.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},bf.prototype.pipe=function(){var e=vf.prototype.pipe.apply(this,arguments);return this.resume(),e},bf.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},bf.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}};var wf=w,xf=x.Stream,kf=yf,Sf=Ef;function Ef(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}wf.inherits(Ef,xf),Ef.create=function(e){var t=new this;for(var r in e=e||{})t[r]=e[r];return t},Ef.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},Ef.prototype.append=function(e){if(Ef.isStreamLike(e)){if(!(e instanceof kf)){var t=kf.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},Ef.prototype.pipe=function(e,t){return xf.prototype.pipe.call(this,e,t),this.resume(),e},Ef.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},Ef.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){Ef.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},Ef.prototype._pipeNext=function(e){if(this._currentStream=e,Ef.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},Ef.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},Ef.prototype.write=function(e){this.emit("data",e)},Ef.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},Ef.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},Ef.prototype.end=function(){this._reset(),this.emit("end")},Ef.prototype.destroy=function(){this._reset(),this.emit("close")},Ef.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},Ef.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},Ef.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},Ef.prototype._emitError=function(e){this._reset(),this.emit("error",e)};var Pf=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)},Cf=function(e){var t=!1;return Pf((function(){t=!0})),function(r,n){t?e(r,n):Pf((function(){e(r,n)}))}};var Af=function(e){Object.keys(e.jobs).forEach(_f.bind(e)),e.jobs={}};function _f(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var Rf=Cf,Ff=Af,Of=function(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=function(e,t,r,n){var i;i=2==e.length?e(r,Rf(n)):e(r,t,Rf(n));return i}(t,i,e[i],(function(e,t){i in r.jobs&&(delete r.jobs[i],e?Ff(r):r.results[i]=t,n(e,r.results))}))};var Tf=function(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};t&&n.keyedList.sort(r?t:function(r,n){return t(e[r],e[n])});return n};var Df=Af,Lf=Cf,If=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,Df(this),Lf(e)(null,this.results)};var jf=Of,Nf=Tf,qf=If,zf=function(e,t,r){var n=Nf(e);for(;n.index<(n.keyedList||e).length;)jf(e,t,n,(function(e,t){e?r(e,t):0!==Object.keys(n.jobs).length||r(null,n.results)})),n.index++;return qf.bind(n,r)};var Mf={exports:{}},Bf=Of,Uf=Tf,$f=If;function Vf(e,t){return e<t?-1:e>t?1:0}Mf.exports=function(e,t,r,n){var i=Uf(e,r);return Bf(e,t,i,(function r(o,a){o?n(o,a):(i.index++,i.index<(i.keyedList||e).length?Bf(e,t,i,r):n(null,i.results))})),$f.bind(i,n)},Mf.exports.ascending=Vf,Mf.exports.descending=function(e,t){return-1*Vf(e,t)};var Hf=Mf.exports,Qf=Hf,Gf=function(e,t,r){return Qf(e,t,null,r)};var Wf={parallel:zf,serial:Gf,serialOrdered:Hf},Kf=Sf,Jf=w,Yf=i,Zf=k,Xf=S,eh=E.parse,th=P,rh=x.Stream,nh=C,ih=Wf,oh=function(e,t){return Object.keys(t).forEach((function(r){e[r]=e[r]||t[r]})),e},ah=sh;function sh(e){if(!(this instanceof sh))return new sh(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Kf.call(this),e=e||{})this[t]=e[t]}Jf.inherits(sh,Kf),sh.LINE_BREAK="\r\n",sh.DEFAULT_CONTENT_TYPE="application/octet-stream",sh.prototype.append=function(e,t,r){"string"==typeof(r=r||{})&&(r={filename:r});var n=Kf.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),Jf.isArray(t))this._error(new Error("Arrays are not supported."));else{var i=this._multiPartHeader(e,t,r),o=this._multiPartFooter();n(i),n(t),n(o),this._trackLength(i,t,r)}},sh.prototype._trackLength=function(e,t,r){var n=0;null!=r.knownLength?n+=+r.knownLength:Buffer.isBuffer(t)?n=t.length:"string"==typeof t&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+sh.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof rh)&&(r.knownLength||this._valuesToMeasure.push(t))},sh.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):th.stat(e.path,(function(r,n){var i;r?t(r):(i=n.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(r){e.pause(),t(null,+r.headers["content-length"])})),e.resume()):t("Unknown stream")},sh.prototype._multiPartHeader=function(e,t,r){if("string"==typeof r.header)return r.header;var n,i=this._getContentDisposition(t,r),o=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof r.header&&oh(s,r.header),s)s.hasOwnProperty(c)&&null!=(n=s[c])&&(Array.isArray(n)||(n=[n]),n.length&&(a+=c+": "+n.join("; ")+sh.LINE_BREAK));return"--"+this.getBoundary()+sh.LINE_BREAK+a+sh.LINE_BREAK},sh.prototype._getContentDisposition=function(e,t){var r,n;return"string"==typeof t.filepath?r=Yf.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Yf.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Yf.basename(e.client._httpMessage.path||"")),r&&(n='filename="'+r+'"'),n},sh.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=nh.lookup(e.name)),!r&&e.path&&(r=nh.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),r||!t.filepath&&!t.filename||(r=nh.lookup(t.filepath||t.filename)),r||"object"!=typeof e||(r=sh.DEFAULT_CONTENT_TYPE),r},sh.prototype._multiPartFooter=function(){return function(e){var t=sh.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},sh.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+sh.LINE_BREAK},sh.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r},sh.prototype.setBoundary=function(e){this._boundary=e},sh.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},sh.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)"function"!=typeof this._streams[r]&&(e=Buffer.isBuffer(this._streams[r])?Buffer.concat([e,this._streams[r]]):Buffer.concat([e,Buffer.from(this._streams[r])]),"string"==typeof this._streams[r]&&this._streams[r].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(sh.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},sh.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},sh.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},sh.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},sh.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?ih.parallel(this._valuesToMeasure,this._lengthRetriever,(function(r,n){r?e(r):(n.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},sh.prototype.submit=function(e,t){var r,n,i={method:"post"};return"string"==typeof e?(e=eh(e),n=oh({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=oh(e,i)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(e.headers),r="https:"==n.protocol?Xf.request(n):Zf.request(n),this.getLength(function(e,n){if(e&&"Unknown stream"!==e)this._error(e);else if(n&&r.setHeader("Content-Length",n),this.pipe(r),t){var i,o=function(e,n){return r.removeListener("error",o),r.removeListener("response",i),t.call(this,e,n)};i=o.bind(this,null),r.on("error",o),r.on("response",i)}}.bind(this)),r},sh.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},sh.prototype.toString=function(){return"[object FormData]"};var ch=J(ah);function uh(e){return pf.isPlainObject(e)||pf.isArray(e)}function lh(e){return pf.endsWith(e,"[]")?e.slice(0,-2):e}function fh(e,t,r){return e?e.concat(t).map((function(e,t){return e=lh(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const hh=pf.toFlatObject(pf,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ph(e,t,r){if(!pf.isObject(e))throw new TypeError("target must be an object");t=t||new(ch||FormData);const n=(r=pf.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!pf.isUndefined(t[e])}))).metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&pf.isSpecCompliantForm(t);if(!pf.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(pf.isDate(e))return e.toISOString();if(!s&&pf.isBlob(e))throw new df("Blob is not supported. Use a Buffer instead.");return pf.isArrayBuffer(e)||pf.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(pf.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(pf.isArray(e)&&function(e){return pf.isArray(e)&&!e.some(uh)}(e)||(pf.isFileList(e)||pf.endsWith(r,"[]"))&&(s=pf.toArray(e)))return r=lh(r),s.forEach((function(e,n){!pf.isUndefined(e)&&null!==e&&t.append(!0===a?fh([r],n,o):null===a?r:r+"[]",c(e))})),!1;return!!uh(e)||(t.append(fh(i,r,o),c(e)),!1)}const l=[],f=Object.assign(hh,{defaultVisitor:u,convertValue:c,isVisitable:uh});if(!pf.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!pf.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),pf.forEach(r,(function(r,o){!0===(!(pf.isUndefined(r)||null===r)&&i.call(t,r,pf.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])})),l.pop()}}(e),t}function dh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function mh(e,t){this._pairs=[],e&&ph(e,this,t)}const gh=mh.prototype;function vh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yh(e,t,r){if(!t)return e;const n=r&&r.encode||vh,i=r&&r.serialize;let o;if(o=i?i(t,r):pf.isURLSearchParams(t)?t.toString():new mh(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}gh.append=function(e,t){this._pairs.push([e,t])},gh.toString=function(e){const t=e?function(t){return e.call(this,t,dh)}:dh;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var bh=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){pf.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},wh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xh={isNode:!0,classes:{URLSearchParams:E.URLSearchParams,FormData:ch,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const kh="undefined"!=typeof window&&"undefined"!=typeof document,Sh=(Eh="undefined"!=typeof navigator&&navigator.product,kh&&["ReactNative","NativeScript","NS"].indexOf(Eh)<0);var Eh;const Ph="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var Ch={...Object.freeze({__proto__:null,hasBrowserEnv:kh,hasStandardBrowserEnv:Sh,hasStandardBrowserWebWorkerEnv:Ph}),...xh};function Ah(e){function t(e,r,n,i){let o=e[i++];const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&pf.isArray(n)?n.length:o,s)return pf.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a;n[o]&&pf.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&pf.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!a}if(pf.isFormData(e)&&pf.isFunction(e.entries)){const r={};return pf.forEachEntry(e,((e,n)=>{t(function(e){return pf.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const _h={transitional:wh,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=pf.isObject(e);i&&pf.isHTMLForm(e)&&(e=new FormData(e));if(pf.isFormData(e))return n&&n?JSON.stringify(Ah(e)):e;if(pf.isArrayBuffer(e)||pf.isBuffer(e)||pf.isStream(e)||pf.isFile(e)||pf.isBlob(e))return e;if(pf.isArrayBufferView(e))return e.buffer;if(pf.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ph(e,new Ch.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Ch.isNode&&pf.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=pf.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ph(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(pf.isString(e))try{return(t||JSON.parse)(e),pf.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_h.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&pf.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw df.from(e,df.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ch.classes.FormData,Blob:Ch.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pf.forEach(["delete","get","head","post","put","patch"],(e=>{_h.headers[e]={}}));var Rh=_h;const Fh=pf.toObjectSet(["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"]);const Oh=Symbol("internals");function Th(e){return e&&String(e).trim().toLowerCase()}function Dh(e){return!1===e||null==e?e:pf.isArray(e)?e.map(Dh):String(e)}function Lh(e,t,r,n,i){return pf.isFunction(n)?n.call(this,t,r):(i&&(t=r),pf.isString(t)?pf.isString(n)?-1!==t.indexOf(n):pf.isRegExp(n)?n.test(t):void 0:void 0)}let Ih=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Th(t);if(!i)throw new Error("header name must be a non-empty string");const o=pf.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Dh(e))}const o=(e,t)=>pf.forEach(e,((e,r)=>i(e,r,t)));return pf.isPlainObject(e)||e instanceof this.constructor?o(e,t):pf.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Fh[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=Th(e)){const r=pf.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(pf.isFunction(t))return t.call(this,e,r);if(pf.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Th(e)){const r=pf.findKey(this,e);return!(!r||void 0===this[r]||t&&!Lh(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Th(e)){const i=pf.findKey(r,e);!i||t&&!Lh(0,r[i],i,t)||(delete r[i],n=!0)}}return pf.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!Lh(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return pf.forEach(this,((n,i)=>{const o=pf.findKey(r,i);if(o)return t[o]=Dh(n),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();a!==i&&delete t[i],t[a]=Dh(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return pf.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&pf.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Oh]=this[Oh]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Th(e);t[n]||(!function(e,t){const r=pf.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return pf.isArray(e)?e.forEach(n):n(e),this}};Ih.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pf.reduceDescriptors(Ih.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),pf.freezeMethods(Ih);var jh=Ih;function Nh(e,t){const r=this||Rh,n=t||r,i=jh.from(n.headers);let o=n.data;return pf.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qh(e){return!(!e||!e.__CANCEL__)}function zh(e,t,r){df.call(this,null==e?"canceled":e,df.ERR_CANCELED,t,r),this.name="CanceledError"}function Mh(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new df("Request failed with status code "+r.status,[df.ERR_BAD_REQUEST,df.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function Bh(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}pf.inherits(zh,df,{__CANCEL__:!0});var Uh=E.parse,$h={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Vh=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function Hh(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var Qh,Gh,Wh,Kh,Jh,Yh,Zh,Xh,ep,tp=function(e){var t="string"==typeof e?Uh(e):e||{},r=t.protocol,n=t.host,i=t.port;if("string"!=typeof n||!n||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(Hh("npm_config_no_proxy")||Hh("no_proxy")).toLowerCase();if(!r)return!0;if("*"===r)return!1;return r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),i=n?n[1]:r,o=n?parseInt(n[2]):0;return!(!o||o===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!Vh.call(e,i)):e!==i)}))}(n=n.replace(/:\d*$/,""),i=parseInt(i)||$h[r]||0))return"";var o=Hh("npm_config_"+r+"_proxy")||Hh(r+"_proxy")||Hh("npm_config_proxy")||Hh("all_proxy");return o&&-1===o.indexOf("://")&&(o=r+"://"+o),o},rp={exports:{}},np={exports:{}},ip={exports:{}};function op(){return Gh?Qh:(Gh=1,Qh=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n<i)})}function ap(){if(Kh)return Wh;Kh=1;const e=R,t=op(),r=process.env;let n;function i(i){const o=function(i){if(!1===n)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!i.isTTY&&!0!==n)return 0;const o=n?1:0;if("win32"===process.platform){const t=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in r))||"codeship"===r.CI_NAME?1:o;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM,o)}(i);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?n=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(n=!0),"FORCE_COLOR"in r&&(n=0===r.FORCE_COLOR.length||0!==parseInt(r.FORCE_COLOR,10)),Wh={supportsColor:i,stdout:i(process.stdout),stderr:i(process.stderr)}}function sp(){if(Yh)return Jh;Yh=1;var e=1e3,t=60*e,r=60*t,n=24*r,i=7*n,o=365.25*n;function a(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return Jh=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(i){var o=Math.abs(i);if(o>=n)return a(i,o,n,"day");if(o>=r)return a(i,o,r,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=n)return Math.round(i/n)+"d";if(o>=r)return Math.round(i/r)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Jh}function cp(){if(Xh)return Zh;return Xh=1,Zh=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=sp(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},Zh}function up(){return ep||(ep=1,function(e,t){const r=_,n=w;t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(n.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${n} `;r[0]=o+r[0].split("\n").join("\n"+o),r.push(i+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=ap();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=cp()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}}(ip,ip.exports)),ip.exports}var lp,fp,hp,pp={exports:{}};function dp(){return fp||(fp=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?np.exports=(lp||(lp=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=cp()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(pp,pp.exports)),pp.exports):np.exports=up()),np.exports}var mp=E,gp=mp.URL,vp=k,yp=S,bp=x.Writable,wp=A,xp=function(){if(!hp){try{hp=dp()("follow-redirects")}catch(e){}"function"!=typeof hp&&(hp=function(){})}hp.apply(null,arguments)},kp=["abort","aborted","connect","error","socket","timeout"],Sp=Object.create(null);kp.forEach((function(e){Sp[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var Ep=Lp("ERR_INVALID_URL","Invalid URL",TypeError),Pp=Lp("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Cp=Lp("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ap=Lp("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),_p=Lp("ERR_STREAM_WRITE_AFTER_END","write after end");function Rp(e,t){bp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function Fp(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",o=r[i]=e[n],a=t[n]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,n,o){if(jp(e)){var a;try{a=Tp(new gp(e))}catch(t){a=mp.parse(e)}if(!jp(a.protocol))throw new Ep({input:e});e=a}else gp&&e instanceof gp?e=Tp(e):(o=n,n=e,e={protocol:i});return Np(n)&&(o=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,jp(n.host)||jp(n.hostname)||(n.hostname="::1"),wp.equal(n.protocol,i,"protocol mismatch"),xp("options",n),new Rp(n,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=a.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function Op(){}function Tp(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function Dp(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function Lp(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function Ip(e){for(var t of kp)e.removeListener(t,Sp[t]);e.on("error",Op),e.abort()}function jp(e){return"string"==typeof e||e instanceof String}function Np(e){return"function"==typeof e}Rp.prototype=Object.create(bp.prototype),Rp.prototype.abort=function(){Ip(this._currentRequest),this.emit("abort")},Rp.prototype.write=function(e,t,r){if(this._ending)throw new _p;if(!jp(e)&&!function(e){return"object"==typeof e&&"length"in e}(e))throw new TypeError("data should be a string, Buffer or Uint8Array");Np(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Ap),this.abort()):r&&r()},Rp.prototype.end=function(e,t,r){if(Np(e)?(r=e,e=t=null):Np(t)&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},Rp.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Rp.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Rp.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),o()}),e),n(t)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Rp.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Rp.prototype,e,{get:function(){return this._currentRequest[e]}})})),Rp.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},Rp.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(n._redirectable=this,kp))n.on(i,Sp[i]);if(this._currentUrl=/^\//.test(this._options.path)?mp.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(n===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var r=s[o++];n.finished||n.write(r.data,r.encoding,e)}else a._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},Rp.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(Ip(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new Cp);else{var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Dp(/^content-/i,this._options.headers));var a,s=Dp(/^host$/i,this._options.headers),c=mp.parse(this._currentUrl),u=s||c.host,l=/^\w+:/.test(r)?this._currentUrl:mp.format(Object.assign(c,{host:u}));try{a=mp.resolve(l,r)}catch(e){return void this.emit("error",new Pp({cause:e}))}xp("redirecting to",a),this._isRedirect=!0;var f=mp.parse(a);if(Object.assign(this._options,f),(f.protocol!==c.protocol&&"https:"!==f.protocol||f.host!==u&&!function(e,t){wp(jp(e)&&jp(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(f.host,u))&&Dp(/^(?:authorization|cookie)$/i,this._options.headers),Np(i)){var h={headers:e.headers,statusCode:t},p={url:l,method:o,headers:n};try{i(this._options,h,p)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new Pp({cause:e}))}}},rp.exports=Fp({http:vp,https:yp}),rp.exports.wrap=Fp;var qp=J(rp.exports);const zp="1.6.2";function Mp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Bp=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Up(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];i||(i=c),r[o]=s,n[o]=c;let l=a,f=0;for(;l!==o;)f+=r[l++],l%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}const $p=Symbol("internals");class Vp extends x.Transform{constructor(e){super({readableHighWaterMark:(e=pf.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!pf.isUndefined(t[e])))).chunkSize});const t=this,r=this[$p]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Up(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let i=0;r.updateProgress=function(e,t){let r=0;const n=1e3/t;let i=null;return function(t,o){const a=Date.now();if(t||a-r>n)return i&&(clearTimeout(i),i=null),r=a,e.apply(null,o);i||(i=setTimeout((()=>(i=null,r=Date.now(),e.apply(null,o))),n-(a-r)))}}((function(){const e=r.length,o=r.bytesSeen,a=o-i;if(!a||t.destroyed)return;const s=n(a);i=o,process.nextTick((()=>{t.emit("progress",{loaded:o,total:e,progress:e?o/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&o<=e?(e-o)/s:void 0})}))}),r.ticksRate);const o=()=>{r.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(e){const t=this[$p];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,i=this[$p],o=i.maxRate,a=this.readableHighWaterMark,s=i.timeWindow,c=o/(1e3/s),u=!1!==i.minChunkSize?Math.max(i.minChunkSize,.01*c):0;const l=(e,t)=>{const r=Buffer.byteLength(e);let l,f=null,h=a,p=0;if(o){const e=Date.now();(!i.ts||(p=e-i.ts)>=s)&&(i.ts=e,l=c-i.bytes,i.bytes=l<0?-l:0,p=0),l=c-i.bytes}if(o){if(l<=0)return setTimeout((()=>{t(null,e)}),s-p);l<h&&(h=l)}h&&r>h&&r-h>u&&(f=e.subarray(h),e=e.subarray(0,h)),function(e,t){const r=Buffer.byteLength(e);i.bytesSeen+=r,i.bytes+=r,i.isCaptured&&i.updateProgress(),n.push(e)?process.nextTick(t):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(t)}}(e,f?()=>{process.nextTick(t,null,f)}:t)};l(e,(function e(t,n){if(t)return r(t);n?l(n,e):r(null)}))}setLength(e){return this[$p].length=+e,this}}var Hp=Vp;const{asyncIterator:Qp}=Symbol;var Gp=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Qp]?yield*e[Qp]():yield e};const Wp=pf.ALPHABET.ALPHA_DIGIT+"-_",Kp=new w.TextEncoder,Jp="\r\n",Yp=Kp.encode(Jp);class Zp{constructor(e,t){const{escapeName:r}=this.constructor,n=pf.isString(t);let i=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${Jp}`;n?t=Kp.encode(String(t).replace(/\r?\n|\r\n?/g,Jp)):i+=`Content-Type: ${t.type||"application/octet-stream"}${Jp}`,this.headers=Kp.encode(i+Jp),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;pf.isTypedArray(e)?yield e:yield*Gp(e),yield Yp}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}var Xp=(e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:o=n+"-"+pf.generateString(i,Wp)}=r||{};if(!pf.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");const a=Kp.encode("--"+o+Jp),s=Kp.encode("--"+o+"--"+Jp+Jp);let c=s.byteLength;const u=Array.from(e.entries()).map((([e,t])=>{const r=new Zp(e,t);return c+=r.size,r}));c+=a.byteLength*u.length,c=pf.toFiniteNumber(c);const l={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),x.Readable.from(async function*(){for(const e of u)yield a,yield*e.encode();yield s}())};class ed extends x.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}var td=ed;var rd=(e,t)=>pf.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e;const nd={flush:F.constants.Z_SYNC_FLUSH,finishFlush:F.constants.Z_SYNC_FLUSH},id={flush:F.constants.BROTLI_OPERATION_FLUSH,finishFlush:F.constants.BROTLI_OPERATION_FLUSH},od=pf.isFunction(F.createBrotliDecompress),{http:ad,https:sd}=qp,cd=/https:?/,ud=Ch.protocols.map((e=>e+":"));function ld(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function fd(e,t,r){let n=t;if(!n&&!1!==n){const e=tp(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(e){fd(e,t,e.href)}}const hd="undefined"!=typeof process&&"process"===pf.kindOf(process),pd=(e,t)=>(({address:e,family:t})=>{if(!pf.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(pf.isObject(e)?e:{address:e,family:t});var dd=hd&&function(e){return t=async function(t,r,n){let{data:i,lookup:o,family:a}=e;const{responseType:s,responseEncoding:c}=e,u=e.method.toUpperCase();let l,f,h=!1;if(o){const e=rd(o,(e=>pf.isArray(e)?e:[e]));o=(t,r,n)=>{e(t,r,((e,t,i)=>{const o=pf.isArray(t)?t.map((e=>pd(e))):[pd(t,i)];r.all?n(e,o):n(e,o[0].address,o[0].family)}))}}const p=new O,d=()=>{e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m),p.removeAllListeners()};function m(t){p.emit("abort",!t||t.type?new zh(null,e,f):t)}n(((e,t)=>{l=!0,t&&(h=!0,d())})),p.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m)));const g=Bh(e.baseURL,e.url),v=new URL(g,"http://localhost"),y=v.protocol||ud[0];if("data:"===y){let n;if("GET"!==u)return Mh(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=function(e,t,r){const n=r&&r.Blob||Ch.classes.Blob,i=Mp(e);if(void 0===t&&n&&(t=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const r=Bp.exec(e);if(!r)throw new df("Invalid URL",df.ERR_INVALID_URL);const o=r[1],a=r[2],s=r[3],c=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!n)throw new df("Blob is not supported",df.ERR_NOT_SUPPORT);return new n([c],{type:o})}return c}throw new df("Unsupported protocol "+i,df.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw df.from(t,df.ERR_BAD_REQUEST,e)}return"text"===s?(n=n.toString(c),c&&"utf8"!==c||(n=pf.stripBOM(n))):"stream"===s&&(n=x.Readable.from(n)),Mh(t,r,{data:n,status:200,statusText:"OK",headers:new jh,config:e})}if(-1===ud.indexOf(y))return r(new df("Unsupported protocol "+y,df.ERR_BAD_REQUEST,e));const b=jh.from(e.headers).normalize();b.set("User-Agent","axios/"+zp,!1);const E=e.onDownloadProgress,P=e.onUploadProgress,C=e.maxRate;let A,_;if(pf.isSpecCompliantForm(i)){const e=b.getContentType(/boundary=([-_\w\d]{10,70})/i);i=Xp(i,(e=>{b.set(e)}),{tag:`axios-${zp}-boundary`,boundary:e&&e[1]||void 0})}else if(pf.isFormData(i)&&pf.isFunction(i.getHeaders)){if(b.set(i.getHeaders()),!b.hasContentLength())try{const e=await w.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&b.setContentLength(e)}catch(e){}}else if(pf.isBlob(i))i.size&&b.setContentType(i.type||"application/octet-stream"),b.setContentLength(i.size||0),i=x.Readable.from(Gp(i));else if(i&&!pf.isStream(i)){if(Buffer.isBuffer(i));else if(pf.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!pf.isString(i))return r(new df("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",df.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(b.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return r(new df("Request body larger than maxBodyLength limit",df.ERR_BAD_REQUEST,e))}const R=pf.toFiniteNumber(b.getContentLength());let T,D;pf.isArray(C)?(A=C[0],_=C[1]):A=_=C,i&&(P||A)&&(pf.isStream(i)||(i=x.Readable.from(i,{objectMode:!1})),i=x.pipeline([i,new Hp({length:R,maxRate:pf.toFiniteNumber(A)})],pf.noop),P&&i.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(T=(e.auth.username||"")+":"+(e.auth.password||"")),!T&&v.username&&(T=v.username+":"+v.password),T&&b.delete("authorization");try{D=yh(v.pathname+v.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=new Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}b.set("Accept-Encoding","gzip, compress, deflate"+(od?", br":""),!1);const L={path:D,method:u,headers:b.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:T,protocol:y,family:a,beforeRedirect:ld,beforeRedirects:{}};let I;!pf.isUndefined(o)&&(L.lookup=o),e.socketPath?L.socketPath=e.socketPath:(L.hostname=v.hostname,L.port=v.port,fd(L,e.proxy,y+"//"+v.hostname+(v.port?":"+v.port:"")+L.path));const j=cd.test(L.protocol);if(L.agent=j?e.httpsAgent:e.httpAgent,e.transport?I=e.transport:0===e.maxRedirects?I=j?S:k:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),e.beforeRedirect&&(L.beforeRedirects.config=e.beforeRedirect),I=j?sd:ad),e.maxBodyLength>-1?L.maxBodyLength=e.maxBodyLength:L.maxBodyLength=1/0,e.insecureHTTPParser&&(L.insecureHTTPParser=e.insecureHTTPParser),f=I.request(L,(function(n){if(f.destroyed)return;const i=[n],o=+n.headers["content-length"];if(E){const e=new Hp({length:pf.toFiniteNumber(o),maxRate:pf.toFiniteNumber(_)});E&&e.on("progress",(e=>{E(Object.assign(e,{download:!0}))})),i.push(e)}let a=n;const l=n.req||f;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==u&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(F.createUnzip(nd)),delete n.headers["content-encoding"];break;case"deflate":i.push(new td),i.push(F.createUnzip(nd)),delete n.headers["content-encoding"];break;case"br":od&&(i.push(F.createBrotliDecompress(id)),delete n.headers["content-encoding"])}a=i.length>1?x.pipeline(i,pf.noop):i[0];const m=x.finished(a,(()=>{m(),d()})),g={status:n.statusCode,statusText:n.statusMessage,headers:new jh(n.headers),config:e,request:l};if("stream"===s)g.data=a,Mh(t,r,g);else{const n=[];let i=0;a.on("data",(function(t){n.push(t),i+=t.length,e.maxContentLength>-1&&i>e.maxContentLength&&(h=!0,a.destroy(),r(new df("maxContentLength size of "+e.maxContentLength+" exceeded",df.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(h)return;const t=new df("maxContentLength size of "+e.maxContentLength+" exceeded",df.ERR_BAD_RESPONSE,e,l);a.destroy(t),r(t)})),a.on("error",(function(t){f.destroyed||r(df.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==s&&(e=e.toString(c),c&&"utf8"!==c||(e=pf.stripBOM(e))),g.data=e}catch(t){return r(df.from(t,null,e,g.request,g))}Mh(t,r,g)}))}p.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),p.once("abort",(e=>{r(e),f.destroy(e)})),f.on("error",(function(t){r(df.from(t,null,e,f))})),f.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new df("error trying to parse `config.timeout` to int",df.ERR_BAD_OPTION_VALUE,e,f));f.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||wh;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new df(t,n.clarifyTimeoutError?df.ETIMEDOUT:df.ECONNABORTED,e,f)),m()}))}if(pf.isStream(i)){let t=!1,r=!1;i.on("end",(()=>{t=!0})),i.once("error",(e=>{r=!0,f.destroy(e)})),i.on("close",(()=>{t||r||m(new zh("Request stream has been aborted",e,f))})),i.pipe(f)}else f.end(i)},new Promise(((e,r)=>{let n,i;const o=(e,t)=>{i||(i=!0,n&&n(e,t))},a=e=>{o(e,!0),r(e)};t((t=>{o(t),e(t)}),a,(e=>n=e)).catch(a)}));var t},md=Ch.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const a=[e+"="+encodeURIComponent(t)];pf.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),pf.isString(n)&&a.push("path="+n),pf.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},gd=Ch.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=pf.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function vd(e,t){let r=0;const n=Up(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-r,c=n(s);r=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var yd="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=jh.from(e.headers).normalize();let o,a,{responseType:s,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(pf.isFormData(n))if(Ch.hasStandardBrowserEnv||Ch.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(a=i.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const f=Bh(e.baseURL,e.url);function h(){if(!l)return;const n=jh.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());Mh((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),yh(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(r(new df("Request aborted",df.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new df("Network Error",df.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||wh;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new df(t,n.clarifyTimeoutError?df.ETIMEDOUT:df.ECONNABORTED,e,l)),l=null},Ch.hasStandardBrowserEnv&&(c&&pf.isFunction(c)&&(c=c(e)),c||!1!==c&&gd(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&md.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&pf.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),pf.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",vd(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",vd(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{l&&(r(!t||t.type?new zh(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=Mp(f);p&&-1===Ch.protocols.indexOf(p)?r(new df("Unsupported protocol "+p+":",df.ERR_BAD_REQUEST,e)):l.send(n||null)}))};const bd={http:dd,xhr:yd};pf.forEach(bd,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const wd=e=>`- ${e}`,xd=e=>pf.isFunction(e)||null===e||!1===e;var kd=e=>{e=pf.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!xd(r)&&(n=bd[(t=String(r)).toLowerCase()],void 0===n))throw new df(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new df("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(wd).join("\n"):" "+wd(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Sd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zh(null,e)}function Ed(e){Sd(e),e.headers=jh.from(e.headers),e.data=Nh.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return kd(e.adapter||Rh.adapter)(e).then((function(t){return Sd(e),t.data=Nh.call(e,e.transformResponse,t),t.headers=jh.from(t.headers),t}),(function(t){return qh(t)||(Sd(e),t&&t.response&&(t.response.data=Nh.call(e,e.transformResponse,t.response),t.response.headers=jh.from(t.response.headers))),Promise.reject(t)}))}const Pd=e=>e instanceof jh?e.toJSON():e;function Cd(e,t){t=t||{};const r={};function n(e,t,r){return pf.isPlainObject(e)&&pf.isPlainObject(t)?pf.merge.call({caseless:r},e,t):pf.isPlainObject(t)?pf.merge({},t):pf.isArray(t)?t.slice():t}function i(e,t,r){return pf.isUndefined(t)?pf.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!pf.isUndefined(t))return n(void 0,t)}function a(e,t){return pf.isUndefined(t)?pf.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(Pd(e),Pd(t),!0)};return pf.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,a=o(e[n],t[n],n);pf.isUndefined(a)&&o!==s||(r[n]=a)})),r}const Ad={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ad[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const _d={};Ad.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new df(n(i," has been removed"+(t?" in "+t:"")),df.ERR_DEPRECATED);return t&&!_d[i]&&(_d[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var Rd={assertOptions:function(e,t,r){if("object"!=typeof e)throw new df("options must be an object",df.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],a=t[o];if(a){const t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new df("option "+o+" must be "+r,df.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new df("Unknown option "+o,df.ERR_BAD_OPTION)}},validators:Ad};const Fd=Rd.validators;let Od=class{constructor(e){this.defaults=e,this.interceptors={request:new bh,response:new bh}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Cd(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Rd.assertOptions(r,{silentJSONParsing:Fd.transitional(Fd.boolean),forcedJSONParsing:Fd.transitional(Fd.boolean),clarifyTimeoutError:Fd.transitional(Fd.boolean)},!1),null!=n&&(pf.isFunction(n)?t.paramsSerializer={serialize:n}:Rd.assertOptions(n,{encode:Fd.function,serialize:Fd.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&pf.merge(i.common,i[t.method]);i&&pf.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=jh.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!s){const e=[Ed.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let h=t;for(f=0;f<l;){const e=a[f++],t=a[f++];try{h=e(h)}catch(e){t.call(this,e);break}}try{u=Ed.call(this,h)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return yh(Bh((e=Cd(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};pf.forEach(["delete","get","head","options"],(function(e){Od.prototype[e]=function(t,r){return this.request(Cd(r||{},{method:e,url:t,data:(r||{}).data}))}})),pf.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(Cd(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Od.prototype[e]=t(),Od.prototype[e+"Form"]=t(!0)}));var Td=Od;var Dd=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new zh(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let t;const r=new e((function(e){t=e}));return{token:r,cancel:t}}};const Ld={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ld).forEach((([e,t])=>{Ld[t]=e}));var Id=Ld;const jd=function e(t){const r=new Td(t),n=Dl(Td.prototype.request,r);return pf.extend(n,Td.prototype,r,{allOwnKeys:!0}),pf.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Cd(t,r))},n}(Rh);jd.Axios=Td,jd.CanceledError=zh,jd.CancelToken=Dd,jd.isCancel=qh,jd.VERSION=zp,jd.toFormData=ph,jd.AxiosError=df,jd.Cancel=jd.CanceledError,jd.all=function(e){return Promise.all(e)},jd.spread=function(e){return function(t){return e.apply(null,t)}},jd.isAxiosError=function(e){return pf.isObject(e)&&!0===e.isAxiosError},jd.mergeConfig=Cd,jd.AxiosHeaders=jh,jd.formToJSON=e=>Ah(pf.isHTMLForm(e)?new FormData(e):e),jd.getAdapter=kd,jd.HttpStatusCode=Id,jd.default=jd;var Nd=jd;const{Axios:qd,AxiosError:zd,CanceledError:Md,isCancel:Bd,CancelToken:Ud,VERSION:$d,all:Vd,Cancel:Hd,isAxiosError:Qd,spread:Gd,toFormData:Wd,AxiosHeaders:Kd,HttpStatusCode:Jd,formToJSON:Yd,getAdapter:Zd,mergeConfig:Xd}=Nd;function em(e){return e}function tm(e){const t=[];if(e){if(Array.isArray(e))return e;if("object"==typeof e)for(const r of Object.keys(e)){const n=Number.parseInt(r,10);Number.isNaN(n)||(t[n]=e[r])}return t}}function rm(e){const t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config?.method||!t.httpMethodsToRetry.includes(e.config.method.toUpperCase()))return!1;if(e.response?.status){let r=!1;for(const[n,i]of t.statusCodesToRetry){const{status:t}=e.response;if(t>=n&&t<=i){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}var nm=function(){function e(e,t,r,n){this.id=void 0,this.sha=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.sha=n,this.summary=r,this.config=t}return c(e,[{key:"config",get:function(){return this._config},set:function(e){e.setKey(this.id+":config"),this._config=e}}]),e}();nm.style=".topwrite/style.css",nm.logo="logo.png",nm.readme="README.md";function im(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function om(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return am(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?am(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function am(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var sm=function(){function e(e,t,r,n){this.key=void 0,this.values=void 0,this.presetValues=void 0,this.schema=void 0,this.values=v(e,n),this.presetValues=n,this.schema=t,this.key=r}var t=e.prototype;return t.setKey=function(e){this.key=e},t.getValues=function(){return this.values},t.setValues=function(e){var t=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:"ignore"}).compile(this.schema);if(!t(e=u(e)))for(var r,n=om(t.errors);!(r=n()).done;){var i=r.value;e=p(e,i.dataPath.substr(1).split("/"))}this.values=e},t.getPresetValues=function(){return this.presetValues},t.getValue=function(e,t){return l(this.values,e,t)},t.setValue=function(e,t){return d(this.values,e,t)},t.toObject=function(){var e=this,t=u(this.values);this.presetValues&&(t=p(t,y(this.presetValues)));var r=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});return r.removeKeyword("default"),r.addKeyword("default",{validate:function(e,t,r,n,i,o,a){return h(e,t)&&(delete i[o],f(i)&&function(e,t){for(var r=[],n=e,i=0;i<t.length-1;i++)r.push(n),n=n[t[i]];for(var o=t.length-2;o>=0;o--)f(r[o][t[o]])&&delete r[o][t[o]]}(a,m(n.substring(1)))),!0},modifying:!0,errors:!1}),r.addKeyword("encrypt",{validate:function(t,r,n,i,o,a){return e.key&&t&&!im(r)&&o&&a&&d(o,a,"@encrypted:"+function(e,t){return Br.encrypt(e,t).toString()}(r,e.key)),!0},modifying:!0,errors:!1}),r.compile(this.schema)(t),t},e.createFromObject=function(e,t,r,n){var i=new br({removeAdditional:!0,useDefaults:!0,allErrors:!0,unknownFormats:["color"]});i.addKeyword("encrypt",{validate:function(e,t,n,i,o,a){return r&&e&&im(t)&&o&&a&&d(o,a,function(e,t){try{return Br.decrypt(e,t).toString($r)}catch(e){return""}}(t.substring(11),r)),!0},modifying:!0,errors:!1});var o=i.compile(t);if(!o(e))for(var a,s=om(o.errors);!(a=s()).done;){var c=a.value;e=p(e,c.dataPath.substring(1).split("/"))}return new this(e,t,r,n)},e}(),cm=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).pluginsConfig={},t.presetPlugins={},t}s(t,e);var r=t.prototype;return r.setPresetPlugins=function(e){this.presetPlugins=e},r.getPresetPluginConfig=function(e){return this.presetPlugins[e]},r.getPlugins=function(){return Array.from(new Set([].concat(this.getValue("plugins"),Object.keys(this.presetPlugins))))},r.getPluginConfig=function(e,t){if(!this.pluginsConfig[e]){var r=this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=sm.createFromObject(u(r),t,this.key+":"+e,this.presetPlugins[e])}return this.pluginsConfig[e]},r.setPluginConfig=function(e,t){var r=t.toObject();f(r)?g(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],r),delete this.pluginsConfig[e]},t.createFromObject=function(r){return e.createFromObject.call(this,r,t.schema)},t}(sm);cm.file="book.json",cm.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode",default:"light"},primaryColor:{type:"string",title:"Primary Color",format:"color",default:"#3c60ff"},expandLevel:{type:"integer",title:"Expand level",default:0},navs:{type:"array",title:"Nav configures",items:{type:"object",properties:{title:{title:"Label",type:"string"},url:{title:"Link",type:"string"}},required:["title","url"],additionalProperties:!1},default:[]}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}},release:{type:"object",title:"Release specific configurations",properties:{pathEncode:{type:"boolean",title:"Whether to encode the chapter path",default:!0}},default:{}}},required:[]};var um=function(){function e(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((function(e){return parseInt(e,10)})):e}var t=e.prototype;return t.getRoot=function(){return new e(this.data.slice(0,1))},t.getParent=function(){return new e(this.data.slice(0,-1))},t.createChild=function(t){return new e(this.data.concat(t))},t.isDescendant=function(e){return e.toString().startsWith(this.toString()+".")},t.getNext=function(){var t=[].concat(this.data);return t[t.length-1]++,new e(t)},t.getDepth=function(){return this.data.length-1},t.eq=function(e){return this.toString()===e.toString()},t.getLeafIndex=function(){return this.data[this.data.length-1]-1},t.toString=function(e){return e?this.data.slice(e.data.length).join("."):this.data.join(".")},e.compare=function(e,t){for(var r=0;r<Math.max(e.data.length,t.data.length);r++){var n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0},e}();function lm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var fm=function(){function e(e){var t=e.title,r=e.ref,n=void 0===r?"":r,o=e.path,s=e.children,c=void 0===s?[]:s,u=e.metadata;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.metadata=void 0,this.hasPath=!1,this.title=t,this.ref=n,o?(this.hasPath=!0,this.path=o):this.path=n?i.posix.format(a({},i.posix.parse(n),{ext:".html",base:""})):"",this.children=c,this.level=new um,this.metadata=u}var t=e.prototype;return t.getMetadata=function(e,t){return this.metadata?l(this.metadata,e,t):t},t.getLevel=function(){return this.level},t.getTitle=function(){return this.title},t.getRef=function(){return this.ref},t.getPath=function(){return this.path},t.getArticles=function(){return this.children},t.getDescendants=function(){var t=[];return e.findArticle(this,(function(e){return t.push(e),!1})),t},t.getDepth=function(){return this.getLevel().getDepth()},t.createChildLevel=function(){return this.level.createChild(this.children.length+1)},t.indexLevels=function(e){e?this.level=e:e=this.level;for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return lm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.children.entries());!(t=r()).done;){var n=t.value,i=n[0];n[1].indexLevels(e.createChild(i+1))}},t.toObject=function(){var e=this.children.map((function(e){return e.toObject()}));return{title:this.title,ref:this.ref,path:this.hasPath?this.path:void 0,metadata:this.metadata,children:f(e)?void 0:e}},e.findArticle=function(t,r){return t.getArticles().reduce((function(t,n){return t||(r(n)?n:e.findArticle(n,r))}),void 0)},e.createFromObject=function(t){var r,n=null==(r=t.children)?void 0:r.filter((function(e){return!!e.title})).map((function(t){return e.createFromObject(t)}));return new e(a({},t,{children:n}))},e}();function hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var pm=function(){function e(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.title=void 0,this.articles=void 0,this.metadata=void 0,this.level=new um,this.title=e,this.articles=t,this.metadata=r}var t=e.prototype;return t.getMetadata=function(e,t){return this.metadata?l(this.metadata,e,t):t},t.getLevel=function(){return this.level},t.getTitle=function(){return this.title},t.getArticles=function(){return this.articles},t.getFirstArticle=function(){return fm.findArticle(this,(function(){return!0}))},t.getDescendants=function(){var e=[];return fm.findArticle(this,(function(t){return e.push(t),!1})),e},t.createChildLevel=function(){return this.level.createChild(this.articles.length+1)},t.indexLevels=function(e){e?this.level=e:e=this.level;for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return hm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.articles.entries());!(t=r()).done;){var n=t.value,i=n[0];n[1].indexLevels(e.createChild(i+1))}},t.toObject=function(){var e=this.articles.map((function(e){return e.toObject()}));return{title:this.title,metadata:this.metadata,articles:f(e)?void 0:e}},e.createFromObject=function(t){var r,n=null==(r=t.articles)?void 0:r.filter((function(e){return!!e.title})).map((function(e){return fm.createFromObject(e)}));return new e(t.title,n,t.metadata)},e}(),dm={name:"labelEnd",tokenize:function(e,t,r){for(var n,i,o=this,a=o.events.length;a--;)if((o.events[a][1].type===au.labelImage||o.events[a][1].type===au.labelLink)&&!o.events[a][1]._balanced){n=o.events[a][1];break}return function(t){return n?n._inactive?l(t):(i=o.parser.defined.includes(Wi(o.sliceSerialize({start:n.end,end:o.now()}))),e.enter(au.labelEnd),e.enter(au.labelMarker),e.consume(t),e.exit(au.labelMarker),e.exit(au.labelEnd),s):r(t)};function s(t){return t===iu.leftParenthesis?e.attempt(mm,u,i?u:l)(t):t===iu.leftSquareBracket?e.attempt(gm,u,i?c:l)(t):i?u(t):l(t)}function c(t){return e.attempt(vm,u,l)(t)}function u(e){return t(e)}function l(e){return n._balanced=!0,r(e)}},resolveTo:Wo.resolveTo,resolveAll:Wo.resolveAll},mm={tokenize:function(e,t,r){return function(t){return e.enter(au.resource),e.enter(au.resourceMarker),e.consume(t),e.exit(au.resourceMarker),n};function n(t){return io(t)?No(e,i)(t):i(t)}function i(t){return t===iu.rightParenthesis?d(t):Lo(e,o,a,au.resourceDestination,au.resourceDestinationLiteral,au.resourceDestinationLiteralMarker,au.resourceDestinationRaw,au.resourceDestinationString,ou.linkResourceDestinationBalanceMax)(t)}function o(t){return io(t)?No(e,s)(t):d(t)}function a(e){return r(e)}function s(t){return t===iu.quotationMark||t===iu.apostrophe||t===iu.leftParenthesis?jo(e,c,r,au.resourceTitle,au.resourceTitleMarker,au.resourceTitleString)(t):u(t)}function c(t){return io(t)?No(e,d)(t):u(t)}function u(t){return t===iu.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),l):d(t)}function l(t){return t===iu.lowercaseX?(e.enter("resourceSizeXMarker"),e.consume(t),e.exit("resourceSizeXMarker"),h):t===iu.rightParenthesis||io(t)?(e.exit("resourceSize"),No(e,d)(t)):(e.enter("resourceSizeWidth"),e.enter(au.chunkString,{contentType:"string"}),f(t))}function f(t){return t===iu.rightParenthesis||io(t)?(e.exit(au.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),No(e,d)(t)):t===iu.lowercaseX?(e.exit(au.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),h):(e.consume(t),f)}function h(t){return t===iu.rightParenthesis||io(t)?(e.exit("resourceSize"),No(e,d)(t)):(e.enter("resourceSizeHeight"),e.enter(au.chunkString,{contentType:"string"}),p(t))}function p(t){return t===iu.rightParenthesis||io(t)?(e.exit(au.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),No(e,d)(t)):(e.consume(t),p)}function d(n){return n===iu.rightParenthesis?(e.enter(au.resourceMarker),e.consume(n),e.exit(au.resourceMarker),e.exit(au.resource),t):r(n)}}},gm={tokenize:function(e,t,r){var n=this;return function(t){return Io.call(n,e,i,o,au.reference,au.referenceMarker,au.referenceString)(t)};function i(e){return n.parser.defined.includes(Wi(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},vm={tokenize:function(e,t,r){return function(t){return e.enter(au.reference),e.enter(au.referenceMarker),e.consume(t),e.exit(au.referenceMarker),n};function n(n){return n===iu.rightSquareBracket?(e.enter(au.referenceMarker),e.consume(n),e.exit(au.referenceMarker),e.exit(au.reference),t):r(n)}}};function ym(e){var t=e.micromark,r=e.toMarkdown,n=e.fromMarkdown,i=e.toHast,o=e.handler;return function(){var e=this.data(),s=e.micromarkExtensions||(e.micromarkExtensions=[]),c=e.toMarkdownExtensions||(e.toMarkdownExtensions=[]),u=e.fromMarkdownExtensions||(e.fromMarkdownExtensions=[]),l=e.toHastExtensions||(e.toHastExtensions=[]);if(t&&s.push(t(a({},su,uo,{assert:Cn,factorySpace:fo,factoryWhitespace:No}))),r&&c.push(r()),n&&u.push(n()),i&&l.push(i()),o)return o({visit:es,select:Kn})}}var bm=function(e,t,r,n){var i=ps.image(e,t,r,n);return e.width||e.height?i.replace(/\)$/," ="+(e.width||"")+(e.height?"x"+e.height:"")+")"):i};bm.peek=ps.image.peek;var wm=ym({micromark:function(){var e;return{text:(e={},e[iu.rightSquareBracket]=dm,e)}},fromMarkdown:function(){return{enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){var e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){var e=this.resume();this.stack[this.stack.length-1].height=e}}}},toMarkdown:function(){return{handlers:{image:bm}}},toHast:function(){return{image:function(e,t){var r=vu.image(e,t);if(r&&!Array.isArray(r)&&"element"===r.type)return r.properties.width=t.width,r.properties.height=t.height,r}}}}),xm=ps.paragraph,km=ps.heading,Sm=function(e){var t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},Em=ym({toMarkdown:function(){return{handlers:{paragraph:function(e,t,r,n){var i=xm(e,t,r,n);return Sm(e.align)+i},heading:function(e,t,r,n){return km(e,t,r,n).replace(/^#+\s/,"$&"+Sm(e.align))}}}},handler:function(){return function(e){es(e,(function(e,t,r){if(function(e){return"paragraph"===e.type||"heading"===e.type}(e)){var n=Kn("text",e);if(n){var i=n.value;i.startsWith("--: ")?e.align="right":i.startsWith(":-: ")?e.align="center":i.startsWith(":-- ")&&(e.align="left"),e.align&&(n.value=i.substr(4),r&&"listItem"===r.type?r.data=a({},r.data,{hProperties:{className:"align-"+e.align}}):e.data=a({},e.data,{hProperties:{className:"align-"+e.align}}))}}}))}}}),Pm={tokenize:function(e,t,r){function n(t){return t===iu.rightSquareBracket?r(t):(e.enter("blockQuoteType"),e.enter(au.chunkString,{contentType:"string"}),i(t))}function i(t){return t===iu.rightSquareBracket?(e.exit(au.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),o):io(t)||!Ji(t)?r(t):(e.consume(t),i)}function o(e){return e===iu.leftParenthesis?r(e):t(e)}return function(t){return e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),n}},partial:!0},Cm={name:"blockQuote",tokenize:function(e,t,r){var n=this;return function(t){if(t===iu.greaterThan){var o=n.containerState;return o.open||(e.enter(au.blockQuote,{_container:!0}),o.open=!0),e.enter(au.blockQuotePrefix),e.enter(au.blockQuoteMarker),e.consume(t),e.exit(au.blockQuoteMarker),fo(e,i,au.whitespace)}return r(t)};function i(t){return t===iu.leftSquareBracket?e.attempt(Pm,o,o)(t):o(t)}function o(r){return oo(r)?(e.enter(au.blockQuotePrefixWhitespace),e.consume(r),e.exit(au.blockQuotePrefixWhitespace),e.exit(au.blockQuotePrefix),t):(e.exit(au.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){var n=this;return function(t){return oo(t)?(n.parser.constructs.disable.null,fo(e,i,au.linePrefix,n.parser.constructs.disable.null.includes("codeIndented")?void 0:ou.tabSize)(t)):i(t)};function i(n){return e.attempt(Cm,t,r)(n)}}},exit:ko.exit},Am=ps.blockquote,_m=ym({micromark:function(){var e;return{document:(e={},e[iu.greaterThan]=Cm,e)}},toMarkdown:function(){return{handlers:{blockquote:function(e,t,r,n){var i=Am(e,t,r,n);return e.variant?i.replace(/(^|\s+)>\s/,"$1> ["+e.variant+"] "):i}}}},fromMarkdown:function(){return{enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){var e=this.resume();this.stack[this.stack.length-1].variant=e}}}},handler:function(){return function(e){es(e,"blockquote",(function(e){e.variant&&(e.data=a({},e.data,{hProperties:{className:e.variant}}))}))}}}),Rm="blankLine",Fm="blankLineSequence",Om={name:"blankLine",tokenize:function(e,t,r){var n,i=function t(r){return r===n?(e.consume(r),t):(e.exit(Fm),o(r))},o=function o(a){return a===n?(e.enter(Fm),i(a)):oo(a)?fo(e,o,au.whitespace)(a):a===iu.eof||no(a)?(e.exit(Rm),t(a)):r(a)};return function(t){return e.enter(Rm),n=t,o(t)}}},Tm=ym({toHast:function(){return{blankLine:function(){return{type:"element",tagName:"p",properties:{},children:[{type:"element",tagName:"br",properties:{},children:[]}]}}}},micromark:function(){var e;return{flow:(e={},e[iu.caret]=Om,e)}},toMarkdown:function(){return{handlers:{blankLine:function(){return"^"}}}},fromMarkdown:function(){return{enter:{blankLine:function(e){this.enter({type:"blankLine"},e)}},exit:{blankLine:function(e){this.exit(e)}}}}}),Dm=function(e,t){void 0===t&&(t="text");var r="";return es(e,t,(function(e){r+=e.value})),r},Lm=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,Im=ym({handler:function(){return function(e){es(e,(function(e,t,r){if(r&&"root"===r.type&&void 0!==t&&Dm(e).match(Lm))return r.children.splice(t,1),[Za,t]}))}}}),jm=ym({toHast:function(){return{xBlock:function(e,t){return{type:"element",tagName:"x-block",properties:{name:t.name,value:t.value,parameter:t.parameter},children:[]}},xInline:function(e,t){return{type:"element",tagName:"x-inline",properties:{name:t.name,value:t.value},children:[]}}}},handler:function(){return function(e){es(e,(function(e,t,r){if(void 0!==t&&void 0!==r)if(function(e){return"code"===e.type}(e)&&e.lang){var n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){var i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if(function(e){return"inlineCode"===e.type}(e)){var o=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(o){var a={type:"xInline",name:o[1],value:o[2],position:e.position};r.children.splice(t,1,a)}}}))}}}),Nm=Ai().use((function(e){const t=this;t.parser=function(r){return Aa(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}})).use((function(e){const t=this;t.compiler=function(r){return Ps(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}),{bullet:"*",listItemIndent:"one",fences:!0,join:[function(e,t){if("blankLine"===e.type&&e.type===t.type)return 0}]}).use((function(){const e=this.data(),t=e.micromarkExtensions||(e.micromarkExtensions=[]),r=e.fromMarkdownExtensions||(e.fromMarkdownExtensions=[]),n=e.toMarkdownExtensions||(e.toMarkdownExtensions=[]);t.push({text:{58:Sl},flow:{58:[gl,wl]}}),r.push({canContainEols:["textDirective"],enter:{directiveContainer:Yu,directiveContainerAttributes:il,directiveContainerLabel:rl,directiveLeaf:Zu,directiveLeafAttributes:il,directiveText:Xu,directiveTextAttributes:il},exit:{directiveContainer:ll,directiveContainerAttributeClassValue:al,directiveContainerAttributeIdValue:ol,directiveContainerAttributeName:cl,directiveContainerAttributeValue:sl,directiveContainerAttributes:ul,directiveContainerLabel:nl,directiveContainerName:tl,directiveLeaf:ll,directiveLeafAttributeClassValue:al,directiveLeafAttributeIdValue:ol,directiveLeafAttributeName:cl,directiveLeafAttributeValue:sl,directiveLeafAttributes:ul,directiveLeafName:tl,directiveText:ll,directiveTextAttributeClassValue:al,directiveTextAttributeIdValue:ol,directiveTextAttributeName:cl,directiveTextAttributeValue:sl,directiveTextAttributes:ul,directiveTextName:tl}}),n.push({unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:fl,leafDirective:fl,textDirective:fl}})})).use((function(e){const t=e||"yaml",r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){const t=Cu(e),r={};let n=-1;for(;++n<t.length;){const e=t[n],i=Ru(e,"open").charCodeAt(0),o=_u(e),a=r[i];Array.isArray(a)?a.push(o):r[i]=[o]}return{flow:r}}(t)),i.push(function(e){const t=Cu(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=Ou(e),n[e.type]=Tu,n[e.type+"Value"]=Du}return{enter:r,exit:n}}(t)),o.push(function(e){const t=[],r={},n=Cu(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=Lu(e);const o=Iu(e,"open");t.push({atBreak:!0,character:o.charAt(0),after:Ds(o.charAt(1))})}return{unsafe:t,handlers:r}}(t))}),["yaml"]).use((function(e){const t=e||ru,r=this.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(function(e){return Vi([{text:Tc},{document:{91:{tokenize:$c,continuation:{tokenize:Vc},exit:Hc}},text:{91:{tokenize:Uc},93:{add:"after",tokenize:Mc,resolveTo:Bc}}},Qc(e),{flow:{null:{tokenize:Kc,resolveAll:Jc}}},{text:{91:eu}}])}(t)),i.push([{transforms:[Hs],enter:{literalAutolink:zs,literalAutolinkEmail:Ms,literalAutolinkHttp:Ms,literalAutolinkWww:Ms},exit:{literalAutolink:Vs,literalAutolinkEmail:$s,literalAutolinkHttp:Bs,literalAutolinkWww:Us}},{enter:{gfmFootnoteDefinition:Ks,gfmFootnoteDefinitionLabelString:Js,gfmFootnoteCall:Xs,gfmFootnoteCallString:ec},exit:{gfmFootnoteDefinition:Zs,gfmFootnoteDefinitionLabelString:Ys,gfmFootnoteCall:rc,gfmFootnoteCallString:tc}},{canContainEols:["delete"],enter:{strikethrough:sc},exit:{strikethrough:cc}},{enter:{table:pc,tableData:vc,tableHeader:vc,tableRow:mc},exit:{codeText:yc,table:dc,tableData:gc,tableHeader:gc,tableRow:gc}},{exit:{taskListCheckValueChecked:xc,taskListCheckValueUnchecked:xc,paragraph:kc}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ns,notInConstruct:qs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ns,notInConstruct:qs},{character:":",before:"[ps]",after:"\\/",inConstruct:Ns,notInConstruct:qs}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ic,footnoteReference:nc}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ac}],handlers:{delete:uc}},wc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Sc}}]}}(t))})).use((function(){return function(e){!function(e){Ls(e,[/\r?\n|\r/g,nu])}(e)}})).use((function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[Tl.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==Tl.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==Tl.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[Tl.carriageReturn,Tl.lineFeed,Tl.carriageReturnLineFeed,null,Tl.backslash,Tl.leftCurlyBrace].includes(n)?r(n):n===Tl.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){Ol(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),Ol(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}})).use(jm).use(wm).use(Em).use(_m).use(Tm).use(Im);function qm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mm(e){for(var t,r=[],n=qm(e.children);!(t=n()).done;){var i=t.value,o=i.children,a=Kn("paragraph:first-child>*",i);if(a){var s=Dm(a);if(s){var c="";a.url&&(c=decodeURI(a.url)).match(/[\\:*?"<>|]/)&&(c="");var u={title:s,ref:c};if(o.length>1){var l=o[o.length-1];Va(l,"list")&&(u.children=Mm(l))}r.push(u)}}}return r}var Bm=Nm();function Um(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $m=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=!1),this.parts=void 0,this.json=void 0,this.parts=e,this.json=t,this.indexLevels()}var t=e.prototype;return t.hasMetadata=function(){var e=!1;return this.getArticle((function(t){return!!e||!f(t.metadata)&&(e=!0,!0)}),(function(t){return f(t.metadata)||(e=!0),!0})),e},t.isJson=function(){return this.json},t.getParts=function(){return this.parts},t.getPart=function(e){return this.parts[e]},t.getLastPart=function(){return this.parts[this.parts.length-1]},t.getArticles=function(){var e=[];return this.getArticle((function(t){return e.push(t),!1})),e},t.getArticle=function(e,t){return this.parts.reduce((function(r,n){return r||(!t||t(n)?fm.findArticle(n,e):void 0)}),void 0)},t.getArticlePart=function(e){var t=e.getLevel().getRoot();return this.getByLevel(t)},t.getFirstPath=function(){var e=this.getArticle((function(e){return!!e.getPath()}));if(e)return e.getPath()},t.getByLevel=function(e){var t=function(t){return t.getLevel().eq(e)};return this.parts.reduce((function(e,r){return e||(t(r)?r:fm.findArticle(r,t))}),void 0)},t.getFirstArticle=function(){return this.getArticle((function(){return!0}))},t.getNextArticle=function(e){var t=e instanceof fm?e.getLevel():e,r=!1;return this.getArticle((function(e){return!!r||(r=e.getLevel()==t,!1)}))},t.getPrevArticle=function(e){var t=e instanceof fm?e.getLevel():e,r=void 0;return this.getArticle((function(e){return e.getLevel()==t||(r=e,!1)})),r},t.getParent=function(e){var t=(e instanceof fm?e.getLevel():e).getParent();if(t)return this.getByLevel(t)},t.indexLevels=function(){for(var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Um(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Um(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.parts.entries());!(e=t()).done;){var r=e.value,n=r[0],i=r[1],o=new um(String(n+1));i.indexLevels(o)}},t.isSinglePart=function(){return 1===this.parts.length&&!this.parts[0].title},t.isEmpty=function(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length},t.toObject=function(){return this.parts.map((function(e){return e.toObject()}))},e.createFromObject=function(t){return new e(t.map((function(e){return pm.createFromObject(e)})),!0)},e.createFromText=function(t){return new e(function(e){for(var t,r,n=[],i=qm(Bm.parse(e).children);!(r=i()).done;){var o=r.value;if(Va(o,"heading")&&[2,3].includes(o.depth)&&(t&&n.push(t),t={title:Dm(o).trim()}),Va(o,"list")){var a=Mm(o);t?t.articles=(t.articles||[]).concat(a):t={title:"",articles:a}}}return t?n.push(t):n.push({title:""}),n}(t).map((function(e){return pm.createFromObject(e)})))},e.create=function(t){return"object"==typeof t?e.createFromObject(t):e.createFromText(t)},e}();$m.file={json:"SUMMARY.json",markdown:"SUMMARY.md"};var Vm=function(){function e(e){var t=e.path,r=e.content,n=e.meta,i=void 0===n?{}:n;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=i}var t=e.prototype;return t.getMeta=function(e,t){return l(this.meta,e,t)},t.relative=function(e){var t="/"===e.slice(-1);return(e=i.posix.relative(i.posix.dirname(this.path),e)||".")+(t?"/":"")},t.resolve=function(e){return i.posix.join(i.posix.dirname(this.path),e)},e}(),Hm=["page"],Qm=function(){function r(e){var t=e.host,r=e.preset;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}var n=r.prototype;return n.getBuyUrl=function(e,t){return this.host+"/api/buy?book="+e.id+"&plugin="+t.name},n.bought=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Nd.get(this.host+"/api/bought?book="+r.id+"&plugin="+n.name);case 3:return e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(e,t){return r.apply(this,arguments)}}(),n.trial=function(){var r=e(t.mark((function e(r,n){var i,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Nd.get(this.host+"/api/trial?book="+r.id+"&plugin="+n.name);case 3:return i=e.sent,o=i.data,e.abrupt("return",o);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(e,t){return r.apply(this,arguments)}}(),n.queryPlugins=function(){var r=e(t.mark((function e(r){var n,i,o,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.page,i=void 0===n?1:n,o=b(r,Hm),e.next=3,Nd.get(this.host+"/api/query",{params:a({},o,{page:i})});case 3:return s=e.sent,c=s.data,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.getInstalled=function(){var r=e(t.mark((function e(r){var n,i,o,a,s,c=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.config,i=n.getValue("theme"),o=["theme-"+i].concat(n.getValue("plugins")),this.preset&&(o.push.apply(o,Object.keys(this.preset)),n.setPresetPlugins(this.preset)),e.next=6,Nd.get(this.host+"/api/installed",{params:{book:r.id,plugins:o.join(",")}}).catch((function(e){throw new Error("Plugins Check Failed:"+e.message)}));case 6:return a=e.sent,s=a.data,e.abrupt("return",s.flatMap((function(e){var t,r;return!e.builtin||null!=(t=c.preset)&&t[e.name]?(e.preset=!(null==(r=c.preset)||!r[e.name]),[e]):[]})));case 9:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),r}();function Gm(e){return new Qm(e)}var Wm,Km=function(){function e(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}var t=e.prototype;return t.toDataUrl=function(){return this.canvas.toDataURL()},t.generate=function(){var e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");var t=this.size/10;if(e.beginPath(),e.arc(this.size-t,this.size-t,t,0,Math.PI/2),e.lineTo(t,this.size),e.arc(t,this.size-t,t,Math.PI/2,Math.PI),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2),e.lineTo(this.size-t,0),e.arc(this.size-t,t,t,3*Math.PI/2,2*Math.PI),e.lineTo(this.size,this.size-t),e.closePath(),this.letter.length>0){var r=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[r.charCodeAt(0)%this.flatColors.length],e.fill(),e.restore(),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}else e.fillStyle=this.flatColors[0],e.fill()},e.create=function(t,r,n){return n||(n=function(e){var t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(r)),new e(t,r,n)},e}(),Jm=/^(?:\w+:)?\/\/(\S+)$/,Ym=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Zm=/^[^\s\.]+\.\S{2,}$/;function Xm(e){var t=e.match(Jm);if(!t)return!1;var r=t[1];return!!r&&(Ym.test(r)||Zm.test(r))}function eg(e){return Or(e).toString()}(Wm=Wm||Nd).interceptors.response.use(em,(async e=>async function(e,t){if(Bd(t))throw t;const r=function(e){if(e?.config)return e.config.raxConfig}(t)||{};r.currentRetryAttempt=r.currentRetryAttempt||0,r.retry="number"==typeof r.retry?r.retry:3,r.retryDelay="number"==typeof r.retryDelay?r.retryDelay:100,r.instance=r.instance||e,r.backoffType=r.backoffType||"exponential",r.httpMethodsToRetry=tm(r.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],r.noResponseRetries="number"==typeof r.noResponseRetries?r.noResponseRetries:2,r.checkRetryAfter="boolean"!=typeof r.checkRetryAfter||r.checkRetryAfter,r.maxRetryAfter="number"==typeof r.maxRetryAfter?r.maxRetryAfter:3e5;const n=[[100,199],[429,429],[500,599]];r.statusCodesToRetry=tm(r.statusCodesToRetry)||n;const i=t;if(i.config=i.config||{},i.config.raxConfig={...r},!(r.shouldRetry||rm)(i))throw i;const o=new Promise(((e,t)=>{let n=0;if(r.checkRetryAfter&&i.response?.headers["retry-after"]){const e=function(e){const t=Number(e);if(!Number.isNaN(t))return 1e3*t;const r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(i.response.headers["retry-after"]);if(!(e&&e>0&&e<=r.maxRetryAfter))return void t(i);n=e}i.config.raxConfig.currentRetryAttempt+=1;const o=i.config.raxConfig.currentRetryAttempt;0===n&&(n="linear"===r.backoffType?1e3*o:"static"===r.backoffType?r.retryDelay:(2**o-1)/2*1e3,"number"==typeof r.maxRetryDelay&&(n=Math.min(n,r.maxRetryDelay))),setTimeout(e,n)}));r.onRetryAttempt&&r.onRetryAttempt(i);const a=Promise.resolve();return Promise.resolve().then((async()=>o)).then((async()=>a)).then((async()=>r.instance.request(i.config)))}(Wm,e))),Nd.defaults.raxConfig={retryDelay:2e3,backoffType:"static",shouldRetry:function(e){var t,r=e.config,n=e.response,i=(null==r?void 0:r.raxConfig)||{};return!(null!=i&&i.retryDecider&&!i.retryDecider()||null==r||!r.method||null==(t=i.httpMethodsToRetry)||!t.includes(r.method.toUpperCase())||449!==(null==n?void 0:n.status))}},Nd.defaults.maxContentLength=1/0,Nd.defaults.maxBodyLength=1/0,Nd.isAxiosError;var tg=function(){function e(e){var t=e.name,r=e.version,n=e.path,i=e.hooks,o=e.config;this.name=void 0,this.version=void 0,this.path=void 0,this.hooks=void 0,this.config=void 0,this.name=t,this.version=r,this.path=n,this.hooks=i,this.config=o}var t=e.prototype;return t.getHook=function(e){return this.hooks[e]},t.getContext=function(e){var t=this;return a({},e,{getConfig:function(){return e.book.config.getPluginConfig(t.name,t.config)}})},e}();function rg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ng(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ng(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ng(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ig(e,t){return og.apply(this,arguments)}function og(){return(og=e(t.mark((function e(r,n){var o,a,s,c,u,l,f,h,p;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W.info('installing plugin "'+r.name+'"'),o="npm install "+r.host+".tgz",a=T.sync(o,{stdio:["inherit"],cwd:n,shell:!0}),!(s=a.error)){e.next=5;break}throw s;case 5:return c=i.join(n,"node_modules","topwrite-plugin-"+r.name),u=i.join(c,"dist","hooks.js"),l={},G.existsSync(u)&&(f=new D.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}),l=f.runFile(u)),h=i.join(c,"config.json"),p={},G.existsSync(h)&&(p=require(h)),W.info('plugin "'+r.name+"@"+r.version+'" installed with success'),e.abrupt("return",new tg({name:r.name,version:r.version,path:c,hooks:l,config:p}));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ag(e,t,r){return sg.apply(this,arguments)}function sg(){return(sg=e(t.mark((function e(r,n,i){var o,a,s,c,u,l,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Gm(i),e.next=3,o.getInstalled(r);case 3:a=e.sent,s=[],c=r.config.getValue("theme"),W.info("installing "+a.length+" plugins from registry"),u=rg(a);case 8:if((l=u()).done){e.next=22;break}if(!(f=l.value).disabled){e.next=12;break}throw new Error('plugin "'+f.name+'" has been disabled');case 12:if("theme"===f.type||"ebook"!==c||f.ebook){e.next=15;break}return W.info('plugin "'+f.name+'" ignored in ebook'),e.abrupt("continue",20);case 15:return e.t0=s,e.next=18,ig(f,n);case 18:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 20:e.next=8;break;case 22:return e.abrupt("return",s);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ug(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ug(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ug(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var lg=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/,fg=function(){var r=e(t.mark((function e(r,n){var i,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=cg(r);case 1:if((o=i()).done){e.next=9;break}return a=o.value,e.next=5,n(a);case 5:if(e.sent){e.next=7;break}return e.abrupt("return",!1);case 7:e.next=1;break;case 9:return e.abrupt("return",!0);case 10:case"end":return e.stop()}}),e)})));return function(e,t){return r.apply(this,arguments)}}(),hg=function(){function r(e,t,r,n,i,o){this.book=void 0,this.sourceFS=void 0,this.tmpFS=void 0,this.dest=void 0,this.version=void 0,this.options=void 0,this.plugins=[],this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i,this.version=o}var n=r.prototype;return n.getContext=function(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:Nd,logger:W,format:this.format}},n.generate=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initLfs();case 2:return e.next=4,this.initPlugins();case 4:return e.next=6,this.onInit();case 6:return e.next=8,this.callHook("init");case 8:return e.next=10,this.checkStyle();case 10:return e.next=12,this.generateLogo();case 12:return e.next=14,this.onReadme();case 14:return e.next=16,this.callHook("readme");case 16:return e.next=18,this.generateArticles();case 18:return e.next=20,this.callHook("articles");case 20:return e.next=22,this.onSummary();case 22:return e.next=24,this.callHook("summary");case 24:return e.next=26,this.callHook("beforeFinish");case 26:if(!e.sent){e.next=31;break}return e.next=29,this.onFinish();case 29:return e.next=31,this.callHook("finish");case 31:W.success("generation finished with success!");case 32:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.checkStyle=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(nm.style)){e.next=3;break}return e.next=3,this.tmpFS.writeFile(nm.style,"");case 3:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.initLfs=function(){var r=e(t.mark((function e(){var r,n,o,a,s,c,u,l=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.options.lfs&&(W.info("generate lfs files..."),r="git lfs ls-files -l",n=this.book.config,(o=n.getValue("root",""))&&(r+=" --include "+o),a=T.sync(r,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),s=a.error,c=a.stdout,u={},s||c.trim().split("\n").forEach((function(e){if(e){var t=e.trim().split(/\s[-*]\s/),r=t[0],n=t[1];if(r&&n){var a=n.trim();o&&(a=i.relative(o,a)),u[a]=r.trim(),l.tmpFS.unlink(a)}}})),this.options.lfs.files=u,W.info("found "+Object.keys(u).length+" files"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.initPlugins=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ag(this.book,this.tmpFS.root,this.options.plugins);case 2:this.plugins=e.sent;case 3:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.generateLogo=function(){var r=e(t.mark((function e(){var r,n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(nm.logo)){e.next=7;break}return r=this.book.config.getValue("title","Untitled"),n=I.createCanvas(60,60),Km.create(r,60,n),i=n.toBuffer("image/png"),e.next=7,this.tmpFS.writeFile(nm.logo,i);case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),n.generateArticles=function(){var r=e(t.mark((function e(){var r,n,i,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:W.info("generate articles ..."),r=this.book.summary.getArticles(),W.info("found "+r.length+" articles"),n=cg(r);case 4:if((i=n()).done){e.next=20;break}if(!(o=i.value).ref){e.next=18;break}return W.info('generate article "'+o.getRef()+'"'),e.prev=8,e.next=11,this.onArticle(o);case 11:return e.next=13,this.callHook("article",o);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(8),"ENOENT"===e.t0.code?W.warn("article file ["+o.ref+"] not exist"):W.warn("generate article ["+o.ref+"] failed: "+e.t0.message);case 18:e.next=4;break;case 20:case"end":return e.stop()}}),e,this,[[8,15]])})));return function(){return r.apply(this,arguments)}}(),n.callHook=function(){var r=e(t.mark((function r(n){var i,o,a,s=this,c=arguments;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(i=c.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=c[a];return W.debug('calling hook "'+n+'"'),r.next=4,fg(this.plugins,function(){var r=e(t.mark((function e(r){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=r.getHook(n))){e.next=5;break}return e.next=4,i.apply(r.getContext(s.getContext()),o);case 4:return e.abrupt("return",e.sent);case 5:return e.abrupt("return",!0);case 6:case"end":return e.stop()}}),e)})));return function(e){return r.apply(this,arguments)}}());case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})));return function(e){return r.apply(this,arguments)}}(),n.makeFile=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tmpFS.readAsString(r.ref);case 2:return n=e.sent,i=this.parseFileMeta(r.ref,n),e.abrupt("return",new Vm(a({path:r.path},i)));case 5:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.parseFileMeta=function(e,t){var r=t.match(lg),n={};if(r){if(void 0!==r[2])try{n=L.load(r[2])||{}}catch(e){}t=void 0!==r[3]?r[3]:""}var o=i.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(o),{meta:n,content:t}},r}();function pg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return dg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dg(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var mg=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).format="json",e.scripts=[],e}s(n,r);var o=n.prototype;return o.onInit=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.processSummary(),e.next=3,this.installCommonAssets();case 3:return e.next=5,this.installReader();case 5:return e.next=7,this.copyPluginsAssets();case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.processSummary=function(){var e=this;this.book.summary.getArticle((function(t){return e.book.config.getValue(["release","pathEncode"],!0)&&(t.path=N.pinyin(t.path,{toneType:"none",nonZh:"consecutive",type:"array",v:!0}).join("")),t.hasPath=!0,!1}))},o.installCommonAssets=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("installing common assets ..."),e.next=3,this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js");case 3:return e.next=5,this.installPackage("react","umd/react.production.min.js","react/react.production.min.js");case 5:return e.next=7,this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js");case 7:W.info("common assets installed with success");case 8:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.installReader=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("installing package @topwrite/reader ..."),e.next=3,this.installPackage("@topwrite/reader","dist/","reader");case 3:r=e.sent,W.info("package @topwrite/reader@"+r.version+" installed with success");case 5:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.installPackage=function(){var r=e(t.mark((function e(r,n,o){var a,s,c,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=require.resolve(r+"/package.json"),s=require(a),!this.useCdn()){e.next=7;break}n.endsWith("/")&&(n+="index.js"),this.scripts.push("https://jsdelivr.topthink.com/npm/"+r+"@"+s.version+"/"+n),e.next=13;break;case 7:return c=i.join(i.dirname(a),n),u=i.join(this.tmpFS.root,"asset",o),e.next=11,j.copy(c,u);case 11:n.endsWith("/")&&(o+="/index.js"),this.scripts.push("asset/"+o+"?v="+s.version);case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),o.copyPluginsAssets=function(){var r=e(t.mark((function e(){var r,n,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=pg(this.plugins);case 1:if((n=r()).done){e.next=13;break}if(o=n.value,!this.useCdn()){e.next=8;break}a=this.options.plugins.host,this.scripts.push(a+"/plugins/"+o.name+"/"+o.version+"/dist/index.js"),e.next=11;break;case 8:return e.next=10,j.copy(i.join(o.path,"dist"),i.join(this.tmpFS.root,"asset","plugins",o.name));case 10:this.scripts.push("asset/plugins/"+o.name+"/index.js?v="+o.version);case 11:e.next=1;break;case 13:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.useCdn=function(){return"cdn"===this.options.asset},o.onReadme=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeFile({path:"index.html",ref:"README.md"});case 2:return r=e.sent,e.next=5,this.tmpFS.unlink("README.md");case 5:return e.next=7,this.tmpFS.writeFile("index.html.json",this.stringify(r));case 7:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onArticle=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.path+".json",this.tmpFS.exist(n)){e.next=10;break}return e.next=4,this.makeFile(r);case 4:return i=e.sent,r.metadata=a({},i.meta,r.metadata),e.next=8,this.tmpFS.unlink(r.ref);case 8:return e.next=10,this.tmpFS.writeFile(n,this.stringify(i));case 10:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.onSummary=function(){var r=e(t.mark((function e(){var r,n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.book.summary,e.next=3,this.tmpFS.unlink($m.file.json);case 3:return e.next=5,this.tmpFS.unlink($m.file.markdown);case 5:return e.next=7,this.tmpFS.writeFile($m.file.json,this.stringify(r.toObject()));case 7:return n={id:this.book.id,sha:this.book.sha,lfs:this.options.lfs,scripts:this.scripts,poweredBy:this.options.poweredBy,mtime:this.sourceFS.readFileMTime()},e.next=10,this.tmpFS.writeFile("context.json",this.stringify(n));case 10:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onFinish=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.packBook();case 2:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.packBook=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W.info("pack book ..."),r=j.createWriteStream(this.dest),e.next=4,this.tmpFS.archive(r,"tar");case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.stringify=function(e){return JSON.stringify(e,null,4)},n}(hg);function gg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return vg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vg(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var yg=function(){function r(e){this.root=void 0,this.root=e}var n=r.prototype;return n.readFileMTime=function(e){void 0===e&&(e="");var t="git log --pretty=format:%cI -1 -- "+e,r=T.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0}),n=r.error,i=r.stdout;if(!n)return i||void 0},n.createReadStream=function(e,t){return j.createReadStream(this.resolve(e),t)},n.readFile=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j.readFile(this.resolve(r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),n.readAsObject=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n={}),e.prev=1,e.next=4,j.readJSON(this.resolve(r));case 4:return e.abrupt("return",e.sent);case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(e,t){return r.apply(this,arguments)}}(),n.readAsString=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,j.readFile(this.resolve(r),"utf-8");case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return","");case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(e){return r.apply(this,arguments)}}(),n.writeFile=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.resolve(r),j.ensureDirSync(i.dirname(r)),e.abrupt("return",j.writeFile(r,n));case 3:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.createWriteStream=function(e,t){return e=this.resolve(e),j.ensureDirSync(i.dirname(e)),j.createWriteStream(e,t)},n.appendFile=function(){var r=e(t.mark((function e(r,n){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",j.appendFile(this.resolve(r),n));case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.exist=function(e){return j.pathExistsSync(this.resolve(e))},n.unlink=function(){var r=e(t.mark((function e(r){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,j.unlink(this.resolve(r));case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(e){return r.apply(this,arguments)}}(),n.readDir=function(){var r=e(t.mark((function e(r){var n,i=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=""),n=[],e.abrupt("return",new Promise((function(e){q({path:i.resolve(r),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){n.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(function(){e(n)}))})));case 3:case"end":return e.stop()}}),e)})));return function(e){return r.apply(this,arguments)}}(),n.resolve=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.join.apply(i,[this.root].concat(t))},n.archive=function(){var r=e(t.mark((function e(r,n){var i,o=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===n&&(n="tar"),"tar"!=n){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){M.pack(o.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(r).on("error",(function(e){t(e)})).on("close",(function(){e()}))})));case 5:return e.next=7,this.readDir();case 7:return i=e.sent,e.abrupt("return",new Promise((function(e,t){r.on("error",(function(e){t(e)})),r.on("close",(function(){e()}));var a=z(n,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});a.pipe(r);for(var s,c=gg(i);!(s=c()).done;){var u=s.value;"File"===u.type&&a.append(o.createReadStream(u.path),{name:u.path})}a.finalize()})));case 9:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),r}(),bg=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).template=void 0,e.format="html",e}s(n,r);var o=n.prototype;return o.onInit=function(){var n=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.prototype.onInit.call(this);case 2:return e.next=4,this.initTemplate();case 4:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),o.initTemplate=function(){var r=e(t.mark((function e(){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j.readFile(i.resolve(__dirname,"../templates/html.ejs"),"utf-8");case 2:r=e.sent,this.template=B.compile(r);case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.useCdn=function(){return!1},o.onReadme=function(){var r=e(t.mark((function e(){var r,n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.makeFile({path:"index.html",ref:"README.md"});case 2:return r=e.sent,e.next=5,this.renderFile(r);case 5:return n=e.sent,e.next=8,this.tmpFS.unlink("README.md");case 8:return e.next=10,this.tmpFS.writeFile("index.html",n);case 10:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.onArticle=function(){var r=e(t.mark((function e(r){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tmpFS.exist(r.path)){e.next=12;break}return e.next=3,this.makeFile(r);case 3:return n=e.sent,r.metadata=a({},n.meta,r.metadata),e.next=7,this.renderFile(n,r.title);case 7:return i=e.sent,e.next=10,this.tmpFS.unlink(r.ref);case 10:return e.next=12,this.tmpFS.writeFile(r.path,i);case 12:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.onSummary=function(){var r=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tmpFS.unlink($m.file.json);case 2:return e.next=4,this.tmpFS.unlink($m.file.markdown);case 4:case"end":return e.stop()}}),e,this)})));return function(){return r.apply(this,arguments)}}(),o.renderFile=function(){var r=e(t.mark((function e(r,n){var i,o,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={id:this.book.id,sha:this.book.sha,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:r,lfs:this.options.lfs,options:{poweredBy:this.options.poweredBy}},o=this.scripts.map((function(e){return Xm(e)?e:r.relative(e)})),a=this.book.config.getValue("title","Untitled"),s=r.getMeta("title",n),e.abrupt("return",this.template({title:(s?s+" - ":"")+a,keywords:r.getMeta("keywords"),description:r.getMeta("description"),scripts:o,payload:JSON.stringify(i).replace(/\//g,"\\/")}));case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),n}(mg);const wg=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));function xg(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const o=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",o=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+o,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},a=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=o;if((!Array.isArray(t.excludes)||!wg(t.excludes,r))&&(!Array.isArray(t.includes)||wg(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=a),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}function kg(r,n){var i=n.tryEvery,o=n.stopAfter,a=Date.now();return new Promise((function n(s,c){setTimeout(e(t.mark((function e(){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r();case 3:i=e.sent,s(i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Date.now()-a>o?c(e.t0):n(s,c);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),i)}))}var Sg=function(r){function n(){return r.apply(this,arguments)||this}return s(n,r),n.prototype.fetch=function(){var n=e(t.mark((function e(n,i){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o=i.element)||"IMG"!==o.nodeName){e.next=3;break}return e.abrupt("return",null);case 3:return e.abrupt("return",r.prototype.fetch.call(this,n,i));case 4:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),n}($.ResourceLoader);const Eg=/\s+at.*[(\s](.*)\)?/,Pg=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Cg=void 0===R.homedir?"":R.homedir().replace(/\\/g,"/");class Ag extends Error{#e;name="AggregateError";constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t=(e=e.map((e=>e instanceof Error?e:null!==e&&"object"==typeof e?Object.assign(new Error(e.message),e):new Error(e)))).map((e=>{return"string"==typeof e.stack&&e.stack.length>0?(t=function(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${Ds(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(Eg);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||Pg.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(Eg,((e,t)=>e.replace(t,t.replace(Cg,"~"))))),e))).join("\n")}(e.stack),t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"")):String(e);var t})).join("\n");t="\n"+function(e,t=1,r={}){const{indent:n=" ",includeEmptyLines:i=!1}=r;if("string"!=typeof e)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if("number"!=typeof t)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if("string"!=typeof n)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(0===t)return e;const o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,n.repeat(t))}(t,4),super(t),this.#e=e}get errors(){return this.#e.slice()}}class _g extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Rg=e=>void 0===globalThis.DOMException?new _g(e):new DOMException(e),Fg=e=>{const t=void 0===e.reason?Rg("This operation was aborted."):e.reason;return t instanceof Error?t:Rg(t)};async function Og(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise(((o,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if("function"!=typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(r)&&r!==Number.POSITIVE_INFINITY||!(r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const s=[],c=[],u=new Map;let l=!1,f=!1,h=!1,p=0,d=0;const m=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{l=!0,f=!0,a(e)};i&&(i.aborted&&g(Fg(i)),i.addEventListener("abort",(()=>{g(Fg(i))})));const v=async()=>{if(f)return;const e=await m.next(),r=d;if(d++,e.done){if(h=!0,0===p&&!f){if(!n&&c.length>0)return void g(new Ag(c));if(f=!0,0===u.size)return void o(s);const e=[];for(const[t,r]of s.entries())u.get(t)!==Tg&&e.push(r);o(e)}}else p++,(async()=>{try{const n=await e.value;if(f)return;const i=await t(n,r);i===Tg&&u.set(r,i),s[r]=i,p--,await v()}catch(e){if(n)g(e);else{c.push(e),p--;try{await v()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<r;e++){try{await v()}catch(e){g(e);break}if(h||l)break}})()}))}const Tg=Symbol("skip");function Dg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Lg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lg(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ig(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var jg=function(r){function n(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))||this).format="ebook",e}s(n,r);var o=n.prototype;return o.initPlugins=function(){var n=e(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},e.next=4,r.prototype.initPlugins.call(this);case 4:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),o.createDOM=function(){var r=e(t.mark((function e(r,n){var i,o,a,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new Sg,(o=new $.VirtualConsole).on("error",(function(e){W.error(e)})),a=!1,s=0,c=new $.JSDOM(r,{virtualConsole:o,url:"file:///"+this.tmpFS.resolve(n.path),runScripts:"dangerously",resources:i,pretendToBeVisual:!0,beforeParse:function(e){e.SC_DISABLE_SPEEDY=!0;var t=e.document,r={attributes:!0,childList:!0,subtree:!0};e.addEventListener("load",(function(){var n=new e.MutationObserver((function(e){for(var t,r=Dg(e);!(t=r()).done;){var n=t.value;"childList"===n.type&&n.addedNodes.forEach((function(e){"SCRIPT"===e.nodeName&&(++s,e.addEventListener("load",(function(){--s})))}))}}));n.observe(t.head,r)})),e.addEventListener("bootstrapped",(function(){a=!0}))}}),e.next=7,kg((function(){if(!a||s>0)throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100});case 7:return e.abrupt("return",c);case 8:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),o.renderFile=function(){var n=e(t.mark((function n(i,o){var a,s,c,u,l=this;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.prototype.renderFile.call(this,i,o);case 2:return a=n.sent,n.next=5,this.createDOM(a,i);case 5:return s=n.sent,n.next=8,Og(Array.from(s.window.document.images),function(){var r=e(t.mark((function e(r,n){var o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.src){e.next=14;break}if(a=E.parse(r.src),null==(o=a.protocol)||!o.startsWith("http")){e.next=14;break}return e.prev=3,W.info("fetch image#"+n+": "+r.src),e.next=7,l.fetchImage(i,r.src);case 7:r.src=e.sent,W.info("image#"+n+" fetch succeed"),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),W.warn("image#"+n+" "+r.src+" fetch failed");case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(e,t){return r.apply(this,arguments)}}(),{concurrency:3});case 8:for(c=0,u=Array.from(s.window.document.scripts);c<u.length;c++)u[c].remove();return n.abrupt("return",s.serialize());case 10:case"end":return n.stop()}}),n,this)})));return function(e,t){return n.apply(this,arguments)}}(),o.fetchImage=function(){var r=e(t.mark((function e(r,n){var i,o,a,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nd.get(n,{responseType:"stream",timeout:5e3,headers:{"User-Agent":"TopWriteBuilder/"+this.version}});case 2:return i=e.sent,o="_images/"+eg(n),(a=C.extension(i.headers["content-type"]))&&(o+="."+a),s=this.tmpFS.createWriteStream(o),e.abrupt("return",new Promise((function(e,t){i.data.pipe(s),s.on("error",(function(e){s.close(),t(e)})),s.on("close",(function(){e(r.relative(o))}))})));case 8:case"end":return e.stop()}}),e,this)})));return function(e,t){return r.apply(this,arguments)}}(),o.getConvertOptions=function(){var r=e(t.mark((function e(r){var n,o,a,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.book.config,o={title:n.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0},e.t0=r,e.next="docx"===e.t0?5:"epub"===e.t0?7:"pdf"===e.t0?9:31;break;case 5:return o["docx-no-toc"]=!0,e.abrupt("break",31);case 7:return o["dont-split-on-page-breaks"]=!0,e.abrupt("break",31);case 9:return a={poweredBy:this.options.poweredBy},e.next=12,B.renderFile(i.resolve(__dirname,"../templates/pdf-header.ejs"),a,{rmWhitespace:!0});case 12:return s=e.sent,e.next=15,B.renderFile(i.resolve(__dirname,"../templates/pdf-footer.ejs"),a,{rmWhitespace:!0});case 15:return c=e.sent,o["chapter-mark"]=n.getValue(["pdf","chapterMark"]),o["page-breaks-before"]=n.getValue(["pdf","pageBreaksBefore"]),o["pdf-page-margin-left"]=n.getValue(["pdf","margin","left"]),o["pdf-page-margin-right"]=n.getValue(["pdf","margin","right"]),o["pdf-page-margin-top"]=n.getValue(["pdf","margin","top"]),o["pdf-page-margin-bottom"]=n.getValue(["pdf","margin","bottom"]),o["pdf-serif-family"]=n.getValue(["pdf","fontFamily"]),o["paper-size"]=n.getValue(["pdf","paperSize"]),o["pdf-custom-size"]=n.getValue(["pdf","customSize"]),o.unit="millimeter",o["pdf-page-numbers"]=n.getValue(["pdf","pageNumbers"]),o["preserve-cover-aspect-ratio"]=!0,o["pdf-header-template"]=s,o["pdf-footer-template"]=c,e.abrupt("break",31);case 31:return e.abrupt("return",o);case 32:case"end":return e.stop()}}),e,this)})));return function(e){return r.apply(this,arguments)}}(),o.packBook=function(){var n=e(t.mark((function e(){var n,o,a,s,c,u=this;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.extname(this.dest).substr(1),["pdf","docx","epub"].includes(n)){e.next=3;break}return e.abrupt("return",r.prototype.packBook.call(this));case 3:return e.next=5,U.lookpath("ebook-convert");case 5:if(o=e.sent){e.next=8;break}throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");case 8:return e.next=10,this.getConvertOptions(n);case 10:return a=e.sent,s=xg(a),c=this.tmpFS.resolve("index.html"),s.unshift(c,this.dest),e.abrupt("return",new Promise((function(e,t){var r,n;W.info("convert book ...");var i=T(o,s,{stdio:["inherit"],cwd:u.tmpFS.root}),a=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^Ignoring internal ","^CSSStyleDeclaration: ","^CSSStylesheet: ","^PropertyValue: ","^CSSVariable: ",Ig(c),Ig(u.dest)].map((function(e){return"("+e+")"})).join("|"),l=new RegExp("("+a+")");null==(r=i.stdout)||r.on("data",(function(e){e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((function(e){if(e){var t=e.trim();e.match(l)?W.debug({message:t,type:"log"}):W.log(t)}}))})),null==(n=i.stderr)||n.on("data",(function(e){W.error(e.toString().trimEnd())})),i.on("close",(function(r){0!==r?t("Convert failed"):e()}))})));case 15:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}(),n}(bg),Ng=V,qg=process.cwd,zg=null,Mg=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return zg||(zg=qg.call(process)),zg};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Bg=process.chdir;process.chdir=function(e){zg=null,Bg.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Bg)}var Ug=function(e){Ng.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,Ng.O_WRONLY|Ng.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,Ng.O_WRONLY|Ng.O_SYMLINK,r),o=!0;try{n=e.fchmodSync(i,r),o=!1}finally{if(o)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){Ng.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,n,i){e.open(t,Ng.O_SYMLINK,(function(t,o){t?i&&i(t):e.futimes(o,r,n,(function(t){e.close(o,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,o=e.openSync(t,Ng.O_SYMLINK),a=!0;try{i=e.futimesSync(o,r,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=a(e.statSync),e.fstatSync=a(e.fstatSync),e.lstatSync=a(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Mg&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),a),void(a<100&&(a+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){s(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!s(e))throw e}}:t}function n(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function i(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function a(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,o,a,c);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c};var $g=x.Stream,Vg=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);$g.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,s=o.length;a<s;a++){var c=o[a];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);$g.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),o=0,a=i.length;o<a;o++){var s=i[o];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Hg=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:Qg(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},Qg=Object.getPrototypeOf||function(e){return e.__proto__};var Gg,Wg,Kg=P,Jg=Ug,Yg=Vg,Zg=Hg,Xg=w;function ev(e,t){Object.defineProperty(e,Gg,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Gg=Symbol.for("graceful-fs.queue"),Wg=Symbol.for("graceful-fs.previous")):(Gg="___graceful-fs.queue",Wg="___graceful-fs.previous");var tv=function(){};if(Xg.debuglog?tv=Xg.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(tv=function(){var e=Xg.format.apply(Xg,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Kg[Gg]){var rv=K[Gg]||[];ev(Kg,rv),Kg.close=function(e){function t(t,r){return e.call(Kg,t,(function(e){e||sv(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Wg,{value:e}),t}(Kg.close),Kg.closeSync=function(e){function t(t){e.apply(Kg,arguments),sv()}return Object.defineProperty(t,Wg,{value:e}),t}(Kg.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){tv(Kg[Gg]),A.equal(Kg[Gg].length,0)}))}K[Gg]||ev(K,Kg[Gg]);var nv,iv=ov(Zg(Kg));function ov(e){Jg(e),e.gracefulify=ov,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):av([e,[r,n,i],t,o||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,o,a){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):av([e,[t,n,i,o],r,a||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,o,a){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):av([e,[t,r,i,o],n,a||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,o,a){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof o&&o.apply(this,arguments):av([e,[t,r,n,o],i,a||Date.now(),Date.now()])}))}(e,t,r,n)});var o=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var n=a.test(process.version)?function(e,t,r,n){return o(e,i(e,t,r,n))}:function(e,t,r,n){return o(e,t,i(e,t,r,n))};return n(e,t,r);function i(e,t,r,i){return function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(a&&a.sort&&a.sort(),"function"==typeof r&&r.call(this,o,a)):av([n,[e,t,r],o,i||Date.now(),Date.now()])}}};var a=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=Yg(e);h=s.ReadStream,p=s.WriteStream}var c=e.ReadStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(p.prototype=Object.create(u.prototype),p.prototype.open=function(){var e=this;m(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var l=h;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=p;function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function p(e,t){return this instanceof p?(u.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var d=e.open;function m(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,o){return d(t,r,n,(function(a,s){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof i&&i.apply(this,arguments):av([e,[t,r,n,i],a,o||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=m,e}function av(e){tv("ENQUEUE",e[0].name,e[1]),Kg[Gg].push(e),cv()}function sv(){for(var e=Date.now(),t=0;t<Kg[Gg].length;++t)Kg[Gg][t].length>2&&(Kg[Gg][t][3]=e,Kg[Gg][t][4]=e);cv()}function cv(){if(clearTimeout(nv),nv=void 0,0!==Kg[Gg].length){var e=Kg[Gg].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(void 0===i)tv("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){tv("TIMEOUT",t.name,r);var a=r.pop();"function"==typeof a&&a.call(null,n)}else{var s=Date.now()-o,c=Math.max(o-i,1);s>=Math.min(1.2*c,100)?(tv("RETRY",t.name,r),t.apply(null,r.concat([i]))):Kg[Gg].push(e)}void 0===nv&&(nv=setTimeout(cv,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Kg.__patched&&(iv=ov(Kg),Kg.__patched=!0);var uv=J(iv);const lv=R.homedir(),{env:fv}=process,hv=fv.XDG_DATA_HOME||(lv?i.join(lv,".local","share"):void 0),pv=fv.XDG_CONFIG_HOME||(lv?i.join(lv,".config"):void 0);fv.XDG_STATE_HOME||lv&&i.join(lv,".local","state"),fv.XDG_CACHE_HOME||lv&&i.join(lv,".cache"),fv.XDG_RUNTIME_DIR;const dv=(fv.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");hv&&dv.unshift(hv);const mv=(fv.XDG_CONFIG_DIRS||"/etc/xdg").split(":");pv&&mv.unshift(pv);var gv={exports:{}},vv={exports:{}};
4
4
  /**
5
5
  * @preserve
6
6
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
@@ -12,4 +12,4 @@
12
12
  * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
13
13
  * @see http://sites.google.com/site/murmurhash/
14
14
  */
15
- !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,o;switch(o=e.length,this.len+=o,r=this.k1,n=0,this.rem){case 0:r^=o>n?65535&e.charCodeAt(n++):0;case 1:r^=o>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=o>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=o>n?(255&e.charCodeAt(n))<<24:0,r^=o>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=o);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(Yv);var Zv,Xv=Yv.exports,ey={exports:{}},ty={exports:{}};var ry=K.process;const ny=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(ny(ry)){var iy,oy=_,ay=(Zv||(Zv=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(ty)),ty.exports),sy=/^win/i.test(ry.platform),cy=O;"function"!=typeof cy&&(cy=cy.EventEmitter),ry.__signal_exit_emitter__?iy=ry.__signal_exit_emitter__:((iy=ry.__signal_exit_emitter__=new cy).count=0,iy.emitted={}),iy.infinite||(iy.setMaxListeners(1/0),iy.infinite=!0),ey.exports=function(e,t){if(!ny(K.process))return function(){};oy.equal(typeof e,"function","a callback must be provided for exit handler"),!1===hy&&py();var r="exit";t&&t.alwaysLast&&(r="afterexit");return iy.on(r,e),function(){iy.removeListener(r,e),0===iy.listeners("exit").length&&0===iy.listeners("afterexit").length&&uy()}};var uy=function(){hy&&ny(K.process)&&(hy=!1,ay.forEach((function(e){try{ry.removeListener(e,fy[e])}catch(e){}})),ry.emit=gy,ry.reallyExit=dy,iy.count-=1)};ey.exports.unload=uy;var ly=function(e,t,r){iy.emitted[e]||(iy.emitted[e]=!0,iy.emit(e,t,r))},fy={};ay.forEach((function(e){fy[e]=function(){ny(K.process)&&(ry.listeners(e).length===iy.count&&(uy(),ly("exit",null,e),ly("afterexit",null,e),sy&&"SIGHUP"===e&&(e="SIGINT"),ry.kill(ry.pid,e)))}})),ey.exports.signals=function(){return ay};var hy=!1,py=function(){!hy&&ny(K.process)&&(hy=!0,iy.count+=1,ay=ay.filter((function(e){try{return ry.on(e,fy[e]),!0}catch(e){return!1}})),ry.emit=vy,ry.reallyExit=my)};ey.exports.load=py;var dy=ry.reallyExit,my=function(e){ny(K.process)&&(ry.exitCode=e||0,ly("exit",ry.exitCode,null),ly("afterexit",ry.exitCode,null),dy.call(ry,ry.exitCode))},gy=ry.emit,vy=function(e,t){if("exit"===e&&ny(K.process)){void 0!==t&&(ry.exitCode=t);var r=gy.apply(this,arguments);return ly("exit",ry.exitCode,null),ly("afterexit",ry.exitCode,null),r}return gy.apply(this,arguments)}}else ey.exports=function(){return function(){}};var yy=ey.exports,by=ky;ky.strict=Ey,ky.loose=Sy;var wy=Object.prototype.toString,xy={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function ky(e){return Ey(e)||Sy(e)}function Ey(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function Sy(e){return xy[wy.call(e)]}var Py=by.strict;Jv.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const o=Ay(Ny((()=>i))),a=Ry.resolve(e);try{await function(e){return new Promise((t=>{Dy[e]||(Dy[e]=[]),Dy[e].push(t),1===Dy[e].length&&t()}))}(a);const o=await Ty(Cy.realpath)(e).catch((()=>e));if(i=Iy(o),!r.mode||!r.chown){const e=await Ty(Cy.stat)(o).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await Ty(Cy.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),Fy(t)&&(t=Oy(t)),Buffer.isBuffer(t)?await Ty(Cy.write)(n,t,0,t.length,0):null!=t&&await Ty(Cy.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await Ty(Cy.fsync)(n),await Ty(Cy.close)(n),n=null,r.chown&&await Ty(Cy.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!zy(e))throw e})),r.mode&&await Ty(Cy.chmod)(i,r.mode).catch((e=>{if(!zy(e))throw e})),await Ty(Cy.rename)(i,o)}finally{n&&await Ty(Cy.close)(n).catch((()=>{})),o(),await Ty(Cy.unlink)(i).catch((()=>{})),Dy[a].shift(),Dy[a].length>0?Dy[a][0]():delete Dy[a]}}(e,t,r);n&&i.then(n,n);return i},Jv.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=Cy.realpathSync(e)}catch(e){}const n=Iy(e);if(!r.mode||!r.chown)try{const t=Cy.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const o=Ny(n),a=Ay(o);let s=!0;try{if(i=Cy.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),Fy(t)&&(t=Oy(t)),Buffer.isBuffer(t)?Cy.writeSync(i,t,0,t.length,0):null!=t&&Cy.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&Cy.fsyncSync(i),Cy.closeSync(i),i=null,r.chown)try{Cy.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!zy(e))throw e}if(r.mode)try{Cy.chmodSync(n,r.mode)}catch(e){if(!zy(e))throw e}Cy.renameSync(n,e),s=!1}finally{if(i)try{Cy.closeSync(i)}catch(e){}a(),s&&o()}},Jv.exports._getTmpname=Iy,Jv.exports._cleanupOnExit=Ny;const Cy=P,_y=Xv,Ay=yy,Ry=i,Fy=by,Oy=function(e){if(Py(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:Ty}=w,Dy={},Ly=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let jy=0;function Iy(e){return e+"."+_y(__filename).hash(String(process.pid)).hash(String(Ly)).hash(String(++jy)).result()}function Ny(e){return()=>{try{Cy.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function zy(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var qy=J(Jv.exports);const By=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},My=new Set(["__proto__","prototype","constructor"]);function Uy(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return r.some((e=>My.has(e)))?[]:r}var $y={get(e,t,r){if(!By(e)||"string"!=typeof t)return void 0===r?e:r;const n=Uy(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(null==(e=e[n[t]])){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!By(e)||"string"!=typeof t)return e;const n=e,i=Uy(t);for(let t=0;t<i.length;t++){const n=i[t];By(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!By(e)||"string"!=typeof t)return!1;const r=Uy(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!By(e))return!1}},has(e,t){if(!By(e)||"string"!=typeof t)return!1;const r=Uy(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!By(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}},Vy=J($y);const Hy=w.promisify(H.randomBytes),Qy="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),Gy="0123456789".split(""),Wy="CDEHKMPRTUWXY012458".split(""),Ky="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),Jy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Yy=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),Zy=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!Yy.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,Qy);if("numeric"===n)return e(r,Gy);if("distinguishable"===n)return e(r,Wy);if("ascii-printable"===n)return e(r,Ky);if("alphanumeric"===n)return e(r,Jy);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},Xy=Zy(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=H.randomBytes(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),((e,t,r)=>H.randomBytes(e).toString(t).slice(0,r)));Xy.async=Zy((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=await Hy(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),(async(e,t,r)=>(await Hy(e)).toString(t).slice(0,r)));const eb=Gv||i.join(R.tmpdir(),Xy({length:32})),tb="You don't have access to this file.",rb={mode:448,recursive:!0},nb={mode:384};var ib=new class{constructor(e,t,r={}){const n=r.globalConfigPath?i.join(e,"config.json"):i.join("configstore",`${e}.json`);this._path=r.configPath||i.join(eb,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse($v.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\n${tb}\n`),"SyntaxError"===e.name)return qy.sync(this._path,"",nb),{};throw e}}set all(e){try{$v.mkdirSync(i.dirname(this._path),rb),qy.sync(this._path,JSON.stringify(e,void 0,"\t"),nb)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\n${tb}\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return Vy.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))Vy.set(r,t,e[t]);else Vy.set(r,e,t);this.all=r}has(e){return Vy.has(this.all,e)}delete(e){const t=this.all;Vy.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function ob(e){return e?ib.get(e):ib.all}var ab={json:Kg,html:Xg,ebook:gv};function sb(e,t,r,n,i){return cb.apply(this,arguments)}function cb(){return cb=e(t.mark((function e(r,o,s,c,u){var l,f,h,p,d,m,g,v,y,b,w,x;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==ab[o]){e.next=2;break}throw new Error("unsupported format: "+o);case 2:return l=ab[o],f=new Zg(r),e.next=6,f.readAsObject("ttxconfig.json");case 6:return h=e.sent,W.debug("read options form ttxconfig.json"),W.debug(h),e.t0=qm,e.next=12,f.readAsObject(qm.file);case 12:return e.t1=e.sent,p=e.t0.createFromObject.call(e.t0,e.t1),d=f.resolve(p.getValue("root","")),m=n.dirSync({unsafeCleanup:!0}).name,g=new Zg(m),e.next=19,I.copy(d,m);case 19:return e.next=21,I.copy(i.resolve(__dirname,"../templates/.bookignore"),g.resolve(".bookignore"));case 21:if(v={plugins:a({host:ob("plugins_host"),preset:{}},h.plugins),poweredBy:{name:"顶想云",link:"https://www.topthink.com"},asset:h.asset||"local"},void 0!==h.poweredBy&&(v.poweredBy=h.poweredBy),h.lfs&&(v.lfs={url:h.lfs,files:{}}),y=h.id||"unknown",!g.exist(Eg.file.json)){e.next=31;break}return e.next=28,g.readAsObject(Eg.file.json,[]);case 28:b=e.sent,e.next=34;break;case 31:return e.next=33,g.readAsString(Eg.file.markdown);case 33:b=e.sent;case 34:return w=Eg.create(b),x=new Lm(y,p,w,u),e.abrupt("return",new l(x,f,g,v,s,c));case 37:case"end":return e.stop()}}),e)}))),cb.apply(this,arguments)}var ub="1.0.75-alpha.1+614c2f4",lb=new r.Command;lb.version(ub),lb.name("ttx"),lb.option("-d, --debug","output extra debugging"),lb.on("option:debug",(function(){W.level=4})),lb.command("build <dir> <format> [dest]").option("--sha <sha>","book hash value").option("--no-clean","not clean").description("build book").action(function(){var r=e(t.mark((function e(r,o,a,s){var c,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.clean&&n.setGracefulCleanup(),W.info("cli version "+ub),c=i.resolve(r),a=a?i.resolve(a):i.join(c,"book.tar.gz"),e.prev=4,e.next=7,sb(r,o,a,ub,s.sha);case 7:return u=e.sent,e.next=10,u.generate();case 10:process.exit(0),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(4),W.error(e.t0),process.exit(1);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(e,t,n,i){return r.apply(this,arguments)}}());var fb=lb.command("config");fb.command("list").action((function(){console.log(ob())})),fb.command("set <key> <value>").action((function(e,t){!function(e,t){ib.set(e,t)}(e,t)})),lb.parse(process.argv);
15
+ !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,o;switch(o=e.length,this.len+=o,r=this.k1,n=0,this.rem){case 0:r^=o>n?65535&e.charCodeAt(n++):0;case 1:r^=o>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=o>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=o>n?(255&e.charCodeAt(n))<<24:0,r^=o>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=o);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(vv);var yv,bv=vv.exports,wv={exports:{}},xv={exports:{}};var kv=K.process;const Sv=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Sv(kv)){var Ev,Pv=A,Cv=(yv||(yv=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(xv)),xv.exports),Av=/^win/i.test(kv.platform),_v=O;"function"!=typeof _v&&(_v=_v.EventEmitter),kv.__signal_exit_emitter__?Ev=kv.__signal_exit_emitter__:((Ev=kv.__signal_exit_emitter__=new _v).count=0,Ev.emitted={}),Ev.infinite||(Ev.setMaxListeners(1/0),Ev.infinite=!0),wv.exports=function(e,t){if(!Sv(K.process))return function(){};Pv.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Tv&&Dv();var r="exit";t&&t.alwaysLast&&(r="afterexit");return Ev.on(r,e),function(){Ev.removeListener(r,e),0===Ev.listeners("exit").length&&0===Ev.listeners("afterexit").length&&Rv()}};var Rv=function(){Tv&&Sv(K.process)&&(Tv=!1,Cv.forEach((function(e){try{kv.removeListener(e,Ov[e])}catch(e){}})),kv.emit=jv,kv.reallyExit=Lv,Ev.count-=1)};wv.exports.unload=Rv;var Fv=function(e,t,r){Ev.emitted[e]||(Ev.emitted[e]=!0,Ev.emit(e,t,r))},Ov={};Cv.forEach((function(e){Ov[e]=function(){Sv(K.process)&&(kv.listeners(e).length===Ev.count&&(Rv(),Fv("exit",null,e),Fv("afterexit",null,e),Av&&"SIGHUP"===e&&(e="SIGINT"),kv.kill(kv.pid,e)))}})),wv.exports.signals=function(){return Cv};var Tv=!1,Dv=function(){!Tv&&Sv(K.process)&&(Tv=!0,Ev.count+=1,Cv=Cv.filter((function(e){try{return kv.on(e,Ov[e]),!0}catch(e){return!1}})),kv.emit=Nv,kv.reallyExit=Iv)};wv.exports.load=Dv;var Lv=kv.reallyExit,Iv=function(e){Sv(K.process)&&(kv.exitCode=e||0,Fv("exit",kv.exitCode,null),Fv("afterexit",kv.exitCode,null),Lv.call(kv,kv.exitCode))},jv=kv.emit,Nv=function(e,t){if("exit"===e&&Sv(K.process)){void 0!==t&&(kv.exitCode=t);var r=jv.apply(this,arguments);return Fv("exit",kv.exitCode,null),Fv("afterexit",kv.exitCode,null),r}return jv.apply(this,arguments)}}else wv.exports=function(){return function(){}};var qv=wv.exports,zv=Uv;Uv.strict=$v,Uv.loose=Vv;var Mv=Object.prototype.toString,Bv={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function Uv(e){return $v(e)||Vv(e)}function $v(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function Vv(e){return Bv[Mv.call(e)]}var Hv=zv.strict;gv.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const o=Wv(ny((()=>i))),a=Kv.resolve(e);try{await function(e){return new Promise((t=>{Xv[e]||(Xv[e]=[]),Xv[e].push(t),1===Xv[e].length&&t()}))}(a);const o=await Zv(Qv.realpath)(e).catch((()=>e));if(i=ry(o),!r.mode||!r.chown){const e=await Zv(Qv.stat)(o).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await Zv(Qv.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),Jv(t)&&(t=Yv(t)),Buffer.isBuffer(t)?await Zv(Qv.write)(n,t,0,t.length,0):null!=t&&await Zv(Qv.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await Zv(Qv.fsync)(n),await Zv(Qv.close)(n),n=null,r.chown&&await Zv(Qv.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!iy(e))throw e})),r.mode&&await Zv(Qv.chmod)(i,r.mode).catch((e=>{if(!iy(e))throw e})),await Zv(Qv.rename)(i,o)}finally{n&&await Zv(Qv.close)(n).catch((()=>{})),o(),await Zv(Qv.unlink)(i).catch((()=>{})),Xv[a].shift(),Xv[a].length>0?Xv[a][0]():delete Xv[a]}}(e,t,r);n&&i.then(n,n);return i},gv.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=Qv.realpathSync(e)}catch(e){}const n=ry(e);if(!r.mode||!r.chown)try{const t=Qv.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const o=ny(n),a=Wv(o);let s=!0;try{if(i=Qv.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),Jv(t)&&(t=Yv(t)),Buffer.isBuffer(t)?Qv.writeSync(i,t,0,t.length,0):null!=t&&Qv.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&Qv.fsyncSync(i),Qv.closeSync(i),i=null,r.chown)try{Qv.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!iy(e))throw e}if(r.mode)try{Qv.chmodSync(n,r.mode)}catch(e){if(!iy(e))throw e}Qv.renameSync(n,e),s=!1}finally{if(i)try{Qv.closeSync(i)}catch(e){}a(),s&&o()}},gv.exports._getTmpname=ry,gv.exports._cleanupOnExit=ny;const Qv=P,Gv=bv,Wv=qv,Kv=i,Jv=zv,Yv=function(e){if(Hv(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:Zv}=w,Xv={},ey=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let ty=0;function ry(e){return e+"."+Gv(__filename).hash(String(process.pid)).hash(String(ey)).hash(String(++ty)).result()}function ny(e){return()=>{try{Qv.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function iy(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var oy=J(gv.exports);const ay=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},sy=new Set(["__proto__","prototype","constructor"]);function cy(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return r.some((e=>sy.has(e)))?[]:r}var uy={get(e,t,r){if(!ay(e)||"string"!=typeof t)return void 0===r?e:r;const n=cy(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(null==(e=e[n[t]])){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!ay(e)||"string"!=typeof t)return e;const n=e,i=cy(t);for(let t=0;t<i.length;t++){const n=i[t];ay(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!ay(e)||"string"!=typeof t)return!1;const r=cy(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!ay(e))return!1}},has(e,t){if(!ay(e)||"string"!=typeof t)return!1;const r=cy(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!ay(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}},ly=J(uy);const fy=w.promisify(H.randomBytes),hy="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),py="0123456789".split(""),dy="CDEHKMPRTUWXY012458".split(""),my="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),gy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),vy=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),yy=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!vy.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,hy);if("numeric"===n)return e(r,py);if("distinguishable"===n)return e(r,dy);if("ascii-printable"===n)return e(r,my);if("alphanumeric"===n)return e(r,gy);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},by=yy(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=H.randomBytes(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),((e,t,r)=>H.randomBytes(e).toString(t).slice(0,r)));by.async=yy((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let o="",a=0;for(;a<e;){const s=await fy(i);let c=0;for(;c<i&&a<e;){const e=s.readUInt16LE(c);c+=2,e>n||(o+=t[e%r],a++)}}return o}),(async(e,t,r)=>(await fy(e)).toString(t).slice(0,r)));const wy=pv||i.join(R.tmpdir(),by({length:32})),xy="You don't have access to this file.",ky={mode:448,recursive:!0},Sy={mode:384};var Ey=new class{constructor(e,t,r={}){const n=r.globalConfigPath?i.join(e,"config.json"):i.join("configstore",`${e}.json`);this._path=r.configPath||i.join(wy,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(uv.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\n${xy}\n`),"SyntaxError"===e.name)return oy.sync(this._path,"",Sy),{};throw e}}set all(e){try{uv.mkdirSync(i.dirname(this._path),ky),oy.sync(this._path,JSON.stringify(e,void 0,"\t"),Sy)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\n${xy}\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return ly.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))ly.set(r,t,e[t]);else ly.set(r,e,t);this.all=r}has(e){return ly.has(this.all,e)}delete(e){const t=this.all;ly.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function Py(e){return e?Ey.get(e):Ey.all}var Cy={json:mg,html:bg,ebook:jg};function Ay(e,t,r,n,i){return _y.apply(this,arguments)}function _y(){return _y=e(t.mark((function e(r,o,s,c,u){var l,f,h,p,d,m,g,v,y,b,w,x;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==Cy[o]){e.next=2;break}throw new Error("unsupported format: "+o);case 2:return l=Cy[o],f=new yg(r),e.next=6,f.readAsObject("ttxconfig.json");case 6:return h=e.sent,W.debug("read options form ttxconfig.json"),W.debug(h),e.t0=cm,e.next=12,f.readAsObject(cm.file);case 12:return e.t1=e.sent,p=e.t0.createFromObject.call(e.t0,e.t1),d=f.resolve(p.getValue("root","")),m=n.dirSync({unsafeCleanup:!0}).name,g=new yg(m),e.next=19,j.copy(d,m);case 19:return e.next=21,j.copy(i.resolve(__dirname,"../templates/.bookignore"),g.resolve(".bookignore"));case 21:if(v={plugins:a({host:Py("plugins_host"),preset:{}},h.plugins),poweredBy:{name:"顶想云",link:"https://www.topthink.com"},asset:h.asset||"local"},void 0!==h.poweredBy&&(v.poweredBy=h.poweredBy),h.lfs&&(v.lfs={url:h.lfs,files:{}}),y=h.id||"unknown",!g.exist($m.file.json)){e.next=31;break}return e.next=28,g.readAsObject($m.file.json,[]);case 28:b=e.sent,e.next=34;break;case 31:return e.next=33,g.readAsString($m.file.markdown);case 33:b=e.sent;case 34:return w=$m.create(b),x=new nm(y,p,w,u),e.abrupt("return",new l(x,f,g,v,s,c));case 37:case"end":return e.stop()}}),e)}))),_y.apply(this,arguments)}var Ry="1.0.75-alpha.3+679c61e",Fy=new r.Command;Fy.version(Ry),Fy.name("ttx"),Fy.option("-d, --debug","output extra debugging"),Fy.on("option:debug",(function(){W.level=4})),Fy.command("build <dir> <format> [dest]").option("--sha <sha>","book hash value").option("--no-clean","not clean").description("build book").action(function(){var r=e(t.mark((function e(r,o,a,s){var c,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.clean&&n.setGracefulCleanup(),W.info("cli version "+Ry),c=i.resolve(r),a=a?i.resolve(a):i.join(c,"book.tar.gz"),e.prev=4,e.next=7,Ay(r,o,a,Ry,s.sha);case 7:return u=e.sent,e.next=10,u.generate();case 10:process.exit(0),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(4),W.error(e.t0),process.exit(1);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(e,t,n,i){return r.apply(this,arguments)}}());var Oy=Fy.command("config");Oy.command("list").action((function(){console.log(Py())})),Oy.command("set <key> <value>").action((function(e,t){!function(e,t){Ey.set(e,t)}(e,t)})),Fy.parse(process.argv);