@wenyan-md/core 1.0.17 → 2.0.0
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/README.md +19 -169
- package/dist/core.js +1060 -416
- package/dist/publish.js +64 -66
- package/dist/types/core/hlThemeRegistry.d.ts +8 -0
- package/dist/types/core/index.d.ts +29 -0
- package/dist/types/core/parser/cssParser.d.ts +11 -0
- package/dist/types/core/parser/frontMatterParser.d.ts +7 -0
- package/dist/types/core/parser/markedParser.d.ts +6 -0
- package/dist/types/core/parser/mathjaxParser.d.ts +8 -0
- package/dist/types/core/renderer/footnotesRender.d.ts +1 -0
- package/dist/types/core/renderer/highlightApplyRender.d.ts +1 -0
- package/dist/types/core/renderer/macStyleRender.d.ts +3 -0
- package/dist/types/core/renderer/pseudoApplyRender.d.ts +1 -0
- package/dist/types/core/renderer/themeApplyRender.d.ts +1 -0
- package/dist/types/core/renderer/wechatPostRender.d.ts +1 -0
- package/dist/types/core/themeRegistry.d.ts +16 -0
- package/dist/types/core/types.d.ts +10 -0
- package/dist/types/core/utils.d.ts +6 -0
- package/dist/types/node/wrapper.d.ts +9 -0
- package/dist/types/wechat/adapters/browser.d.ts +2 -0
- package/dist/types/wechat/adapters/node.d.ts +2 -0
- package/dist/types/wechat/core.d.ts +6 -0
- package/dist/types/wechat/http.d.ts +12 -0
- package/dist/wrapper.js +17 -8
- package/package.json +30 -23
- package/dist/browser/wenyan-core.js +0 -94
- package/dist/hltheme.js +0 -70
- package/dist/math/wenyan-math.js +0 -19
- package/dist/styles/wenyan-styles.js +0 -2232
- package/dist/theme.js +0 -461
- package/dist/types/core.d.ts +0 -17
- package/dist/types/hltheme.d.ts +0 -6
- package/dist/types/theme.d.ts +0 -11
- package/dist/types/utils.d.ts +0 -1
- package/dist/types/wechatApi.d.ts +0 -8
- package/dist/types/wrapper.d.ts +0 -7
- package/dist/utils-YieK94fG.js +0 -9
- /package/dist/types/{runtimeEnv.d.ts → node/runtimeEnv.d.ts} +0 -0
- /package/dist/types/{publish.d.ts → wechat/publish.d.ts} +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
var WenyanCore=(function(U,Kn,lt,ot,at,Xe,Wn){"use strict";function st(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=st(lt);function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var oe=en();function Vn(r){oe=r}var xe={exec:()=>null};function M(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")},ut=/^(?:[ \t]*(?:\n|$))+/,ct=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,pt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ke=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ft=/^ {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=M(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(),ht=M(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]+)*)/,dt=/^[^\n]+/,tn=/(?!\s*\])(?:\\.|[^\[\]\\])+/,gt=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),mt=M(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nn).getRegex(),Te="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]*?(?:-->|$))/,xt=M("^ {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",Te).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xn=M(rn).replace("hr",ke).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",Te).getRegex(),kt=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xn).getRegex(),on={blockquote:kt,code:ct,def:gt,fences:pt,heading:ft,hr:ke,html:xt,lheading:Jn,list:mt,newline:ut,paragraph:Xn,table:xe,text:dt},er=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ke).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",Te).getRegex(),vt={...on,lheading:ht,table:er,paragraph:M(rn).replace("hr",ke).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",Te).getRegex()},bt={...on,html:M(`^ *(?: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:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(rn).replace("hr",ke).replace("heading",` *#{1,6} *[^
|
|
2
|
-
]`).replace("lheading",Jn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nr=/^( {2,}|\\)\n(?!\s*$)/,At=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_e=/[\p{P}\p{S}]/u,an=/[\s\p{P}\p{S}]/u,rr=/[^\s\p{P}\p{S}]/u,St=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,an).getRegex(),tr=/(?!~)[\p{P}\p{S}]/u,Ct=/(?!~)[\s\p{P}\p{S}]/u,Tt=/(?:[^\s\p{P}\p{S}]|~)/u,_t=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,ir=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Et=M(ir,"u").replace(/punct/g,_e).getRegex(),Rt=M(ir,"u").replace(/punct/g,tr).getRegex(),lr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ft=M(lr,"gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,an).replace(/punct/g,_e).getRegex(),Lt=M(lr,"gu").replace(/notPunctSpace/g,Tt).replace(/punctSpace/g,Ct).replace(/punct/g,tr).getRegex(),It=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,an).replace(/punct/g,_e).getRegex(),$t=M(/\\(punct)/,"gu").replace(/punct/g,_e).getRegex(),Ot=M(/^<(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(),Mt=M(ln).replace("(?:-->|$)","-->").getRegex(),Pt=M("^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",Mt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ee=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Dt=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ee).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),or=M(/^!?\[(label)\]\[(ref)\]/).replace("label",Ee).replace("ref",tn).getRegex(),ar=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",tn).getRegex(),qt=M("reflink|nolink(?!\\()","g").replace("reflink",or).replace("nolink",ar).getRegex(),sn={_backpedal:xe,anyPunctuation:$t,autolink:Ot,blockSkip:_t,br:nr,code:wt,del:xe,emStrongLDelim:Et,emStrongRDelimAst:Ft,emStrongRDelimUnd:It,escape:yt,link:Dt,nolink:ar,punctuation:St,reflink:or,reflinkSearch:qt,tag:Pt,text:At,url:xe},Nt={...sn,link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",Ee).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ee).getRegex()},un={...sn,emStrongRDelimAst:Lt,emStrongLDelim:Rt,url:M(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Bt={...un,br:M(nr).replace("{2,}","*").getRegex(),text:M(un.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Re={normal:on,gfm:vt,pedantic:bt},ve={normal:sn,gfm:un,breaks:Bt,pedantic:Nt},zt={"&":"&","<":"<",">":">",'"':""","'":"'"},sr=r=>zt[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 c=!1,p=s;for(;--p>=0&&u[p]==="\\";)c=!c;return c?"|":" |"}),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 be(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 Ht(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 c={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:s,text:u,tokens:o.inlineTokens(u)};return o.state.inLink=!1,c}function jt(r,n,i){const o=r.match(i.other.indentCodeCompensation);if(o===null)return n;const t=o[1];return n.split(`
|
|
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 Fe=class{options;rules;lexer;constructor(r){this.options=r||oe}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:be(i,`
|
|
5
|
-
`)}}}fences(r){const n=this.rules.block.fences.exec(r);if(n){const i=n[0],o=jt(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=be(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:be(n[0],`
|
|
6
|
-
`)}}blockquote(r){const n=this.rules.block.blockquote.exec(r);if(n){let i=be(n[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),o="",t="";const a=[];for(;i.length>0;){let s=!1;const u=[];let c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))u.push(i[c]),s=!0;else if(!s)u.push(i[c]);else break;i=i.slice(c);const p=u.join(`
|
|
9
|
-
`),f=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
11
|
-
${p}`:p,t=t?`${t}
|
|
12
|
-
${f}`:f;const b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=b,i.length===0)break;const k=a.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){const E=k,T=E.raw+`
|
|
13
|
-
`+i.join(`
|
|
14
|
-
`),L=this.blockquote(T);a[a.length-1]=L,o=o.substring(0,o.length-E.raw.length)+L.raw,t=t.substring(0,t.length-E.text.length)+L.text;break}else if(k?.type==="list"){const E=k,T=E.raw+`
|
|
15
|
-
`+i.join(`
|
|
16
|
-
`),L=this.list(T);a[a.length-1]=L,o=o.substring(0,o.length-k.raw.length)+L.raw,t=t.substring(0,t.length-E.raw.length)+L.raw,i=T.substring(a.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:t}}}list(r){let n=this.rules.block.list.exec(r);if(n){let i=n[1].trim();const o=i.length>1,t={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let s=!1;for(;r;){let c=!1,p="",f="";if(!(n=a.exec(r))||this.rules.block.hr.test(r))break;p=n[0],r=r.substring(p.length);let b=n[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,Z=>" ".repeat(3*Z.length)),k=r.split(`
|
|
19
|
-
`,1)[0],E=!b.trim(),T=0;if(this.options.pedantic?(T=2,f=b.trimStart()):E?T=n[1].length+1:(T=n[2].search(this.rules.other.nonSpaceChar),T=T>4?1:T,f=b.slice(T),T+=n[1].length),E&&this.rules.other.blankLine.test(k)&&(p+=k+`
|
|
20
|
-
`,r=r.substring(k.length+1),c=!0),!c){const Z=this.rules.other.nextBulletRegex(T),K=this.rules.other.hrRegex(T),j=this.rules.other.fencesBeginRegex(T),V=this.rules.other.headingBeginRegex(T),z=this.rules.other.htmlBeginRegex(T);for(;r;){const Q=r.split(`
|
|
21
|
-
`,1)[0];let re;if(k=Q,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),re=k):re=k.replace(this.rules.other.tabCharGlobal," "),j.test(k)||V.test(k)||z.test(k)||Z.test(k)||K.test(k))break;if(re.search(this.rules.other.nonSpaceChar)>=T||!k.trim())f+=`
|
|
22
|
-
`+re.slice(T);else{if(E||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||j.test(b)||V.test(b)||K.test(b))break;f+=`
|
|
23
|
-
`+k}!E&&!k.trim()&&(E=!0),p+=Q+`
|
|
24
|
-
`,r=r.substring(Q.length+1),b=re.slice(T)}}t.loose||(s?t.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(s=!0));let L=null,H;this.options.gfm&&(L=this.rules.other.listIsTask.exec(f),L&&(H=L[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:p,task:!!L,checked:H,loose:!1,text:f,tokens:[]}),t.raw+=p}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 c=0;c<t.items.length;c++)if(this.lexer.state.top=!1,t.items[c].tokens=this.lexer.blockTokens(t.items[c].text,[]),!t.loose){const p=t.items[c].tokens.filter(b=>b.type==="space"),f=p.length>0&&p.some(b=>this.rules.other.anyLine.test(b.raw));t.loose=f}if(t.loose)for(let c=0;c<t.items.length;c++)t.items[c].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,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[c]})));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=be(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{const a=Ht(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,c=a,p=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]){c+=u;continue}else if((o[5]||o[6])&&a%3&&!((a+u)%3)){p+=u;continue}if(c-=u,c>0)continue;u=Math.min(u,u+c+p);const b=[...o[0]][0].length,k=r.slice(0,a+o.index+b+u);if(Math.min(a,u)%2){const T=k.slice(1,-1);return{type:"em",raw:k,text:T,tokens:this.lexer.inlineTokens(T)}}const E=k.slice(2,-2);return{type:"strong",raw:k,text:E,tokens:this.lexer.inlineTokens(E)}}}}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}}}},ee=class Gn{tokens;options;state;tokenizer;inlineQueue;constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||oe,this.options.tokenizer=this.options.tokenizer||new Fe,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:Re.normal,inline:ve.normal};this.options.pedantic?(i.block=Re.pedantic,i.inline=ve.pedantic):this.options.gfm&&(i.block=Re.gfm,this.options.breaks?i.inline=ve.breaks:i.inline=ve.gfm),this.tokenizer.rules=i}static get rules(){return{block:Re,inline:ve}}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
|
-
`),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
|
-
`: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
|
-
`+t.raw,s.text+=`
|
|
30
|
-
`+t.text,this.inlineQueue.at(-1).src=s.text):i.push(t);continue}if(t=this.tokenizer.fences(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.heading(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.hr(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.blockquote(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.list(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.html(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length);const s=i.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
|
|
31
|
-
`+t.raw,s.text+=`
|
|
32
|
-
`+t.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(n)){n=n.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.lheading(n)){n=n.substring(t.raw.length),i.push(t);continue}let a=n;if(this.options.extensions?.startBlock){let s=1/0;const u=n.slice(1);let c;this.options.extensions.startBlock.forEach(p=>{c=p.call({lexer:this},u),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(a=n.substring(0,s+1))}if(this.state.top&&(t=this.tokenizer.paragraph(a))){const s=i.at(-1);o&&s?.type==="paragraph"?(s.raw+=`
|
|
33
|
-
`+t.raw,s.text+=`
|
|
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
|
-
`+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(p=>(u=p.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 p=i.at(-1);u.type==="text"&&p?.type==="text"?(p.raw+=u.raw,p.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 c=n;if(this.options.extensions?.startInline){let p=1/0;const f=n.slice(1);let b;this.options.extensions.startInline.forEach(k=>{b=k.call({lexer:this},f),typeof b=="number"&&b>=0&&(p=Math.min(p,b))}),p<1/0&&p>=0&&(c=n.substring(0,p+1))}if(u=this.tokenizer.inlineText(c)){n=n.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),a=!0;const p=i.at(-1);p?.type==="text"?(p.raw+=u.raw,p.text+=u.text):i.push(u);continue}if(n){const p="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return i}},Le=class{options;parser;constructor(r){this.options=r||oe}space(r){return""}code({text:r,lang:n,escaped:i}){const o=(n||"").match(G.notSpaceStart)?.[0],t=r.replace(G.endingNewline,"")+`
|
|
37
|
-
`;return o?'<pre><code class="language-'+J(o)+'">'+(i?t:J(t,!0))+`</code></pre>
|
|
38
|
-
`:"<pre><code>"+(i?t:J(t,!0))+`</code></pre>
|
|
39
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
40
|
-
${this.parser.parse(r)}</blockquote>
|
|
41
|
-
`}html({text:r}){return r}heading({tokens:r,depth:n}){return`<h${n}>${this.parser.parseInline(r)}</h${n}>
|
|
42
|
-
`}hr(r){return`<hr>
|
|
43
|
-
`}list(r){const n=r.ordered,i=r.start;let o="";for(let s=0;s<r.items.length;s++){const u=r.items[s];o+=this.listitem(u)}const t=n?"ol":"ul",a=n&&i!==1?' start="'+i+'"':"";return"<"+t+a+`>
|
|
44
|
-
`+o+"</"+t+`>
|
|
45
|
-
`}listitem(r){let n="";if(r.task){const i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+J(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):n+=i+" "}return n+=this.parser.parse(r.tokens,!!r.loose),`<li>${n}</li>
|
|
46
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
47
|
-
`}table(r){let n="",i="";for(let t=0;t<r.header.length;t++)i+=this.tablecell(r.header[t]);n+=this.tablerow({text:i});let o="";for(let t=0;t<r.rows.length;t++){const a=r.rows[t];i="";for(let s=0;s<a.length;s++)i+=this.tablecell(a[s]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
48
|
-
<thead>
|
|
49
|
-
`+n+`</thead>
|
|
50
|
-
`+o+`</table>
|
|
51
|
-
`}tablerow({text:r}){return`<tr>
|
|
52
|
-
${r}</tr>
|
|
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=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""}},ne=class Zn{options;renderer;textRenderer;constructor(n){this.options=n||oe,this.options.renderer=this.options.renderer||new Le,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,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){o+=c||"";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,c=this.renderer.text(u);for(;t+1<n.length&&n[t+1].type==="text";)u=n[++t],c+=`
|
|
55
|
-
`+this.renderer.text(u);i?o+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):o+=c;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}},Ie=class{options;block;constructor(r){this.options=r||oe}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?ee.lex:ee.lexInline}provideParser(){return this.block?ne.parse:ne.parseInline}},Yt=class{defaults=en();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ne;Renderer=Le;TextRenderer=cn;Lexer=ee;Tokenizer=Fe;Hooks=Ie;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 Le(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],c=t[s];t[s]=(...p)=>{let f=u.apply(t,p);return f===!1&&(f=c.apply(t,p)),f||""}}o.renderer=t}if(i.tokenizer){const t=this.defaults.tokenizer||new Fe(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],c=t[s];t[s]=(...p)=>{let f=u.apply(t,p);return f===!1&&(f=c.apply(t,p)),f}}o.tokenizer=t}if(i.hooks){const t=this.defaults.hooks||new Ie;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],c=t[s];Ie.passThroughHooks.has(a)?t[s]=p=>{if(this.defaults.async)return Promise.resolve(u.call(t,p)).then(b=>c.call(t,b));const f=u.call(t,p);return c.call(t,f)}:t[s]=(...p)=>{let f=u.apply(t,p);return f===!1&&(f=c.apply(t,p)),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 ee.lex(r,n??this.defaults)}parser(r,n){return ne.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?ee.lex:ee.lexInline,c=a.hooks?a.hooks.provideParser():r?ne.parse:ne.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(i):i).then(p=>u(p,a)).then(p=>a.hooks?a.hooks.processAllTokens(p):p).then(p=>a.walkTokens?Promise.all(this.walkTokens(p,a.walkTokens)).then(()=>p):p).then(p=>c(p,a)).then(p=>a.hooks?a.hooks.postprocess(p):p).catch(s);try{a.hooks&&(i=a.hooks.preprocess(i));let p=u(i,a);a.hooks&&(p=a.hooks.processAllTokens(p)),a.walkTokens&&this.walkTokens(p,a.walkTokens);let f=c(p,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(p){return s(p)}}}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}}},ae=new Yt;function $(r,n){return ae.parse(r,n)}$.options=$.setOptions=function(r){return ae.setOptions(r),$.defaults=ae.defaults,Vn($.defaults),$},$.getDefaults=en,$.defaults=oe,$.use=function(...r){return ae.use(...r),$.defaults=ae.defaults,Vn($.defaults),$},$.walkTokens=function(r,n){return ae.walkTokens(r,n)},$.parseInline=ae.parseInline,$.Parser=ne,$.parser=ne.parse,$.Renderer=Le,$.TextRenderer=cn,$.Lexer=ee,$.lexer=ee.lex,$.Tokenizer=Fe,$.Hooks=Ie,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,ne.parse,ee.lex;function Ut(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=fr(n.lang);if(r.async)return Promise.resolve(r.highlight(n.text,i,n.lang||"")).then(hr(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.");hr(n)(o)},useNewRenderer:!0,renderer:{code(n,i,o){typeof n=="object"&&(o=n.escaped,i=n.lang,n=n.text);const t=fr(i),a=t?r.langPrefix+xr(t):r.emptyLangClass,s=a?` class="${a}"`:"";return n=n.replace(/\n$/,""),`<pre><code${s}>${o?n:xr(n,!0)}
|
|
57
|
-
</code></pre>`}}}}function fr(r){return(r||"").match(/\S*/)[0]}function hr(r){return n=>{typeof n=="string"&&n!==r.text&&(r.escaped=!0,r.text=n)}}const dr=/[&<>"']/,Gt=new RegExp(dr.source,"g"),gr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zt=new RegExp(gr.source,"g"),Kt={"&":"&","<":"<",">":">",'"':""","'":"'"},mr=r=>Kt[r];function xr(r,n){if(n){if(dr.test(r))return r.replace(Gt,mr)}else if(gr.test(r))return r.replace(Zt,mr);return r}function Wt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var $e={exports:{}},P={},ue={},ie={},kr;function ce(){if(kr)return ie;kr=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 c,p,f,b;if(u)for(b=Object.keys(u),c=0,p=b.length;c<p;c+=1)f=b[c],s[f]=u[f];return s}function t(s,u){var c="",p;for(p=0;p<u;p+=1)c+=s;return c}function a(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return ie.isNothing=r,ie.isObject=n,ie.toArray=i,ie.repeat=t,ie.isNegativeZero=a,ie.extend=o,ie}var pn,vr;function ye(){if(vr)return pn;vr=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,br;function Vt(){if(br)return fn;br=1;var r=ce();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,c,p;if(!this.buffer)return null;for(o=o||4,t=t||75,a="",s=this.position;s>0&&`\0\r
|
|
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="",c=this.position;c<this.buffer.length&&`\0\r
|
|
59
|
-
\u2028\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>t/2-1){u=" ... ",c-=5;break}return p=this.buffer.slice(s,c),r.repeat(" ",o)+a+p+u+`
|
|
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},fn=n,fn}var hn,yr;function B(){if(yr)return hn;yr=1;var r=ye(),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(c){s[String(c)]=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,wr;function pe(){if(wr)return dn;wr=1;var r=ce(),n=ye(),i=B();function o(s,u,c){var p=[];return s.include.forEach(function(f){c=o(f,u,c)}),s[u].forEach(function(f){c.forEach(function(b,k){b.tag===f.tag&&b.kind===f.kind&&p.push(k)}),c.push(f)}),c.filter(function(f,b){return p.indexOf(b)===-1})}function t(){var s={scalar:{},sequence:{},mapping:{},fallback:{}},u,c;function p(f){s[f.kind][f.tag]=s.fallback[f.tag]=f}for(u=0,c=arguments.length;u<c;u+=1)arguments[u].forEach(p);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,c;switch(arguments.length){case 1:u=a.DEFAULT,c=arguments[0];break;case 2:u=arguments[0],c=arguments[1];break;default:throw new n("Wrong number of arguments for Schema.create function")}if(u=r.toArray(u),c=r.toArray(c),!u.every(function(p){return p instanceof a}))throw new n("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!c.every(function(p){return p 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:c})},dn=a,dn}var gn,Ar;function Qt(){if(Ar)return gn;Ar=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,Sr;function Jt(){if(Sr)return mn;Sr=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,Cr;function Xt(){if(Cr)return xn;Cr=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,Tr;function vn(){if(Tr)return kn;Tr=1;var r=pe();return kn=new r({explicit:[Qt(),Jt(),Xt()]}),kn}var bn,_r;function ei(){if(_r)return bn;_r=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,Er;function ni(){if(Er)return yn;Er=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,Rr;function ri(){if(Rr)return wn;Rr=1;var r=ce(),n=B();function i(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function o(c){return 48<=c&&c<=55}function t(c){return 48<=c&&c<=57}function a(c){if(c===null)return!1;var p=c.length,f=0,b=!1,k;if(!p)return!1;if(k=c[f],(k==="-"||k==="+")&&(k=c[++f]),k==="0"){if(f+1===p)return!0;if(k=c[++f],k==="b"){for(f++;f<p;f++)if(k=c[f],k!=="_"){if(k!=="0"&&k!=="1")return!1;b=!0}return b&&k!=="_"}if(k==="x"){for(f++;f<p;f++)if(k=c[f],k!=="_"){if(!i(c.charCodeAt(f)))return!1;b=!0}return b&&k!=="_"}for(;f<p;f++)if(k=c[f],k!=="_"){if(!o(c.charCodeAt(f)))return!1;b=!0}return b&&k!=="_"}if(k==="_")return!1;for(;f<p;f++)if(k=c[f],k!=="_"){if(k===":")break;if(!t(c.charCodeAt(f)))return!1;b=!0}return!b||k==="_"?!1:k!==":"?!0:/^(:[0-5]?[0-9])+$/.test(c.slice(f))}function s(c){var p=c,f=1,b,k,E=[];return p.indexOf("_")!==-1&&(p=p.replace(/_/g,"")),b=p[0],(b==="-"||b==="+")&&(b==="-"&&(f=-1),p=p.slice(1),b=p[0]),p==="0"?0:b==="0"?p[1]==="b"?f*parseInt(p.slice(2),2):p[1]==="x"?f*parseInt(p,16):f*parseInt(p,8):p.indexOf(":")!==-1?(p.split(":").forEach(function(T){E.unshift(parseInt(T,10))}),p=0,k=1,E.forEach(function(T){p+=T*k,k*=60}),f*p):f*parseInt(p,10)}function u(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!r.isNegativeZero(c)}return wn=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:u,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0"+c.toString(8):"-0"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),wn}var An,Fr;function ti(){if(Fr)return An;Fr=1;var r=ce(),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(c){return!(c===null||!i.test(c)||c[c.length-1]==="_")}function t(c){var p,f,b,k;return p=c.replace(/_/g,"").toLowerCase(),f=p[0]==="-"?-1:1,k=[],"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:p.indexOf(":")>=0?(p.split(":").forEach(function(E){k.unshift(parseFloat(E,10))}),p=0,b=1,k.forEach(function(E){p+=E*b,b*=60}),f*p):f*parseFloat(p,10)}var a=/^[-+]?[0-9]+e/;function s(c,p){var f;if(isNaN(c))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(c))return"-0.0";return f=c.toString(10),a.test(f)?f.replace("e",".e"):f}function u(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||r.isNegativeZero(c))}return An=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:t,predicate:u,represent:s,defaultStyle:"lowercase"}),An}var Sn,Lr;function Ir(){if(Lr)return Sn;Lr=1;var r=pe();return Sn=new r({include:[vn()],implicit:[ei(),ni(),ri(),ti()]}),Sn}var Cn,$r;function Or(){if($r)return Cn;$r=1;var r=pe();return Cn=new r({include:[Ir()]}),Cn}var Tn,Mr;function ii(){if(Mr)return Tn;Mr=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,c,p,f,b,k,E,T=0,L=null,H,Z,K;if(u=n.exec(s),u===null&&(u=i.exec(s)),u===null)throw new Error("Date resolve error");if(c=+u[1],p=+u[2]-1,f=+u[3],!u[4])return new Date(Date.UTC(c,p,f));if(b=+u[4],k=+u[5],E=+u[6],u[7]){for(T=u[7].slice(0,3);T.length<3;)T+="0";T=+T}return u[9]&&(H=+u[10],Z=+(u[11]||0),L=(H*60+Z)*6e4,u[9]==="-"&&(L=-L)),K=new Date(Date.UTC(c,p,f,b,k,E,T)),L&&K.setTime(K.getTime()-L),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 li(){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 Dr(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,qr;function oi(){if(qr)return En;qr=1;var r;try{var n=Dr;r=n("buffer").Buffer}catch{}var i=B(),o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
62
|
-
\r`;function t(c){if(c===null)return!1;var p,f,b=0,k=c.length,E=o;for(f=0;f<k;f++)if(p=E.indexOf(c.charAt(f)),!(p>64)){if(p<0)return!1;b+=6}return b%8===0}function a(c){var p,f,b=c.replace(/[\r\n=]/g,""),k=b.length,E=o,T=0,L=[];for(p=0;p<k;p++)p%4===0&&p&&(L.push(T>>16&255),L.push(T>>8&255),L.push(T&255)),T=T<<6|E.indexOf(b.charAt(p));return f=k%4*6,f===0?(L.push(T>>16&255),L.push(T>>8&255),L.push(T&255)):f===18?(L.push(T>>10&255),L.push(T>>2&255)):f===12&&L.push(T>>4&255),r?r.from?r.from(L):new r(L):L}function s(c){var p="",f=0,b,k,E=c.length,T=o;for(b=0;b<E;b++)b%3===0&&b&&(p+=T[f>>18&63],p+=T[f>>12&63],p+=T[f>>6&63],p+=T[f&63]),f=(f<<8)+c[b];return k=E%3,k===0?(p+=T[f>>18&63],p+=T[f>>12&63],p+=T[f>>6&63],p+=T[f&63]):k===2?(p+=T[f>>10&63],p+=T[f>>4&63],p+=T[f<<2&63],p+=T[64]):k===1&&(p+=T[f>>2&63],p+=T[f<<4&63],p+=T[64],p+=T[64]),p}function u(c){return r&&r.isBuffer(c)}return En=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t,construct:a,predicate:u,represent:s}),En}var Rn,Nr;function ai(){if(Nr)return Rn;Nr=1;var r=B(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;var s=[],u,c,p,f,b,k=a;for(u=0,c=k.length;u<c;u+=1){if(p=k[u],b=!1,i.call(p)!=="[object Object]")return!1;for(f in p)if(n.call(p,f))if(!b)b=!0;else return!1;if(!b)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,Br;function si(){if(Br)return Fn;Br=1;var r=B(),n=Object.prototype.toString;function i(t){if(t===null)return!0;var a,s,u,c,p,f=t;for(p=new Array(f.length),a=0,s=f.length;a<s;a+=1){if(u=f[a],n.call(u)!=="[object Object]"||(c=Object.keys(u),c.length!==1))return!1;p[a]=[c[0],u[c[0]]]}return!0}function o(t){if(t===null)return[];var a,s,u,c,p,f=t;for(p=new Array(f.length),a=0,s=f.length;a<s;a+=1)u=f[a],c=Object.keys(u),p[a]=[c[0],u[c[0]]];return p}return Fn=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o}),Fn}var Ln,zr;function ui(){if(zr)return Ln;zr=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,Hr;function we(){if(Hr)return In;Hr=1;var r=pe();return In=new r({include:[Or()],implicit:[ii(),li()],explicit:[oi(),ai(),si(),ui()]}),In}var $n,jr;function ci(){if(jr)return $n;jr=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,Yr;function pi(){if(Yr)return On;Yr=1;var r=B();function n(a){if(a===null||a.length===0)return!1;var s=a,u=/\/([gim]*)$/.exec(a),c="";return!(s[0]==="/"&&(u&&(c=u[1]),c.length>3||s[s.length-c.length-1]!=="/"))}function i(a){var s=a,u=/\/([gim]*)$/.exec(a),c="";return s[0]==="/"&&(u&&(c=u[1]),s=s.slice(1,s.length-c.length-1)),new RegExp(s,c)}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,Ur;function fi(){if(Ur)return Mn;Ur=1;var r;try{var n=Dr;r=n("esprima")}catch{typeof window<"u"&&(r=window.esprima)}var i=B();function o(u){if(u===null)return!1;try{var c="("+u+")",p=r.parse(c,{range:!0});return!(p.type!=="Program"||p.body.length!==1||p.body[0].type!=="ExpressionStatement"||p.body[0].expression.type!=="ArrowFunctionExpression"&&p.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function t(u){var c="("+u+")",p=r.parse(c,{range:!0}),f=[],b;if(p.type!=="Program"||p.body.length!==1||p.body[0].type!=="ExpressionStatement"||p.body[0].expression.type!=="ArrowFunctionExpression"&&p.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return p.body[0].expression.params.forEach(function(k){f.push(k.name)}),b=p.body[0].expression.body.range,p.body[0].expression.body.type==="BlockStatement"?new Function(f,c.slice(b[0]+1,b[1]-1)):new Function(f,"return "+c.slice(b[0],b[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 Pn,Gr;function Oe(){if(Gr)return Pn;Gr=1;var r=pe();return Pn=r.DEFAULT=new r({include:[we()],explicit:[ci(),pi(),fi()]}),Pn}var Zr;function hi(){if(Zr)return ue;Zr=1;var r=ce(),n=ye(),i=Vt(),o=we(),t=Oe(),a=Object.prototype.hasOwnProperty,s=1,u=2,c=3,p=4,f=1,b=2,k=3,E=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=/[\x85\u2028\u2029]/,L=/[,\[\]\{\}]/,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 V(e){return e===9||e===32}function z(e){return e===9||e===32||e===10||e===13}function Q(e){return e===44||e===91||e===93||e===123||e===125}function re(e){var d;return 48<=e&&e<=57?e-48:(d=e|32,97<=d&&d<=102?d-97+10:-1)}function De(e){return e===120?2:e===117?4:e===85?8:0}function qe(e){return 48<=e&&e<=57?e-48:-1}function Ne(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 Be(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ze(e,d,x){d==="__proto__"?Object.defineProperty(e,d,{configurable:!0,enumerable:!0,writable:!0,value:x}):e[d]=x}for(var Ae=new Array(256),q=new Array(256),le=0;le<256;le++)Ae[le]=Ne(le)?1:0,q[le]=Ne(le);function zn(e,d){this.input=e,this.filename=d.filename||null,this.schema=d.schema||t,this.onWarning=d.onWarning||null,this.legacy=d.legacy||!1,this.json=d.json||!1,this.listener=d.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 Se(e,d){return new n(d,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,d){throw Se(e,d)}function se(e,d){e.onWarning&&e.onWarning.call(null,Se(e,d))}var fe={YAML:function(d,x,C){var y,l,h;d.version!==null&&R(d,"duplication of %YAML directive"),C.length!==1&&R(d,"YAML directive accepts exactly one argument"),y=/^([0-9]+)\.([0-9]+)$/.exec(C[0]),y===null&&R(d,"ill-formed argument of the YAML directive"),l=parseInt(y[1],10),h=parseInt(y[2],10),l!==1&&R(d,"unacceptable YAML version of the document"),d.version=C[0],d.checkLineBreaks=h<2,h!==1&&h!==2&&se(d,"unsupported YAML version of the document")},TAG:function(d,x,C){var y,l;C.length!==2&&R(d,"TAG directive accepts exactly two arguments"),y=C[0],l=C[1],H.test(y)||R(d,"ill-formed tag handle (first argument) of the TAG directive"),a.call(d.tagMap,y)&&R(d,'there is a previously declared suffix for "'+y+'" tag handle'),Z.test(l)||R(d,"ill-formed tag prefix (second argument) of the TAG directive"),d.tagMap[y]=l}};function X(e,d,x,C){var y,l,h,g;if(d<x){if(g=e.input.slice(d,x),C)for(y=0,l=g.length;y<l;y+=1)h=g.charCodeAt(y),h===9||32<=h&&h<=1114111||R(e,"expected valid JSON character");else E.test(g)&&R(e,"the stream contains non-printable characters");e.result+=g}}function he(e,d,x,C){var y,l,h,g;for(r.isObject(x)||R(e,"cannot merge mappings; the provided source object is unacceptable"),y=Object.keys(x),h=0,g=y.length;h<g;h+=1)l=y[h],a.call(d,l)||(ze(d,l,x[l]),C[l]=!0)}function W(e,d,x,C,y,l,h,g){var m,w;if(Array.isArray(y))for(y=Array.prototype.slice.call(y),m=0,w=y.length;m<w;m+=1)Array.isArray(y[m])&&R(e,"nested arrays are not supported inside keys"),typeof y=="object"&&K(y[m])==="[object Object]"&&(y[m]="[object Object]");if(typeof y=="object"&&K(y)==="[object Object]"&&(y="[object Object]"),y=String(y),d===null&&(d={}),C==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(m=0,w=l.length;m<w;m+=1)he(e,d,l[m],x);else he(e,d,l,x);else!e.json&&!a.call(x,y)&&a.call(d,y)&&(e.line=h||e.line,e.position=g||e.position,R(e,"duplicated mapping key")),ze(d,y,l),delete x[y];return d}function Ce(e){var d;d=e.input.charCodeAt(e.position),d===10?e.position++:d===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 D(e,d,x){for(var C=0,y=e.input.charCodeAt(e.position);y!==0;){for(;V(y);)y=e.input.charCodeAt(++e.position);if(d&&y===35)do y=e.input.charCodeAt(++e.position);while(y!==10&&y!==13&&y!==0);if(j(y))for(Ce(e),y=e.input.charCodeAt(e.position),C++,e.lineIndent=0;y===32;)e.lineIndent++,y=e.input.charCodeAt(++e.position);else break}return x!==-1&&C!==0&&e.lineIndent<x&&se(e,"deficient indentation"),C}function de(e){var d=e.position,x;return x=e.input.charCodeAt(d),!!((x===45||x===46)&&x===e.input.charCodeAt(d+1)&&x===e.input.charCodeAt(d+2)&&(d+=3,x=e.input.charCodeAt(d),x===0||z(x)))}function ge(e,d){d===1?e.result+=" ":d>1&&(e.result+=r.repeat(`
|
|
64
|
-
`,d-1))}function He(e,d,x){var C,y,l,h,g,m,w,A,v=e.kind,_=e.result,S;if(S=e.input.charCodeAt(e.position),z(S)||Q(S)||S===35||S===38||S===42||S===33||S===124||S===62||S===39||S===34||S===37||S===64||S===96||(S===63||S===45)&&(y=e.input.charCodeAt(e.position+1),z(y)||x&&Q(y)))return!1;for(e.kind="scalar",e.result="",l=h=e.position,g=!1;S!==0;){if(S===58){if(y=e.input.charCodeAt(e.position+1),z(y)||x&&Q(y))break}else if(S===35){if(C=e.input.charCodeAt(e.position-1),z(C))break}else{if(e.position===e.lineStart&&de(e)||x&&Q(S))break;if(j(S))if(m=e.line,w=e.lineStart,A=e.lineIndent,D(e,!1,-1),e.lineIndent>=d){g=!0,S=e.input.charCodeAt(e.position);continue}else{e.position=h,e.line=m,e.lineStart=w,e.lineIndent=A;break}}g&&(X(e,l,h,!1),ge(e,e.line-m),l=h=e.position,g=!1),V(S)||(h=e.position+1),S=e.input.charCodeAt(++e.position)}return X(e,l,h,!1),e.result?!0:(e.kind=v,e.result=_,!1)}function je(e,d){var x,C,y;if(x=e.input.charCodeAt(e.position),x!==39)return!1;for(e.kind="scalar",e.result="",e.position++,C=y=e.position;(x=e.input.charCodeAt(e.position))!==0;)if(x===39)if(X(e,C,e.position,!0),x=e.input.charCodeAt(++e.position),x===39)C=e.position,e.position++,y=e.position;else return!0;else j(x)?(X(e,C,y,!0),ge(e,D(e,!1,d)),C=y=e.position):e.position===e.lineStart&&de(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,y=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function Ye(e,d){var x,C,y,l,h,g;if(g=e.input.charCodeAt(e.position),g!==34)return!1;for(e.kind="scalar",e.result="",e.position++,x=C=e.position;(g=e.input.charCodeAt(e.position))!==0;){if(g===34)return X(e,x,e.position,!0),e.position++,!0;if(g===92){if(X(e,x,e.position,!0),g=e.input.charCodeAt(++e.position),j(g))D(e,!1,d);else if(g<256&&Ae[g])e.result+=q[g],e.position++;else if((h=De(g))>0){for(y=h,l=0;y>0;y--)g=e.input.charCodeAt(++e.position),(h=re(g))>=0?l=(l<<4)+h:R(e,"expected hexadecimal character");e.result+=Be(l),e.position++}else R(e,"unknown escape sequence");x=C=e.position}else j(g)?(X(e,x,C,!0),ge(e,D(e,!1,d)),x=C=e.position):e.position===e.lineStart&&de(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,d){var x=!0,C,y=e.tag,l,h=e.anchor,g,m,w,A,v,_={},S,F,O,I;if(I=e.input.charCodeAt(e.position),I===91)m=93,v=!1,l=[];else if(I===123)m=125,v=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),I=e.input.charCodeAt(++e.position);I!==0;){if(D(e,!0,d),I=e.input.charCodeAt(e.position),I===m)return e.position++,e.tag=y,e.anchor=h,e.kind=v?"mapping":"sequence",e.result=l,!0;x||R(e,"missed comma between flow collection entries"),F=S=O=null,w=A=!1,I===63&&(g=e.input.charCodeAt(e.position+1),z(g)&&(w=A=!0,e.position++,D(e,!0,d))),C=e.line,te(e,d,s,!1,!0),F=e.tag,S=e.result,D(e,!0,d),I=e.input.charCodeAt(e.position),(A||e.line===C)&&I===58&&(w=!0,I=e.input.charCodeAt(++e.position),D(e,!0,d),te(e,d,s,!1,!0),O=e.result),v?W(e,l,_,F,S,O):w?l.push(W(e,null,_,F,S,O)):l.push(S),D(e,!0,d),I=e.input.charCodeAt(e.position),I===44?(x=!0,I=e.input.charCodeAt(++e.position)):x=!1}R(e,"unexpected end of the stream within a flow collection")}function me(e,d){var x,C,y=f,l=!1,h=!1,g=d,m=0,w=!1,A,v;if(v=e.input.charCodeAt(e.position),v===124)C=!1;else if(v===62)C=!0;else return!1;for(e.kind="scalar",e.result="";v!==0;)if(v=e.input.charCodeAt(++e.position),v===43||v===45)f===y?y=v===43?k:b:R(e,"repeat of a chomping mode identifier");else if((A=qe(v))>=0)A===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?R(e,"repeat of an indentation width identifier"):(g=d+A-1,h=!0);else break;if(V(v)){do v=e.input.charCodeAt(++e.position);while(V(v));if(v===35)do v=e.input.charCodeAt(++e.position);while(!j(v)&&v!==0)}for(;v!==0;){for(Ce(e),e.lineIndent=0,v=e.input.charCodeAt(e.position);(!h||e.lineIndent<g)&&v===32;)e.lineIndent++,v=e.input.charCodeAt(++e.position);if(!h&&e.lineIndent>g&&(g=e.lineIndent),j(v)){m++;continue}if(e.lineIndent<g){y===k?e.result+=r.repeat(`
|
|
65
|
-
`,l?1+m:m):y===f&&l&&(e.result+=`
|
|
66
|
-
`);break}for(C?V(v)?(w=!0,e.result+=r.repeat(`
|
|
67
|
-
`,l?1+m:m)):w?(w=!1,e.result+=r.repeat(`
|
|
68
|
-
`,m+1)):m===0?l&&(e.result+=" "):e.result+=r.repeat(`
|
|
69
|
-
`,m):e.result+=r.repeat(`
|
|
70
|
-
`,l?1+m:m),l=!0,h=!0,m=0,x=e.position;!j(v)&&v!==0;)v=e.input.charCodeAt(++e.position);X(e,x,e.position,!1)}return!0}function Ge(e,d){var x,C=e.tag,y=e.anchor,l=[],h,g=!1,m;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),m=e.input.charCodeAt(e.position);m!==0&&!(m!==45||(h=e.input.charCodeAt(e.position+1),!z(h)));){if(g=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=d){l.push(null),m=e.input.charCodeAt(e.position);continue}if(x=e.line,te(e,d,c,!1,!0),l.push(e.result),D(e,!0,-1),m=e.input.charCodeAt(e.position),(e.line===x||e.lineIndent>d)&&m!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<d)break}return g?(e.tag=C,e.anchor=y,e.kind="sequence",e.result=l,!0):!1}function Hn(e,d,x){var C,y,l,h,g=e.tag,m=e.anchor,w={},A={},v=null,_=null,S=null,F=!1,O=!1,I;for(e.anchor!==null&&(e.anchorMap[e.anchor]=w),I=e.input.charCodeAt(e.position);I!==0;){if(C=e.input.charCodeAt(e.position+1),l=e.line,h=e.position,(I===63||I===58)&&z(C))I===63?(F&&(W(e,w,A,v,_,null),v=_=S=null),O=!0,F=!0,y=!0):F?(F=!1,y=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,I=C;else if(te(e,x,u,!1,!0))if(e.line===l){for(I=e.input.charCodeAt(e.position);V(I);)I=e.input.charCodeAt(++e.position);if(I===58)I=e.input.charCodeAt(++e.position),z(I)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),F&&(W(e,w,A,v,_,null),v=_=S=null),O=!0,F=!1,y=!1,v=e.tag,_=e.result;else if(O)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=m,!0}else if(O)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=m,!0;else break;if((e.line===l||e.lineIndent>d)&&(te(e,d,p,!0,y)&&(F?_=e.result:S=e.result),F||(W(e,w,A,v,_,S,l,h),v=_=S=null),D(e,!0,-1),I=e.input.charCodeAt(e.position)),e.lineIndent>d&&I!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<d)break}return F&&W(e,w,A,v,_,null),O&&(e.tag=g,e.anchor=m,e.kind="mapping",e.result=w),O}function Ze(e){var d,x=!1,C=!1,y,l,h;if(h=e.input.charCodeAt(e.position),h!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),h=e.input.charCodeAt(++e.position),h===60?(x=!0,h=e.input.charCodeAt(++e.position)):h===33?(C=!0,y="!!",h=e.input.charCodeAt(++e.position)):y="!",d=e.position,x){do h=e.input.charCodeAt(++e.position);while(h!==0&&h!==62);e.position<e.length?(l=e.input.slice(d,e.position),h=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!z(h);)h===33&&(C?R(e,"tag suffix cannot contain exclamation marks"):(y=e.input.slice(d-1,e.position+1),H.test(y)||R(e,"named tag handle cannot contain such characters"),C=!0,d=e.position+1)),h=e.input.charCodeAt(++e.position);l=e.input.slice(d,e.position),L.test(l)&&R(e,"tag suffix cannot contain flow indicator characters")}return l&&!Z.test(l)&&R(e,"tag name cannot contain such characters: "+l),x?e.tag=l:a.call(e.tagMap,y)?e.tag=e.tagMap[y]+l:y==="!"?e.tag="!"+l:y==="!!"?e.tag="tag:yaml.org,2002:"+l:R(e,'undeclared tag handle "'+y+'"'),!0}function Ke(e){var d,x;if(x=e.input.charCodeAt(e.position),x!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),x=e.input.charCodeAt(++e.position),d=e.position;x!==0&&!z(x)&&!Q(x);)x=e.input.charCodeAt(++e.position);return e.position===d&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(d,e.position),!0}function jn(e){var d,x,C;if(C=e.input.charCodeAt(e.position),C!==42)return!1;for(C=e.input.charCodeAt(++e.position),d=e.position;C!==0&&!z(C)&&!Q(C);)C=e.input.charCodeAt(++e.position);return e.position===d&&R(e,"name of an alias node must contain at least one character"),x=e.input.slice(d,e.position),a.call(e.anchorMap,x)||R(e,'unidentified alias "'+x+'"'),e.result=e.anchorMap[x],D(e,!0,-1),!0}function te(e,d,x,C,y){var l,h,g,m=1,w=!1,A=!1,v,_,S,F,O;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=h=g=p===x||c===x,C&&D(e,!0,-1)&&(w=!0,e.lineIndent>d?m=1:e.lineIndent===d?m=0:e.lineIndent<d&&(m=-1)),m===1)for(;Ze(e)||Ke(e);)D(e,!0,-1)?(w=!0,g=l,e.lineIndent>d?m=1:e.lineIndent===d?m=0:e.lineIndent<d&&(m=-1)):g=!1;if(g&&(g=w||y),(m===1||p===x)&&(s===x||u===x?F=d:F=d+1,O=e.position-e.lineStart,m===1?g&&(Ge(e,O)||Hn(e,O,F))||Ue(e,F)?A=!0:(h&&me(e,F)||je(e,F)||Ye(e,F)?A=!0:jn(e)?(A=!0,(e.tag!==null||e.anchor!==null)&&R(e,"alias node should not have any properties")):He(e,F,s===x)&&(A=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):m===0&&(A=g&&Ge(e,O))),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+'"'),v=0,_=e.implicitTypes.length;v<_;v+=1)if(S=e.implicitTypes[v],S.resolve(e.result)){e.result=S.construct(e.result),e.tag=S.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else a.call(e.typeMap[e.kind||"fallback"],e.tag)?(S=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&S.kind!==e.kind&&R(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+S.kind+'", not "'+e.kind+'"'),S.resolve(e.result)?(e.result=S.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||A}function Yn(e){var d=e.position,x,C,y,l=!1,h;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(h=e.input.charCodeAt(e.position))!==0&&(D(e,!0,-1),h=e.input.charCodeAt(e.position),!(e.lineIndent>0||h!==37));){for(l=!0,h=e.input.charCodeAt(++e.position),x=e.position;h!==0&&!z(h);)h=e.input.charCodeAt(++e.position);for(C=e.input.slice(x,e.position),y=[],C.length<1&&R(e,"directive name must not be less than one character in length");h!==0;){for(;V(h);)h=e.input.charCodeAt(++e.position);if(h===35){do h=e.input.charCodeAt(++e.position);while(h!==0&&!j(h));break}if(j(h))break;for(x=e.position;h!==0&&!z(h);)h=e.input.charCodeAt(++e.position);y.push(e.input.slice(x,e.position))}h!==0&&Ce(e),a.call(fe,C)?fe[C](e,C,y):se(e,'unknown document directive "'+C+'"')}if(D(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,D(e,!0,-1)):l&&R(e,"directives end mark is expected"),te(e,e.lineIndent-1,p,!1,!0),D(e,!0,-1),e.checkLineBreaks&&T.test(e.input.slice(d,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&de(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,D(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 We(e,d){e=String(e),d=d||{},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 x=new zn(e,d),C=e.indexOf("\0");for(C!==-1&&(x.position=C,R(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Yn(x);return x.documents}function Ve(e,d,x){d!==null&&typeof d=="object"&&typeof x>"u"&&(x=d,d=null);var C=We(e,x);if(typeof d!="function")return C;for(var y=0,l=C.length;y<l;y+=1)d(C[y])}function Qe(e,d){var x=We(e,d);if(x.length!==0){if(x.length===1)return x[0];throw new n("expected a single document in the stream, but found more")}}function Un(e,d,x){return typeof d=="object"&&d!==null&&typeof x>"u"&&(x=d,d=null),Ve(e,d,r.extend({schema:o},x))}function Je(e,d){return Qe(e,r.extend({schema:o},d))}return ue.loadAll=Ve,ue.load=Qe,ue.safeLoadAll=Un,ue.safeLoad=Je,ue}var Me={},Kr;function di(){if(Kr)return Me;Kr=1;var r=ce(),n=ye(),i=Oe(),o=we(),t=Object.prototype.toString,a=Object.prototype.hasOwnProperty,s=9,u=10,c=13,p=32,f=33,b=34,k=35,E=37,T=38,L=39,H=42,Z=44,K=45,j=58,V=61,z=62,Q=63,re=64,De=91,qe=93,Ne=96,Be=123,ze=124,Ae=125,q={};q[0]="\\0",q[7]="\\a",q[8]="\\b",q[9]="\\t",q[10]="\\n",q[11]="\\v",q[12]="\\f",q[13]="\\r",q[27]="\\e",q[34]='\\"',q[92]="\\\\",q[133]="\\N",q[160]="\\_",q[8232]="\\L",q[8233]="\\P";var le=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function zn(l,h){var g,m,w,A,v,_,S;if(h===null)return{};for(g={},m=Object.keys(h),w=0,A=m.length;w<A;w+=1)v=m[w],_=String(h[v]),v.slice(0,2)==="!!"&&(v="tag:yaml.org,2002:"+v.slice(2)),S=l.compiledTypeMap.fallback[v],S&&a.call(S.styleAliases,_)&&(_=S.styleAliases[_]),g[v]=_;return g}function Se(l){var h,g,m;if(h=l.toString(16).toUpperCase(),l<=255)g="x",m=2;else if(l<=65535)g="u",m=4;else if(l<=4294967295)g="U",m=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+g+r.repeat("0",m-h.length)+h}function R(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=zn(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 se(l,h){for(var g=r.repeat(" ",h),m=0,w=-1,A="",v,_=l.length;m<_;)w=l.indexOf(`
|
|
72
|
-
`,m),w===-1?(v=l.slice(m),m=_):(v=l.slice(m,w+1),m=w+1),v.length&&v!==`
|
|
73
|
-
`&&(A+=g),A+=v;return A}function fe(l,h){return`
|
|
74
|
-
`+r.repeat(" ",l.indent*h)}function X(l,h){var g,m,w;for(g=0,m=l.implicitTypes.length;g<m;g+=1)if(w=l.implicitTypes[g],w.resolve(h))return!0;return!1}function he(l){return l===p||l===s}function W(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 Ce(l){return W(l)&&!he(l)&&l!==65279&&l!==c&&l!==u}function D(l,h){return W(l)&&l!==65279&&l!==Z&&l!==De&&l!==qe&&l!==Be&&l!==Ae&&l!==j&&(l!==k||h&&Ce(h))}function de(l){return W(l)&&l!==65279&&!he(l)&&l!==K&&l!==Q&&l!==j&&l!==Z&&l!==De&&l!==qe&&l!==Be&&l!==Ae&&l!==k&&l!==T&&l!==H&&l!==f&&l!==ze&&l!==V&&l!==z&&l!==L&&l!==b&&l!==E&&l!==re&&l!==Ne}function ge(l){var h=/^\n* /;return h.test(l)}var He=1,je=2,Ye=3,Ue=4,me=5;function Ge(l,h,g,m,w){var A,v,_,S=!1,F=!1,O=m!==-1,I=-1,Y=de(l.charCodeAt(0))&&!he(l.charCodeAt(l.length-1));if(h)for(A=0;A<l.length;A++){if(v=l.charCodeAt(A),!W(v))return me;_=A>0?l.charCodeAt(A-1):null,Y=Y&&D(v,_)}else{for(A=0;A<l.length;A++){if(v=l.charCodeAt(A),v===u)S=!0,O&&(F=F||A-I-1>m&&l[I+1]!==" ",I=A);else if(!W(v))return me;_=A>0?l.charCodeAt(A-1):null,Y=Y&&D(v,_)}F=F||O&&A-I-1>m&&l[I+1]!==" "}return!S&&!F?Y&&!w(l)?He:je:g>9&&ge(l)?me:F?Ue:Ye}function Hn(l,h,g,m){l.dump=(function(){if(h.length===0)return"''";if(!l.noCompatMode&&le.indexOf(h)!==-1)return"'"+h+"'";var w=l.indent*Math.max(1,g),A=l.lineWidth===-1?-1:Math.max(Math.min(l.lineWidth,40),l.lineWidth-w),v=m||l.flowLevel>-1&&g>=l.flowLevel;function _(S){return X(l,S)}switch(Ge(h,v,l.indent,A,_)){case He:return h;case je:return"'"+h.replace(/'/g,"''")+"'";case Ye:return"|"+Ze(h,l.indent)+Ke(se(h,w));case Ue:return">"+Ze(h,l.indent)+Ke(se(jn(h,A),w));case me:return'"'+Yn(h)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ze(l,h){var g=ge(l)?String(h):"",m=l[l.length-1]===`
|
|
75
|
-
`,w=m&&(l[l.length-2]===`
|
|
76
|
-
`||l===`
|
|
77
|
-
`),A=w?"+":m?"":"-";return g+A+`
|
|
78
|
-
`}function Ke(l){return l[l.length-1]===`
|
|
79
|
-
`?l.slice(0,-1):l}function jn(l,h){for(var g=/(\n+)([^\n]*)/g,m=(function(){var F=l.indexOf(`
|
|
80
|
-
`);return F=F!==-1?F:l.length,g.lastIndex=F,te(l.slice(0,F),h)})(),w=l[0]===`
|
|
81
|
-
`||l[0]===" ",A,v;v=g.exec(l);){var _=v[1],S=v[2];A=S[0]===" ",m+=_+(!w&&!A&&S!==""?`
|
|
82
|
-
`:"")+te(S,h),w=A}return m}function te(l,h){if(l===""||l[0]===" ")return l;for(var g=/ [^ ]/g,m,w=0,A,v=0,_=0,S="";m=g.exec(l);)_=m.index,_-w>h&&(A=v>w?v:_,S+=`
|
|
83
|
-
`+l.slice(w,A),w=A+1),v=_;return S+=`
|
|
84
|
-
`,l.length-w>h&&v>w?S+=l.slice(w,v)+`
|
|
85
|
-
`+l.slice(v+1):S+=l.slice(w),S.slice(1)}function Yn(l){for(var h="",g,m,w,A=0;A<l.length;A++){if(g=l.charCodeAt(A),g>=55296&&g<=56319&&(m=l.charCodeAt(A+1),m>=56320&&m<=57343)){h+=Se((g-55296)*1024+m-56320+65536),A++;continue}w=q[g],h+=!w&&W(g)?l[A]:w||Se(g)}return h}function We(l,h,g){var m="",w=l.tag,A,v;for(A=0,v=g.length;A<v;A+=1)e(l,h,g[A],!1,!1)&&(A!==0&&(m+=","+(l.condenseFlow?"":" ")),m+=l.dump);l.tag=w,l.dump="["+m+"]"}function Ve(l,h,g,m){var w="",A=l.tag,v,_;for(v=0,_=g.length;v<_;v+=1)e(l,h+1,g[v],!0,!0)&&((!m||v!==0)&&(w+=fe(l,h)),l.dump&&u===l.dump.charCodeAt(0)?w+="-":w+="- ",w+=l.dump);l.tag=A,l.dump=w||"[]"}function Qe(l,h,g){var m="",w=l.tag,A=Object.keys(g),v,_,S,F,O;for(v=0,_=A.length;v<_;v+=1)O="",v!==0&&(O+=", "),l.condenseFlow&&(O+='"'),S=A[v],F=g[S],e(l,h,S,!1,!1)&&(l.dump.length>1024&&(O+="? "),O+=l.dump+(l.condenseFlow?'"':"")+":"+(l.condenseFlow?"":" "),e(l,h,F,!1,!1)&&(O+=l.dump,m+=O));l.tag=w,l.dump="{"+m+"}"}function Un(l,h,g,m){var w="",A=l.tag,v=Object.keys(g),_,S,F,O,I,Y;if(l.sortKeys===!0)v.sort();else if(typeof l.sortKeys=="function")v.sort(l.sortKeys);else if(l.sortKeys)throw new n("sortKeys must be a boolean or a function");for(_=0,S=v.length;_<S;_+=1)Y="",(!m||_!==0)&&(Y+=fe(l,h)),F=v[_],O=g[F],e(l,h+1,F,!0,!0,!0)&&(I=l.tag!==null&&l.tag!=="?"||l.dump&&l.dump.length>1024,I&&(l.dump&&u===l.dump.charCodeAt(0)?Y+="?":Y+="? "),Y+=l.dump,I&&(Y+=fe(l,h)),e(l,h+1,O,!0,I)&&(l.dump&&u===l.dump.charCodeAt(0)?Y+=":":Y+=": ",Y+=l.dump,w+=Y));l.tag=A,l.dump=w||"{}"}function Je(l,h,g){var m,w,A,v,_,S;for(w=g?l.explicitTypes:l.implicitTypes,A=0,v=w.length;A<v;A+=1)if(_=w[A],(_.instanceOf||_.predicate)&&(!_.instanceOf||typeof h=="object"&&h instanceof _.instanceOf)&&(!_.predicate||_.predicate(h))){if(l.tag=g?_.tag:"?",_.represent){if(S=l.styleMap[_.tag]||_.defaultStyle,t.call(_.represent)==="[object Function]")m=_.represent(h,S);else if(a.call(_.represent,S))m=_.represent[S](h,S);else throw new n("!<"+_.tag+'> tag resolver accepts not "'+S+'" style');l.dump=m}return!0}return!1}function e(l,h,g,m,w,A){l.tag=null,l.dump=g,Je(l,g,!1)||Je(l,g,!0);var v=t.call(l.dump);m&&(m=l.flowLevel<0||l.flowLevel>h);var _=v==="[object Object]"||v==="[object Array]",S,F;if(_&&(S=l.duplicates.indexOf(g),F=S!==-1),(l.tag!==null&&l.tag!=="?"||F||l.indent!==2&&h>0)&&(w=!1),F&&l.usedDuplicates[S])l.dump="*ref_"+S;else{if(_&&F&&!l.usedDuplicates[S]&&(l.usedDuplicates[S]=!0),v==="[object Object]")m&&Object.keys(l.dump).length!==0?(Un(l,h,l.dump,w),F&&(l.dump="&ref_"+S+l.dump)):(Qe(l,h,l.dump),F&&(l.dump="&ref_"+S+" "+l.dump));else if(v==="[object Array]"){var O=l.noArrayIndent&&h>0?h-1:h;m&&l.dump.length!==0?(Ve(l,O,l.dump,w),F&&(l.dump="&ref_"+S+l.dump)):(We(l,O,l.dump),F&&(l.dump="&ref_"+S+" "+l.dump))}else if(v==="[object String]")l.tag!=="?"&&Hn(l,l.dump,h,A);else{if(l.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+v)}l.tag!==null&&l.tag!=="?"&&(l.dump="!<"+l.tag+"> "+l.dump)}return!0}function d(l,h){var g=[],m=[],w,A;for(x(l,g,m),w=0,A=m.length;w<A;w+=1)h.duplicates.push(g[m[w]]);h.usedDuplicates=new Array(A)}function x(l,h,g){var m,w,A;if(l!==null&&typeof l=="object")if(w=h.indexOf(l),w!==-1)g.indexOf(w)===-1&&g.push(w);else if(h.push(l),Array.isArray(l))for(w=0,A=l.length;w<A;w+=1)x(l[w],h,g);else for(m=Object.keys(l),w=0,A=m.length;w<A;w+=1)x(l[m[w]],h,g)}function C(l,h){h=h||{};var g=new R(h);return g.noRefs||d(l,g),e(g,0,l,!0,!0)?g.dump+`
|
|
86
|
-
`:""}function y(l,h){return C(l,r.extend({schema:o},h))}return Me.dump=C,Me.safeDump=y,Me}var Wr;function gi(){if(Wr)return P;Wr=1;var r=hi(),n=di();function i(o){return function(){throw new Error("Function "+o+" is deprecated and cannot be used.")}}return P.Type=B(),P.Schema=pe(),P.FAILSAFE_SCHEMA=vn(),P.JSON_SCHEMA=Ir(),P.CORE_SCHEMA=Or(),P.DEFAULT_SAFE_SCHEMA=we(),P.DEFAULT_FULL_SCHEMA=Oe(),P.load=r.load,P.loadAll=r.loadAll,P.safeLoad=r.safeLoad,P.safeLoadAll=r.safeLoadAll,P.dump=n.dump,P.safeDump=n.safeDump,P.YAMLException=ye(),P.MINIMAL_SCHEMA=vn(),P.SAFE_SCHEMA=we(),P.DEFAULT_SCHEMA=Oe(),P.scan=i("scan"),P.parse=i("parse"),P.compose=i("compose"),P.addConstructor=i("addConstructor"),P}var Dn,Vr;function mi(){if(Vr)return Dn;Vr=1;var r=gi();return Dn=r,Dn}var Qr;function xi(){if(Qr)return $e.exports;Qr=1;var r=mi(),n="\\ufeff?",i=typeof process<"u"?process.platform:"",o="^("+n+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(i==="win32"?"\\r?":"")+"(?:\\n)?)",t=new RegExp(o,"m");$e.exports=a,$e.exports.test=c;function a(p,f){p=p||"";var b={allowUnsafe:!1};f=f instanceof Object?{...b,...f}:b,f.allowUnsafe=!!f.allowUnsafe;var k=p.split(/(\r?\n)/);return k[0]&&/= yaml =|---/.test(k[0])?u(p,f.allowUnsafe):{attributes:{},body:p,bodyBegin:1}}function s(p,f){for(var b=1,k=f.indexOf(`
|
|
87
|
-
`),E=p.index+p[0].length;k!==-1;){if(k>=E)return b;b++,k=f.indexOf(`
|
|
88
|
-
`,k+1)}return b}function u(p,f){var b=t.exec(p);if(!b)return{attributes:{},body:p,bodyBegin:1};var k=f?r.load:r.safeLoad,E=b[b.length-1].replace(/^\s+|\s+$/g,""),T=k(E)||{},L=p.replace(b[0],""),H=s(b,p);return{attributes:T,body:L,bodyBegin:H,frontmatter:E}}function c(p){return p=p||"",t.test(p)}return $e.exports}var ki=xi();const vi=Wt(ki),bi="Georgia, Cambria, 'Noto Serif', 'Times New Roman', serif",Jr="system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', 'Roboto', sans-serif",qn="Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace";let Xr=!1,Pe=null;async function et(){if(!Xr)return Pe||(Pe=(async()=>{const r=Ut({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight:function(t,a,s){const u=Kn.getLanguage(a)?a:"plaintext";return Kn.highlight(t,{language:u}).value}});$.use(r);const n={name:"attributeImage",level:"inline",start(t){return t.indexOf("![")},tokenizer(t){const s=/^!\[([^\]]*)\]\(([^)]+)\)\{(.*?)\}/.exec(t);if(s)return{type:"attributeImage",raw:s[0],alt:s[1],href:s[2],attrs:s[3]}},renderer(t){const a=yi(t.attrs),s=Array.from(a).map(([u,c])=>/^\d+$/.test(c)?`${u}:${c}px`:`${u}:${c}`).join("; ");return`<img src="${t.href}" alt="${t.alt||""}" title="${t.alt||""}" style="${s}">`}};$.use({extensions:[n]});const i=$.Renderer,o=$.Parser;i.heading=function(t){const a=o.parseInline(t.tokens),s=t.depth;return`<h${s}><span>${a}</span></h${s}>
|
|
89
|
-
`},i.paragraph=function(t){const a=t.text;return a.length>4&&(/\$\$[\s\S]*?\$\$/g.test(a)||/\\\[[\s\S]*?\\\]/g.test(a))?`${a}
|
|
90
|
-
`:`<p>${o.parseInline(t.tokens)}</p>
|
|
91
|
-
`},i.image=function(t,a,s){return`<img src="${t.href}" alt="${t.text||""}" title="${t.text||""}">`},$.use({renderer:i}),Xr=!0})(),Pe)}function yi(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}async function wi(r){const{attributes:n,body:i}=vi(r),o={};let t="";const{title:a,description:s,cover:u}=n;return a&&(o.title=a),s&&(t+="> "+s+`
|
|
92
|
-
|
|
93
|
-
`,o.description=s),u&&(o.cover=u),o.body=t+i,o}async function Ai(r){await et();const n=$.parse(r);return await ot.renderMathInHtml(n)}async function Si(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(p=>p.name.toLowerCase()===n.toLowerCase()))),!a)throw new Error("主题不存在");if(!(i in Wn.hlThemes))throw new Error("代码块主题不存在");const s=rt(await a.getCss()),c=await Wn.hlThemes[i].getCss();return nt(r,s,c,o,t)}async function nt(r,n,i,o=!0,t=!0){t&&it(!1,r),n=tt(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 c=N.parse(at,{context:"stylesheet",positions:!1,parseAtrulePrelude:!1,parseCustomProperty:!1,parseValue:!1});a.children.appendList(c.children)}N.walk(a,{visit:"Rule",enter(c,p,f){const b=c.prelude.children;b&&b.forEach(k=>{const E=N.generate(k),T=c.block.children.toArray();E==="#wenyan"?T.forEach(L=>{const H=N.generate(L.value);r.style[L.property]=H}):r.querySelectorAll(E).forEach(H=>{T.forEach(Z=>{const K=N.generate(Z.value);H.style[Z.property]=K})})})}});let u=r.querySelectorAll("mjx-container");return u.forEach(c=>{const p=c.querySelector("svg");p.style.width=p.getAttribute("width"),p.style.height=p.getAttribute("height"),p.removeAttribute("width"),p.removeAttribute("height");const f=c.parentElement;c.remove(),f.appendChild(p),f.classList.contains("block-equation")&&f.setAttribute("style","text-align: center; margin-bottom: 1rem;")}),u=r.querySelectorAll("pre code"),u.forEach(c=>{c.innerHTML=c.innerHTML.replace(/\n/g,"<br>").replace(/(>[^<]+)|(^[^<]+)/g,p=>p.replace(/\s/g," "))}),u=r.querySelectorAll("h1, h2, h3, h4, h5, h6, blockquote, pre"),u.forEach(c=>{const p=new Map,f=new Map;N.walk(a,{visit:"Rule",enter(b){const k=N.generate(b.prelude),E=c.tagName.toLowerCase();k.includes(`${E}::after`)?Nn(b,p):k.includes(`${E}::before`)&&Nn(b,f)}}),p.size>0&&c.appendChild(Bn(p,r.ownerDocument)),f.size>0&&c.insertBefore(Bn(f,r.ownerDocument),c.firstChild)}),u=r.querySelectorAll("li"),u.forEach(c=>{const p=r.ownerDocument.createElement("section");for(;c.firstChild;)p.appendChild(c.firstChild);c.appendChild(p)}),r.setAttribute("data-provider","WenYan"),`${r.outerHTML.replace(/class="mjx-solid"/g,'fill="none" stroke-width="70"').replace(/\n<li/g,"<li").replace(/<\/li>\n/g,"</li>")}`}function rt(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],c=t[2].trim().replaceAll(`
|
|
94
|
-
`,"");o[u]=c}o["sans-serif-font"]||(o["sans-serif-font"]=Jr),o["monospace-font"]||(o["monospace-font"]=qn);function a(u,c,p=new Set){if(p.has(u))return u;p.add(u);let f=u,b;for(;(b=i.exec(f))!==null;){const k=b[1];if(c[k]){const E=a(c[k],c,p);f=f.replace(b[0],E)}}return f}for(const u in o){const c=a(o[u],o);o[u]=c}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 tt(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],c=n[u];if(!c)return;for(const{property:p,value:f,append:b}of c)if(f){let k=!1;N.walk(o.block,E=>{E.type==="Declaration"&&E.property===p&&(E.value=N.parse(f,{context:"value"}),k=!0)}),!k&&b&&o.block.children.prepend(a.createItem({type:"Declaration",property:p,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>)/),c=s.match(/data:image\/svg\+xml;base64,([^"'\)]*)["']?\)/),p=s.match(/(?:"|')?(https?[^"'\)]*)(?:"|')?\)/);if(u){const f=decodeURIComponent(u[1]);i.innerHTML=f}else if(c){const f=atob(c[1]);i.innerHTML=f}else if(p){const f=n.createElement("img");f.src=p[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 it(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 c=n.ownerDocument.createElement("sup");c.setAttribute("class","footnote"),c.innerHTML=`[${o}]`,a.after(c)}),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=it,U.buildPseudoSpan=Bn,U.configureMarked=et,U.extractDeclarations=Nn,U.getContentForGzhBuiltinTheme=Si,U.getContentForGzhCustomCss=nt,U.handleFrontMatter=wi,U.modifyCss=tt,U.monospace=qn,U.renderMarkdown=Ai,U.replaceCSSVariables=rt,U.sansSerif=Jr,U.serif=bi,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}),U})({},hljs,csstree,WenyanMath,macStyleCss,themes,hlThemes);
|
package/dist/hltheme.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { n as normalizeCssLoader } from "./utils-YieK94fG.js";
|
|
2
|
-
const __vite_glob_0_0 = "pre{background:#282c34}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}";
|
|
3
|
-
const __vite_glob_0_1 = "pre{background:#fafafa}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}";
|
|
4
|
-
const __vite_glob_0_2 = "pre{background:#282936}\n/*!\n Theme: Dracula\n Author: Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula)\n License: ~ MIT (or more permissive) [via base16-schemes-source]\n Maintainer: @highlightjs/core-team\n Version: 2021.09.0\n*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#e9e9f4;background:#282936}.hljs ::selection,.hljs::selection{background-color:#4d4f68;color:#e9e9f4}.hljs-comment{color:#626483}.hljs-tag{color:#62d6e8}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#e9e9f4}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#ea51b2}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#b45bcf}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#00f769}.hljs-strong{font-weight:700;color:#00f769}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#ebff87}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#a1efe4}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#62d6e8}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#b45bcf}.hljs-emphasis{color:#b45bcf;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#00f769}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}";
|
|
5
|
-
const __vite_glob_0_3 = "pre{background:#0d1117}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: GitHub Dark\n Description: Dark theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-dark\n Current colors taken from GitHub's CSS\n*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}";
|
|
6
|
-
const __vite_glob_0_4 = "pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: GitHub\n Description: Light theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-light\n Current colors taken from GitHub's CSS\n*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}\n";
|
|
7
|
-
const __vite_glob_0_5 = "pre{background:#272822}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-number,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attr,.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700}";
|
|
8
|
-
const __vite_glob_0_6 = "pre{background:#002b36}\n/*!\n Theme: Solarized Dark\n Author: Ethan Schoonover (modified by aramisgithub)\n License: ~ MIT (or more permissive) [via base16-schemes-source]\n Maintainer: @highlightjs/core-team\n Version: 2021.09.0\n*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#93a1a1;background:#002b36}.hljs ::selection,.hljs::selection{background-color:#586e75;color:#93a1a1}.hljs-comment{color:#657b83}.hljs-tag{color:#839496}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#93a1a1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}";
|
|
9
|
-
const __vite_glob_0_7 = "pre{background:#fdf6e3}\n/*!\n Theme: Solarized Light\n Author: Ethan Schoonover (modified by aramisgithub)\n License: ~ MIT (or more permissive) [via base16-schemes-source]\n Maintainer: @highlightjs/core-team\n Version: 2021.09.0\n*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#586e75;background:#fdf6e3}.hljs ::selection,.hljs::selection{background-color:#93a1a1;color:#586e75}.hljs-comment{color:#839496}.hljs-tag{color:#657b83}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#586e75}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}";
|
|
10
|
-
const __vite_glob_0_8 = "pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.xml .hljs-meta{color:silver}.hljs-comment,.hljs-quote{color:#007400}.hljs-attribute,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#aa0d91}.hljs-template-variable,.hljs-variable{color:#3f6e74}.hljs-code,.hljs-meta .hljs-string,.hljs-string{color:#c41a16}.hljs-link,.hljs-regexp{color:#0e0eff}.hljs-bullet,.hljs-number,.hljs-symbol,.hljs-title{color:#1c00cf}.hljs-meta,.hljs-section{color:#643820}.hljs-built_in,.hljs-class .hljs-title,.hljs-params,.hljs-title.class_,.hljs-type{color:#5c2699}.hljs-attr{color:#836c28}.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-selector-class,.hljs-selector-id{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}";
|
|
11
|
-
const themeMeta = [
|
|
12
|
-
{
|
|
13
|
-
id: "atom-one-dark"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: "atom-one-light"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: "dracula"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "github-dark"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "github"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: "monokai"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "solarized-dark"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "solarized-light"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "xcode"
|
|
38
|
-
}
|
|
39
|
-
];
|
|
40
|
-
const themeCssModules = /* @__PURE__ */ Object.assign({
|
|
41
|
-
"./highlight/styles/atom-one-dark.min.css": __vite_glob_0_0,
|
|
42
|
-
"./highlight/styles/atom-one-light.min.css": __vite_glob_0_1,
|
|
43
|
-
"./highlight/styles/dracula.min.css": __vite_glob_0_2,
|
|
44
|
-
"./highlight/styles/github-dark.min.css": __vite_glob_0_3,
|
|
45
|
-
"./highlight/styles/github.min.css": __vite_glob_0_4,
|
|
46
|
-
"./highlight/styles/monokai.min.css": __vite_glob_0_5,
|
|
47
|
-
"./highlight/styles/solarized-dark.min.css": __vite_glob_0_6,
|
|
48
|
-
"./highlight/styles/solarized-light.min.css": __vite_glob_0_7,
|
|
49
|
-
"./highlight/styles/xcode.min.css": __vite_glob_0_8
|
|
50
|
-
});
|
|
51
|
-
const hlThemes = {};
|
|
52
|
-
for (const meta of themeMeta) {
|
|
53
|
-
const cssPath = `./highlight/styles/${meta.id}.min.css`;
|
|
54
|
-
const cssModuleLoader = themeCssModules[cssPath];
|
|
55
|
-
if (cssModuleLoader) {
|
|
56
|
-
hlThemes[meta.id] = {
|
|
57
|
-
...meta,
|
|
58
|
-
getCss: normalizeCssLoader(cssModuleLoader)
|
|
59
|
-
};
|
|
60
|
-
} else {
|
|
61
|
-
console.warn(`[Highlight Themes] CSS file not found for theme: ${meta.id}`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function getAllHlThemes() {
|
|
65
|
-
return Object.values(hlThemes);
|
|
66
|
-
}
|
|
67
|
-
export {
|
|
68
|
-
getAllHlThemes,
|
|
69
|
-
hlThemes
|
|
70
|
-
};
|