rapier-html 1.2.46 → 1.2.49
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.
- package/BUILD.json +4 -4
- package/README.md +12 -11
- package/dist/ledger/carried.mjs +17 -8
- package/dist/ledger/diff/concerns.mjs +2 -2
- package/dist/ledger/document-fonts.mjs +60 -6
- package/dist/ledger/source.mjs +31 -2
- package/dist/ledger/vendor/SOURCES.json +253 -0
- package/dist/ledger/vendor/entities/decode-codepoint.mjs +27 -0
- package/dist/ledger/vendor/entities.mjs +499 -0
- package/dist/ledger/vendor/linkify-it.mjs +427 -0
- package/dist/ledger/vendor/markdown-it.mjs +4027 -0
- package/dist/ledger/vendor/markdown-plugins.mjs +1328 -11
- package/dist/ledger/vendor/markdown-runtime.mjs +3 -11
- package/dist/ledger/vendor/mdurl/index.mjs +11 -0
- package/dist/ledger/vendor/mdurl/lib/decode.mjs +107 -0
- package/dist/ledger/vendor/mdurl/lib/encode.mjs +77 -0
- package/dist/ledger/vendor/mdurl/lib/format.mjs +20 -0
- package/dist/ledger/vendor/mdurl/lib/parse.mjs +231 -0
- package/dist/ledger/vendor/punycode.mjs +282 -0
- package/dist/ledger/vendor/uc.micro.mjs +49 -0
- package/dist/page.mjs +11 -3
- package/dist/rapier.html +97 -51
- package/dist/wrap.mjs +10 -5
- package/package.json +1 -1
- package/dist/ledger/vendor/BROWSER-ENTITIES.json +0 -36
- package/dist/ledger/vendor/MARKDOWN-RUNTIME.json +0 -136
- package/dist/ledger/vendor/MARKDOWNIT.json +0 -582
- package/dist/ledger/vendor/markdown-plugins.json +0 -46
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
// One lazy constructor serves named browser/worker imports and the default Node facade.
|
|
3
|
-
let owned = null;
|
|
4
|
-
export function markdownItConstructor() {
|
|
5
|
-
if (!owned) {
|
|
6
|
-
const exports = {}; const module = {exports};
|
|
7
|
-
/*! markdown-it 15.0.3 https://github.com/markdown-it/markdown-it @license MIT; unchanged release source, ES2022 build. See agent/vendor/MARKDOWNIT.json. */
|
|
8
|
-
!function(e){"object"==typeof module&&module.exports?module.exports=e():globalThis.markdownit=e()}(function(){const e={exports:{}};var t,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},a={};i(a,{default:()=>Gt}),e.exports=(t=a,((e,t,i,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))o.call(e,i)||void 0===i||r(e,i,{get:()=>t[i],enumerable:!(a=n(t,i))||a.enumerable});return e})(r({},"__esModule",{value:!0}),t));var u={};i(u,{arrayReplaceAt:()=>Z,asciiTrim:()=>fe,callable:()=>V,escapeHtml:()=>ne,escapeRE:()=>oe,fromCodePoint:()=>G,isMdAsciiPunct:()=>le,isPunctChar:()=>ue,isPunctCharCode:()=>ce,isSpace:()=>ie,isValidEntityCode:()=>H,isWhiteSpace:()=>ae,lib:()=>de,normalizeReference:()=>he,unescapeAll:()=>K,unescapeMd:()=>Y});var c={};i(c,{decode:()=>p,encode:()=>g,format:()=>m,parse:()=>q});var l={};function h(e,t){"string"!=typeof t&&(t=h.defaultChars);const r=function(e){let t=l[e];if(t)return t;t=l[e]=[];for(let e=0;e<128;e++){const r=String.fromCharCode(e);t.push(r)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let n=0,s=e.length;n<s;n+=3){const o=parseInt(e.slice(n+1,n+3),16);if(o<128)t+=r[o];else{if(192==(224&o)&&n+3<s){const r=parseInt(e.slice(n+4,n+6),16);if(128==(192&r)){const e=o<<6&1984|63&r;t+=e<128?"��":String.fromCharCode(e),n+=3;continue}}if(224==(240&o)&&n+6<s){const r=parseInt(e.slice(n+4,n+6),16),s=parseInt(e.slice(n+7,n+9),16);if(128==(192&r)&&128==(192&s)){const e=o<<12&61440|r<<6&4032|63&s;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),n+=6;continue}}if(240==(248&o)&&n+9<s){const r=parseInt(e.slice(n+4,n+6),16),s=parseInt(e.slice(n+7,n+9),16),i=parseInt(e.slice(n+10,n+12),16);if(128==(192&r)&&128==(192&s)&&128==(192&i)){let e=o<<18&1835008|r<<12&258048|s<<6&4032|63&i;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),n+=9;continue}}t+="�"}}return t})}h.defaultChars=";/?:@&=+$,#",h.componentChars="";var p=h,f={};function d(e,t,r){"string"!=typeof t&&(r=t,t=d.defaultChars),void 0===r&&(r=!0);const n=function(e){let t=f[e];if(t)return t;t=f[e]=[];for(let e=0;e<128;e++){const r=String.fromCharCode(e);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}(t);let s="";for(let t=0,o=e.length;t<o;t++){const i=e.charCodeAt(t);if(r&&37===i&&t+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3)))s+=e.slice(t,t+3),t+=2;else if(i<128)s+=n[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&t+1<o){const r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){s+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}s+="%EF%BF%BD"}else s+=encodeURIComponent(e[t])}return s}d.defaultChars=";/?:@&=+$,-_.!~*'()#",d.componentChars="-_.!~*'()";var g=d;function m(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function _(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var k=/^([a-z0-9.+-]+:)/i,D=/:[0-9]*$/,b=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,C=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),x=["'"].concat(C),A=["%","/","?",";","#"].concat(x),F=["/","?","#"],E=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};_.prototype.parse=function(e,t){let r,n,s,o=e;if(o=o.trim(),!t&&1===e.split("#").length){const e=b.exec(o);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let i=k.exec(o);if(i&&(i=i[0],r=i.toLowerCase(),this.protocol=i,o=o.substr(i.length)),(t||i||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s="//"===o.substr(0,2),!s||i&&y[i]||(o=o.substr(2),this.slashes=!0)),!y[i]&&(s||i&&!v[i])){let e,t,r=-1;for(let e=0;e<F.length;e++)n=o.indexOf(F[e]),-1!==n&&(-1===r||n<r)&&(r=n);t=-1===r?o.lastIndexOf("@"):o.lastIndexOf("@",r),-1!==t&&(e=o.slice(0,t),o=o.slice(t+1),this.auth=e),r=-1;for(let e=0;e<A.length;e++)n=o.indexOf(A[e]),-1!==n&&(-1===r||n<r)&&(r=n);-1===r&&(r=o.length),":"===o[r-1]&&r--;const s=o.slice(0,r);o=o.slice(r),this.parseHost(s),this.hostname=this.hostname||"";const i="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!i){const e=this.hostname.split(/\./);for(let t=0,r=e.length;t<r;t++){const r=e[t];if(r&&!r.match(E)){let n="";for(let e=0,t=r.length;e<t;e++)r.charCodeAt(e)>127?n+="x":n+=r[e];if(!n.match(E)){const n=e.slice(0,t),s=e.slice(t+1),i=r.match(w);i&&(n.push(i[1]),s.unshift(i[2])),s.length&&(o=s.join(".")+o),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),i&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=o.indexOf("#");-1!==a&&(this.hash=o.substr(a),o=o.slice(0,a));const u=o.indexOf("?");return-1!==u&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),v[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},_.prototype.parseHost=function(e){let t=D.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var q=function(e,t){if(e&&e instanceof _)return e;const r=new _;return r.parse(e,t),r},S={};i(S,{Any:()=>$,Cc:()=>L,Cf:()=>I,P:()=>B,S:()=>z,Z:()=>T});var $=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,L=/[\0-\x1F\x7F-\x9F]/,I=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,B=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,z=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,T=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,R=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];var M,N,O,P,j=new Map([["fjlig","fj"]]);{let e,t,r=/([^A-Za-z\d ]+)|[A-Za-z\d]+/g,n="\tTab\nNewLine!excl\"QUOT quot#num$dollar%percnt& amp'apos(lpar)rpar*ast midast+plus,comma.period/sol:colon;semi<LT lt<⃒nvlt=equals=⃥bne>GT gt>⃒nvgt?quest@commat[lbrack lsqb\\bsol]rbrack rsqb^Hat_UnderBar lowbar`DiacriticalGrave grave{lbrace lcub|VerticalLine verbar vert}rbrace rcub NonBreakingSpace nbsp¡iexcl¢cent£pound¤curren¥yen¦brvbar§sect¨Dot DoubleDot die uml©COPY copyªordf«laquo¬notshy®REG circledR reg¯macr strns°deg±PlusMinus plusmn pm²sup2³sup3´DiacriticalAcute acuteµmicro¶para·CenterDot centerdot middot¸Cedilla cedil¹sup1ºordm»raquo¼frac14½frac12 half¾frac34¿iquestÀAgraveÁAacuteÂAcircÃAtildeÄAumlÅAring angstÆAEligÇCcedilÈEgraveÉEacuteÊEcircËEumlÌIgraveÍIacuteÎIcircÏIumlÐETHÑNtildeÒOgraveÓOacuteÔOcircÕOtildeÖOuml×timesØOslashÙUgraveÚUacuteÛUcircÜUumlÝYacuteÞTHORNßszligàagraveáaacuteâacircãatildeäaumlåaringæaeligçccedilèegraveéeacuteêecircëeumlìigraveíiacuteîicircïiumlðethñntildeòograveóoacuteôocircõotildeöouml÷div divideøoslashùugraveúuacuteûucircüuumlýyacuteþthornÿyumlĀAmacrāamacrĂAbreveăabreveĄAogonąaogonĆCacutećcacuteĈCcircĉccircĊCdotċcdotČCcarončccaronĎDcaronďdcaronĐDstrokđdstrokĒEmacrēemacrĖEdotėedotĘEogonęeogonĚEcaroněecaronĜGcircĝgcircĞGbreveğgbreveĠGdotġgdotĢGcedilĤHcircĥhcircĦHstrokħhstrokĨItildeĩitildeĪImacrīimacrĮIogonįiogonİIdotıimath inodotIJIJligijijligĴJcircĵjcircĶKcedilķkcedilĸkgreenĹLacuteĺlacuteĻLcedilļlcedilĽLcaronľlcaronĿLmidotŀlmidotŁLstrokłlstrokŃNacuteńnacuteŅNcedilņncedilŇNcaronňncaronʼnnaposŊENGŋengŌOmacrōomacrŐOdblacőodblacŒOEligœoeligŔRacuteŕracuteŖRcedilŗrcedilŘRcaronřrcaronŚSacuteśsacuteŜScircŝscircŞScedilşscedilŠScaronšscaronŢTcedilţtcedilŤTcaronťtcaronŦTstrokŧtstrokŨUtildeũutildeŪUmacrūumacrŬUbreveŭubreveŮUringůuringŰUdblacűudblacŲUogonųuogonŴWcircŵwcircŶYcircŷycircŸYumlŹZacuteźzacuteŻZdotżzdotŽZcaronžzcaronƒfnofƵimpedǵgacuteȷjmathˆcircˇHacek caron˘Breve breve˙DiacriticalDot dot˚ring˛ogon˜DiacriticalTilde tilde˝DiacriticalDoubleAcute dblac̑DownBreveΑAlphaΒBetaΓGammaΔDeltaΕEpsilonΖZetaΗEtaΘThetaΙIotaΚKappaΛLambdaΜMuΝNuΞXiΟOmicronΠPiΡRhoΣSigmaΤTauΥUpsilonΦPhiΧChiΨPsiΩOmega ohmαalphaβbetaγgammaδdeltaεepsi epsilonζzetaηetaθthetaιiotaκkappaλlambdaμmuνnuξxiοomicronπpiρrhoςsigmaf sigmav varsigmaσsigmaτtauυupsi upsilonφphiχchiψpsiωomegaϑthetasym thetav varthetaϒUpsi upsihϕphiv straightphi varphiϖpiv varpiϜGammadϝdigamma gammadϰkappav varkappaϱrhov varrhoϵepsiv straightepsilon varepsilon϶backepsilon bepsiЁIOcyЂDJcyЃGJcyЄJukcyЅDScyІIukcyЇYIcyЈJsercyЉLJcyЊNJcyЋTSHcyЌKJcyЎUbrcyЏDZcyАAcyБBcyВVcyГGcyДDcyЕIEcyЖZHcyЗZcyИIcyЙJcyКKcyЛLcyМMcyНNcyОOcyПPcyРRcyСScyТTcyУUcyФFcyХKHcyЦTScyЧCHcyШSHcyЩSHCHcyЪHARDcyЫYcyЬSOFTcyЭEcyЮYUcyЯYAcyаacyбbcyвvcyгgcyдdcyеiecyжzhcyзzcyиicyйjcyкkcyлlcyмmcyнncyоocyпpcyрrcyсscyтtcyуucyфfcyхkhcyцtscyчchcyшshcyщshchcyъhardcyыycyьsoftcyэecyюyucyяyacyёiocyђdjcyѓgjcyєjukcyѕdscyіiukcyїyicyјjsercyљljcyњnjcyћtshcyќkjcyўubrcyџdzcy ensp emsp emsp13 emsp14 numsp puncsp ThinSpace thinsp VeryThinSpace hairspNegativeMediumSpace NegativeThickSpace NegativeThinSpace NegativeVeryThinSpace ZeroWidthSpacezwnjzwjlrmrlm‐dash hyphen–ndash—mdash―horbar‖Verbar Vert‘OpenCurlyQuote lsquo’CloseCurlyQuote rsquo rsquor‚lsquor sbquo“OpenCurlyDoubleQuote ldquo”CloseCurlyDoubleQuote rdquo rdquor„bdquo ldquor†dagger‡Dagger ddagger•bull bullet‥nldr…hellip mldr‰permil‱pertenk′prime″Prime‴tprime‵backprime bprime‹lsaquo›rsaquo‾OverBar oline⁁caret⁃hybull⁄frasl⁏bsemi⁗qprime MediumSpace ThickSpaceNoBreakApplyFunction afInvisibleTimes itInvisibleComma ic€euro⃛TripleDot tdot⃜DotDotℂCopf complexes℅incareℊgscrℋHilbertSpace Hscr hamiltℌHfr PoincareplaneℍHopf quaternionsℎplanckhℏhbar hslash planck plankvℐIscr imaglineℑIfr Im image imagpartℒLaplacetrf Lscr lagranℓellℕNopf naturals№numero℗copysr℘weierp wpℙPopf primesℚQopf rationalsℛRscr realineℜRe Rfr real realpartℝRopf reals℞rx™TRADE tradeℤZopf integers℧mhoℨZfr zeetrf℩iiotaℬBernoullis Bscr bernouℭCayleys CfrℯescrℰEscr expectationℱFouriertrf FscrℳMellintrf Mscr phmmatℴorder orderof oscrℵalefsym alephℶbethℷgimelℸdalethⅅCapitalDifferentialD DDⅆDifferentialD ddⅇExponentialE ee exponentialeⅈImaginaryI ii⅓frac13⅔frac23⅕frac15⅖frac25⅗frac35⅘frac45⅙frac16⅚frac56⅛frac18⅜frac38⅝frac58⅞frac78←LeftArrow ShortLeftArrow larr leftarrow slarr↑ShortUpArrow UpArrow uarr uparrow→RightArrow ShortRightArrow rarr rightarrow srarr↓DownArrow ShortDownArrow darr downarrow↔LeftRightArrow harr leftrightarrow↕UpDownArrow updownarrow varr↖UpperLeftArrow nwarr nwarrow↗UpperRightArrow nearr nearrow↘LowerRightArrow searr searrow↙LowerLeftArrow swarr swarrow↚nlarr nleftarrow↛nrarr nrightarrow↝rarrw rightsquigarrow↝̸nrarrw↞Larr twoheadleftarrow↟Uarr↠Rarr twoheadrightarrow↡Darr↢larrtl leftarrowtail↣rarrtl rightarrowtail↤LeftTeeArrow mapstoleft↥UpTeeArrow mapstoup↦RightTeeArrow map mapsto↧DownTeeArrow mapstodown↩hookleftarrow larrhk↪hookrightarrow rarrhk↫larrlp looparrowleft↬looparrowright rarrlp↭harrw leftrightsquigarrow↮nharr nleftrightarrow↰Lsh lsh↱Rsh rsh↲ldsh↳rdsh↵crarr↶cularr curvearrowleft↷curarr curvearrowright↺circlearrowleft olarr↻circlearrowright orarr↼LeftVector leftharpoonup lharu↽DownLeftVector leftharpoondown lhard↾RightUpVector uharr upharpoonright↿LeftUpVector uharl upharpoonleft⇀RightVector rharu rightharpoonup⇁DownRightVector rhard rightharpoondown⇂RightDownVector dharr downharpoonright⇃LeftDownVector dharl downharpoonleft⇄RightArrowLeftArrow rightleftarrows rlarr⇅UpArrowDownArrow udarr⇆LeftArrowRightArrow leftrightarrows lrarr⇇leftleftarrows llarr⇈upuparrows uuarr⇉rightrightarrows rrarr⇊ddarr downdownarrows⇋ReverseEquilibrium leftrightharpoons lrhar⇌Equilibrium rightleftharpoons rlhar⇍nLeftarrow nlArr⇎nLeftrightarrow nhArr⇏nRightarrow nrArr⇐DoubleLeftArrow Leftarrow lArr⇑DoubleUpArrow Uparrow uArr⇒DoubleRightArrow Implies Rightarrow rArr⇓DoubleDownArrow Downarrow dArr⇔DoubleLeftRightArrow Leftrightarrow hArr iff⇕DoubleUpDownArrow Updownarrow vArr⇖nwArr⇗neArr⇘seArr⇙swArr⇚Lleftarrow lAarr⇛Rrightarrow rAarr⇝zigrarr⇤LeftArrowBar larrb⇥RightArrowBar rarrb⇵DownArrowUpArrow duarr⇽loarr⇾roarr⇿hoarr∀ForAll forall∁comp complement∂PartialD part∂̸npart∃Exists exist∄NotExists nexist nexists∅empty emptyset emptyv varnothing∇Del nabla∈Element in isin isinv∉NotElement notin notinva∋ReverseElement SuchThat ni niv∌NotReverseElement notni notniva∏Product prod∐Coproduct coprod∑Sum sum−minus∓MinusPlus mnplus mp∔dotplus plusdo∖Backslash setminus setmn smallsetminus ssetmn∗lowast∘SmallCircle compfn√Sqrt radic∝Proportional prop propto varpropto vprop∞infin∟angrt∠ang angle∠⃒nang∡angmsd measuredangle∢angsph∣VerticalBar mid shortmid smid∤NotVerticalBar nmid nshortmid nsmid∥DoubleVerticalBar par parallel shortparallel spar∦NotDoubleVerticalBar npar nparallel nshortparallel nspar∧and wedge∨or vee∩cap∩︀caps∪cup∪︀cups∫Integral int∬Int∭iiint tint∮ContourIntegral conint oint∯Conint DoubleContourIntegral∰Cconint∱cwint∲ClockwiseContourIntegral cwconint∳CounterClockwiseContourIntegral awconint∴Therefore there4 therefore∵Because becaus because∶ratio∷Colon Proportion∸dotminus minusd∺mDDot∻homtht∼Tilde sim thicksim thksim∼⃒nvsim∽backsim bsim∽̱race∾ac mstpos∾̳acE∿acd≀VerticalTilde wr wreath≁NotTilde nsim≂EqualTilde eqsim esim≂̸NotEqualTilde nesim≃TildeEqual sime simeq≄NotTildeEqual nsime nsimeq≅TildeFullEqual cong≆simne≇NotTildeFullEqual ncong≈TildeTilde ap approx asymp thickapprox thkap≉NotTildeTilde nap napprox≊ape approxeq≋apid≋̸napid≌backcong bcong≍CupCap asympeq≍⃒nvap≎Bumpeq HumpDownHump bump≎̸NotHumpDownHump nbump≏HumpEqual bumpe bumpeq≏̸NotHumpEqual nbumpe≐DotEqual doteq esdot≐̸nedot≑doteqdot eDot≒efDot fallingdotseq≓erDot risingdotseq≔Assign colone coloneq≕ecolon eqcolon≖ecir eqcirc≗circeq cire≙wedgeq≚veeeq≜triangleq trie≟equest questeq≠NotEqual ne≡Congruent equiv≡⃥bnequiv≢NotCongruent nequiv≤le leq≤⃒nvle≥GreaterEqual ge geq≥⃒nvge≦LessFullEqual lE leqq≦̸nlE nleqq≧GreaterFullEqual gE geqq≧̸NotGreaterFullEqual ngE ngeqq≨lnE lneqq≨︀lvertneqq lvnE≩gnE gneqq≩︀gvertneqq gvnE≪Lt NestedLessLess ll≪̸NotLessLess nLtv≪⃒nLt≫Gt NestedGreaterGreater gg≫̸NotGreaterGreater nGtv≫⃒nGt≬between twixt≭NotCupCap≮NotLess nless nlt≯NotGreater ngt ngtr≰NotLessEqual nle nleq≱NotGreaterEqual nge ngeq≲LessTilde lesssim lsim≳GreaterTilde gsim gtrsim≴NotLessTilde nlsim≵NotGreaterTilde ngsim≶LessGreater lessgtr lg≷GreaterLess gl gtrless≸NotLessGreater ntlg≹NotGreaterLess ntgl≺Precedes pr prec≻Succeeds sc succ≼PrecedesSlantEqual prcue preccurlyeq≽SucceedsSlantEqual sccue succcurlyeq≾PrecedesTilde precsim prsim≿SucceedsTilde scsim succsim≿̸NotSucceedsTilde⊀NotPrecedes npr nprec⊁NotSucceeds nsc nsucc⊂sub subset⊂⃒NotSubset nsubset vnsub⊃Superset sup supset⊃⃒NotSuperset nsupset vnsup⊄nsub⊅nsup⊆SubsetEqual sube subseteq⊇SupersetEqual supe supseteq⊈NotSubsetEqual nsube nsubseteq⊉NotSupersetEqual nsupe nsupseteq⊊subne subsetneq⊊︀varsubsetneq vsubne⊋supne supsetneq⊋︀varsupsetneq vsupne⊍cupdot⊎UnionPlus uplus⊏SquareSubset sqsub sqsubset⊏̸NotSquareSubset⊐SquareSuperset sqsup sqsupset⊐̸NotSquareSuperset⊑SquareSubsetEqual sqsube sqsubseteq⊒SquareSupersetEqual sqsupe sqsupseteq⊓SquareIntersection sqcap⊓︀sqcaps⊔SquareUnion sqcup⊔︀sqcups⊕CirclePlus oplus⊖CircleMinus ominus⊗CircleTimes otimes⊘osol⊙CircleDot odot⊚circledcirc ocir⊛circledast oast⊝circleddash odash⊞boxplus plusb⊟boxminus minusb⊠boxtimes timesb⊡dotsquare sdotb⊢RightTee vdash⊣LeftTee dashv⊤DownTee top⊥UpTee bot bottom perp⊧models⊨DoubleRightTee vDash⊩Vdash⊪Vvdash⊫VDash⊬nvdash⊭nvDash⊮nVdash⊯nVDash⊰prurel⊲LeftTriangle vartriangleleft vltri⊳RightTriangle vartriangleright vrtri⊴LeftTriangleEqual ltrie trianglelefteq⊴⃒nvltrie⊵RightTriangleEqual rtrie trianglerighteq⊵⃒nvrtrie⊶origof⊷imof⊸multimap mumap⊹hercon⊺intcal intercal⊻veebar⊽barvee⊾angrtvb⊿lrtri⋀Wedge bigwedge xwedge⋁Vee bigvee xvee⋂Intersection bigcap xcap⋃Union bigcup xcup⋄Diamond diam diamond⋅sdot⋆Star sstarf⋇divideontimes divonx⋈bowtie⋉ltimes⋊rtimes⋋leftthreetimes lthree⋌rightthreetimes rthree⋍backsimeq bsime⋎curlyvee cuvee⋏curlywedge cuwed⋐Sub Subset⋑Sup Supset⋒Cap⋓Cup⋔fork pitchfork⋕epar⋖lessdot ltdot⋗gtdot gtrdot⋘Ll⋘̸nLl⋙Gg ggg⋙̸nGg⋚LessEqualGreater leg lesseqgtr⋚︀lesg⋛GreaterEqualLess gel gtreqless⋛︀gesl⋞cuepr curlyeqprec⋟cuesc curlyeqsucc⋠NotPrecedesSlantEqual nprcue⋡NotSucceedsSlantEqual nsccue⋢NotSquareSubsetEqual nsqsube⋣NotSquareSupersetEqual nsqsupe⋦lnsim⋧gnsim⋨precnsim prnsim⋩scnsim succnsim⋪NotLeftTriangle nltri ntriangleleft⋫NotRightTriangle nrtri ntriangleright⋬NotLeftTriangleEqual nltrie ntrianglelefteq⋭NotRightTriangleEqual nrtrie ntrianglerighteq⋮vellip⋯ctdot⋰utdot⋱dtdot⋲disin⋳isinsv⋴isins⋵isindot⋵̸notindot⋶notinvc⋷notinvb⋹isinE⋹̸notinE⋺nisd⋻xnis⋼nis⋽notnivc⋾notnivb⌅barwed barwedge⌆Barwed doublebarwedge⌈LeftCeiling lceil⌉RightCeiling rceil⌊LeftFloor lfloor⌋RightFloor rfloor⌌drcrop⌍dlcrop⌎urcrop⌏ulcrop⌐bnot⌒profline⌓profsurf⌕telrec⌖target⌜ulcorn ulcorner⌝urcorn urcorner⌞dlcorn llcorner⌟drcorn lrcorner⌢frown sfrown⌣smile ssmile⌭cylcty⌮profalar⌶topbot⌽ovbar⌿solbar⍼angzarr⎰lmoust lmoustache⎱rmoust rmoustache⎴OverBracket tbrk⎵UnderBracket bbrk⎶bbrktbrk⏜OverParenthesis⏝UnderParenthesis⏞OverBrace⏟UnderBrace⏢trpezium⏧elinters␣blankⓈcircledS oS─HorizontalLine boxh│boxv┌boxdr┐boxdl└boxur┘boxul├boxvr┤boxvl┬boxhd┴boxhu┼boxvh═boxH║boxV╒boxdR╓boxDr╔boxDR╕boxdL╖boxDl╗boxDL╘boxuR╙boxUr╚boxUR╛boxuL╜boxUl╝boxUL╞boxvR╟boxVr╠boxVR╡boxvL╢boxVl╣boxVL╤boxHd╥boxhD╦boxHD╧boxHu╨boxhU╩boxHU╪boxvH╫boxVh╬boxVH▀uhblk▄lhblk█block░blk14▒blk12▓blk34□Square squ square▪FilledVerySmallSquare blacksquare squarf squf▫EmptyVerySmallSquare▭rect▮marker▱fltns△bigtriangleup xutri▴blacktriangle utrif▵triangle utri▸blacktriangleright rtrif▹rtri triangleright▽bigtriangledown xdtri▾blacktriangledown dtrif▿dtri triangledown◂blacktriangleleft ltrif◃ltri triangleleft◊loz lozenge○cir◬tridot◯bigcirc xcirc◸ultri◹urtri◺lltri◻EmptySmallSquare◼FilledSmallSquare★bigstar starf☆star☎phone♀female♂male♠spades spadesuit♣clubs clubsuit♥hearts heartsuit♦diamondsuit diams♪sung♭flat♮natur natural♯sharp✓check checkmark✗cross✠malt maltese✶sext❘VerticalSeparator❲lbbrk❳rbbrk⟈bsolhsub⟉suphsol⟦LeftDoubleBracket lobrk⟧RightDoubleBracket robrk⟨LeftAngleBracket lang langle⟩RightAngleBracket rang rangle⟪Lang⟫Rang⟬loang⟭roang⟵LongLeftArrow longleftarrow xlarr⟶LongRightArrow longrightarrow xrarr⟷LongLeftRightArrow longleftrightarrow xharr⟸DoubleLongLeftArrow Longleftarrow xlArr⟹DoubleLongRightArrow Longrightarrow xrArr⟺DoubleLongLeftRightArrow Longleftrightarrow xhArr⟼longmapsto xmap⟿dzigrarr⤂nvlArr⤃nvrArr⤄nvHarr⤅Map⤌lbarr⤍bkarow rbarr⤎lBarr⤏dbkarow rBarr⤐RBarr drbkarow⤑DDotrahd⤒UpArrowBar⤓DownArrowBar⤖Rarrtl⤙latail⤚ratail⤛lAtail⤜rAtail⤝larrfs⤞rarrfs⤟larrbfs⤠rarrbfs⤣nwarhk⤤nearhk⤥hksearow searhk⤦hkswarow swarhk⤧nwnear⤨nesear toea⤩seswar tosa⤪swnwar⤳rarrc⤳̸nrarrc⤵cudarrr⤶ldca⤷rdca⤸cudarrl⤹larrpl⤼curarrm⤽cularrp⥅rarrpl⥈harrcir⥉Uarrocir⥊lurdshar⥋ldrushar⥎LeftRightVector⥏RightUpDownVector⥐DownLeftRightVector⥑LeftUpDownVector⥒LeftVectorBar⥓RightVectorBar⥔RightUpVectorBar⥕RightDownVectorBar⥖DownLeftVectorBar⥗DownRightVectorBar⥘LeftUpVectorBar⥙LeftDownVectorBar⥚LeftTeeVector⥛RightTeeVector⥜RightUpTeeVector⥝RightDownTeeVector⥞DownLeftTeeVector⥟DownRightTeeVector⥠LeftUpTeeVector⥡LeftDownTeeVector⥢lHar⥣uHar⥤rHar⥥dHar⥦luruhar⥧ldrdhar⥨ruluhar⥩rdldhar⥪lharul⥫llhard⥬rharul⥭lrhard⥮UpEquilibrium udhar⥯ReverseUpEquilibrium duhar⥰RoundImplies⥱erarr⥲simrarr⥳larrsim⥴rarrsim⥵rarrap⥶ltlarr⥸gtrarr⥹subrarr⥻suplarr⥼lfisht⥽rfisht⥾ufisht⥿dfisht⦅lopar⦆ropar⦋lbrke⦌rbrke⦍lbrkslu⦎rbrksld⦏lbrksld⦐rbrkslu⦑langd⦒rangd⦓lparlt⦔rpargt⦕gtlPar⦖ltrPar⦚vzigzag⦜vangrt⦝angrtvbd⦤ange⦥range⦦dwangle⦧uwangle⦨angmsdaa⦩angmsdab⦪angmsdac⦫angmsdad⦬angmsdae⦭angmsdaf⦮angmsdag⦯angmsdah⦰bemptyv⦱demptyv⦲cemptyv⦳raemptyv⦴laemptyv⦵ohbar⦶omid⦷opar⦹operp⦻olcross⦼odsold⦾olcir⦿ofcir⧀olt⧁ogt⧂cirscir⧃cirE⧄solb⧅bsolb⧉boxbox⧍trisb⧎rtriltri⧏LeftTriangleBar⧏̸NotLeftTriangleBar⧐RightTriangleBar⧐̸NotRightTriangleBar⧜iinfin⧝infintie⧞nvinfin⧣eparsl⧤smeparsl⧥eqvparsl⧫blacklozenge lozf⧴RuleDelayed⧶dsol⨀bigodot xodot⨁bigoplus xoplus⨂bigotimes xotime⨄biguplus xuplus⨆bigsqcup xsqcup⨌iiiint qint⨍fpartint⨐cirfnint⨑awint⨒rppolint⨓scpolint⨔npolint⨕pointint⨖quatint⨗intlarhk⨢pluscir⨣plusacir⨤simplus⨥plusdu⨦plussim⨧plustwo⨩mcomma⨪minusdu⨭loplus⨮roplus⨯Cross⨰timesd⨱timesbar⨳smashp⨴lotimes⨵rotimes⨶otimesas⨷Otimes⨸odiv⨹triplus⨺triminus⨻tritime⨼intprod iprod⨿amalg⩀capdot⩂ncup⩃ncap⩄capand⩅cupor⩆cupcap⩇capcup⩈cupbrcap⩉capbrcup⩊cupcup⩋capcap⩌ccups⩍ccaps⩐ccupssm⩓And⩔Or⩕andand⩖oror⩗orslope⩘andslope⩚andv⩛orv⩜andd⩝ord⩟wedbar⩦sdote⩪simdot⩭congdot⩭̸ncongdot⩮easter⩯apacir⩰apE⩰̸napE⩱eplus⩲pluse⩳Esim⩴Colone⩵Equal⩷ddotseq eDDot⩸equivDD⩹ltcir⩺gtcir⩻ltquest⩼gtquest⩽LessSlantEqual leqslant les⩽̸NotLessSlantEqual nleqslant nles⩾GreaterSlantEqual geqslant ges⩾̸NotGreaterSlantEqual ngeqslant nges⩿lesdot⪀gesdot⪁lesdoto⪂gesdoto⪃lesdotor⪄gesdotol⪅lap lessapprox⪆gap gtrapprox⪇lne lneq⪈gne gneq⪉lnap lnapprox⪊gnap gnapprox⪋lEg lesseqqgtr⪌gEl gtreqqless⪍lsime⪎gsime⪏lsimg⪐gsiml⪑lgE⪒glE⪓lesges⪔gesles⪕els eqslantless⪖egs eqslantgtr⪗elsdot⪘egsdot⪙el⪚eg⪝siml⪞simg⪟simlE⪠simgE⪡LessLess⪡̸NotNestedLessLess⪢GreaterGreater⪢̸NotNestedGreaterGreater⪤glj⪥gla⪦ltcc⪧gtcc⪨lescc⪩gescc⪪smt⪫lat⪬smte⪬︀smtes⪭late⪭︀lates⪮bumpE⪯PrecedesEqual pre preceq⪯̸NotPrecedesEqual npre npreceq⪰SucceedsEqual sce succeq⪰̸NotSucceedsEqual nsce nsucceq⪳prE⪴scE⪵precneqq prnE⪶scnE succneqq⪷prap precapprox⪸scap succapprox⪹precnapprox prnap⪺scnap succnapprox⪻Pr⪼Sc⪽subdot⪾supdot⪿subplus⫀supplus⫁submult⫂supmult⫃subedot⫄supedot⫅subE subseteqq⫅̸nsubE nsubseteqq⫆supE supseteqq⫆̸nsupE nsupseteqq⫇subsim⫈supsim⫋subnE subsetneqq⫋︀varsubsetneqq vsubnE⫌supnE supsetneqq⫌︀varsupsetneqq vsupnE⫏csub⫐csup⫑csube⫒csupe⫓subsup⫔supsub⫕subsub⫖supsup⫗suphsub⫘supdsub⫙forkv⫚topfork⫛mlcp⫤Dashv DoubleLeftTee⫦Vdashl⫧Barv⫨vBar⫩vBarv⫫Vbar⫬Not⫭bNot⫮rnmid⫯cirmid⫰midcir⫱topcir⫲nhpar⫳parsim⫽parsl⫽⃥nparsl𝒜Ascr𝒞Cscr𝒟Dscr𝒢Gscr𝒥Jscr𝒦Kscr𝒩Nscr𝒪Oscr𝒫Pscr𝒬Qscr𝒮Sscr𝒯Tscr𝒰Uscr𝒱Vscr𝒲Wscr𝒳Xscr𝒴Yscr𝒵Zscr𝒶ascr𝒷bscr𝒸cscr𝒹dscr𝒻fscr𝒽hscr𝒾iscr𝒿jscr𝓀kscr𝓁lscr𝓂mscr𝓃nscr𝓅pscr𝓆qscr𝓇rscr𝓈sscr𝓉tscr𝓊uscr𝓋vscr𝓌wscr𝓍xscr𝓎yscr𝓏zscr𝔄Afr𝔅Bfr𝔇Dfr𝔈Efr𝔉Ffr𝔊Gfr𝔍Jfr𝔎Kfr𝔏Lfr𝔐Mfr𝔑Nfr𝔒Ofr𝔓Pfr𝔔Qfr𝔖Sfr𝔗Tfr𝔘Ufr𝔙Vfr𝔚Wfr𝔛Xfr𝔜Yfr𝔞afr𝔟bfr𝔠cfr𝔡dfr𝔢efr𝔣ffr𝔤gfr𝔥hfr𝔦ifr𝔧jfr𝔨kfr𝔩lfr𝔪mfr𝔫nfr𝔬ofr𝔭pfr𝔮qfr𝔯rfr𝔰sfr𝔱tfr𝔲ufr𝔳vfr𝔴wfr𝔵xfr𝔶yfr𝔷zfr𝔸Aopf𝔹Bopf𝔻Dopf𝔼Eopf𝔽Fopf𝔾Gopf𝕀Iopf𝕁Jopf𝕂Kopf𝕃Lopf𝕄Mopf𝕆Oopf𝕊Sopf𝕋Topf𝕌Uopf𝕍Vopf𝕎Wopf𝕏Xopf𝕐Yopf𝕒aopf𝕓bopf𝕔copf𝕕dopf𝕖eopf𝕗fopf𝕘gopf𝕙hopf𝕚iopf𝕛jopf𝕜kopf𝕝lopf𝕞mopf𝕟nopf𝕠oopf𝕡popf𝕢qopf𝕣ropf𝕤sopf𝕥topf𝕦uopf𝕧vopf𝕨wopf𝕩xopf𝕪yopf𝕫zopfffffligfifiligflflligffiffiligfflffllig";for(;t=r.exec(n);)t[1]?e=t[1]:j.set(t[0],e)}function U(e){return e.replace(/&(?:#(?:[xX]([\dA-Fa-f]+)|(\d+))|([A-Za-z\d]+));/g,(e,t,r,n)=>{return n?j.has(n)?j.get(n):e:String.fromCodePoint(function(e){return 0===e||e>=55296&&e<=57343||e>1114111}(s=t?parseInt(t,16):+r)?65533:s>=128&&s<=159&&R[s-128]||s);var s})}function V(e){const t=function(...r){const n=new.target&&new.target!==t?new.target:e;return Reflect.construct(e,r,n)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Z(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function H(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||!(65535&~e&&65534!=(65535&e))||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function G(e){if(e>65535){const t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(N=M||(M={}))[N.XML=0]="XML",N[N.HTML=1]="HTML",(P=O||(O={}))[P.UTF8=0]="UTF8",P[P.ASCII=1]="ASCII",P[P.Extensive=2]="Extensive",P[P.Attribute=3]="Attribute",P[P.Text=4]="Text";var W=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,J=new RegExp(`${W.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Q=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Y(e){return e.indexOf("\\")<0?e:e.replace(W,"$1")}function K(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(J,function(e,t,r){return t||function(e,t){if(35===t.charCodeAt(0)&&Q.test(t)){const r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return H(r)?G(r):e}const r=U(e);return r!==e?r:e}(e,r)})}var X=/[&<>"]/,ee=/[&<>"]/g,te={"&":"&","<":"<",">":">",'"':"""};function re(e){return te[e]}function ne(e){return X.test(e)?e.replace(ee,re):e}var se=/[.?*+^$[\]\\(){}|-]/g;function oe(e){return e.replace(se,"\\$&")}function ie(e){switch(e){case 9:case 32:return!0}return!1}function ae(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ue(e){return B.test(e)||z.test(e)}function ce(e){return ue(G(e))}function le(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function he(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}function pe(e){return 32===e||9===e||10===e||13===e}function fe(e){let t=0;for(;t<e.length&&pe(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&pe(e.charCodeAt(r));r--);return e.slice(t,r+1)}var de={mdurl:c,ucmicro:S},ge={};function me(e,t,r){let n,s,o,i;const a=e.posMax,u=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),93===o&&(n--,0===n)){s=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)n++;else if(r)return e.pos=u,-1}let c=-1;return s&&(c=e.pos),e.pos=u,c}function _e(e,t,r){let n,s=t;const o={ok:!1,pos:0,str:""};if(60===e.charCodeAt(s)){for(s++;s<r;){if(n=e.charCodeAt(s),10===n)return o;if(60===n)return o;if(62===n)return o.pos=s+1,o.str=K(e.slice(t+1,s)),o.ok=!0,o;92===n&&s+1<r?s+=2:s++}return o}let i=0;for(;s<r&&(n=e.charCodeAt(s),32!==n)&&!(n<32||127===n);)if(92===n&&s+1<r){if(32===e.charCodeAt(s+1)){s++;continue}s+=2}else{if(40===n&&(i++,i>32))return o;if(41===n){if(0===i)break;i--}s++}return t===s||0!==i||(o.str=K(e.slice(t,s)),o.pos=s,o.ok=!0),o}function ke(e,t,r,n){let s,o=t;const i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)i.str=n.str,i.marker=n.marker;else{if(o>=r)return i;let n=e.charCodeAt(o);if(34!==n&&39!==n&&40!==n)return i;t++,o++,40===n&&(n=41),i.marker=n}for(;o<r;){if(s=e.charCodeAt(o),s===i.marker)return i.pos=o+1,i.str+=K(e.slice(t,o)),i.ok=!0,i;if(40===s&&41===i.marker)return i;92===s&&o+1<r&&o++,o++}return i.can_continue=!0,i.str+=K(e.slice(t,o)),i}i(ge,{parseLinkDestination:()=>_e,parseLinkLabel:()=>me,parseLinkTitle:()=>ke});var De=class{map=null;level=0;children=null;content="";markup="";info="";block=!1;hidden=!1;constructor(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.nesting=r,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let r=0,n=t.length;r<n;r++)if(t[r][0]===e)return r;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n}attrGet(e){const t=this.attrIndex(e);let r=null;return t>=0&&(r=this.attrs[t][1]),r}attrJoin(e,t){const r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=`${this.attrs[r][1]} ${t}`}},be=class{__rules__=[];__cache__=null;__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){const e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(t=>{t&&e.add(t)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(e=>{e.enabled&&this.__cache__[""].push(e.fn)}),e.forEach(e=>{this.__cache__[e]=[],this.__rules__.forEach(t=>{t.enabled&&t.alt.indexOf(e)>=0&&this.__cache__[e].push(t.fn)})})}at(e,t,r={}){const n=this.__find__(e);if(-1===n)throw new Error(`Parser rule not found: ${e}`);this.__rules__[n].fn=t,this.__rules__[n].alt=r.alt||[],this.__cache__=null}before(e,t,r,n={}){const s=this.__find__(e);if(-1===s)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:r,alt:n.alt||[]}),this.__cache__=null}after(e,t,r,n={}){const s=this.__find__(e);if(-1===s)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:r,alt:n.alt||[]}),this.__cache__=null}push(e,t,r={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(e=>{const n=this.__find__(e);if(n<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[n].enabled=!0,r.push(e)}),this.__cache__=null,r}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(e=>{e.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(e=>{const n=this.__find__(e);if(n<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${e}`)}this.__rules__[n].enabled=!1,r.push(e)}),this.__cache__=null,r}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},Ce={code_inline:function(e,t,r,n,s){const o=e[t];return`<code${s.renderAttrs(o)}>${ne(o.content)}</code>`},code_block:function(e,t,r,n,s){const o=e[t];return`<pre${s.renderAttrs(o)}><code>${ne(e[t].content)}</code></pre>\n`},fence:function(e,t,r,n,s){const o=e[t],i=o.info?K(o.info).trim():"";let a,u="",c="";if(i){const e=i.split(/(\s+)/g);u=e[0],c=e.slice(2).join("")}if(a=r.highlight&&r.highlight(o.content,u,c)||ne(o.content),0===a.indexOf("<pre"))return a+"\n";if(i){const e=o.attrIndex("class"),t=o.attrs?o.attrs.slice():[];e<0?t.push(["class",`${r.langPrefix}${u}`]):(t[e]=[t[e][0],t[e][1]],t[e][1]+=` ${r.langPrefix}${u}`);const n={attrs:t};return`<pre><code${s.renderAttrs(n)}>${a}</code></pre>\n`}return`<pre><code${s.renderAttrs(o)}>${a}</code></pre>\n`},image:function(e,t,r,n,s){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,r,n),s.renderToken(e,t,r)},hardbreak:function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},softbreak:function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},text:function(e,t){return ne(e[t].content)},html_block:function(e,t){return e[t].content},html_inline:function(e,t){return e[t].content}},xe=class{rules=Object.assign({},Ce);renderAttrs(e){let t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t<r;t++)n+=` ${ne(e.attrs[t][0])}="${ne(String(e.attrs[t][1]))}"`;return n}renderToken(e,t,r){const n=e[t];let s="";if(n.hidden)return"";let o=t-1;for(;o>=0&&e[o].hidden&&0===e[o].nesting;)o--;n.block&&-1!==n.nesting&&o>=0&&e[o].hidden&&-1===e[o].nesting&&(s+="\n"),s+=(-1===n.nesting?"</":"<")+n.tag,s+=this.renderAttrs(n),0===n.nesting&&r.xhtmlOut&&(s+=" /");let i=!1;if(n.block&&(i=!0,1===n.nesting)){let r=t+1;for(;r<e.length&&e[r].hidden&&0===e[r].nesting;)r++;if(r<e.length){const t=e[r];("inline"===t.type||t.hidden||-1===t.nesting&&t.tag===n.tag)&&(i=!1)}}return s+=i?">\n":">",s}renderInline(e,t,r){let n="";const s=this.rules;for(let o=0,i=e.length;o<i;o++){const i=e[o].type;void 0!==s[i]?n+=s[i](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n}renderInlineAsText(e,t,r){let n="";for(let s=0,o=e.length;s<o;s++)switch(e[s].type){case"text":case"code_inline":case"html_inline":case"html_block":n+=e[s].content;break;case"image":n+=this.renderInlineAsText(e[s].children,t,r);break;case"softbreak":case"hardbreak":n+="\n"}return n}render(e,t,r){let n="";const s=this.rules;for(let o=0,i=e.length;o<i;o++){const i=e[o].type;"inline"===i?n+=this.renderInline(e[o].children,t,r):void 0!==s[i]?n+=s[i](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n}},Ae=class{tokens=[];inlineMode=!1;Token=De;constructor(e,t,r){this.src=e,this.env=r,this.md=t}},Fe=/\r\n?/g,Ee=/\0/g;function we(e){return/^<a[>\s]/i.test(e)}function ye(e){return/^<\/a\s*>/i.test(e)}var ve=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,qe=/\((c|tm|r)\)/i,Se=/\((c|tm|r)\)/gi,$e={c:"©",r:"®",tm:"™"};function Le(e,t){return $e[t.toLowerCase()]}function Ie(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];"text"!==n.type||t||(n.content=n.content.replace(Se,Le)),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}function Be(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];"text"!==n.type||t||ve.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}var ze=/['"]/,Te=/['"]/g;function Re(e,t,r){for(;e.length>r;){const r=e.pop();r.isSingleQuote?t.single=r.prevSameQuoteIdx:t.double=r.prevSameQuoteIdx}}function Me(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function Ne(e,t){let r;const n=[],s={single:-1,double:-1},o={};for(let i=0;i<e.length;i++){const a=e[i],u=e[i].level;for(r=n.length-1;r>=0&&!(n[r].level<=u);r--);if(Re(n,s,r+1),"text"!==a.type)continue;const c=a.content;let l=0;const h=c.length;e:for(;l<h;){Te.lastIndex=l;const a=Te.exec(c);if(!a)break;let p=!0,f=!0;l=a.index+1;const d="'"===a[0];let g=32;if(a.index-1>=0)g=c.charCodeAt(a.index-1);else for(r=i-1;r>=0&&"softbreak"!==e[r].type&&"hardbreak"!==e[r].type;r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let m=32;if(l<h)m=c.charCodeAt(l);else for(r=i+1;r<e.length&&"softbreak"!==e[r].type&&"hardbreak"!==e[r].type;r++)if(e[r].content){m=e[r].content.charCodeAt(0);break}const _=le(g)||ce(g),k=le(m)||ce(m),D=ae(g),b=ae(m);if(b?p=!1:k&&(D||_||(p=!1)),D?f=!1:_&&(b||k||(f=!1)),34===m&&'"'===a[0]&&g>=48&&g<=57&&(f=p=!1),p&&f&&(p=_,f=k),p||f){if(f&&(r=d?s.single:s.double,r>=0&&n[r].level===u)){const e=n[r];let u,c;d?(u=t.md.options.quotes[2],c=t.md.options.quotes[3]):(u=t.md.options.quotes[0],c=t.md.options.quotes[1]),Me(o,i,a.index,c),Me(o,e.tokenIdx,e.contentPos,u),Re(n,s,r);continue e}if(p){if(n.length>=1e3)return;n.push({tokenIdx:i,contentPos:a.index,isSingleQuote:d,level:u,prevSameQuoteIdx:d?s.single:s.double}),d?s.single=n.length-1:s.double=n.length-1}else f&&d&&Me(o,i,a.index,"’")}else d&&Me(o,i,a.index,"’")}}Object.keys(o).forEach(function(t){const r=Number(t);e[r].content=function(e,t){let r="",n=0;t.sort((e,t)=>e.pos-t.pos);for(let s=0;s<t.length;s++){const o=t[s];r+=e.slice(n,o.pos)+o.ch,n=o.pos+1}return r+e.slice(n)}(e[r].content,o[t])})}function Oe(e){let t,r;const n=e.length;for(t=0;t<n;t++)"text_special"===e[t].type&&(e[t].type="text");for(t=r=0;t<n;t++)"text"===e[t].type&&t+1<n&&"text"===e[t+1].type?e[t+1].content=e[t].content+e[t+1].content:(t!==r&&(e[r]=e[t]),r++);t!==r&&(e.length=r)}var Pe=[["normalize",function(e){let t;t=e.src.replace(Fe,"\n"),t=t.replace(Ee,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["strip_references",function(e){const t=e.tokens;let r=0;for(let e=0;e<t.length;e++)"reference_definition"!==t[e].type&&(e!==r&&(t[r]=t[e]),r++);t.length!==r&&(t.length=r)}],["inline",function(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const n=t[r];"inline"===n.type&&e.md.inline.parse(n.content,e.md,e.env,n.children)}}],["linkify",function(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if("inline"!==t[r].type||!e.md.linkify.test(t[r].content))continue;const n=t[r].children,s=[];let o=0;for(let t=n.length-1;t>=0;t--){const r=n[t];if("link_close"!==r.type){if("html_inline"===r.type&&(we(r.content)&&o>0&&o--,ye(r.content)&&o++),!(o>0)&&"text"===r.type&&e.md.linkify.test(r.content)){const o=r.content;let i=e.md.linkify.match(o);const a=[];let u=r.level,c=0;i.length>0&&0===i[0].index&&t>0&&"text_special"===n[t-1].type&&(i=i.slice(1));for(let t=0;t<i.length;t++){const r=i[t].url,n=e.md.normalizeLink(r);if(!e.md.validateLink(n))continue;let s=i[t].text;s=i[t].schema?"mailto:"!==i[t].schema||/^mailto:/i.test(s)?e.md.normalizeLinkText(s):e.md.normalizeLinkText(`mailto:${s}`).replace(/^mailto:/,""):e.md.normalizeLinkText(`http://${s}`).replace(/^http:\/\//,"");const l=i[t].index;if(l>c){const t=new e.Token("text","",0);t.content=o.slice(c,l),t.level=u,a.push(t)}const h=new e.Token("link_open","a",1);h.attrs=[["href",n]],h.level=u++,h.markup="linkify",h.info="auto",a.push(h);const p=new e.Token("text","",0);p.content=s,p.level=u,a.push(p);const f=new e.Token("link_close","a",-1);f.level=--u,f.markup="linkify",f.info="auto",a.push(f),c=i[t].lastIndex}if(c<o.length){const t=new e.Token("text","",0);t.content=o.slice(c),t.level=u,a.push(t)}s.push({index:t,nodes:a})}}else for(t--;n[t].level!==r.level&&"link_open"!==n[t].type;)t--}if(s.length>0){let e=n.length;for(const t of s)e+=t.nodes.length-1;const o=new Array(e);let i=0,a=0;s.reverse();for(let e=0;e<n.length;e++){const t=s[i];if(t?.index===e){for(const e of t.nodes)o[a++]=e;i++}else o[a++]=n[e]}t[r].children=o}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(qe.test(e.tokens[t].content)&&Ie(e.tokens[t].children),ve.test(e.tokens[t].content)&&Be(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&ze.test(e.tokens[t].content)&&Ne(e.tokens[t].children,e)}],["text_join",function(e){let t,r;const n=e.tokens,s=n.length;for(let e=0;e<s;e++){if("inline"!==n[e].type)continue;const s=n[e].children,o=s.length;for(t=0;t<o;t++)"text_special"===s[t].type&&(s[t].type="text"),s[t].children&&Oe(s[t].children);for(t=r=0;t<o;t++)"text"===s[t].type&&t+1<o&&"text"===s[t+1].type?s[t+1].content=s[t].content+s[t+1].content:(t!==r&&(s[r]=s[t]),r++);t!==r&&(s.length=r)}}]],je=class{ruler=new be;State=Ae;constructor(){for(let e=0;e<Pe.length;e++)this.ruler.push(Pe[e][0],Pe[e][1])}process(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)}},Ue=class{bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];blkIndent=0;line=0;lineMax=0;tight=!1;listIndent=-1;parentType="root";level=0;Token=De;constructor(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n;const s=this.src;for(let e=0,t=0,r=0,n=0,o=s.length,i=!1;t<o;t++){const a=s.charCodeAt(t);if(!i){if(ie(a)){r++,9===a?n+=4-n%4:n++;continue}i=!0}10!==a&&t!==o-1||(10!==a&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(r),this.sCount.push(n),this.bsCount.push(0),i=!1,r=0,n=0,e=t+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,r){const n=new De(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&ie(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!ie(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,r,n){if(e>=t)return"";const s=new Array(t-e);for(let o=0,i=e;i<t;i++,o++){let e=0;const a=this.bMarks[i];let u,c=a;for(u=i+1<t||n?this.eMarks[i]+1:this.eMarks[i];c<u&&e<r;){const t=this.src.charCodeAt(c);if(ie(t))9===t?e+=4-(e+this.bsCount[i])%4:e++;else{if(!(c-a<this.tShift[i]))break;e++}c++}s[o]=e>r?new Array(e-r+1).join(" ")+this.src.slice(c,u):this.src.slice(c,u)}return s.join("")}};function Ve(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function Ze(e){const t=[],r=e.length;let n=0,s=e.charCodeAt(n),o=!1,i=0,a="";for(;n<r;)124===s&&(o?(a+=e.substring(i,n-1),i=n):(t.push(a+e.substring(i,n)),a="",i=n+1)),o=92===s,n++,s=e.charCodeAt(n);return t.push(a+e.substring(i)),t}function He(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(n++);return 42!==s&&45!==s&&43!==s||n<r&&!ie(e.src.charCodeAt(n))?-1:n}function Ge(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let s=r;if(s+1>=n)return-1;let o=e.src.charCodeAt(s++);if(o<48||o>57)return-1;for(;;){if(s>=n)return-1;if(o=e.src.charCodeAt(s++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(s-r>=10)return-1}return s<n&&(o=e.src.charCodeAt(s),!ie(o))?-1:s}function We(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function Je(e,t){const r=e.lineMax;if(t>=r||e.isEmpty(t))return-1;let n=!1;if(e.sCount[t]-e.blkIndent>3&&(n=!0),e.sCount[t]<0&&(n=!0),!n){const n=e.md.block.ruler.getRules("reference"),s=e.parentType;e.parentType="reference";let o=!1;for(let s=0,i=n.length;s<i;s++)if(n[s](e,t,r,!0)){o=!0;break}if(e.parentType=s,o)return-1}return e.bMarks[t]+e.tShift[t]}var Qe="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Ye="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ke=(new RegExp(`^(?:${Qe}|${Ye}|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),new RegExp(`^(?:${Qe}|${Ye})`)),Xe=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${["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"].join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Ke.source}\\s*$`),/^$/,!1]],et=[["table",function(e,t,r,n){if(t+2>r)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent)return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const i=e.src.charCodeAt(o++);if(124!==i&&45!==i&&58!==i)return!1;if(o>=e.eMarks[s])return!1;const a=e.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a&&!ie(a))return!1;if(45===i&&ie(a))return!1;for(;o<e.eMarks[s];){const t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!ie(t))return!1;o++}let u=Ve(e,t+1),c=u.split("|");const l=[];for(let e=0;e<c.length;e++){const t=c[e].trim();if(!t){if(0===e||e===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?l.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?l.push("left"):l.push("")}if(u=Ve(e,t).trim(),-1===u.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;c=Ze(u),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const h=c.length;if(0===h||h!==l.length)return!1;if(n)return!0;const p=e.parentType;e.parentType="table";const f=e.md.block.ruler.getRules("blockquote"),d=[t,0];e.push("table_open","table",1).map=d,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<c.length;t++){const r=e.push("th_open","th",1);l[t]&&(r.attrs=[["style",`text-align:${l[t]}`]]);const n=e.push("inline","",0);n.content=c[t].trim(),n.children=[],e.push("th_close","th",-1)}let g;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let m=0;for(s=t+2;s<r&&!(e.sCount[s]<e.blkIndent);s++){let n=!1;for(let t=0,o=f.length;t<o;t++)if(f[t](e,s,r,!0)){n=!0;break}if(n)break;if(u=Ve(e,s).trim(),!u)break;if(e.sCount[s]-e.blkIndent>=4)break;if(c=Ze(u),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),m+=h-c.length,m>65536)break;s===t+2&&(e.push("tbody_open","tbody",1).map=g=[t+2,0]),e.push("tr_open","tr",1).map=[s,s+1];for(let t=0;t<h;t++){const r=e.push("td_open","td",1);l[t]&&(r.attrs=[["style",`text-align:${l[t]}`]]);const n=e.push("inline","",0);n.content=c[t]?c[t].trim():"",n.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return g&&(e.push("tbody_close","tbody",-1),g[1]=s),e.push("table_close","table",-1),d[1]=s,e.parentType=p,e.line=s,!0},["paragraph","reference"]],["code",function(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,s=n;for(;n<r;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}e.line=s;const o=e.push("code_block","code",0);return o.content=e.getLines(t,s,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}],["fence",function(e,t,r,n){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>o)return!1;const i=e.src.charCodeAt(s);if(126!==i&&96!==i)return!1;let a=s;s=e.skipChars(s,i);let u=s-a;if(u<3)return!1;const c=e.src.slice(a,s),l=e.src.slice(s,o);if(96===i&&l.indexOf(String.fromCharCode(i))>=0)return!1;if(n)return!0;let h=t,p=!1;for(;!(h++,h>=r||(s=a=e.bMarks[h]+e.tShift[h],o=e.eMarks[h],s<o&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(s)===i&&!(e.sCount[h]-e.blkIndent>=4||(s=e.skipChars(s,i),s-a<u||(s=e.skipSpaces(s),s<o)))){p=!0;break}u=e.sCount[t],e.line=h+(p?1:0);const f=e.push("fence","code",0);return f.info=l,f.content=e.getLines(t+1,h,u,!0),f.markup=c,f.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,r,n){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(s))return!1;if(n)return!0;const a=[],u=[],c=[],l=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let f,d=!1;for(f=t;f<r;f++){const t=e.sCount[f]<e.blkIndent;if(s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],s>=o)break;if(62===e.src.charCodeAt(s++)&&!t){let t,r,n=e.sCount[f]+1;32===e.src.charCodeAt(s)?(s++,n++,r=!1,t=!0):9===e.src.charCodeAt(s)?(t=!0,(e.bsCount[f]+n)%4==3?(s++,n++,r=!1):r=!0):t=!1;let i=n;for(a.push(e.bMarks[f]),e.bMarks[f]=s;s<o;){const t=e.src.charCodeAt(s);if(!ie(t))break;9===t?i+=4-(i+e.bsCount[f]+(r?1:0))%4:i++,s++}d=s>=o,u.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(t?1:0),c.push(e.sCount[f]),e.sCount[f]=i-n,l.push(e.tShift[f]),e.tShift[f]=s-e.bMarks[f];continue}if(d)break;let n=!1;for(let t=0,s=h.length;t<s;t++)if(h[t](e,f,r,!0)){n=!0;break}if(n){e.lineMax=f,0!==e.blkIndent&&(a.push(e.bMarks[f]),u.push(e.bsCount[f]),l.push(e.tShift[f]),c.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}a.push(e.bMarks[f]),u.push(e.bsCount[f]),l.push(e.tShift[f]),c.push(e.sCount[f]),e.sCount[f]=-1}const g=e.blkIndent;e.blkIndent=0;const m=e.push("blockquote_open","blockquote",1);m.markup=">";const _=[t,0];m.map=_,e.md.block.tokenize(e,t,f),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=i,e.parentType=p,_[1]=e.line;for(let r=0;r<l.length;r++)e.bMarks[r+t]=a[r],e.tShift[r+t]=l[r],e.sCount[r+t]=c[r],e.bsCount[r+t]=u[r];return e.blkIndent=g,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,r,n){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(o++);if(42!==i&&45!==i&&95!==i)return!1;let a=1;for(;o<s;){const t=e.src.charCodeAt(o++);if(t!==i&&!ie(t))return!1;t===i&&a++}if(a<3)return!1;if(n)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(i)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,r,n){let s,o,i,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l,h,p,f=!1;if(n&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(f=!0),(p=Ge(e,u))>=0){if(l=!0,i=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(i,p-1)),f&&1!==h)return!1}else{if(!((p=He(e,u))>=0))return!1;l=!1}if(f&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(n)return!0;const d=e.src.charCodeAt(p-1),g=e.tokens.length;l?(a=e.push("ordered_list_open","ol",1),1!==h&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const m=[u,0];a.map=m,a.markup=String.fromCharCode(d);let _=!1;const k=e.md.block.ruler.getRules("list"),D=e.parentType;for(e.parentType="list";u<r;){o=p,s=e.eMarks[u];const t=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let n=t;for(;o<s;){const t=e.src.charCodeAt(o);if(9===t)n+=4-(n+e.bsCount[u])%4;else{if(32!==t)break;n++}o++}const h=o;let f;f=h>=s?1:n-t,f>4&&(f=1);const g=t+f;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(d);const m=[u,0];a.map=m,l&&(a.info=e.src.slice(i,p-1));const D=e.tight,b=e.tShift[u],C=e.sCount[u],x=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=g,e.tight=!0,e.tShift[u]=h-e.bMarks[u],e.sCount[u]=n,h>=s&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,u,r),e.tight&&!_||(c=!1),_=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=x,e.tShift[u]=b,e.sCount[u]=C,e.tight=D,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(d),u=e.line,m[1]=u,u>=r)break;if(e.sCount[u]<e.blkIndent)break;if(e.sCount[u]-e.blkIndent>=4)break;let A=!1;for(let t=0,n=k.length;t<n;t++)if(k[t](e,u,r,!0)){A=!0;break}if(A)break;if(l){if(p=Ge(e,u),p<0)break;i=e.bMarks[u]+e.tShift[u]}else if(p=He(e,u),p<0)break;if(d!==e.src.charCodeAt(p-1))break}return a=l?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(d),m[1]=u,e.line=u,e.parentType=D,c&&function(e,t){const r=e.level+2;for(let n=t+2,s=e.tokens.length-2;n<s;n++)e.tokens[n].level===r&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,r,n){const s=e.src;let o=e.bMarks[t]+e.tShift[t],i=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==s.charCodeAt(o))return!1;let a=We(e,t),u="",c=-1,l=++o;for(;o<a;){if(u.length+o-l>1998)return!1;let t=s.charCodeAt(o);if(91===t)return!1;if(93===t){c=o;break}if(92===t&&(t=s.charCodeAt(++o)),10===t&&o<a){const t=Je(e,i);if(t<0)return!1;u+=s.slice(l,a),o=l=t,a=We(e,i++);continue}o++}if(c<0||58!==s.charCodeAt(c+1))return!1;if(u+=s.slice(l,c),u.length>999&&function(e){let t=e.length;for(let r=0;r<e.length-1;r++){const n=e.charCodeAt(r);if(n<55296||n>56319)continue;const s=e.charCodeAt(r+1);s>=56320&&s<=57343&&(t--,r++)}return t}(u)>999)return!1;for(o=c+2;o<a;){const t=s.charCodeAt(o);if(10===t){const t=Je(e,i);if(t<0)break;o=t,a=We(e,i++)}else{if(!ie(t))break;o++}}const h=e.md.helpers.parseLinkDestination(s,o,a);if(!h.ok)return!1;const p=e.md.normalizeLink(h.str);if(!e.md.validateLink(p))return!1;o=h.pos;const f=o,d=a,g=i;for(;o<a;){const t=s.charCodeAt(o);if(10===t){const t=Je(e,i);if(t<0)break;o=t,a=We(e,i++)}else{if(!ie(t))break;o++}}const m=o;let _,k=e.md.helpers.parseLinkTitle(s,o,a);for(;k.can_continue;){const t=Je(e,i);if(t<0)break;o=t,a=We(e,i++),k=e.md.helpers.parseLinkTitle(s,o,a,k)}for(m!==f&&k.ok?(_=k.str,o=k.pos):(_="",o=f,a=d,i=g);o<a&&ie(s.charCodeAt(o));)o++;if(o<a&&10!==s.charCodeAt(o)&&_)for(_="",o=f,a=d,i=g;o<a&&ie(s.charCodeAt(o));)o++;if(o<a&&10!==s.charCodeAt(o))return!1;const D=he(u);if(!D)return!1;if(n)return!0;void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[D]&&(e.env.references[D]={title:_,href:p});const b=e.push("reference_definition","",0);b.map=[t,i],b.hidden=!0;const C=Object.create(null);return C.label=D,b.meta=C,e.line=i,!0}],["html_block",function(e,t,r,n){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(s))return!1;let i=e.src.slice(s,o),a=0;for(;a<Xe.length&&!Xe[a][0].test(i);a++);if(a===Xe.length)return!1;if(n)return Xe[a][2];let u=t+1;const c=Xe[a][1].test("");if(!Xe[a][1].test(i))for(;u<r&&(!(e.sCount[u]<e.blkIndent)||!c&&e.isEmpty(u));u++)if(s=e.bMarks[u]+e.tShift[u],o=e.eMarks[u],i=e.src.slice(s,o),Xe[a][1].test(i)){0!==i.length&&u++;break}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,r,n){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.src.charCodeAt(s);if(35!==i||s>=o)return!1;let a=1;for(i=e.src.charCodeAt(++s);35===i&&s<o&&a<=6;)a++,i=e.src.charCodeAt(++s);if(a>6||s<o&&!ie(i))return!1;if(n)return!0;o=e.skipSpacesBack(o,s);const u=e.skipCharsBack(o,35,s);u>s&&ie(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const c=e.push("heading_open",`h${a}`,1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);return l.content=fe(e.src.slice(s,o)),l.map=[t,e.line],l.children=[],e.push("heading_close",`h${a}`,-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const s=e.parentType;e.parentType="paragraph";let o,i=0,a=t+1;for(;a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let t=e.bMarks[a]+e.tShift[a];const r=e.eMarks[a];if(t<r&&(o=e.src.charCodeAt(t),(45===o||61===o)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=r))){i=61===o?1:2;break}}if(e.sCount[a]<0)continue;let t=!1;for(let s=0,o=n.length;s<o;s++)if(n[s](e,a,r,!0)){t=!0;break}if(t)break}if(!i)return e.parentType=s,!1;const u=fe(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open",`h${i}`,1);c.markup=String.fromCharCode(o),c.map=[t,e.line];const l=e.push("inline","",0);return l.content=u,l.map=[t,e.line-1],l.children=[],e.push("heading_close",`h${i}`,-1).markup=String.fromCharCode(o),e.parentType=s,!0}],["paragraph",function(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),s=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]<0)continue;let t=!1;for(let s=0,i=n.length;s<i;s++)if(n[s](e,o,r,!0)){t=!0;break}if(t)break}const i=fe(e.getLines(t,o,e.blkIndent,!1));e.line=o,e.push("paragraph_open","p",1).map=[t,e.line];const a=e.push("inline","",0);return a.content=i,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}]],tt=class{ruler=new be;State=Ue;constructor(){for(let e=0;e<et.length;e++)this.ruler.push(et[e][0],et[e][1],{alt:(et[e][2]||[]).slice()})}tokenize(e,t,r){const n=this.ruler.getRules(""),s=n.length,o=e.md.options.maxNesting;let i=t,a=!1;for(;i<r&&(e.line=i=e.skipEmptyLines(i),!(i>=r))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=o){e.line=r;break}const t=e.line;let u=!1;for(let o=0;o<s;o++)if(u=n[o](e,i,r,!1),u){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),i=e.line,i<r&&e.isEmpty(i)&&(a=!0,i++,e.line=i)}}parse(e,t,r,n){if(!e)return;const s=new this.State(e,t,r,n);this.tokenize(s,s.line,s.lineMax)}},rt=class{pos=0;level=0;pending="";pendingLevel=0;cache={};backticks={};backticksScanned=!1;skipHtmlSpecial=!1;linkLevel=0;delimiters=[];_prev_delimiters=[];Token=De;constructor(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.posMax=this.src.length}pushPending(){const e=new De("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,r){this.pending&&this.pushPending();const n=new De(e,t,r);let s;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n}scanDelims(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let s;if(0===e)s=32;else if(1===e)s=this.src.charCodeAt(0),55296==(63488&s)&&(s=65533);else if(s=this.src.charCodeAt(e-1),56320==(64512&s)){const t=this.src.charCodeAt(e-2);s=55296==(64512&t)?65536+(t-55296<<10)+(s-56320):65533}else 55296==(64512&s)&&(s=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const i=o-e;let a=o<r?this.src.charCodeAt(o):32;if(55296==(64512&a)){const e=this.src.charCodeAt(o+1);a=56320==(64512&e)?65536+(a-55296<<10)+(e-56320):65533}else 56320==(64512&a)&&(a=65533);const u=le(s)||ce(s),c=le(a)||ce(a),l=ae(s),h=ae(a),p=!h&&(!c||l||u),f=!l&&(!u||h||c);return{can_open:p&&(t||!f||u),can_close:f&&(t||!p||c),length:i}}};function nt(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function st(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||45===e||46===e}var ot=[];for(let e=0;e<256;e++)ot.push(0);function it(e,t){let r;const n=[],s=t.length;for(let o=0;o<s;o++){const s=t[o];if(126!==s.marker)continue;if(-1===s.end)continue;const i=t[s.end];r=e.tokens[s.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[i.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&n.push(i.token-1)}for(;n.length;){const t=n.pop();let s=t+1;for(;s<e.tokens.length&&"s_close"===e.tokens[s].type;)s++;s--,t!==s&&(r=e.tokens[s],e.tokens[s]=e.tokens[t],e.tokens[t]=r)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ot[e.charCodeAt(0)]=1});var at={tokenize:function(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(126!==n)return!1;const s=e.scanDelims(e.pos,!0);let o=s.length;const i=String.fromCharCode(n);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=i,o--);for(let t=0;t<o;t+=2)a=e.push("text","",0),a.content=i+i,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0},postProcess:function(e){const t=e.tokens_meta,r=e.tokens_meta.length;it(e,e.delimiters);for(let n=0;n<r;n++){const r=t[n]?.delimiters;r&&it(e,r)}}};function ut(e,t){for(let r=t.length-1;r>=0;r--){const n=t[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const s=t[n.end],o=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===s.token+1,i=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=o?"strong_open":"em_open",a.tag=o?"strong":"em",a.nesting=1,a.markup=o?i+i:i,a.content="";const u=e.tokens[s.token];u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?i+i:i,u.content="",o&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}var ct={tokenize:function(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(95!==n&&42!==n)return!1;const s=e.scanDelims(e.pos,42===n);for(let t=0;t<s.length;t++)e.push("text","",0).content=String.fromCharCode(n),e.delimiters.push({marker:n,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0},postProcess:function(e){const t=e.tokens_meta,r=e.tokens_meta.length;ut(e,e.delimiters);for(let n=0;n<r;n++){const r=t[n]?.delimiters;r&&ut(e,r)}}},lt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ht=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function pt(e){const t=32|e;return t>=97&&t<=122}var ft=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,dt=/^&([a-z][a-z0-9]{1,31});/i;function gt(e){const t={},r=e.length;if(!r)return;let n=0,s=-2;const o=[];for(let i=0;i<r;i++){const r=e[i];if(o.push(0),e[n].marker===r.marker&&s===r.token-1||(n=i),s=r.token,r.length=r.length||0,!r.close)continue;t.hasOwnProperty(r.marker)||(t[r.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[r.marker][(r.open?3:0)+r.length%3];let u=n-o[n]-1,c=u;for(;u>a;u-=o[u]+1){const t=e[u];if(t.marker===r.marker&&t.open&&t.end<0){let n=!1;if((t.close||r.open)&&(t.length+r.length)%3==0&&(t.length%3==0&&r.length%3==0||(n=!0)),!n){const n=u>0&&!e[u-1].open?o[u-1]+1:0;o[i]=i-u+n,o[u]=n,r.open=!1,t.end=i,t.close=!1,c=-1,s=-2;break}}}-1!==c&&(t[r.marker][(r.open?3:0)+(r.length||0)%3]=c)}}var mt=[["text",function(e,t){let r=e.pos;for(;r<e.posMax&&!nt(e.src.charCodeAt(r));)r++;return r!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}],["linkify",function(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const r=e.pos;if(r+3>e.posMax)return!1;if(58!==e.src.charCodeAt(r))return!1;if(47!==e.src.charCodeAt(r+1))return!1;if(47!==e.src.charCodeAt(r+2))return!1;const n=r-Math.min(10,e.pending.length,r);let s=r;for(;s>n&&st(e.src.charCodeAt(s-1));)s--;if(s===r||!((o=e.src.charCodeAt(s))>=65&&o<=90||o>=97&&o<=122))return!1;var o;const i=r-s,a=e.md.linkify.matchAtStart(e.src.slice(s));if(!a)return!1;let u=a.url;if(u.length<=i)return!1;let c=u.length;for(;c>0&&42===u.charCodeAt(c-1);)c--;c!==u.length&&(u=u.slice(0,c));const l=e.md.normalizeLink(u);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i);const t=e.push("link_open","a",1);t.attrs=[["href",l]],t.markup="linkify",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(u);const r=e.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return e.pos+=u.length-i,!0}],["newline",function(e,t){let r=e.pos;if(10!==e.src.charCodeAt(r))return!1;const n=e.pending.length-1,s=e.posMax;if(!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){let t=n-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<s&&ie(e.src.charCodeAt(r));)r++;return e.pos=r,!0}],["escape",function(e,t){let r=e.pos;const n=e.posMax;if(92!==e.src.charCodeAt(r))return!1;if(r++,r>=n)return!1;let s=e.src.charCodeAt(r);if(10===s){for(t||e.push("hardbreak","br",0),r++;r<n&&(s=e.src.charCodeAt(r),ie(s));)r++;return e.pos=r,!0}if(32===s){if(!t){const t=e.push("text_special","",0);t.content="\\",t.markup="\\",t.info="escape"}return e.pos=r,!0}let o=e.src[r];if(s>=55296&&s<=56319&&r+1<n){const t=e.src.charCodeAt(r+1);t>=56320&&t<=57343&&(o+=e.src[r+1],r++)}const i="\\"+o;if(!t){const t=e.push("text_special","",0);s<256&&0!==ot[s]?t.content=o:t.content=i,t.markup=i,t.info="escape"}return e.pos=r+1,!0}],["backticks",function(e,t){const r=e.pos;if(96!==e.src.charCodeAt(r))return!1;const n=e.posMax;let s=r+1;for(;s<n&&96===e.src.charCodeAt(s);)s++;const o=e.src.slice(r,s),i=o.length;if(e.backticksScanned||(e.backticks=function(e){const t={};let r=0;for(;-1!==(r=e.indexOf("`",r));){const n=r;for(;96===e.charCodeAt(++r););t[r-n]=n}return t}(e.src),e.backticksScanned=!0),(e.backticks[i]??-1)>=s){let r,a=s;for(;-1!==(r=e.src.indexOf("`",a))&&r<n;){for(a=r+1;96===e.src.charCodeAt(a);)a++;if(a>n)break;if(a-r===i){if(!t){const t=e.push("code_inline","code",0);t.markup=o;let n=e.src.slice(s,r).replace(/\n/g," ");n.startsWith(" ")&&n.endsWith(" ")&&/[^ ]/.test(n)&&(n=n.slice(1,-1)),t.content=n}return e.pos=a,!0}}}return t||(e.pending+=o),e.pos=s,!0}],["strikethrough",at.tokenize],["emphasis",ct.tokenize],["link",function(e,t){let r,n,s,o,i="",a="",u=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const l=e.pos,h=e.posMax,p=e.pos+1,f=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(f<0)return!1;let d=f+1;if(d<h&&40===e.src.charCodeAt(d)){for(c=!1,d++;d<h&&(r=e.src.charCodeAt(d),ie(r)||10===r);d++);if(d>=h)return!1;if(u=d,s=e.md.helpers.parseLinkDestination(e.src,d,e.posMax),s.ok){for(i=e.md.normalizeLink(s.str),e.md.validateLink(i)?d=s.pos:i="",u=d;d<h&&(r=e.src.charCodeAt(d),ie(r)||10===r);d++);if(s=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<h&&u!==d&&s.ok)for(a=s.str,d=s.pos;d<h&&(r=e.src.charCodeAt(d),ie(r)||10===r);d++);}(d>=h||41!==e.src.charCodeAt(d))&&(c=!0),d++}if(c){if(void 0===e.env.references)return!1;if(d<h&&91===e.src.charCodeAt(d)?(u=d+1,d=e.md.helpers.parseLinkLabel(e,d),d>=0?n=e.src.slice(u,d++):d=f+1):d=f+1,n||(n=e.src.slice(p,f)),n=he(n),o=e.env.references[n],!o)return e.pos=l,!1;i=o.href,a=o.title}if(!t){e.pos=p,e.posMax=f;const t=e.push("link_open","a",1),r=[["href",i]];if(t.attrs=r,a&&r.push(["title",a]),n){const e=Object.create(null);e.label=n,t.meta=e}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=h,!0}],["image",function(e,t){let r,n,s,o,i,a,u,c,l="";const h=e.pos,p=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const f=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if(o=d+1,o<p&&40===e.src.charCodeAt(o)){for(o++;o<p&&(r=e.src.charCodeAt(o),ie(r)||10===r);o++);if(o>=p)return!1;for(c=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?o=a.pos:l=""),c=o;o<p&&(r=e.src.charCodeAt(o),ie(r)||10===r);o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<p&&c!==o&&a.ok)for(u=a.str,o=a.pos;o<p&&(r=e.src.charCodeAt(o),ie(r)||10===r);o++);else u="";if(o>=p||41!==e.src.charCodeAt(o))return e.pos=h,!1;o++}else{if(void 0===e.env.references)return!1;if(o<p&&91===e.src.charCodeAt(o)?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?s=e.src.slice(c,o++):o=d+1):o=d+1,s||(s=e.src.slice(f,d)),s=he(s),i=e.env.references[s],!i)return e.pos=h,!1;l=i.href,u=i.title}if(!t){n=e.src.slice(f,d);const t=[];e.md.inline.parse(n,e.md,e.env,t);const r=e.push("image","img",0),o=[["src",l],["alt",""]];if(r.attrs=o,r.children=t,r.content=n,u&&o.push(["title",u]),s){const e=Object.create(null);e.label=s,r.meta=e}}return e.pos=o,e.posMax=p,!0}],["autolink",function(e,t){let r=e.pos;if(60!==e.src.charCodeAt(r))return!1;const n=e.pos,s=e.posMax;for(;;){if(++r>=s)return!1;const t=e.src.charCodeAt(r);if(60===t)return!1;if(62===t)break}const o=e.src.slice(n+1,r);if(ht.test(o)){const r=e.md.normalizeLink(o);if(!e.md.validateLink(r))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",r]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=o.length+2,!0}if(lt.test(o)){const r=e.md.normalizeLink(`mailto:${o}`);if(!e.md.validateLink(r))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",r]],t.markup="autolink",t.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(60!==e.src.charCodeAt(n)||n+2>=r)return!1;let s;const o=e.src.charCodeAt(n+1);if(33===o||63===o)s=function(e,t){const r=e.src;let n,s;if(r.startsWith("\x3c!--",t)){if(r.startsWith(">",t+4))return t+5;if(r.startsWith("->",t+4))return t+6;n=t+4,s="--\x3e"}else if(r.startsWith("<![CDATA[",t))n=t+9,s="]]>";else if(63===r.charCodeAt(t+1))n=t+2,s="?>";else{if(!pt(r.charCodeAt(t+2)))return-1;n=t+3,s=">"}if(e.skipHtmlSpecial)return-1;const o=r.indexOf(s,n);return o<0?(e.skipHtmlSpecial=!0,-1):o+s.length}(e,n);else{if(47!==o&&!pt(o))return!1;{const t=e.src.slice(n).match(Ke);s=t?n+t[0].length:-1}}if(s<0)return!1;if(!t){const t=e.push("html_inline","",0);t.content=e.src.slice(n,s),i=t.content,/^<a[>\s]/i.test(i)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var i;return e.pos=s,!0}],["entity",function(e,t){const r=e.pos,n=e.posMax;if(38!==e.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===e.src.charCodeAt(r+1)){const n=e.src.slice(r).match(ft);if(n){if(!t){const t="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=e.push("text_special","",0);r.content=H(t)?G(t):G(65533),r.markup=n[0],r.info="entity"}return e.pos+=n[0].length,!0}}else{const n=e.src.slice(r).match(dt);if(n){const r=U(n[0]);if(r!==n[0]){if(!t){const t=e.push("text_special","",0);t.content=r,t.markup=n[0],t.info="entity"}return e.pos+=n[0].length,!0}}}return!1}]],_t=[["balance_pairs",function(e){const t=e.tokens_meta,r=e.tokens_meta.length;gt(e.delimiters);for(let e=0;e<r;e++){const r=t[e]?.delimiters;r&>(r)}}],["strikethrough",at.postProcess],["emphasis",ct.postProcess],["fragments_join",function(e){let t,r,n=0;const s=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)s[t].nesting<0&&n--,s[t].level=n,s[t].nesting>0&&n++,"text"===s[t].type&&t+1<o&&"text"===s[t+1].type?s[t+1].content=s[t].content+s[t+1].content:(t!==r&&(s[r]=s[t]),r++);t!==r&&(s.length=r)}]],kt=class{ruler=new be;ruler2=new be;State=rt;constructor(){for(let e=0;e<mt.length;e++)this.ruler.push(mt[e][0],mt[e][1]);for(let e=0;e<_t.length;e++)this.ruler2.push(_t[e][0],_t[e][1])}skipToken(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,s=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t])return void(e.pos=o[t]);let i=!1;if(e.level<s){for(let s=0;s<n;s++)if(e.level++,i=r[s](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,o[t]=e.pos}tokenize(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,s=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let i=!1;if(e.level<s)for(let n=0;n<r;n++)if(i=t[n](e,!1),i){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(i){if(e.pos>=n)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,r,n){const s=new this.State(e,t,r,n);this.tokenize(s);const o=this.ruler2.getRules(""),i=o.length;for(let e=0;e<i;e++)o[e](s)}},Dt=class{src_Any=$.source;src_Cc=L.source;src_Z=T.source;src_P=B.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,r=4){const n=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${n}|${s}).)`;let i=`${n}${o}{0,1000}${s}`;for(let e=2;e<=r;e++)i=`${n}(?:${o}|${i}){0,1000}${s}`;return i}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},bt={validate:(e,t,r)=>{const n=r.re.get_http_validator();n.lastIndex=t;const s=n.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},Ct={"http:":bt,"https:":bt,"ftp:":bt,"//":{validate:function(e,t,r){const n=r.re.get_relative_proto_validator();n.lastIndex=t;const s=n.exec(e);return s?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,r){const n=r.re.get_mailto_validator();n.lastIndex=t;const s=n.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},xt={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:function(){const e="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");return"a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw".split("|").forEach(t=>{const r=t.indexOf(":"),n=t.slice(0,r);for(const s of t.slice(r+1))e.push(n+s)}),e}(),urlAuth:!1,maxLength:1e4},At=class{schema;index;lastIndex;raw;text;url;constructor(e,t,r,n){const s=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=s,this.text=s,this.url=s}},Ft=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...r}=e;this.__opts__={...xt,...r},this.__schemas__={...Ct},this.re=t||new Dt,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(t){const r={normalize:(e,t)=>t.normalize(e),...t};this.__schemas__[e]=r}else delete this.__schemas__[e];return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,r;for(r=this.re.get_schema_search(),r.lastIndex=0;null!==(t=r.exec(e));)if(this.testSchemaAt(e,t[2],r.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(r=this.re.get_fuzzy_link_search(),r.lastIndex=0,null!==r.exec(e)))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const r=this.re.get_fuzzy_mail_host_search(),n=this.re.get_mail_name_validator();for(r.lastIndex=0;null!==(t=r.exec(e));){const r=e.slice(Math.max(0,t.index-65),t.index);if(n.test(r))return!0}}return!1}testSchemaAt(e,t,r){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,r+this.__opts__.maxLength),r,this):0}match(e){const t=[],r=this.re.get_schema_search();let n,s,o,i,a,u,c=!1,l=!1,h=!1,p=0;if(!e.length)return null;for(r.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const f=Math.max(p-1,0);if(s&&o&&!h&&(!a||a.index<p))for(s.lastIndex<f&&(s.lastIndex=f);;){const t=s.exec(e);if(!t){h=!0,a=void 0;break}const r=o.exec(e.slice(Math.max(0,t.index-65),t.index));if(r){if(a={schema:"mailto:",index:t.index-r[1].length,lastIndex:t.index+t[0].length},a.index>=p)break;s.lastIndex<f&&(s.lastIndex=f)}}if(n&&!l&&(!i||i.index<p))for(n.lastIndex<f&&(n.lastIndex=f);;){const t=n.exec(e);if(!t){l=!0,i=void 0;break}if(i={schema:"",index:t.index+t[1].length,lastIndex:t.index+t[0].length},i.index>=p)break;n.lastIndex<f&&(n.lastIndex=f)}let d,g=a;if((!g||i&&(i.index<g.index||i.index===g.index&&i.lastIndex>g.lastIndex))&&(g=i),!c)for(;;){if(!u){r.lastIndex<f&&(r.lastIndex=f);const t=r.exec(e);if(!t){c=!0;break}u={schema:t[2],index:t.index+t[1].length,lastIndex:t.index+t[0].length}}if(u.index<p){u=void 0;continue}if(g&&u.index>g.index)break;const t=u;u=void 0;const n=this.testSchemaAt(e,t.schema,t.lastIndex);if(n){d={schema:t.schema,index:t.index,lastIndex:t.lastIndex+n};break}}let m=d;if((!m||a&&(a.index<m.index||a.index===m.index&&a.lastIndex>m.lastIndex))&&(m=a),(!m||i&&(i.index<m.index||i.index===m.index&&i.lastIndex>m.lastIndex))&&(m=i),!m)break;m===a?a=void 0:m===i&&(i=void 0);const _=new At(e,m.schema,m.index,m.lastIndex);_.schema?this.__schemas__[_.schema].normalize(_,this):this.normalize(_),t.push(_),p=m.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const r=this.testSchemaAt(e,t[2],t[0].length);if(!r)return null;const n=new At(e,t[2],t.index+t[1].length,t.index+t[0].length+r);return this.__schemas__[n.schema].normalize(n,this),n}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],this.__opts__.tlds=t?this.__opts__.tlds.concat(e):e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url=`mailto:${e.url}`)}},Et=2147483647,wt=36,yt=/^xn--/,vt=/[^\0-\x7F]/,qt=/[\x2E\u3002\uFF0E\uFF61]/g,St={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$t=Math.floor,Lt=String.fromCharCode;function It(e){throw new RangeError(St[e])}function Bt(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const s=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(qt,".")).split("."),t).join(".");return n+s}function zt(e){const t=[];let r=0;const n=e.length;for(;r<n;){const s=e.charCodeAt(r++);if(s>=55296&&s<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&s)<<10)+(1023&n)+65536):(t.push(s),r--)}else t.push(s)}return t}var Tt=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:wt},Rt=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Mt=function(e,t,r){let n=0;for(e=r?$t(e/700):e>>1,e+=$t(e/t);e>455;n+=wt)e=$t(e/35);return $t(n+36*e/(e+38))},Nt=function(e){const t=[],r=e.length;let n=0,s=128,o=72,i=e.lastIndexOf("-");i<0&&(i=0);for(let r=0;r<i;++r)e.charCodeAt(r)>=128&&It("not-basic"),t.push(e.charCodeAt(r));for(let a=i>0?i+1:0;a<r;){const i=n;for(let t=1,s=wt;;s+=wt){a>=r&&It("invalid-input");const i=Tt(e.charCodeAt(a++));i>=wt&&It("invalid-input"),i>$t((Et-n)/t)&&It("overflow"),n+=i*t;const u=s<=o?1:s>=o+26?26:s-o;if(i<u)break;const c=wt-u;t>$t(Et/c)&&It("overflow"),t*=c}const u=t.length+1;o=Mt(n-i,u,0==i),$t(n/u)>Et-s&&It("overflow"),s+=$t(n/u),n%=u,t.splice(n++,0,s)}return String.fromCodePoint(...t)},Ot=function(e){const t=[],r=(e=zt(e)).length;let n=128,s=0,o=72;for(const r of e)r<128&&t.push(Lt(r));const i=t.length;let a=i;for(i&&t.push("-");a<r;){let r=Et;for(const t of e)t>=n&&t<r&&(r=t);const u=a+1;r-n>$t((Et-s)/u)&&It("overflow"),s+=(r-n)*u,n=r;for(const r of e)if(r<n&&++s>Et&&It("overflow"),r===n){let e=s;for(let r=wt;;r+=wt){const n=r<=o?1:r>=o+26?26:r-o;if(e<n)break;const s=e-n,i=wt-n;t.push(Lt(Rt(n+s%i,0))),e=$t(s/i)}t.push(Lt(Rt(e,0))),o=Mt(s,u,a===i),s=0,++a}++s,++n}return t.join("")},Pt=function(e){return Bt(e,function(e){return vt.test(e)?"xn--"+Ot(e):e})},jt=function(e){return Bt(e,function(e){return yt.test(e)?Nt(e.slice(4).toLowerCase()):e})},Ut={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Vt=/^(vbscript|javascript|file|data):/,Zt=/^data:image\/(gif|png|jpeg|webp);/,Ht=["http:","https:","mailto:"],Gt=V(class{inline=new kt;block=new tt;core=new je;renderer=new xe;linkify=new Ft;validateLink(e){const t=e.trim().toLowerCase();return!Vt.test(t)||Zt.test(t)}normalizeLink(e){const t=q(e,!0);if(t.hostname&&(!t.protocol||Ht.indexOf(t.protocol)>=0))try{t.hostname=Pt(t.hostname)}catch(e){}return t.auth&&(t.auth=g(t.auth)),t.hostname&&(t.hostname=g(t.hostname)),t.pathname&&(t.pathname=g(t.pathname)),t.search&&(t.search=g(t.search)),t.hash&&(t.hash=g(t.hash)),m(t)}normalizeLinkText(e){const t=q(e,!0);if(t.hostname&&(!t.protocol||Ht.indexOf(t.protocol)>=0))try{t.hostname=jt(t.hostname)}catch(e){}return p(m(t),p.defaultChars+"%")}utils=u;helpers=Object.assign({},ge);constructor(...e){const[t,r]=e;"string"==typeof t?(this.configure(t),r&&this.set(r)):(this.configure("default"),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if("string"==typeof e){if(t=Ut[e],!t)throw new Error(`Wrong 'markdown-it' preset "${e}", check name`)}else t=e;if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});const r=t.components;if(r){["core","block","inline"].forEach(e=>{const t=r[e]?.rules;t&&this[e].ruler.enableOnly(t)});const e=r.inline?.rules2;e&&this.inline.ruler2.enableOnly(e)}return this}enable(e,t=!1){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(t=>{r=r.concat(this[t].ruler.enable(e,!0))}),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(e=>r.indexOf(e)<0);if(n.length&&!t)throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${n}`);return this}disable(e,t=!1){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(t=>{r=r.concat(this[t].ruler.disable(e,!0))}),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(e=>r.indexOf(e)<0);if(n.length&&!t)throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${n}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}static Token=De;static Ruler=be;static Renderer=xe;static ParserCore=je;static StateCore=Ae;static ParserBlock=tt;static StateBlock=Ue;static ParserInline=kt;static StateInline=rt});return e.exports.default});
|
|
1
|
+
import markdownIt from './markdown-it.mjs';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return owned;
|
|
3
|
+
export function markdownItConstructor() {
|
|
4
|
+
return markdownIt;
|
|
13
5
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* eslint-disable no-bitwise */
|
|
2
|
+
|
|
3
|
+
const decodeCache = {}
|
|
4
|
+
|
|
5
|
+
function getDecodeCache (exclude) {
|
|
6
|
+
let cache = decodeCache[exclude]
|
|
7
|
+
if (cache) { return cache }
|
|
8
|
+
|
|
9
|
+
cache = decodeCache[exclude] = []
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < 128; i++) {
|
|
12
|
+
const ch = String.fromCharCode(i)
|
|
13
|
+
cache.push(ch)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
for (let i = 0; i < exclude.length; i++) {
|
|
17
|
+
const ch = exclude.charCodeAt(i)
|
|
18
|
+
cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return cache
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function decode (string, exclude) {
|
|
25
|
+
if (typeof exclude !== 'string') {
|
|
26
|
+
exclude = decode.defaultChars
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const cache = getDecodeCache(exclude)
|
|
30
|
+
|
|
31
|
+
return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {
|
|
32
|
+
let result = ''
|
|
33
|
+
|
|
34
|
+
for (let i = 0, l = seq.length; i < l; i += 3) {
|
|
35
|
+
const b1 = parseInt(seq.slice(i + 1, i + 3), 16)
|
|
36
|
+
|
|
37
|
+
if (b1 < 0x80) {
|
|
38
|
+
result += cache[b1]
|
|
39
|
+
continue
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {
|
|
43
|
+
const b2 = parseInt(seq.slice(i + 4, i + 6), 16)
|
|
44
|
+
|
|
45
|
+
if ((b2 & 0xC0) === 0x80) {
|
|
46
|
+
const chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F)
|
|
47
|
+
|
|
48
|
+
if (chr < 0x80) {
|
|
49
|
+
result += '\ufffd\ufffd'
|
|
50
|
+
} else {
|
|
51
|
+
result += String.fromCharCode(chr)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
i += 3
|
|
55
|
+
continue
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {
|
|
60
|
+
const b2 = parseInt(seq.slice(i + 4, i + 6), 16)
|
|
61
|
+
const b3 = parseInt(seq.slice(i + 7, i + 9), 16)
|
|
62
|
+
|
|
63
|
+
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
|
|
64
|
+
const chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F)
|
|
65
|
+
|
|
66
|
+
if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {
|
|
67
|
+
result += '\ufffd\ufffd\ufffd'
|
|
68
|
+
} else {
|
|
69
|
+
result += String.fromCharCode(chr)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
i += 6
|
|
73
|
+
continue
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {
|
|
78
|
+
const b2 = parseInt(seq.slice(i + 4, i + 6), 16)
|
|
79
|
+
const b3 = parseInt(seq.slice(i + 7, i + 9), 16)
|
|
80
|
+
const b4 = parseInt(seq.slice(i + 10, i + 12), 16)
|
|
81
|
+
|
|
82
|
+
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
|
|
83
|
+
let chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F)
|
|
84
|
+
|
|
85
|
+
if (chr < 0x10000 || chr > 0x10FFFF) {
|
|
86
|
+
result += '\ufffd\ufffd\ufffd\ufffd'
|
|
87
|
+
} else {
|
|
88
|
+
chr -= 0x10000
|
|
89
|
+
result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF))
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
i += 9
|
|
93
|
+
continue
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
result += '\ufffd'
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return result
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
decode.defaultChars = ';/?:@&=+$,#'
|
|
105
|
+
decode.componentChars = ''
|
|
106
|
+
|
|
107
|
+
export default decode
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const encodeCache = {}
|
|
2
|
+
|
|
3
|
+
function getEncodeCache (exclude) {
|
|
4
|
+
let cache = encodeCache[exclude]
|
|
5
|
+
if (cache) { return cache }
|
|
6
|
+
|
|
7
|
+
cache = encodeCache[exclude] = []
|
|
8
|
+
|
|
9
|
+
for (let i = 0; i < 128; i++) {
|
|
10
|
+
const ch = String.fromCharCode(i)
|
|
11
|
+
|
|
12
|
+
if (/^[0-9a-z]$/i.test(ch)) {
|
|
13
|
+
cache.push(ch)
|
|
14
|
+
} else {
|
|
15
|
+
cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2))
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
for (let i = 0; i < exclude.length; i++) {
|
|
20
|
+
cache[exclude.charCodeAt(i)] = exclude[i]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return cache
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function encode (string, exclude, keepEscaped) {
|
|
27
|
+
if (typeof exclude !== 'string') {
|
|
28
|
+
keepEscaped = exclude
|
|
29
|
+
exclude = encode.defaultChars
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (typeof keepEscaped === 'undefined') {
|
|
33
|
+
keepEscaped = true
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const cache = getEncodeCache(exclude)
|
|
37
|
+
let result = ''
|
|
38
|
+
|
|
39
|
+
for (let i = 0, l = string.length; i < l; i++) {
|
|
40
|
+
const code = string.charCodeAt(i)
|
|
41
|
+
|
|
42
|
+
if (keepEscaped && code === 0x25 && i + 2 < l) {
|
|
43
|
+
if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
|
|
44
|
+
result += string.slice(i, i + 3)
|
|
45
|
+
i += 2
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (code < 128) {
|
|
51
|
+
result += cache[code]
|
|
52
|
+
continue
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (code >= 0xD800 && code <= 0xDFFF) {
|
|
56
|
+
if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
|
|
57
|
+
const nextCode = string.charCodeAt(i + 1)
|
|
58
|
+
if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
|
|
59
|
+
result += encodeURIComponent(string[i] + string[i + 1])
|
|
60
|
+
i++
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
result += '%EF%BF%BD'
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
result += encodeURIComponent(string[i])
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return result
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
encode.defaultChars = ";/?:@&=+$,-_.!~*'()#"
|
|
75
|
+
encode.componentChars = "-_.!~*'()"
|
|
76
|
+
|
|
77
|
+
export default encode
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default function format (url) {
|
|
2
|
+
let result = ''
|
|
3
|
+
|
|
4
|
+
result += url.protocol || ''
|
|
5
|
+
result += url.slashes ? '//' : ''
|
|
6
|
+
result += url.auth ? url.auth + '@' : ''
|
|
7
|
+
|
|
8
|
+
if (url.hostname && url.hostname.indexOf(':') !== -1) {
|
|
9
|
+
result += '[' + url.hostname + ']'
|
|
10
|
+
} else {
|
|
11
|
+
result += url.hostname || ''
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
result += url.port ? ':' + url.port : ''
|
|
15
|
+
result += url.pathname || ''
|
|
16
|
+
result += url.search || ''
|
|
17
|
+
result += url.hash || ''
|
|
18
|
+
|
|
19
|
+
return result
|
|
20
|
+
};
|