@wenyan-md/core 1.0.7 → 1.0.9
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/dist/browser/wenyan-core.js +29 -29
- package/dist/core.js +67 -64
- package/dist/{phycat-BGGT9oBk.js → phycat-C5ES4IMt.js} +53 -46
- package/dist/styles/wenyan-styles.js +56 -49
- package/dist/theme.js +1 -1
- package/dist/types/wrapper.d.ts +1 -1
- package/dist/wrapper.js +7 -7
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var WenyanCore=(function(U,
|
|
2
|
-
]`).replace("lheading",
|
|
1
|
+
var WenyanCore=(function(U,Kn,it,lt,ot,Xe,Wn){"use strict";function at(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(n,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}return n.default=r,Object.freeze(n)}const N=at(it);function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ae=en();function Vn(r){ae=r}var me={exec:()=>null};function O(r,n=""){let i=typeof r=="string"?r:r.source;const o={replace:(t,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(G.caret,"$1"),i=i.replace(t,s),o},getRegex:()=>new RegExp(i,n)};return o}var G={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},st=/^(?:[ \t]*(?:\n|$))+/,ut=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ct=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nn=/(?:[*+-]|\d{1,9}[.)])/,Qn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jn=O(Qn).replace(/bull/g,nn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ft=O(Qn).replace(/bull/g,nn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ht=/^[^\n]+/,tn=/(?!\s*\])(?:\\.|[^\[\]\\])+/,dt=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gt=O(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nn).getRegex(),Ce="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ln=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mt=O("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ln).replace("tag",Ce).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xn=O(rn).replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ce).getRegex(),xt=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xn).getRegex(),on={blockquote:xt,code:ut,def:dt,fences:ct,heading:pt,hr:xe,html:mt,lheading:Jn,list:gt,newline:st,paragraph:Xn,table:me,text:ht},er=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ce).getRegex(),kt={...on,lheading:ft,table:er,paragraph:O(rn).replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",er).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ce).getRegex()},vt={...on,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ln).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:me,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(rn).replace("hr",xe).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",Jn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nr=/^( {2,}|\\)\n(?!\s*$)/,wt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Te=/[\p{P}\p{S}]/u,an=/[\s\p{P}\p{S}]/u,rr=/[^\s\p{P}\p{S}]/u,At=O(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,an).getRegex(),tr=/(?!~)[\p{P}\p{S}]/u,St=/(?!~)[\s\p{P}\p{S}]/u,Ct=/(?:[^\s\p{P}\p{S}]|~)/u,Tt=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,ir=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_t=O(ir,"u").replace(/punct/g,Te).getRegex(),Et=O(ir,"u").replace(/punct/g,tr).getRegex(),lr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Rt=O(lr,"gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,an).replace(/punct/g,Te).getRegex(),Ft=O(lr,"gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,St).replace(/punct/g,tr).getRegex(),Lt=O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,an).replace(/punct/g,Te).getRegex(),It=O(/\\(punct)/,"gu").replace(/punct/g,Te).getRegex(),$t=O(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),Ot=O(ln).replace("(?:-->|$)","-->").getRegex(),Mt=O("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ot).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_e=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Dt=O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_e).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),or=O(/^!?\[(label)\]\[(ref)\]/).replace("label",_e).replace("ref",tn).getRegex(),ar=O(/^!?\[(ref)\](?:\[\])?/).replace("ref",tn).getRegex(),Pt=O("reflink|nolink(?!\\()","g").replace("reflink",or).replace("nolink",ar).getRegex(),sn={_backpedal:me,anyPunctuation:It,autolink:$t,blockSkip:Tt,br:nr,code:yt,del:me,emStrongLDelim:_t,emStrongRDelimAst:Rt,emStrongRDelimUnd:Lt,escape:bt,link:Dt,nolink:ar,punctuation:At,reflink:or,reflinkSearch:Pt,tag:Mt,text:wt,url:me},qt={...sn,link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",_e).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_e).getRegex()},un={...sn,emStrongRDelimAst:Ft,emStrongLDelim:Et,url:O(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nt={...un,br:O(nr).replace("{2,}","*").getRegex(),text:O(un.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ee={normal:on,gfm:kt,pedantic:vt},ke={normal:sn,gfm:un,breaks:Nt,pedantic:qt},Bt={"&":"&","<":"<",">":">",'"':""","'":"'"},sr=r=>Bt[r];function J(r,n){if(n){if(G.escapeTest.test(r))return r.replace(G.escapeReplace,sr)}else if(G.escapeTestNoEncode.test(r))return r.replace(G.escapeReplaceNoEncode,sr);return r}function ur(r){try{r=encodeURI(r).replace(G.percentDecode,"%")}catch{return null}return r}function cr(r,n){const i=r.replace(G.findPipe,(a,s,u)=>{let p=!1,c=s;for(;--c>=0&&u[c]==="\\";)p=!p;return p?"|":" |"}),o=i.split(G.splitPipe);let t=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),n)if(o.length>n)o.splice(n);else for(;o.length<n;)o.push("");for(;t<o.length;t++)o[t]=o[t].trim().replace(G.slashPipe,"|");return o}function ve(r,n,i){const o=r.length;if(o===0)return"";let t=0;for(;t<o&&r.charAt(o-t-1)===n;)t++;return r.slice(0,o-t)}function zt(r,n){if(r.indexOf(n[1])===-1)return-1;let i=0;for(let o=0;o<r.length;o++)if(r[o]==="\\")o++;else if(r[o]===n[0])i++;else if(r[o]===n[1]&&(i--,i<0))return o;return i>0?-2:-1}function pr(r,n,i,o,t){const a=n.href,s=n.title||null,u=r[1].replace(t.other.outputLinkReplace,"$1");o.state.inLink=!0;const p={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:s,text:u,tokens:o.inlineTokens(u)};return o.state.inLink=!1,p}function Ht(r,n,i){const o=r.match(i.other.indentCodeCompensation);if(o===null)return n;const t=o[1];return n.split(`
|
|
3
3
|
`).map(a=>{const s=a.match(i.other.beginningSpace);if(s===null)return a;const[u]=s;return u.length>=t.length?a.slice(t.length):a}).join(`
|
|
4
|
-
`)}var
|
|
5
|
-
`)}}}fences(r){const n=this.rules.block.fences.exec(r);if(n){const i=n[0],o=
|
|
6
|
-
`)}}blockquote(r){const n=this.rules.block.blockquote.exec(r);if(n){let i=
|
|
4
|
+
`)}var Re=class{options;rules;lexer;constructor(r){this.options=r||ae}space(r){const n=this.rules.block.newline.exec(r);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(r){const n=this.rules.block.code.exec(r);if(n){const i=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ve(i,`
|
|
5
|
+
`)}}}fences(r){const n=this.rules.block.fences.exec(r);if(n){const i=n[0],o=Ht(i,n[3]||"",this.rules);return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(r){const n=this.rules.block.heading.exec(r);if(n){let i=n[2].trim();if(this.rules.other.endingHash.test(i)){const o=ve(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){const n=this.rules.block.hr.exec(r);if(n)return{type:"hr",raw:ve(n[0],`
|
|
6
|
+
`)}}blockquote(r){const n=this.rules.block.blockquote.exec(r);if(n){let i=ve(n[0],`
|
|
7
7
|
`).split(`
|
|
8
8
|
`),o="",t="";const a=[];for(;i.length>0;){let s=!1;const u=[];let p;for(p=0;p<i.length;p++)if(this.rules.other.blockquoteStart.test(i[p]))u.push(i[p]),s=!0;else if(!s)u.push(i[p]);else break;i=i.slice(p);const c=u.join(`
|
|
9
9
|
`),f=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -21,9 +21,9 @@ ${f}`:f;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
21
21
|
`,1)[0];let ie;if(x=V,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),ie=x):ie=x.replace(this.rules.other.tabCharGlobal," "),j.test(x)||W.test(x)||z.test(x)||Z.test(x)||K.test(x))break;if(ie.search(this.rules.other.nonSpaceChar)>=_||!x.trim())f+=`
|
|
22
22
|
`+ie.slice(_);else{if(F||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||j.test(v)||W.test(v)||K.test(v))break;f+=`
|
|
23
23
|
`+x}!F&&!x.trim()&&(F=!0),c+=V+`
|
|
24
|
-
`,r=r.substring(V.length+1),v=ie.slice(_)}}t.loose||(s?t.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let $=null,H;this.options.gfm&&($=this.rules.other.listIsTask.exec(f),$&&(H=$[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:c,task:!!$,checked:H,loose:!1,text:f,tokens:[]}),t.raw+=c}const u=t.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let p=0;p<t.items.length;p++)if(this.lexer.state.top=!1,t.items[p].tokens=this.lexer.blockTokens(t.items[p].text,[]),!t.loose){const c=t.items[p].tokens.filter(v=>v.type==="space"),f=c.length>0&&c.some(v=>this.rules.other.anyLine.test(v.raw));t.loose=f}if(t.loose)for(let p=0;p<t.items.length;p++)t.items[p].loose=!0;return t}}html(r){const n=this.rules.block.html.exec(r);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(r){const n=this.rules.block.def.exec(r);if(n){const i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:o,title:t}}}table(r){const n=this.rules.block.table.exec(r);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const i=
|
|
25
|
-
`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===o.length){for(const s of o)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<i.length;s++)a.header.push({text:i[s],tokens:this.lexer.inline(i[s]),header:!0,align:a.align[s]});for(const s of t)a.rows.push(
|
|
26
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(r){const n=this.rules.block.text.exec(r);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(r){const n=this.rules.inline.escape.exec(r);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(r){const n=this.rules.inline.tag.exec(r);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(r){const n=this.rules.inline.link.exec(r);if(n){const i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const a=
|
|
24
|
+
`,r=r.substring(V.length+1),v=ie.slice(_)}}t.loose||(s?t.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let $=null,H;this.options.gfm&&($=this.rules.other.listIsTask.exec(f),$&&(H=$[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:c,task:!!$,checked:H,loose:!1,text:f,tokens:[]}),t.raw+=c}const u=t.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let p=0;p<t.items.length;p++)if(this.lexer.state.top=!1,t.items[p].tokens=this.lexer.blockTokens(t.items[p].text,[]),!t.loose){const c=t.items[p].tokens.filter(v=>v.type==="space"),f=c.length>0&&c.some(v=>this.rules.other.anyLine.test(v.raw));t.loose=f}if(t.loose)for(let p=0;p<t.items.length;p++)t.items[p].loose=!0;return t}}html(r){const n=this.rules.block.html.exec(r);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(r){const n=this.rules.block.def.exec(r);if(n){const i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:o,title:t}}}table(r){const n=this.rules.block.table.exec(r);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const i=cr(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
+
`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===o.length){for(const s of o)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<i.length;s++)a.header.push({text:i[s],tokens:this.lexer.inline(i[s]),header:!0,align:a.align[s]});for(const s of t)a.rows.push(cr(s,a.header.length).map((u,p)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[p]})));return a}}lheading(r){const n=this.rules.block.lheading.exec(r);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(r){const n=this.rules.block.paragraph.exec(r);if(n){const i=n[1].charAt(n[1].length-1)===`
|
|
26
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(r){const n=this.rules.block.text.exec(r);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(r){const n=this.rules.inline.escape.exec(r);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(r){const n=this.rules.inline.tag.exec(r);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(r){const n=this.rules.inline.link.exec(r);if(n){const i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const a=ve(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{const a=zt(n[2],"()");if(a===-2)return;if(a>-1){const u=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,u).trim(),n[3]=""}}let o=n[2],t="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],t=a[3])}else t=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),pr(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(r,n){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){const o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=n[o.toLowerCase()];if(!t){const a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return pr(i,t,i[0],this.lexer,this.rules)}}emStrong(r,n,i=""){let o=this.rules.inline.emStrongLDelim.exec(r);if(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const a=[...o[0]].length-1;let s,u,p=a,c=0;const f=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,n=n.slice(-1*r.length+a);(o=f.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(u=[...s].length,o[3]||o[4]){p+=u;continue}else if((o[5]||o[6])&&a%3&&!((a+u)%3)){c+=u;continue}if(p-=u,p>0)continue;u=Math.min(u,u+p+c);const v=[...o[0]][0].length,x=r.slice(0,a+o.index+v+u);if(Math.min(a,u)%2){const _=x.slice(1,-1);return{type:"em",raw:x,text:_,tokens:this.lexer.inlineTokens(_)}}const F=x.slice(2,-2);return{type:"strong",raw:x,text:F,tokens:this.lexer.inlineTokens(F)}}}}codespan(r){const n=this.rules.inline.code.exec(r);if(n){let i=n[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(i),t=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&t&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:n[0],text:i}}}br(r){const n=this.rules.inline.br.exec(r);if(n)return{type:"br",raw:n[0]}}del(r){const n=this.rules.inline.del.exec(r);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(r){const n=this.rules.inline.autolink.exec(r);if(n){let i,o;return n[2]==="@"?(i=n[1],o="mailto:"+i):(i=n[1],o=i),{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let n;if(n=this.rules.inline.url.exec(r)){let i,o;if(n[2]==="@")i=n[0],o="mailto:"+i;else{let t;do t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(t!==n[0]);i=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){const n=this.rules.inline.text.exec(r);if(n){const i=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:i}}}},re=class Gn{tokens;options;state;tokenizer;inlineQueue;constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||ae,this.options.tokenizer=this.options.tokenizer||new Re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:G,block:Ee.normal,inline:ke.normal};this.options.pedantic?(i.block=Ee.pedantic,i.inline=ke.pedantic):this.options.gfm&&(i.block=Ee.gfm,this.options.breaks?i.inline=ke.breaks:i.inline=ke.gfm),this.tokenizer.rules=i}static get rules(){return{block:Ee,inline:ke}}static lex(n,i){return new Gn(i).lex(n)}static lexInline(n,i){return new Gn(i).inlineTokens(n)}lex(n){n=n.replace(G.carriageReturn,`
|
|
27
27
|
`),this.blockTokens(n,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const o=this.inlineQueue[i];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,i=[],o=!1){for(this.options.pedantic&&(n=n.replace(G.tabCharGlobal," ").replace(G.spaceLine,""));n;){let t;if(this.options.extensions?.block?.some(s=>(t=s.call({lexer:this},n,i))?(n=n.substring(t.raw.length),i.push(t),!0):!1))continue;if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length);const s=i.at(-1);t.raw.length===1&&s!==void 0?s.raw+=`
|
|
28
28
|
`:i.push(t);continue}if(t=this.tokenizer.code(n)){n=n.substring(t.raw.length);const s=i.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
|
|
29
29
|
`+t.raw,s.text+=`
|
|
@@ -33,7 +33,7 @@ ${f}`:f;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
33
33
|
`+t.raw,s.text+=`
|
|
34
34
|
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):i.push(t),o=a.length!==n.length,n=n.substring(t.raw.length);continue}if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length);const s=i.at(-1);s?.type==="text"?(s.raw+=`
|
|
35
35
|
`+t.raw,s.text+=`
|
|
36
|
-
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):i.push(t);continue}if(n){const s="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){let o=n,t=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,t.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;n;){a||(s=""),a=!1;let u;if(this.options.extensions?.inline?.some(c=>(u=c.call({lexer:this},n,i))?(n=n.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.escape(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.tag(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.link(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(u.raw.length);const c=i.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(u=this.tokenizer.emStrong(n,o,s)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.codespan(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.br(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.del(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.autolink(n)){n=n.substring(u.raw.length),i.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(n))){n=n.substring(u.raw.length),i.push(u);continue}let p=n;if(this.options.extensions?.startInline){let c=1/0;const f=n.slice(1);let v;this.options.extensions.startInline.forEach(x=>{v=x.call({lexer:this},f),typeof v=="number"&&v>=0&&(c=Math.min(c,v))}),c<1/0&&c>=0&&(p=n.substring(0,c+1))}if(u=this.tokenizer.inlineText(p)){n=n.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),a=!0;const c=i.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(n){const c="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return i}},
|
|
36
|
+
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):i.push(t);continue}if(n){const s="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){let o=n,t=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,t.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;n;){a||(s=""),a=!1;let u;if(this.options.extensions?.inline?.some(c=>(u=c.call({lexer:this},n,i))?(n=n.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.escape(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.tag(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.link(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(u.raw.length);const c=i.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(u=this.tokenizer.emStrong(n,o,s)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.codespan(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.br(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.del(n)){n=n.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.autolink(n)){n=n.substring(u.raw.length),i.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(n))){n=n.substring(u.raw.length),i.push(u);continue}let p=n;if(this.options.extensions?.startInline){let c=1/0;const f=n.slice(1);let v;this.options.extensions.startInline.forEach(x=>{v=x.call({lexer:this},f),typeof v=="number"&&v>=0&&(c=Math.min(c,v))}),c<1/0&&c>=0&&(p=n.substring(0,c+1))}if(u=this.tokenizer.inlineText(p)){n=n.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),a=!0;const c=i.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):i.push(u);continue}if(n){const c="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return i}},Fe=class{options;parser;constructor(r){this.options=r||ae}space(r){return""}code({text:r,lang:n,escaped:i}){const o=(n||"").match(G.notSpaceStart)?.[0],t=r.replace(G.endingNewline,"")+`
|
|
37
37
|
`;return o?'<pre><code class="language-'+J(o)+'">'+(i?t:J(t,!0))+`</code></pre>
|
|
38
38
|
`:"<pre><code>"+(i?t:J(t,!0))+`</code></pre>
|
|
39
39
|
`}blockquote({tokens:r}){return`<blockquote>
|
|
@@ -51,44 +51,44 @@ ${this.parser.parse(r)}</blockquote>
|
|
|
51
51
|
`}tablerow({text:r}){return`<tr>
|
|
52
52
|
${r}</tr>
|
|
53
53
|
`}tablecell(r){const n=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+n+`</${i}>
|
|
54
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${J(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:n,tokens:i}){const o=this.parser.parseInline(i),t=
|
|
55
|
-
`+this.renderer.text(u);i?o+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):o+=p;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return o}parseInline(n,i=this.renderer){let o="";for(let t=0;t<n.length;t++){const a=n[t];if(this.options.extensions?.renderers?.[a.type]){const u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=u||"";continue}}const s=a;switch(s.type){case"escape":{o+=i.text(s);break}case"html":{o+=i.html(s);break}case"link":{o+=i.link(s);break}case"image":{o+=i.image(s);break}case"strong":{o+=i.strong(s);break}case"em":{o+=i.em(s);break}case"codespan":{o+=i.codespan(s);break}case"br":{o+=i.br(s);break}case"del":{o+=i.del(s);break}case"text":{o+=i.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return o}},
|
|
56
|
-
Please report this to https://github.com/markedjs/marked.`,r){const o="<p>An error occurred:</p><pre>"+J(i.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(i);throw i}}},se=new
|
|
57
|
-
</code></pre>`}}}}function
|
|
54
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${J(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:n,tokens:i}){const o=this.parser.parseInline(i),t=ur(r);if(t===null)return o;r=t;let a='<a href="'+r+'"';return n&&(a+=' title="'+J(n)+'"'),a+=">"+o+"</a>",a}image({href:r,title:n,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));const t=ur(r);if(t===null)return J(i);r=t;let a=`<img src="${r}" alt="${i}"`;return n&&(a+=` title="${J(n)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:J(r.text)}},cn=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},te=class Zn{options;renderer;textRenderer;constructor(n){this.options=n||ae,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cn}static parse(n,i){return new Zn(i).parse(n)}static parseInline(n,i){return new Zn(i).parseInline(n)}parse(n,i=!0){let o="";for(let t=0;t<n.length;t++){const a=n[t];if(this.options.extensions?.renderers?.[a.type]){const u=a,p=this.options.extensions.renderers[u.type].call({parser:this},u);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){o+=p||"";continue}}const s=a;switch(s.type){case"space":{o+=this.renderer.space(s);continue}case"hr":{o+=this.renderer.hr(s);continue}case"heading":{o+=this.renderer.heading(s);continue}case"code":{o+=this.renderer.code(s);continue}case"table":{o+=this.renderer.table(s);continue}case"blockquote":{o+=this.renderer.blockquote(s);continue}case"list":{o+=this.renderer.list(s);continue}case"html":{o+=this.renderer.html(s);continue}case"paragraph":{o+=this.renderer.paragraph(s);continue}case"text":{let u=s,p=this.renderer.text(u);for(;t+1<n.length&&n[t+1].type==="text";)u=n[++t],p+=`
|
|
55
|
+
`+this.renderer.text(u);i?o+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):o+=p;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return o}parseInline(n,i=this.renderer){let o="";for(let t=0;t<n.length;t++){const a=n[t];if(this.options.extensions?.renderers?.[a.type]){const u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=u||"";continue}}const s=a;switch(s.type){case"escape":{o+=i.text(s);break}case"html":{o+=i.html(s);break}case"link":{o+=i.link(s);break}case"image":{o+=i.image(s);break}case"strong":{o+=i.strong(s);break}case"em":{o+=i.em(s);break}case"codespan":{o+=i.codespan(s);break}case"br":{o+=i.br(s);break}case"del":{o+=i.del(s);break}case"text":{o+=i.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return o}},Le=class{options;block;constructor(r){this.options=r||ae}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?re.lex:re.lexInline}provideParser(){return this.block?te.parse:te.parseInline}},fr=class{defaults=en();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=te;Renderer=Fe;TextRenderer=cn;Lexer=re;Tokenizer=Re;Hooks=Le;constructor(...r){this.use(...r)}walkTokens(r,n){let i=[];for(const o of r)switch(i=i.concat(n.call(this,o)),o.type){case"table":{const t=o;for(const a of t.header)i=i.concat(this.walkTokens(a.tokens,n));for(const a of t.rows)for(const s of a)i=i.concat(this.walkTokens(s.tokens,n));break}case"list":{const t=o;i=i.concat(this.walkTokens(t.items,n));break}default:{const t=o;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(a=>{const s=t[a].flat(1/0);i=i.concat(this.walkTokens(s,n))}):t.tokens&&(i=i.concat(this.walkTokens(t.tokens,n)))}}return i}use(...r){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(i=>{const o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const a=n.renderers[t.name];a?n.renderers[t.name]=function(...s){let u=t.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:n.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=n[t.level];a?a.unshift(t.tokenizer):n[t.level]=[t.tokenizer],t.start&&(t.level==="block"?n.startBlock?n.startBlock.push(t.start):n.startBlock=[t.start]:t.level==="inline"&&(n.startInline?n.startInline.push(t.start):n.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(n.childTokens[t.name]=t.childTokens)}),o.extensions=n),i.renderer){const t=this.defaults.renderer||new Fe(this.defaults);for(const a in i.renderer){if(!(a in t))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const s=a,u=i.renderer[s],p=t[s];t[s]=(...c)=>{let f=u.apply(t,c);return f===!1&&(f=p.apply(t,c)),f||""}}o.renderer=t}if(i.tokenizer){const t=this.defaults.tokenizer||new Re(this.defaults);for(const a in i.tokenizer){if(!(a in t))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const s=a,u=i.tokenizer[s],p=t[s];t[s]=(...c)=>{let f=u.apply(t,c);return f===!1&&(f=p.apply(t,c)),f}}o.tokenizer=t}if(i.hooks){const t=this.defaults.hooks||new Le;for(const a in i.hooks){if(!(a in t))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const s=a,u=i.hooks[s],p=t[s];Le.passThroughHooks.has(a)?t[s]=c=>{if(this.defaults.async)return Promise.resolve(u.call(t,c)).then(v=>p.call(t,v));const f=u.call(t,c);return p.call(t,f)}:t[s]=(...c)=>{let f=u.apply(t,c);return f===!1&&(f=p.apply(t,c)),f}}o.hooks=t}if(i.walkTokens){const t=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),t&&(u=u.concat(t.call(this,s))),u}}this.defaults={...this.defaults,...o}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,n){return re.lex(r,n??this.defaults)}parser(r,n){return te.parse(r,n??this.defaults)}parseMarkdown(r){return(i,o)=>{const t={...o},a={...this.defaults,...t},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&t.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=r);const u=a.hooks?a.hooks.provideLexer():r?re.lex:re.lexInline,p=a.hooks?a.hooks.provideParser():r?te.parse:te.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(i):i).then(c=>u(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>p(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(s);try{a.hooks&&(i=a.hooks.preprocess(i));let c=u(i,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let f=p(c,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(c){return s(c)}}}onError(r,n){return i=>{if(i.message+=`
|
|
56
|
+
Please report this to https://github.com/markedjs/marked.`,r){const o="<p>An error occurred:</p><pre>"+J(i.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(i);throw i}}},se=new fr;function M(r,n){return se.parse(r,n)}M.options=M.setOptions=function(r){return se.setOptions(r),M.defaults=se.defaults,Vn(M.defaults),M},M.getDefaults=en,M.defaults=ae,M.use=function(...r){return se.use(...r),M.defaults=se.defaults,Vn(M.defaults),M},M.walkTokens=function(r,n){return se.walkTokens(r,n)},M.parseInline=se.parseInline,M.Parser=te,M.parser=te.parse,M.Renderer=Fe,M.TextRenderer=cn,M.Lexer=re,M.lexer=re.lex,M.Tokenizer=Re,M.Hooks=Le,M.parse=M,M.options,M.setOptions,M.use,M.walkTokens,M.parseInline,te.parse,re.lex;function jt(r){if(typeof r=="function"&&(r={highlight:r}),!r||typeof r.highlight!="function")throw new Error("Must provide highlight function");return typeof r.langPrefix!="string"&&(r.langPrefix="language-"),typeof r.emptyLangClass!="string"&&(r.emptyLangClass=""),{async:!!r.async,walkTokens(n){if(n.type!=="code")return;const i=hr(n.lang);if(r.async)return Promise.resolve(r.highlight(n.text,i,n.lang||"")).then(dr(n));const o=r.highlight(n.text,i,n.lang||"");if(o instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");dr(n)(o)},useNewRenderer:!0,renderer:{code(n,i,o){typeof n=="object"&&(o=n.escaped,i=n.lang,n=n.text);const t=hr(i),a=t?r.langPrefix+kr(t):r.emptyLangClass,s=a?` class="${a}"`:"";return n=n.replace(/\n$/,""),`<pre><code${s}>${o?n:kr(n,!0)}
|
|
57
|
+
</code></pre>`}}}}function hr(r){return(r||"").match(/\S*/)[0]}function dr(r){return n=>{typeof n=="string"&&n!==r.text&&(r.escaped=!0,r.text=n)}}const gr=/[&<>"']/,Yt=new RegExp(gr.source,"g"),mr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ut=new RegExp(mr.source,"g"),Gt={"&":"&","<":"<",">":">",'"':""","'":"'"},xr=r=>Gt[r];function kr(r,n){if(n){if(gr.test(r))return r.replace(Yt,xr)}else if(mr.test(r))return r.replace(Ut,xr);return r}function Zt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ie={exports:{}},D={},pe={},le={},vr;function fe(){if(vr)return le;vr=1;function r(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function i(s){return Array.isArray(s)?s:r(s)?[]:[s]}function o(s,u){var p,c,f,v;if(u)for(v=Object.keys(u),p=0,c=v.length;p<c;p+=1)f=v[p],s[f]=u[f];return s}function t(s,u){var p="",c;for(c=0;c<u;c+=1)p+=s;return p}function a(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return le.isNothing=r,le.isObject=n,le.toArray=i,le.repeat=t,le.isNegativeZero=a,le.extend=o,le}var pn,br;function be(){if(br)return pn;br=1;function r(n,i){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=i,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(i){var o=this.name+": ";return o+=this.reason||"(unknown reason)",!i&&this.mark&&(o+=" "+this.mark.toString()),o},pn=r,pn}var fn,yr;function Kt(){if(yr)return fn;yr=1;var r=fe();function n(i,o,t,a,s){this.name=i,this.buffer=o,this.position=t,this.line=a,this.column=s}return n.prototype.getSnippet=function(o,t){var a,s,u,p,c;if(!this.buffer)return null;for(o=o||4,t=t||75,a="",s=this.position;s>0&&`\0\r
|
|
58
58
|
\u2028\u2029`.indexOf(this.buffer.charAt(s-1))===-1;)if(s-=1,this.position-s>t/2-1){a=" ... ",s+=5;break}for(u="",p=this.position;p<this.buffer.length&&`\0\r
|
|
59
59
|
\u2028\u2029`.indexOf(this.buffer.charAt(p))===-1;)if(p+=1,p-this.position>t/2-1){u=" ... ",p-=5;break}return c=this.buffer.slice(s,p),r.repeat(" ",o)+a+c+u+`
|
|
60
60
|
`+r.repeat(" ",o+this.position-s+a.length)+"^"},n.prototype.toString=function(o){var t,a="";return this.name&&(a+='in "'+this.name+'" '),a+="at line "+(this.line+1)+", column "+(this.column+1),o||(t=this.getSnippet(),t&&(a+=`:
|
|
61
|
-
`+t)),a},
|
|
62
|
-
\r`;function t(p){if(p===null)return!1;var c,f,v=0,x=p.length,F=o;for(f=0;f<x;f++)if(c=F.indexOf(p.charAt(f)),!(c>64)){if(c<0)return!1;v+=6}return v%8===0}function a(p){var c,f,v=p.replace(/[\r\n=]/g,""),x=v.length,F=o,_=0,$=[];for(c=0;c<x;c++)c%4===0&&c&&($.push(_>>16&255),$.push(_>>8&255),$.push(_&255)),_=_<<6|F.indexOf(v.charAt(c));return f=x%4*6,f===0?($.push(_>>16&255),$.push(_>>8&255),$.push(_&255)):f===18?($.push(_>>10&255),$.push(_>>2&255)):f===12&&$.push(_>>4&255),r?r.from?r.from($):new r($):$}function s(p){var c="",f=0,v,x,F=p.length,_=o;for(v=0;v<F;v++)v%3===0&&v&&(c+=_[f>>18&63],c+=_[f>>12&63],c+=_[f>>6&63],c+=_[f&63]),f=(f<<8)+p[v];return x=F%3,x===0?(c+=_[f>>18&63],c+=_[f>>12&63],c+=_[f>>6&63],c+=_[f&63]):x===2?(c+=_[f>>10&63],c+=_[f>>4&63],c+=_[f<<2&63],c+=_[64]):x===1&&(c+=_[f>>2&63],c+=_[f<<4&63],c+=_[64],c+=_[64]),c}function u(p){return r&&r.isBuffer(p)}return
|
|
63
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function
|
|
64
|
-
`,h-1))}function
|
|
61
|
+
`+t)),a},fn=n,fn}var hn,wr;function B(){if(wr)return hn;wr=1;var r=be(),n=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){var s={};return a!==null&&Object.keys(a).forEach(function(u){a[u].forEach(function(p){s[String(p)]=u})}),s}function t(a,s){if(s=s||{},Object.keys(s).forEach(function(u){if(n.indexOf(u)===-1)throw new r('Unknown option "'+u+'" is met in definition of "'+a+'" YAML type.')}),this.tag=a,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(u){return u},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.defaultStyle=s.defaultStyle||null,this.styleAliases=o(s.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return hn=t,hn}var dn,Ar;function he(){if(Ar)return dn;Ar=1;var r=fe(),n=be(),i=B();function o(s,u,p){var c=[];return s.include.forEach(function(f){p=o(f,u,p)}),s[u].forEach(function(f){p.forEach(function(v,x){v.tag===f.tag&&v.kind===f.kind&&c.push(x)}),p.push(f)}),p.filter(function(f,v){return c.indexOf(v)===-1})}function t(){var s={scalar:{},sequence:{},mapping:{},fallback:{}},u,p;function c(f){s[f.kind][f.tag]=s.fallback[f.tag]=f}for(u=0,p=arguments.length;u<p;u+=1)arguments[u].forEach(c);return s}function a(s){this.include=s.include||[],this.implicit=s.implicit||[],this.explicit=s.explicit||[],this.implicit.forEach(function(u){if(u.loadKind&&u.loadKind!=="scalar")throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=o(this,"implicit",[]),this.compiledExplicit=o(this,"explicit",[]),this.compiledTypeMap=t(this.compiledImplicit,this.compiledExplicit)}return a.DEFAULT=null,a.create=function(){var u,p;switch(arguments.length){case 1:u=a.DEFAULT,p=arguments[0];break;case 2:u=arguments[0],p=arguments[1];break;default:throw new n("Wrong number of arguments for Schema.create function")}if(u=r.toArray(u),p=r.toArray(p),!u.every(function(c){return c instanceof a}))throw new n("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!p.every(function(c){return c instanceof i}))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:u,explicit:p})},dn=a,dn}var gn,Sr;function Wt(){if(Sr)return gn;Sr=1;var r=B();return gn=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),gn}var mn,Cr;function Vt(){if(Cr)return mn;Cr=1;var r=B();return mn=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),mn}var xn,Tr;function Qt(){if(Tr)return xn;Tr=1;var r=B();return xn=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),xn}var kn,_r;function vn(){if(_r)return kn;_r=1;var r=he();return kn=new r({explicit:[Wt(),Vt(),Qt()]}),kn}var bn,Er;function Jt(){if(Er)return bn;Er=1;var r=B();function n(t){if(t===null)return!0;var a=t.length;return a===1&&t==="~"||a===4&&(t==="null"||t==="Null"||t==="NULL")}function i(){return null}function o(t){return t===null}return bn=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),bn}var yn,Rr;function Xt(){if(Rr)return yn;Rr=1;var r=B();function n(t){if(t===null)return!1;var a=t.length;return a===4&&(t==="true"||t==="True"||t==="TRUE")||a===5&&(t==="false"||t==="False"||t==="FALSE")}function i(t){return t==="true"||t==="True"||t==="TRUE"}function o(t){return Object.prototype.toString.call(t)==="[object Boolean]"}return yn=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"}),yn}var wn,Fr;function ei(){if(Fr)return wn;Fr=1;var r=fe(),n=B();function i(p){return 48<=p&&p<=57||65<=p&&p<=70||97<=p&&p<=102}function o(p){return 48<=p&&p<=55}function t(p){return 48<=p&&p<=57}function a(p){if(p===null)return!1;var c=p.length,f=0,v=!1,x;if(!c)return!1;if(x=p[f],(x==="-"||x==="+")&&(x=p[++f]),x==="0"){if(f+1===c)return!0;if(x=p[++f],x==="b"){for(f++;f<c;f++)if(x=p[f],x!=="_"){if(x!=="0"&&x!=="1")return!1;v=!0}return v&&x!=="_"}if(x==="x"){for(f++;f<c;f++)if(x=p[f],x!=="_"){if(!i(p.charCodeAt(f)))return!1;v=!0}return v&&x!=="_"}for(;f<c;f++)if(x=p[f],x!=="_"){if(!o(p.charCodeAt(f)))return!1;v=!0}return v&&x!=="_"}if(x==="_")return!1;for(;f<c;f++)if(x=p[f],x!=="_"){if(x===":")break;if(!t(p.charCodeAt(f)))return!1;v=!0}return!v||x==="_"?!1:x!==":"?!0:/^(:[0-5]?[0-9])+$/.test(p.slice(f))}function s(p){var c=p,f=1,v,x,F=[];return c.indexOf("_")!==-1&&(c=c.replace(/_/g,"")),v=c[0],(v==="-"||v==="+")&&(v==="-"&&(f=-1),c=c.slice(1),v=c[0]),c==="0"?0:v==="0"?c[1]==="b"?f*parseInt(c.slice(2),2):c[1]==="x"?f*parseInt(c,16):f*parseInt(c,8):c.indexOf(":")!==-1?(c.split(":").forEach(function(_){F.unshift(parseInt(_,10))}),c=0,x=1,F.forEach(function(_){c+=_*x,x*=60}),f*c):f*parseInt(c,10)}function u(p){return Object.prototype.toString.call(p)==="[object Number]"&&p%1===0&&!r.isNegativeZero(p)}return wn=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:u,represent:{binary:function(p){return p>=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0"+p.toString(8):"-0"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),wn}var An,Lr;function ni(){if(Lr)return An;Lr=1;var r=fe(),n=B(),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(p){return!(p===null||!i.test(p)||p[p.length-1]==="_")}function t(p){var c,f,v,x;return c=p.replace(/_/g,"").toLowerCase(),f=c[0]==="-"?-1:1,x=[],"+-".indexOf(c[0])>=0&&(c=c.slice(1)),c===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:c===".nan"?NaN:c.indexOf(":")>=0?(c.split(":").forEach(function(F){x.unshift(parseFloat(F,10))}),c=0,v=1,x.forEach(function(F){c+=F*v,v*=60}),f*c):f*parseFloat(c,10)}var a=/^[-+]?[0-9]+e/;function s(p,c){var f;if(isNaN(p))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(p))return"-0.0";return f=p.toString(10),a.test(f)?f.replace("e",".e"):f}function u(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||r.isNegativeZero(p))}return An=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:t,predicate:u,represent:s,defaultStyle:"lowercase"}),An}var Sn,Ir;function $r(){if(Ir)return Sn;Ir=1;var r=he();return Sn=new r({include:[vn()],implicit:[Jt(),Xt(),ei(),ni()]}),Sn}var Cn,Or;function Mr(){if(Or)return Cn;Or=1;var r=he();return Cn=new r({include:[$r()]}),Cn}var Tn,Dr;function ri(){if(Dr)return Tn;Dr=1;var r=B(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(s){return s===null?!1:n.exec(s)!==null||i.exec(s)!==null}function t(s){var u,p,c,f,v,x,F,_=0,$=null,H,Z,K;if(u=n.exec(s),u===null&&(u=i.exec(s)),u===null)throw new Error("Date resolve error");if(p=+u[1],c=+u[2]-1,f=+u[3],!u[4])return new Date(Date.UTC(p,c,f));if(v=+u[4],x=+u[5],F=+u[6],u[7]){for(_=u[7].slice(0,3);_.length<3;)_+="0";_=+_}return u[9]&&(H=+u[10],Z=+(u[11]||0),$=(H*60+Z)*6e4,u[9]==="-"&&($=-$)),K=new Date(Date.UTC(p,c,f,v,x,F,_)),$&&K.setTime(K.getTime()-$),K}function a(s){return s.toISOString()}return Tn=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:t,instanceOf:Date,represent:a}),Tn}var _n,Pr;function ti(){if(Pr)return _n;Pr=1;var r=B();function n(i){return i==="<<"||i===null}return _n=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n}),_n}function qr(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var En,Nr;function ii(){if(Nr)return En;Nr=1;var r;try{var n=qr;r=n("buffer").Buffer}catch{}var i=B(),o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
62
|
+
\r`;function t(p){if(p===null)return!1;var c,f,v=0,x=p.length,F=o;for(f=0;f<x;f++)if(c=F.indexOf(p.charAt(f)),!(c>64)){if(c<0)return!1;v+=6}return v%8===0}function a(p){var c,f,v=p.replace(/[\r\n=]/g,""),x=v.length,F=o,_=0,$=[];for(c=0;c<x;c++)c%4===0&&c&&($.push(_>>16&255),$.push(_>>8&255),$.push(_&255)),_=_<<6|F.indexOf(v.charAt(c));return f=x%4*6,f===0?($.push(_>>16&255),$.push(_>>8&255),$.push(_&255)):f===18?($.push(_>>10&255),$.push(_>>2&255)):f===12&&$.push(_>>4&255),r?r.from?r.from($):new r($):$}function s(p){var c="",f=0,v,x,F=p.length,_=o;for(v=0;v<F;v++)v%3===0&&v&&(c+=_[f>>18&63],c+=_[f>>12&63],c+=_[f>>6&63],c+=_[f&63]),f=(f<<8)+p[v];return x=F%3,x===0?(c+=_[f>>18&63],c+=_[f>>12&63],c+=_[f>>6&63],c+=_[f&63]):x===2?(c+=_[f>>10&63],c+=_[f>>4&63],c+=_[f<<2&63],c+=_[64]):x===1&&(c+=_[f>>2&63],c+=_[f<<4&63],c+=_[64],c+=_[64]),c}function u(p){return r&&r.isBuffer(p)}return En=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t,construct:a,predicate:u,represent:s}),En}var Rn,Br;function li(){if(Br)return Rn;Br=1;var r=B(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;var s=[],u,p,c,f,v,x=a;for(u=0,p=x.length;u<p;u+=1){if(c=x[u],v=!1,i.call(c)!=="[object Object]")return!1;for(f in c)if(n.call(c,f))if(!v)v=!0;else return!1;if(!v)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function t(a){return a!==null?a:[]}return Rn=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:t}),Rn}var Fn,zr;function oi(){if(zr)return Fn;zr=1;var r=B(),n=Object.prototype.toString;function i(t){if(t===null)return!0;var a,s,u,p,c,f=t;for(c=new Array(f.length),a=0,s=f.length;a<s;a+=1){if(u=f[a],n.call(u)!=="[object Object]"||(p=Object.keys(u),p.length!==1))return!1;c[a]=[p[0],u[p[0]]]}return!0}function o(t){if(t===null)return[];var a,s,u,p,c,f=t;for(c=new Array(f.length),a=0,s=f.length;a<s;a+=1)u=f[a],p=Object.keys(u),c[a]=[p[0],u[p[0]]];return c}return Fn=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o}),Fn}var Ln,Hr;function ai(){if(Hr)return Ln;Hr=1;var r=B(),n=Object.prototype.hasOwnProperty;function i(t){if(t===null)return!0;var a,s=t;for(a in s)if(n.call(s,a)&&s[a]!==null)return!1;return!0}function o(t){return t!==null?t:{}}return Ln=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o}),Ln}var In,jr;function ye(){if(jr)return In;jr=1;var r=he();return In=new r({include:[Mr()],implicit:[ri(),ti()],explicit:[ii(),li(),oi(),ai()]}),In}var $n,Yr;function si(){if(Yr)return $n;Yr=1;var r=B();function n(){return!0}function i(){}function o(){return""}function t(a){return typeof a>"u"}return $n=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n,construct:i,predicate:t,represent:o}),$n}var On,Ur;function ui(){if(Ur)return On;Ur=1;var r=B();function n(a){if(a===null||a.length===0)return!1;var s=a,u=/\/([gim]*)$/.exec(a),p="";return!(s[0]==="/"&&(u&&(p=u[1]),p.length>3||s[s.length-p.length-1]!=="/"))}function i(a){var s=a,u=/\/([gim]*)$/.exec(a),p="";return s[0]==="/"&&(u&&(p=u[1]),s=s.slice(1,s.length-p.length-1)),new RegExp(s,p)}function o(a){var s="/"+a.source+"/";return a.global&&(s+="g"),a.multiline&&(s+="m"),a.ignoreCase&&(s+="i"),s}function t(a){return Object.prototype.toString.call(a)==="[object RegExp]"}return On=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:n,construct:i,predicate:t,represent:o}),On}var Mn,Gr;function ci(){if(Gr)return Mn;Gr=1;var r;try{var n=qr;r=n("esprima")}catch{typeof window<"u"&&(r=window.esprima)}var i=B();function o(u){if(u===null)return!1;try{var p="("+u+")",c=r.parse(p,{range:!0});return!(c.type!=="Program"||c.body.length!==1||c.body[0].type!=="ExpressionStatement"||c.body[0].expression.type!=="ArrowFunctionExpression"&&c.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function t(u){var p="("+u+")",c=r.parse(p,{range:!0}),f=[],v;if(c.type!=="Program"||c.body.length!==1||c.body[0].type!=="ExpressionStatement"||c.body[0].expression.type!=="ArrowFunctionExpression"&&c.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return c.body[0].expression.params.forEach(function(x){f.push(x.name)}),v=c.body[0].expression.body.range,c.body[0].expression.body.type==="BlockStatement"?new Function(f,p.slice(v[0]+1,v[1]-1)):new Function(f,"return "+p.slice(v[0],v[1]))}function a(u){return u.toString()}function s(u){return Object.prototype.toString.call(u)==="[object Function]"}return Mn=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:o,construct:t,predicate:s,represent:a}),Mn}var Dn,Zr;function $e(){if(Zr)return Dn;Zr=1;var r=he();return Dn=r.DEFAULT=new r({include:[ye()],explicit:[si(),ui(),ci()]}),Dn}var Kr;function pi(){if(Kr)return pe;Kr=1;var r=fe(),n=be(),i=Kt(),o=ye(),t=$e(),a=Object.prototype.hasOwnProperty,s=1,u=2,p=3,c=4,f=1,v=2,x=3,F=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=/[\x85\u2028\u2029]/,$=/[,\[\]\{\}]/,H=/^(?:!|!!|![a-z\-]+!)$/i,Z=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function K(e){return Object.prototype.toString.call(e)}function j(e){return e===10||e===13}function W(e){return e===9||e===32}function z(e){return e===9||e===32||e===10||e===13}function V(e){return e===44||e===91||e===93||e===123||e===125}function ie(e){var h;return 48<=e&&e<=57?e-48:(h=e|32,97<=h&&h<=102?h-97+10:-1)}function Me(e){return e===120?2:e===117?4:e===85?8:0}function De(e){return 48<=e&&e<=57?e-48:-1}function Pe(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
63
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function qe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Ne=new Array(256),we=new Array(256),P=0;P<256;P++)Ne[P]=Pe(P)?1:0,we[P]=Pe(P);function zn(e,h){this.input=e,this.filename=h.filename||null,this.schema=h.schema||t,this.onWarning=h.onWarning||null,this.legacy=h.legacy||!1,this.json=h.json||!1,this.listener=h.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Be(e,h){return new n(h,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,h){throw Be(e,h)}function ge(e,h){e.onWarning&&e.onWarning.call(null,Be(e,h))}var Ae={YAML:function(h,k,C){var b,T,l;h.version!==null&&R(h,"duplication of %YAML directive"),C.length!==1&&R(h,"YAML directive accepts exactly one argument"),b=/^([0-9]+)\.([0-9]+)$/.exec(C[0]),b===null&&R(h,"ill-formed argument of the YAML directive"),T=parseInt(b[1],10),l=parseInt(b[2],10),T!==1&&R(h,"unacceptable YAML version of the document"),h.version=C[0],h.checkLineBreaks=l<2,l!==1&&l!==2&&ge(h,"unsupported YAML version of the document")},TAG:function(h,k,C){var b,T;C.length!==2&&R(h,"TAG directive accepts exactly two arguments"),b=C[0],T=C[1],H.test(b)||R(h,"ill-formed tag handle (first argument) of the TAG directive"),a.call(h.tagMap,b)&&R(h,'there is a previously declared suffix for "'+b+'" tag handle'),Z.test(T)||R(h,"ill-formed tag prefix (second argument) of the TAG directive"),h.tagMap[b]=T}};function Q(e,h,k,C){var b,T,l,d;if(h<k){if(d=e.input.slice(h,k),C)for(b=0,T=d.length;b<T;b+=1)l=d.charCodeAt(b),l===9||32<=l&&l<=1114111||R(e,"expected valid JSON character");else F.test(d)&&R(e,"the stream contains non-printable characters");e.result+=d}}function ze(e,h,k,C){var b,T,l,d;for(r.isObject(k)||R(e,"cannot merge mappings; the provided source object is unacceptable"),b=Object.keys(k),l=0,d=b.length;l<d;l+=1)T=b[l],a.call(h,T)||(h[T]=k[T],C[T]=!0)}function X(e,h,k,C,b,T,l,d){var g,A;if(Array.isArray(b))for(b=Array.prototype.slice.call(b),g=0,A=b.length;g<A;g+=1)Array.isArray(b[g])&&R(e,"nested arrays are not supported inside keys"),typeof b=="object"&&K(b[g])==="[object Object]"&&(b[g]="[object Object]");if(typeof b=="object"&&K(b)==="[object Object]"&&(b="[object Object]"),b=String(b),h===null&&(h={}),C==="tag:yaml.org,2002:merge")if(Array.isArray(T))for(g=0,A=T.length;g<A;g+=1)ze(e,h,T[g],k);else ze(e,h,T,k);else!e.json&&!a.call(k,b)&&a.call(h,b)&&(e.line=l||e.line,e.position=d||e.position,R(e,"duplicated mapping key")),h[b]=T,delete k[b];return h}function ee(e){var h;h=e.input.charCodeAt(e.position),h===10?e.position++:h===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):R(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function q(e,h,k){for(var C=0,b=e.input.charCodeAt(e.position);b!==0;){for(;W(b);)b=e.input.charCodeAt(++e.position);if(h&&b===35)do b=e.input.charCodeAt(++e.position);while(b!==10&&b!==13&&b!==0);if(j(b))for(ee(e),b=e.input.charCodeAt(e.position),C++,e.lineIndent=0;b===32;)e.lineIndent++,b=e.input.charCodeAt(++e.position);else break}return k!==-1&&C!==0&&e.lineIndent<k&&ge(e,"deficient indentation"),C}function ue(e){var h=e.position,k;return k=e.input.charCodeAt(h),!!((k===45||k===46)&&k===e.input.charCodeAt(h+1)&&k===e.input.charCodeAt(h+2)&&(h+=3,k=e.input.charCodeAt(h),k===0||z(k)))}function Se(e,h){h===1?e.result+=" ":h>1&&(e.result+=r.repeat(`
|
|
64
|
+
`,h-1))}function He(e,h,k){var C,b,T,l,d,g,A,w,m=e.kind,S=e.result,y;if(y=e.input.charCodeAt(e.position),z(y)||V(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(b=e.input.charCodeAt(e.position+1),z(b)||k&&V(b)))return!1;for(e.kind="scalar",e.result="",T=l=e.position,d=!1;y!==0;){if(y===58){if(b=e.input.charCodeAt(e.position+1),z(b)||k&&V(b))break}else if(y===35){if(C=e.input.charCodeAt(e.position-1),z(C))break}else{if(e.position===e.lineStart&&ue(e)||k&&V(y))break;if(j(y))if(g=e.line,A=e.lineStart,w=e.lineIndent,q(e,!1,-1),e.lineIndent>=h){d=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=g,e.lineStart=A,e.lineIndent=w;break}}d&&(Q(e,T,l,!1),Se(e,e.line-g),T=l=e.position,d=!1),W(y)||(l=e.position+1),y=e.input.charCodeAt(++e.position)}return Q(e,T,l,!1),e.result?!0:(e.kind=m,e.result=S,!1)}function je(e,h){var k,C,b;if(k=e.input.charCodeAt(e.position),k!==39)return!1;for(e.kind="scalar",e.result="",e.position++,C=b=e.position;(k=e.input.charCodeAt(e.position))!==0;)if(k===39)if(Q(e,C,e.position,!0),k=e.input.charCodeAt(++e.position),k===39)C=e.position,e.position++,b=e.position;else return!0;else j(k)?(Q(e,C,b,!0),Se(e,q(e,!1,h)),C=b=e.position):e.position===e.lineStart&&ue(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,b=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function Ye(e,h){var k,C,b,T,l,d;if(d=e.input.charCodeAt(e.position),d!==34)return!1;for(e.kind="scalar",e.result="",e.position++,k=C=e.position;(d=e.input.charCodeAt(e.position))!==0;){if(d===34)return Q(e,k,e.position,!0),e.position++,!0;if(d===92){if(Q(e,k,e.position,!0),d=e.input.charCodeAt(++e.position),j(d))q(e,!1,h);else if(d<256&&Ne[d])e.result+=we[d],e.position++;else if((l=Me(d))>0){for(b=l,T=0;b>0;b--)d=e.input.charCodeAt(++e.position),(l=ie(d))>=0?T=(T<<4)+l:R(e,"expected hexadecimal character");e.result+=qe(T),e.position++}else R(e,"unknown escape sequence");k=C=e.position}else j(d)?(Q(e,k,C,!0),Se(e,q(e,!1,h)),k=C=e.position):e.position===e.lineStart&&ue(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,C=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function Ue(e,h){var k=!0,C,b=e.tag,T,l=e.anchor,d,g,A,w,m,S={},y,E,I,L;if(L=e.input.charCodeAt(e.position),L===91)g=93,m=!1,T=[];else if(L===123)g=125,m=!0,T={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=T),L=e.input.charCodeAt(++e.position);L!==0;){if(q(e,!0,h),L=e.input.charCodeAt(e.position),L===g)return e.position++,e.tag=b,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=T,!0;k||R(e,"missed comma between flow collection entries"),E=y=I=null,A=w=!1,L===63&&(d=e.input.charCodeAt(e.position+1),z(d)&&(A=w=!0,e.position++,q(e,!0,h))),C=e.line,oe(e,h,s,!1,!0),E=e.tag,y=e.result,q(e,!0,h),L=e.input.charCodeAt(e.position),(w||e.line===C)&&L===58&&(A=!0,L=e.input.charCodeAt(++e.position),q(e,!0,h),oe(e,h,s,!1,!0),I=e.result),m?X(e,T,S,E,y,I):A?T.push(X(e,null,S,E,y,I)):T.push(y),q(e,!0,h),L=e.input.charCodeAt(e.position),L===44?(k=!0,L=e.input.charCodeAt(++e.position)):k=!1}R(e,"unexpected end of the stream within a flow collection")}function Ge(e,h){var k,C,b=f,T=!1,l=!1,d=h,g=0,A=!1,w,m;if(m=e.input.charCodeAt(e.position),m===124)C=!1;else if(m===62)C=!0;else return!1;for(e.kind="scalar",e.result="";m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)f===b?b=m===43?x:v:R(e,"repeat of a chomping mode identifier");else if((w=De(m))>=0)w===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?R(e,"repeat of an indentation width identifier"):(d=h+w-1,l=!0);else break;if(W(m)){do m=e.input.charCodeAt(++e.position);while(W(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!j(m)&&m!==0)}for(;m!==0;){for(ee(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!l||e.lineIndent<d)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>d&&(d=e.lineIndent),j(m)){g++;continue}if(e.lineIndent<d){b===x?e.result+=r.repeat(`
|
|
65
65
|
`,T?1+g:g):b===f&&T&&(e.result+=`
|
|
66
66
|
`);break}for(C?W(m)?(A=!0,e.result+=r.repeat(`
|
|
67
67
|
`,T?1+g:g)):A?(A=!1,e.result+=r.repeat(`
|
|
68
68
|
`,g+1)):g===0?T&&(e.result+=" "):e.result+=r.repeat(`
|
|
69
69
|
`,g):e.result+=r.repeat(`
|
|
70
|
-
`,T?1+g:g),T=!0,l=!0,g=0,k=e.position;!j(m)&&m!==0;)m=e.input.charCodeAt(++e.position);Q(e,k,e.position,!1)}return!0}function ce(e,h){var k,C=e.tag,b=e.anchor,T=[],l,d=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=T),g=e.input.charCodeAt(e.position);g!==0&&!(g!==45||(l=e.input.charCodeAt(e.position+1),!z(l)));){if(d=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=h){T.push(null),g=e.input.charCodeAt(e.position);continue}if(k=e.line,oe(e,h,p,!1,!0),T.push(e.result),q(e,!0,-1),g=e.input.charCodeAt(e.position),(e.line===k||e.lineIndent>h)&&g!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<h)break}return d?(e.tag=C,e.anchor=b,e.kind="sequence",e.result=T,!0):!1}function
|
|
71
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var k=new
|
|
70
|
+
`,T?1+g:g),T=!0,l=!0,g=0,k=e.position;!j(m)&&m!==0;)m=e.input.charCodeAt(++e.position);Q(e,k,e.position,!1)}return!0}function ce(e,h){var k,C=e.tag,b=e.anchor,T=[],l,d=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=T),g=e.input.charCodeAt(e.position);g!==0&&!(g!==45||(l=e.input.charCodeAt(e.position+1),!z(l)));){if(d=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=h){T.push(null),g=e.input.charCodeAt(e.position);continue}if(k=e.line,oe(e,h,p,!1,!0),T.push(e.result),q(e,!0,-1),g=e.input.charCodeAt(e.position),(e.line===k||e.lineIndent>h)&&g!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<h)break}return d?(e.tag=C,e.anchor=b,e.kind="sequence",e.result=T,!0):!1}function Hn(e,h,k){var C,b,T,l,d=e.tag,g=e.anchor,A={},w={},m=null,S=null,y=null,E=!1,I=!1,L;for(e.anchor!==null&&(e.anchorMap[e.anchor]=A),L=e.input.charCodeAt(e.position);L!==0;){if(C=e.input.charCodeAt(e.position+1),T=e.line,l=e.position,(L===63||L===58)&&z(C))L===63?(E&&(X(e,A,w,m,S,null),m=S=y=null),I=!0,E=!0,b=!0):E?(E=!1,b=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,L=C;else if(oe(e,k,u,!1,!0))if(e.line===T){for(L=e.input.charCodeAt(e.position);W(L);)L=e.input.charCodeAt(++e.position);if(L===58)L=e.input.charCodeAt(++e.position),z(L)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(X(e,A,w,m,S,null),m=S=y=null),I=!0,E=!1,b=!1,m=e.tag,S=e.result;else if(I)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=g,!0}else if(I)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=g,!0;else break;if((e.line===T||e.lineIndent>h)&&(oe(e,h,c,!0,b)&&(E?S=e.result:y=e.result),E||(X(e,A,w,m,S,y,T,l),m=S=y=null),q(e,!0,-1),L=e.input.charCodeAt(e.position)),e.lineIndent>h&&L!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<h)break}return E&&X(e,A,w,m,S,null),I&&(e.tag=d,e.anchor=g,e.kind="mapping",e.result=A),I}function jn(e){var h,k=!1,C=!1,b,T,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(k=!0,l=e.input.charCodeAt(++e.position)):l===33?(C=!0,b="!!",l=e.input.charCodeAt(++e.position)):b="!",h=e.position,k){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(T=e.input.slice(h,e.position),l=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!z(l);)l===33&&(C?R(e,"tag suffix cannot contain exclamation marks"):(b=e.input.slice(h-1,e.position+1),H.test(b)||R(e,"named tag handle cannot contain such characters"),C=!0,h=e.position+1)),l=e.input.charCodeAt(++e.position);T=e.input.slice(h,e.position),$.test(T)&&R(e,"tag suffix cannot contain flow indicator characters")}return T&&!Z.test(T)&&R(e,"tag name cannot contain such characters: "+T),k?e.tag=T:a.call(e.tagMap,b)?e.tag=e.tagMap[b]+T:b==="!"?e.tag="!"+T:b==="!!"?e.tag="tag:yaml.org,2002:"+T:R(e,'undeclared tag handle "'+b+'"'),!0}function Ze(e){var h,k;if(k=e.input.charCodeAt(e.position),k!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),k=e.input.charCodeAt(++e.position),h=e.position;k!==0&&!z(k)&&!V(k);)k=e.input.charCodeAt(++e.position);return e.position===h&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(h,e.position),!0}function Ke(e){var h,k,C;if(C=e.input.charCodeAt(e.position),C!==42)return!1;for(C=e.input.charCodeAt(++e.position),h=e.position;C!==0&&!z(C)&&!V(C);)C=e.input.charCodeAt(++e.position);return e.position===h&&R(e,"name of an alias node must contain at least one character"),k=e.input.slice(h,e.position),a.call(e.anchorMap,k)||R(e,'unidentified alias "'+k+'"'),e.result=e.anchorMap[k],q(e,!0,-1),!0}function oe(e,h,k,C,b){var T,l,d,g=1,A=!1,w=!1,m,S,y,E,I;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,T=l=d=c===k||p===k,C&&q(e,!0,-1)&&(A=!0,e.lineIndent>h?g=1:e.lineIndent===h?g=0:e.lineIndent<h&&(g=-1)),g===1)for(;jn(e)||Ze(e);)q(e,!0,-1)?(A=!0,d=T,e.lineIndent>h?g=1:e.lineIndent===h?g=0:e.lineIndent<h&&(g=-1)):d=!1;if(d&&(d=A||b),(g===1||c===k)&&(s===k||u===k?E=h:E=h+1,I=e.position-e.lineStart,g===1?d&&(ce(e,I)||Hn(e,I,E))||Ue(e,E)?w=!0:(l&&Ge(e,E)||je(e,E)||Ye(e,E)?w=!0:Ke(e)?(w=!0,(e.tag!==null||e.anchor!==null)&&R(e,"alias node should not have any properties")):He(e,E,s===k)&&(w=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g===0&&(w=d&&ce(e,I))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&R(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),m=0,S=e.implicitTypes.length;m<S;m+=1)if(y=e.implicitTypes[m],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else a.call(e.typeMap[e.kind||"fallback"],e.tag)?(y=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&y.kind!==e.kind&&R(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result)?(e.result=y.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||w}function We(e){var h=e.position,k,C,b,T=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(l=e.input.charCodeAt(e.position))!==0&&(q(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(T=!0,l=e.input.charCodeAt(++e.position),k=e.position;l!==0&&!z(l);)l=e.input.charCodeAt(++e.position);for(C=e.input.slice(k,e.position),b=[],C.length<1&&R(e,"directive name must not be less than one character in length");l!==0;){for(;W(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!j(l));break}if(j(l))break;for(k=e.position;l!==0&&!z(l);)l=e.input.charCodeAt(++e.position);b.push(e.input.slice(k,e.position))}l!==0&&ee(e),a.call(Ae,C)?Ae[C](e,C,b):ge(e,'unknown document directive "'+C+'"')}if(q(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,q(e,!0,-1)):T&&R(e,"directives end mark is expected"),oe(e,e.lineIndent-1,c,!1,!0),q(e,!0,-1),e.checkLineBreaks&&_.test(e.input.slice(h,e.position))&&ge(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ue(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,q(e,!0,-1));return}if(e.position<e.length-1)R(e,"end of the stream or a document separator is expected");else return}function Ve(e,h){e=String(e),h=h||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
71
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var k=new zn(e,h),C=e.indexOf("\0");for(C!==-1&&(k.position=C,R(k,"null byte is not allowed in input")),k.input+="\0";k.input.charCodeAt(k.position)===32;)k.lineIndent+=1,k.position+=1;for(;k.position<k.length-1;)We(k);return k.documents}function Qe(e,h,k){h!==null&&typeof h=="object"&&typeof k>"u"&&(k=h,h=null);var C=Ve(e,k);if(typeof h!="function")return C;for(var b=0,T=C.length;b<T;b+=1)h(C[b])}function Je(e,h){var k=Ve(e,h);if(k.length!==0){if(k.length===1)return k[0];throw new n("expected a single document in the stream, but found more")}}function Yn(e,h,k){return typeof h=="object"&&h!==null&&typeof k>"u"&&(k=h,h=null),Qe(e,h,r.extend({schema:o},k))}function Un(e,h){return Je(e,r.extend({schema:o},h))}return pe.loadAll=Qe,pe.load=Je,pe.safeLoadAll=Yn,pe.safeLoad=Un,pe}var Oe={},Wr;function fi(){if(Wr)return Oe;Wr=1;var r=fe(),n=be(),i=$e(),o=ye(),t=Object.prototype.toString,a=Object.prototype.hasOwnProperty,s=9,u=10,p=13,c=32,f=33,v=34,x=35,F=37,_=38,$=39,H=42,Z=44,K=45,j=58,W=61,z=62,V=63,ie=64,Me=91,De=93,Pe=96,qe=123,Ne=124,we=125,P={};P[0]="\\0",P[7]="\\a",P[8]="\\b",P[9]="\\t",P[10]="\\n",P[11]="\\v",P[12]="\\f",P[13]="\\r",P[27]="\\e",P[34]='\\"',P[92]="\\\\",P[133]="\\N",P[160]="\\_",P[8232]="\\L",P[8233]="\\P";var zn=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Be(l,d){var g,A,w,m,S,y,E;if(d===null)return{};for(g={},A=Object.keys(d),w=0,m=A.length;w<m;w+=1)S=A[w],y=String(d[S]),S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2)),E=l.compiledTypeMap.fallback[S],E&&a.call(E.styleAliases,y)&&(y=E.styleAliases[y]),g[S]=y;return g}function R(l){var d,g,A;if(d=l.toString(16).toUpperCase(),l<=255)g="x",A=2;else if(l<=65535)g="u",A=4;else if(l<=4294967295)g="U",A=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+g+r.repeat("0",A-d.length)+d}function ge(l){this.schema=l.schema||i,this.indent=Math.max(1,l.indent||2),this.noArrayIndent=l.noArrayIndent||!1,this.skipInvalid=l.skipInvalid||!1,this.flowLevel=r.isNothing(l.flowLevel)?-1:l.flowLevel,this.styleMap=Be(this.schema,l.styles||null),this.sortKeys=l.sortKeys||!1,this.lineWidth=l.lineWidth||80,this.noRefs=l.noRefs||!1,this.noCompatMode=l.noCompatMode||!1,this.condenseFlow=l.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(l,d){for(var g=r.repeat(" ",d),A=0,w=-1,m="",S,y=l.length;A<y;)w=l.indexOf(`
|
|
72
72
|
`,A),w===-1?(S=l.slice(A),A=y):(S=l.slice(A,w+1),A=w+1),S.length&&S!==`
|
|
73
73
|
`&&(m+=g),m+=S;return m}function Q(l,d){return`
|
|
74
|
-
`+r.repeat(" ",l.indent*d)}function
|
|
74
|
+
`+r.repeat(" ",l.indent*d)}function ze(l,d){var g,A,w;for(g=0,A=l.implicitTypes.length;g<A;g+=1)if(w=l.implicitTypes[g],w.resolve(d))return!0;return!1}function X(l){return l===c||l===s}function ee(l){return 32<=l&&l<=126||161<=l&&l<=55295&&l!==8232&&l!==8233||57344<=l&&l<=65533&&l!==65279||65536<=l&&l<=1114111}function q(l){return ee(l)&&!X(l)&&l!==65279&&l!==p&&l!==u}function ue(l,d){return ee(l)&&l!==65279&&l!==Z&&l!==Me&&l!==De&&l!==qe&&l!==we&&l!==j&&(l!==x||d&&q(d))}function Se(l){return ee(l)&&l!==65279&&!X(l)&&l!==K&&l!==V&&l!==j&&l!==Z&&l!==Me&&l!==De&&l!==qe&&l!==we&&l!==x&&l!==_&&l!==H&&l!==f&&l!==Ne&&l!==W&&l!==z&&l!==$&&l!==v&&l!==F&&l!==ie&&l!==Pe}function He(l){var d=/^\n* /;return d.test(l)}var je=1,Ye=2,Ue=3,Ge=4,ce=5;function Hn(l,d,g,A,w){var m,S,y,E=!1,I=!1,L=A!==-1,ne=-1,Y=Se(l.charCodeAt(0))&&!X(l.charCodeAt(l.length-1));if(d)for(m=0;m<l.length;m++){if(S=l.charCodeAt(m),!ee(S))return ce;y=m>0?l.charCodeAt(m-1):null,Y=Y&&ue(S,y)}else{for(m=0;m<l.length;m++){if(S=l.charCodeAt(m),S===u)E=!0,L&&(I=I||m-ne-1>A&&l[ne+1]!==" ",ne=m);else if(!ee(S))return ce;y=m>0?l.charCodeAt(m-1):null,Y=Y&&ue(S,y)}I=I||L&&m-ne-1>A&&l[ne+1]!==" "}return!E&&!I?Y&&!w(l)?je:Ye:g>9&&He(l)?ce:I?Ge:Ue}function jn(l,d,g,A){l.dump=(function(){if(d.length===0)return"''";if(!l.noCompatMode&&zn.indexOf(d)!==-1)return"'"+d+"'";var w=l.indent*Math.max(1,g),m=l.lineWidth===-1?-1:Math.max(Math.min(l.lineWidth,40),l.lineWidth-w),S=A||l.flowLevel>-1&&g>=l.flowLevel;function y(E){return ze(l,E)}switch(Hn(d,S,l.indent,m,y)){case je:return d;case Ye:return"'"+d.replace(/'/g,"''")+"'";case Ue:return"|"+Ze(d,l.indent)+Ke(Ae(d,w));case Ge:return">"+Ze(d,l.indent)+Ke(Ae(oe(d,m),w));case ce:return'"'+Ve(d)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ze(l,d){var g=He(l)?String(d):"",A=l[l.length-1]===`
|
|
75
75
|
`,w=A&&(l[l.length-2]===`
|
|
76
76
|
`||l===`
|
|
77
77
|
`),m=w?"+":A?"":"-";return g+m+`
|
|
78
|
-
`}function
|
|
78
|
+
`}function Ke(l){return l[l.length-1]===`
|
|
79
79
|
`?l.slice(0,-1):l}function oe(l,d){for(var g=/(\n+)([^\n]*)/g,A=(function(){var I=l.indexOf(`
|
|
80
|
-
`);return I=I!==-1?I:l.length,g.lastIndex=I,
|
|
80
|
+
`);return I=I!==-1?I:l.length,g.lastIndex=I,We(l.slice(0,I),d)})(),w=l[0]===`
|
|
81
81
|
`||l[0]===" ",m,S;S=g.exec(l);){var y=S[1],E=S[2];m=E[0]===" ",A+=y+(!w&&!m&&E!==""?`
|
|
82
|
-
`:"")+
|
|
82
|
+
`:"")+We(E,d),w=m}return A}function We(l,d){if(l===""||l[0]===" ")return l;for(var g=/ [^ ]/g,A,w=0,m,S=0,y=0,E="";A=g.exec(l);)y=A.index,y-w>d&&(m=S>w?S:y,E+=`
|
|
83
83
|
`+l.slice(w,m),w=m+1),S=y;return E+=`
|
|
84
84
|
`,l.length-w>d&&S>w?E+=l.slice(w,S)+`
|
|
85
|
-
`+l.slice(S+1):E+=l.slice(w),E.slice(1)}function
|
|
86
|
-
`:""}function T(l,d){return b(l,r.extend({schema:o},d))}return
|
|
85
|
+
`+l.slice(S+1):E+=l.slice(w),E.slice(1)}function Ve(l){for(var d="",g,A,w,m=0;m<l.length;m++){if(g=l.charCodeAt(m),g>=55296&&g<=56319&&(A=l.charCodeAt(m+1),A>=56320&&A<=57343)){d+=R((g-55296)*1024+A-56320+65536),m++;continue}w=P[g],d+=!w&&ee(g)?l[m]:w||R(g)}return d}function Qe(l,d,g){var A="",w=l.tag,m,S;for(m=0,S=g.length;m<S;m+=1)h(l,d,g[m],!1,!1)&&(m!==0&&(A+=","+(l.condenseFlow?"":" ")),A+=l.dump);l.tag=w,l.dump="["+A+"]"}function Je(l,d,g,A){var w="",m=l.tag,S,y;for(S=0,y=g.length;S<y;S+=1)h(l,d+1,g[S],!0,!0)&&((!A||S!==0)&&(w+=Q(l,d)),l.dump&&u===l.dump.charCodeAt(0)?w+="-":w+="- ",w+=l.dump);l.tag=m,l.dump=w||"[]"}function Yn(l,d,g){var A="",w=l.tag,m=Object.keys(g),S,y,E,I,L;for(S=0,y=m.length;S<y;S+=1)L="",S!==0&&(L+=", "),l.condenseFlow&&(L+='"'),E=m[S],I=g[E],h(l,d,E,!1,!1)&&(l.dump.length>1024&&(L+="? "),L+=l.dump+(l.condenseFlow?'"':"")+":"+(l.condenseFlow?"":" "),h(l,d,I,!1,!1)&&(L+=l.dump,A+=L));l.tag=w,l.dump="{"+A+"}"}function Un(l,d,g,A){var w="",m=l.tag,S=Object.keys(g),y,E,I,L,ne,Y;if(l.sortKeys===!0)S.sort();else if(typeof l.sortKeys=="function")S.sort(l.sortKeys);else if(l.sortKeys)throw new n("sortKeys must be a boolean or a function");for(y=0,E=S.length;y<E;y+=1)Y="",(!A||y!==0)&&(Y+=Q(l,d)),I=S[y],L=g[I],h(l,d+1,I,!0,!0,!0)&&(ne=l.tag!==null&&l.tag!=="?"||l.dump&&l.dump.length>1024,ne&&(l.dump&&u===l.dump.charCodeAt(0)?Y+="?":Y+="? "),Y+=l.dump,ne&&(Y+=Q(l,d)),h(l,d+1,L,!0,ne)&&(l.dump&&u===l.dump.charCodeAt(0)?Y+=":":Y+=": ",Y+=l.dump,w+=Y));l.tag=m,l.dump=w||"{}"}function e(l,d,g){var A,w,m,S,y,E;for(w=g?l.explicitTypes:l.implicitTypes,m=0,S=w.length;m<S;m+=1)if(y=w[m],(y.instanceOf||y.predicate)&&(!y.instanceOf||typeof d=="object"&&d instanceof y.instanceOf)&&(!y.predicate||y.predicate(d))){if(l.tag=g?y.tag:"?",y.represent){if(E=l.styleMap[y.tag]||y.defaultStyle,t.call(y.represent)==="[object Function]")A=y.represent(d,E);else if(a.call(y.represent,E))A=y.represent[E](d,E);else throw new n("!<"+y.tag+'> tag resolver accepts not "'+E+'" style');l.dump=A}return!0}return!1}function h(l,d,g,A,w,m){l.tag=null,l.dump=g,e(l,g,!1)||e(l,g,!0);var S=t.call(l.dump);A&&(A=l.flowLevel<0||l.flowLevel>d);var y=S==="[object Object]"||S==="[object Array]",E,I;if(y&&(E=l.duplicates.indexOf(g),I=E!==-1),(l.tag!==null&&l.tag!=="?"||I||l.indent!==2&&d>0)&&(w=!1),I&&l.usedDuplicates[E])l.dump="*ref_"+E;else{if(y&&I&&!l.usedDuplicates[E]&&(l.usedDuplicates[E]=!0),S==="[object Object]")A&&Object.keys(l.dump).length!==0?(Un(l,d,l.dump,w),I&&(l.dump="&ref_"+E+l.dump)):(Yn(l,d,l.dump),I&&(l.dump="&ref_"+E+" "+l.dump));else if(S==="[object Array]"){var L=l.noArrayIndent&&d>0?d-1:d;A&&l.dump.length!==0?(Je(l,L,l.dump,w),I&&(l.dump="&ref_"+E+l.dump)):(Qe(l,L,l.dump),I&&(l.dump="&ref_"+E+" "+l.dump))}else if(S==="[object String]")l.tag!=="?"&&jn(l,l.dump,d,m);else{if(l.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+S)}l.tag!==null&&l.tag!=="?"&&(l.dump="!<"+l.tag+"> "+l.dump)}return!0}function k(l,d){var g=[],A=[],w,m;for(C(l,g,A),w=0,m=A.length;w<m;w+=1)d.duplicates.push(g[A[w]]);d.usedDuplicates=new Array(m)}function C(l,d,g){var A,w,m;if(l!==null&&typeof l=="object")if(w=d.indexOf(l),w!==-1)g.indexOf(w)===-1&&g.push(w);else if(d.push(l),Array.isArray(l))for(w=0,m=l.length;w<m;w+=1)C(l[w],d,g);else for(A=Object.keys(l),w=0,m=A.length;w<m;w+=1)C(l[A[w]],d,g)}function b(l,d){d=d||{};var g=new ge(d);return g.noRefs||k(l,g),h(g,0,l,!0,!0)?g.dump+`
|
|
86
|
+
`:""}function T(l,d){return b(l,r.extend({schema:o},d))}return Oe.dump=b,Oe.safeDump=T,Oe}var Vr;function hi(){if(Vr)return D;Vr=1;var r=pi(),n=fi();function i(o){return function(){throw new Error("Function "+o+" is deprecated and cannot be used.")}}return D.Type=B(),D.Schema=he(),D.FAILSAFE_SCHEMA=vn(),D.JSON_SCHEMA=$r(),D.CORE_SCHEMA=Mr(),D.DEFAULT_SAFE_SCHEMA=ye(),D.DEFAULT_FULL_SCHEMA=$e(),D.load=r.load,D.loadAll=r.loadAll,D.safeLoad=r.safeLoad,D.safeLoadAll=r.safeLoadAll,D.dump=n.dump,D.safeDump=n.safeDump,D.YAMLException=be(),D.MINIMAL_SCHEMA=vn(),D.SAFE_SCHEMA=ye(),D.DEFAULT_SCHEMA=$e(),D.scan=i("scan"),D.parse=i("parse"),D.compose=i("compose"),D.addConstructor=i("addConstructor"),D}var Pn,Qr;function di(){if(Qr)return Pn;Qr=1;var r=hi();return Pn=r,Pn}var Jr;function gi(){if(Jr)return Ie.exports;Jr=1;var r=di(),n="\\ufeff?",i=typeof process<"u"?process.platform:"",o="^("+n+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(i==="win32"?"\\r?":"")+"(?:\\n)?)",t=new RegExp(o,"m");Ie.exports=a,Ie.exports.test=p;function a(c,f){c=c||"";var v={allowUnsafe:!1};f=f instanceof Object?{...v,...f}:v,f.allowUnsafe=!!f.allowUnsafe;var x=c.split(/(\r?\n)/);return x[0]&&/= yaml =|---/.test(x[0])?u(c,f.allowUnsafe):{attributes:{},body:c,bodyBegin:1}}function s(c,f){for(var v=1,x=f.indexOf(`
|
|
87
87
|
`),F=c.index+c[0].length;x!==-1;){if(x>=F)return v;v++,x=f.indexOf(`
|
|
88
|
-
`,x+1)}return v}function u(c,f){var v=t.exec(c);if(!v)return{attributes:{},body:c,bodyBegin:1};var x=f?r.load:r.safeLoad,F=v[v.length-1].replace(/^\s+|\s+$/g,""),_=x(F)||{},$=c.replace(v[0],""),H=s(v,c);return{attributes:_,body:$,bodyBegin:H,frontmatter:F}}function p(c){return c=c||"",t.test(c)}return
|
|
88
|
+
`,x+1)}return v}function u(c,f){var v=t.exec(c);if(!v)return{attributes:{},body:c,bodyBegin:1};var x=f?r.load:r.safeLoad,F=v[v.length-1].replace(/^\s+|\s+$/g,""),_=x(F)||{},$=c.replace(v[0],""),H=s(v,c);return{attributes:_,body:$,bodyBegin:H,frontmatter:F}}function p(c){return c=c||"",t.test(c)}return Ie.exports}var mi=gi();const xi=Zt(mi),ki="ui-serif, Georgia, Cambria, 'Noto Serif', 'Times New Roman', serif",Xr="ui-sans-serif, system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', 'Roboto', sans-serif",qn="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace";let de;function vi(){de=new fr(jt({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight:function(o,t,a){const s=Kn.getLanguage(t)?t:"plaintext";return Kn.highlight(o,{language:s}).value}}));const r={name:"attributeImage",level:"inline",start(o){return o.indexOf("![")},tokenizer(o){const a=/^!\[([^\]]*)\]\(([^)]+)\)\{(.*?)\}/.exec(o);if(a)return{type:"attributeImage",raw:a[0],alt:a[1],href:a[2],attrs:a[3]}},renderer(o){const t=bi(o.attrs),a=Array.from(t).map(([s,u])=>/^\d+$/.test(u)?`${s}:${u}px`:`${s}:${u}`).join("; ");return`<img src="${o.href}" alt="${o.alt}" style="${a}">`}};de.use({extensions:[r]});const n=de.Renderer,i=de.Parser;n.heading=function(o){const t=i.parseInline(o.tokens),a=o.depth;return`<h${a}><span>${t}</span></h${a}>
|
|
89
89
|
`},n.paragraph=function(o){const t=o.text;return t.length>4&&(/\$\$[\s\S]*?\$\$/g.test(t)||/\\\[[\s\S]*?\\\]/g.test(t))?`${t}
|
|
90
90
|
`:`<p>${i.parseInline(o.tokens)}</p>
|
|
91
|
-
`},n.image=function(o,t,a){return`<img src="${o.href}" alt="${a||""}" title="${t||a||""}">`},
|
|
91
|
+
`},n.image=function(o,t,a){return`<img src="${o.href}" alt="${a||""}" title="${t||a||""}">`},de.use({renderer:n})}function bi(r){const n=new Map;return r.split(/\s+/).forEach(i=>{const[o,t]=i.split("=");o&&t&&n.set(o,t.replace(/^["']|["']$/g,""))}),n}function yi(r){const{attributes:n,body:i}=xi(r),o={};let t="";const{title:a,description:s,cover:u}=n;return a&&(o.title=a),s&&(t+="> "+s+`
|
|
92
92
|
|
|
93
|
-
`,o.description=s),u&&(o.cover=u),o.body=t+i,o}async function
|
|
94
|
-
`,"");o[u]=p}o["sans-serif-font"]||(o["sans-serif-font"]=
|
|
93
|
+
`,o.description=s),u&&(o.cover=u),o.body=t+i,o}async function wi(r){const n=de.parse(r);return await lt.renderMathInHtml(n)}async function Ai(r,n,i,o=!0,t=!0){let a=Xe.themes.default;if(n&&(a=Xe.themes[n],a||(a=Object.values(Xe.themes).find(c=>c.name.toLowerCase()===n.toLowerCase()))),!a)throw new Error("主题不存在");if(!(i in Wn.hlThemes))throw new Error("代码块主题不存在");const s=nt(await a.getCss()),p=await Wn.hlThemes[i].getCss();return et(r,s,p,o,t)}async function et(r,n,i,o=!0,t=!0){t&&tt(!1,r),n=rt(n,{"#wenyan pre code":[{property:"font-family",value:qn,append:!0}],"#wenyan pre":[{property:"font-size",value:"12px",append:!0}]});const a=N.parse(n,{context:"stylesheet",positions:!1,parseAtrulePrelude:!1,parseCustomProperty:!1,parseValue:!1}),s=N.parse(i,{context:"stylesheet",positions:!1,parseAtrulePrelude:!1,parseCustomProperty:!1,parseValue:!1});if(a.children.appendList(s.children),o){const p=N.parse(ot,{context:"stylesheet",positions:!1,parseAtrulePrelude:!1,parseCustomProperty:!1,parseValue:!1});a.children.appendList(p.children)}N.walk(a,{visit:"Rule",enter(p,c,f){const v=p.prelude.children;v&&v.forEach(x=>{const F=N.generate(x),_=p.block.children.toArray();F==="#wenyan"?_.forEach($=>{const H=N.generate($.value);r.style[$.property]=H}):r.querySelectorAll(F).forEach(H=>{_.forEach(Z=>{const K=N.generate(Z.value);H.style[Z.property]=K})})})}});let u=r.querySelectorAll("mjx-container");return u.forEach(p=>{const c=p.querySelector("svg");c.style.width=c.getAttribute("width"),c.style.height=c.getAttribute("height"),c.removeAttribute("width"),c.removeAttribute("height");const f=p.parentElement;p.remove(),f.appendChild(c),f.classList.contains("block-equation")&&f.setAttribute("style","text-align: center; margin-bottom: 1rem;")}),u=r.querySelectorAll("pre code"),u.forEach(p=>{p.innerHTML=p.innerHTML.replace(/\n/g,"<br>").replace(/(>[^<]+)|(^[^<]+)/g,c=>c.replace(/\s/g," "))}),u=r.querySelectorAll("h1, h2, h3, h4, h5, h6, blockquote, pre"),u.forEach(p=>{const c=new Map,f=new Map;N.walk(a,{visit:"Rule",enter(v){const x=N.generate(v.prelude),F=p.tagName.toLowerCase();x.includes(`${F}::after`)?Nn(v,c):x.includes(`${F}::before`)&&Nn(v,f)}}),c.size>0&&p.appendChild(Bn(c,r.ownerDocument)),f.size>0&&p.insertBefore(Bn(f,r.ownerDocument),p.firstChild)}),r.setAttribute("data-provider","WenYan"),`${r.outerHTML.replace(/class="mjx-solid"/g,'fill="none" stroke-width="70"')}`}function nt(r){const n=/--([a-zA-Z0-9\-]+):\s*([^;()]*\((?:[^()]*|\([^()]*\))*\)[^;()]*|[^;]+);/g,i=/var\(--([a-zA-Z0-9\-]+)\)/g,o={};let t;for(;(t=n.exec(r))!==null;){const u=t[1],p=t[2].trim().replaceAll(`
|
|
94
|
+
`,"");o[u]=p}o["sans-serif-font"]||(o["sans-serif-font"]=Xr),o["monospace-font"]||(o["monospace-font"]=qn);function a(u,p,c=new Set){if(c.has(u))return u;c.add(u);let f=u,v;for(;(v=i.exec(f))!==null;){const x=v[1];if(p[x]){const F=a(p[x],p,c);f=f.replace(v[0],F)}}return f}for(const u in o){const p=a(o[u],o);o[u]=p}let s=r;for(;(t=i.exec(r))!==null;){const u=t[1];o[u]&&(s=s.replace(t[0],o[u]))}return s.replace(/:root\s*\{[^}]*\}/g,"")}function rt(r,n){const i=N.parse(r,{context:"stylesheet",positions:!1,parseAtrulePrelude:!1,parseCustomProperty:!1,parseValue:!1});return N.walk(i,{visit:"Rule",leave:(o,t,a)=>{if(o.prelude.type!=="SelectorList")return;const s=o.prelude.children.toArray().map(u=>N.generate(u));if(s){const u=s[0],p=n[u];if(!p)return;for(const{property:c,value:f,append:v}of p)if(f){let x=!1;N.walk(o.block,F=>{F.type==="Declaration"&&F.property===c&&(F.value=N.parse(f,{context:"value"}),x=!0)}),!x&&v&&o.block.children.prepend(a.createItem({type:"Declaration",property:c,value:N.parse(f,{context:"value"})}))}}}}),N.generate(i)}function Nn(r,n){N.walk(r.block,{visit:"Declaration",enter(i){const o=i.property,t=N.generate(i.value);n.set(o,t)}})}function Bn(r,n){const i=n.createElement("section");r.get("content")&&(i.textContent=r.get("content").replace(/['"]/g,""),r.delete("content"));for(const[a,s]of r)if(s.includes("url(")){const u=s.match(/data:image\/svg\+xml;utf8,(.*<\/svg>)/),p=s.match(/data:image\/svg\+xml;base64,([^"'\)]*)["']?\)/),c=s.match(/(?:"|')?(https?[^"'\)]*)(?:"|')?\)/);if(u){const f=decodeURIComponent(u[1]);i.innerHTML=f}else if(p){const f=atob(p[1]);i.innerHTML=f}else if(c){const f=n.createElement("img");f.src=c[1],f.setAttribute("style","vertical-align: top;"),i.appendChild(f)}r.delete(a)}const t=Array.from(r.entries()).map(([a,s])=>`${a}: ${s}`).join("; ");return i.style.cssText=t,i}function tt(r,n){let i=[],o=0;if(n.querySelectorAll("a[href]").forEach(a=>{const s=a.textContent||a.innerText,u=a.getAttribute("href");i.push([++o,s,u]);const p=n.ownerDocument.createElement("sup");p.setAttribute("class","footnote"),p.innerHTML=`[${o}]`,a.after(p)}),o>0)if(r){const s=`<h3>引用链接</h3><div id="footnotes"><ul>${i.map(u=>u[1]===u[2]?`<li id="#footnote-${u[0]}">[${u[0]}]: <i>${u[1]}</i></li>`:`<li id="#footnote-${u[0]}">[${u[0]}] ${u[1]}: <i>${u[2]}</i></li>`).join("")}</ul></div>`;n.innerHTML+=s}else{const s=`<h3>引用链接</h3><section id="footnotes">${i.map(u=>u[1]===u[2]?`<p><span class="footnote-num">[${u[0]}]</span><span class="footnote-txt"><i>${u[1]}</i></span></p>`:`<p><span class="footnote-num">[${u[0]}]</span><span class="footnote-txt">${u[1]}: <i>${u[2]}</i></span></p>`).join("")}</section>`;n.innerHTML+=s}}return U.addFootnotes=tt,U.buildPseudoSpan=Bn,U.configureMarked=vi,U.extractDeclarations=Nn,U.getContentForGzhBuiltinTheme=Ai,U.getContentForGzhCustomCss=et,U.handleFrontMatter=yi,U.modifyCss=rt,U.monospace=qn,U.renderMarkdown=wi,U.replaceCSSVariables=nt,U.sansSerif=Xr,U.serif=ki,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}),U})({},hljs,csstree,WenyanMath,macStyleCss,themes,hlThemes);
|