import{f as Se,g as H,h as F,u as Rn,c as v,i as He,j as xe,k as Gt,o as f,e as X,l as he,m as I,b as x,d as ue,t as T,F as W,n as J,p as G,q as A,s as j,v as ge,x as Je,y as ce,z as Sn,A as ft,B as Ge,C as Te,D as An,E as Ln,G as zn,H as mt,I as In,J as Kt,K as En,r as Tn,L as _n,M as vt,N as jn,O as Mn}from"./app-DnSLvtbI.js";const Qt={"Content-Type":"application/json"},fe=t=>`${t.replace(/\/?$/,"/")}api/`,Ae=(t,e="")=>{if(typeof t=="object"&&t.errno)throw new TypeError(`${e} failed with ${t.errno}: ${t.errmsg}`);return t},Pn=({serverURL:t,lang:e,paths:r,type:l,signal:n})=>fetch(`${fe(t)}article?path=${encodeURIComponent(r.join(","))}&type=${encodeURIComponent(l.join(","))}&lang=${e}`,{signal:n}).then(a=>a.json()).then(a=>Ae(a,"Get counter").data),kt=({serverURL:t,lang:e,path:r,type:l,action:n})=>fetch(`${fe(t)}article?lang=${e}`,{method:"POST",headers:Qt,body:JSON.stringify({path:r,type:l,action:n})}).then(a=>a.json()).then(a=>Ae(a,"Update counter").data),Bn=({serverURL:t,lang:e,path:r,page:l,pageSize:n,sortBy:a,signal:i,token:s})=>{const o={};return s&&(o.Authorization=`Bearer ${s}`),fetch(`${fe(t)}comment?path=${encodeURIComponent(r)}&pageSize=${n}&page=${l}&lang=${e}&sortBy=${a}`,{signal:i,headers:o}).then(c=>c.json()).then(c=>Ae(c,"Get comment data").data)},Hn=({serverURL:t,lang:e,token:r,comment:l})=>{const n={"Content-Type":"application/json"};return r&&(n.Authorization=`Bearer ${r}`),fetch(`${fe(t)}comment?lang=${e}`,{method:"POST",headers:n,body:JSON.stringify(l)}).then(a=>a.json())},Un=({serverURL:t,lang:e,token:r,objectId:l})=>fetch(`${fe(t)}comment/${l}?lang=${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${r}`}}).then(n=>n.json()).then(n=>Ae(n,"Delete comment")),je=({serverURL:t,lang:e,token:r,objectId:l,comment:n})=>fetch(`${fe(t)}comment/${l}?lang=${e}`,{method:"PUT",headers:{...Qt,Authorization:`Bearer ${r}`},body:JSON.stringify(n)}).then(a=>a.json()).then(a=>Ae(a,"Update comment")),Dn=({lang:t,serverURL:e})=>{const r=(window.innerWidth-450)/2,l=(window.innerHeight-450)/2,n=window.open(`${e.replace(/\/$/,"")}/ui/login?lng=${encodeURIComponent(t)}`,"_blank",`width=450,height=450,left=${r},top=${l},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return n?.postMessage({type:"TOKEN",data:null},"*"),new Promise(a=>{const i=({data:s})=>{!s||typeof s!="object"||s.type!=="userInfo"||s.data.token&&(n?.close(),window.removeEventListener("message",i),a(s.data))};window.addEventListener("message",i)})};var $e=new Map;function Nn(t){var e=$e.get(t);e&&e.destroy()}function Vn(t){var e=$e.get(t);e&&e.update()}var we=null;typeof window>"u"?((we=function(t){return t}).destroy=function(t){return t},we.update=function(t){return t}):((we=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(r){return(function(l){if(l&&l.nodeName&&l.nodeName==="TEXTAREA"&&!$e.has(l)){var n,a=null,i=window.getComputedStyle(l),s=(n=l.value,function(){c({testForHeightReduction:n===""||!l.value.startsWith(n),restoreTextAlign:null}),n=l.value}),o=(function(u){l.removeEventListener("autosize:destroy",o),l.removeEventListener("autosize:update",p),l.removeEventListener("input",s),window.removeEventListener("resize",p),Object.keys(u).forEach(function(h){return l.style[h]=u[h]}),$e.delete(l)}).bind(l,{height:l.style.height,resize:l.style.resize,textAlign:l.style.textAlign,overflowY:l.style.overflowY,overflowX:l.style.overflowX,wordWrap:l.style.wordWrap});l.addEventListener("autosize:destroy",o),l.addEventListener("autosize:update",p),l.addEventListener("input",s),window.addEventListener("resize",p),l.style.overflowX="hidden",l.style.wordWrap="break-word",$e.set(l,{destroy:o,update:p}),p()}function c(u){var h,k,m=u.restoreTextAlign,b=m===void 0?null:m,z=u.testForHeightReduction,d=z===void 0||z,w=i.overflowY;if(l.scrollHeight!==0&&(i.resize==="vertical"?l.style.resize="none":i.resize==="both"&&(l.style.resize="horizontal"),d&&(h=(function(U){for(var L=[];U&&U.parentNode&&U.parentNode instanceof Element;)U.parentNode.scrollTop&&L.push([U.parentNode,U.parentNode.scrollTop]),U=U.parentNode;return function(){return L.forEach(function(E){var M=E[0],re=E[1];M.style.scrollBehavior="auto",M.scrollTop=re,M.style.scrollBehavior=null})}})(l),l.style.height=""),k=i.boxSizing==="content-box"?l.scrollHeight-(parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)):l.scrollHeight+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),i.maxHeight!=="none"&&k>parseFloat(i.maxHeight)?(i.overflowY==="hidden"&&(l.style.overflow="scroll"),k=parseFloat(i.maxHeight)):i.overflowY!=="hidden"&&(l.style.overflow="hidden"),l.style.height=k+"px",b&&(l.style.textAlign=b),h&&h(),a!==k&&(l.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=k),w!==i.overflow&&!b)){var N=i.textAlign;i.overflow==="hidden"&&(l.style.textAlign=N==="start"?"end":"start"),c({restoreTextAlign:N,testForHeightReduction:!0})}}function p(){c({testForHeightReduction:!0,restoreTextAlign:null})}})(r)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Nn),t},we.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Vn),t});var bt=we;function et(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var de=et();function Xt(t){de=t}var Ce={exec:()=>null};function _(t,e=""){let r=typeof t=="string"?t:t.source,l={replace:(n,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(Y.caret,"$1"),r=r.replace(n,i),l},getRegex:()=>new RegExp(r,e)};return l}var Y={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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},On=/^(?:[ \t]*(?:\n|$))+/,qn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Le=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tt=/(?:[*+-]|\d{1,9}[.)])/,Yt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jt=_(Yt).replace(/bull/g,tt).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(),Zn=_(Yt).replace(/bull/g,tt).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(),nt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gn=/^[^\n]+/,rt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Kn=_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qn=_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tt).getRegex(),Ue="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",lt=/|$))/,Xn=_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",lt).replace("tag",Ue).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),en=_(nt).replace("hr",Le).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ue).getRegex(),Yn=_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",en).getRegex(),at={blockquote:Yn,code:qn,def:Kn,fences:Fn,heading:Wn,hr:Le,html:Xn,lheading:Jt,list:Qn,newline:On,paragraph:en,table:Ce,text:Gn},wt=_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Le).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ue).getRegex(),Jn={...at,lheading:Zn,table:wt,paragraph:_(nt).replace("hr",Le).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ue).getRegex()},er={...at,html:_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lt).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ce,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_(nt).replace("hr",Le).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Jt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tn=/^( {2,}|\\)\n(?!\s*$)/,rr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,ln=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,or=_(ln,"u").replace(/punct/g,De).getRegex(),cr=_(ln,"u").replace(/punct/g,rn).getRegex(),an="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ur=_(an,"gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,it).replace(/punct/g,De).getRegex(),hr=_(an,"gu").replace(/notPunctSpace/g,ir).replace(/punctSpace/g,ar).replace(/punct/g,rn).getRegex(),pr=_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,it).replace(/punct/g,De).getRegex(),dr=_(/\\(punct)/,"gu").replace(/punct/g,De).getRegex(),gr=_(/^<(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(),fr=_(lt).replace("(?:-->|$)","-->").getRegex(),mr=_("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",fr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Me=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,vr=_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Me).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sn=_(/^!?\[(label)\]\[(ref)\]/).replace("label",Me).replace("ref",rt).getRegex(),on=_(/^!?\[(ref)\](?:\[\])?/).replace("ref",rt).getRegex(),kr=_("reflink|nolink(?!\\()","g").replace("reflink",sn).replace("nolink",on).getRegex(),st={_backpedal:Ce,anyPunctuation:dr,autolink:gr,blockSkip:sr,br:tn,code:nr,del:Ce,emStrongLDelim:or,emStrongRDelimAst:ur,emStrongRDelimUnd:pr,escape:tr,link:vr,nolink:on,punctuation:lr,reflink:sn,reflinkSearch:kr,tag:mr,text:rr,url:Ce},br={...st,link:_(/^!?\[(label)\]\((.*?)\)/).replace("label",Me).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Me).getRegex()},Ke={...st,emStrongRDelimAst:hr,emStrongLDelim:cr,url:_(/^((?: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\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},yt=t=>yr[t];function te(t,e){if(e){if(Y.escapeTest.test(t))return t.replace(Y.escapeReplace,yt)}else if(Y.escapeTestNoEncode.test(t))return t.replace(Y.escapeReplaceNoEncode,yt);return t}function xt(t){try{t=encodeURI(t).replace(Y.percentDecode,"%")}catch{return null}return t}function $t(t,e){let r=t.replace(Y.findPipe,(a,i,s)=>{let o=!1,c=i;for(;--c>=0&&s[c]==="\\";)o=!o;return o?"|":" |"}),l=r.split(Y.splitPipe),n=0;if(l[0].trim()||l.shift(),l.length>0&&!l.at(-1)?.trim()&&l.pop(),e)if(l.length>e)l.splice(e);else for(;l.length0?-2:-1}function Ct(t,e,r,l,n){let a=e.href,i=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");l.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:i,text:s,tokens:l.inlineTokens(s)};return l.state.inLink=!1,o}function $r(t,e,r){let l=t.match(r.other.indentCodeCompensation);if(l===null)return e;let n=l[1];return e.split(` `).map(a=>{let i=a.match(r.other.beginningSpace);if(i===null)return a;let[s]=i;return s.length>=n.length?a.slice(n.length):a}).join(` `)}var Pe=class{options;rules;lexer;constructor(t){this.options=t||de}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ke(r,` `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],l=$r(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:l}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let l=ke(r,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(r=l.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ke(e[0],` `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=ke(e[0],` `).split(` `),l="",n="",a=[];for(;r.length>0;){let i=!1,s=[],o;for(o=0;o1,n={type:"list",raw:"",ordered:l,start:l?+r.slice(0,-1):"",loose:!1,items:[]};r=l?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=l?r:"[*+-]");let a=this.rules.other.listItemRegex(r),i=!1;for(;t;){let o=!1,c="",p="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let u=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,d=>" ".repeat(3*d.length)),h=t.split(` `,1)[0],k=!u.trim(),m=0;if(this.options.pedantic?(m=2,p=u.trimStart()):k?m=e[1].length+1:(m=e[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,p=u.slice(m),m+=e[1].length),k&&this.rules.other.blankLine.test(h)&&(c+=h+` `,t=t.substring(h.length+1),o=!0),!o){let d=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),N=this.rules.other.fencesBeginRegex(m),U=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(` `,1)[0],M;if(h=E,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),M=h):M=h.replace(this.rules.other.tabCharGlobal," "),N.test(h)||U.test(h)||L.test(h)||d.test(h)||w.test(h))break;if(M.search(this.rules.other.nonSpaceChar)>=m||!h.trim())p+=` `+M.slice(m);else{if(k||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(u)||U.test(u)||w.test(u))break;p+=` `+h}!k&&!h.trim()&&(k=!0),c+=E+` `,t=t.substring(E.length+1),u=M.slice(m)}}n.loose||(i?n.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let b=null,z;this.options.gfm&&(b=this.rules.other.listIsTask.exec(p),b&&(z=b[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:c,task:!!b,checked:z,loose:!1,text:p,tokens:[]}),n.raw+=c}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let o=0;ou.type==="space"),p=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=p}if(n.loose)for(let o=0;o({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[o]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=ke(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=xr(e[2],"()");if(a===-2)return;if(a>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let l=e[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(l);a&&(l=a[1],n=a[3])}else n=e[3]?e[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?l=l.slice(1):l=l.slice(1,-1)),Ct(e,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let l=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[l.toLowerCase()];if(!n){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Ct(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let l=this.rules.inline.emStrongLDelim.exec(t);if(!(!l||l[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(l[1]||l[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...l[0]].length-1,a,i,s=n,o=0,c=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+n);(l=c.exec(e))!=null;){if(a=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!a)continue;if(i=[...a].length,l[3]||l[4]){s+=i;continue}else if((l[5]||l[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+o);let p=[...l[0]][0].length,u=t.slice(0,n+l.index+p+i);if(Math.min(n,i)%2){let k=u.slice(1,-1);return{type:"em",raw:u,text:k,tokens:this.lexer.inlineTokens(k)}}let h=u.slice(2,-2);return{type:"strong",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return l&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,l;return e[2]==="@"?(r=e[1],l="mailto:"+r):(r=e[1],l=r),{type:"link",raw:e[0],text:r,href:l,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,l;if(e[2]==="@")r=e[0],l="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=e[0],e[1]==="www."?l="http://"+e[0]:l=e[0]}return{type:"link",raw:e[0],text:r,href:l,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},ie=class Qe{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||de,this.options.tokenizer=this.options.tokenizer||new Pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Y,block:_e.normal,inline:ve.normal};this.options.pedantic?(r.block=_e.pedantic,r.inline=ve.pedantic):this.options.gfm&&(r.block=_e.gfm,this.options.breaks?r.inline=ve.breaks:r.inline=ve.gfm),this.tokenizer.rules=r}static get rules(){return{block:_e,inline:ve}}static lex(e,r){return new Qe(r).lex(e)}static lexInline(e,r){return new Qe(r).inlineTokens(e)}lex(e){e=e.replace(Y.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let r=0;r(n=i.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let i=r.at(-1);n.raw.length===1&&i!==void 0?i.raw+=` `:r.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` `)?"":` `)+n.raw,i.text+=` `+n.text,this.inlineQueue.at(-1).src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` `)?"":` `)+n.raw,i.text+=` `+n.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),r.push(n);continue}let a=e;if(this.options.extensions?.startBlock){let i=1/0,s=e.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},s),typeof o=="number"&&o>=0&&(i=Math.min(i,o))}),i<1/0&&i>=0&&(a=e.substring(0,i+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let i=r.at(-1);l&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(` `)?"":` `)+n.raw,i.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(n),l=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(` `)?"":` `)+n.raw,i.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(n);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let l=e,n=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,n.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=this.options.hooks?.emStrongMask?.call({lexer:this},l)??l;let a=!1,i="";for(;e;){a||(i=""),a=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);let c=r.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(e,l,i)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),r.push(s);continue}let o=e;if(this.options.extensions?.startInline){let c=1/0,p=e.slice(1),u;this.options.extensions.startInline.forEach(h=>{u=h.call({lexer:this},p),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(s=this.tokenizer.inlineText(o)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(i=s.raw.slice(-1)),a=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},Be=class{options;parser;constructor(t){this.options=t||de}space(t){return""}code({text:t,lang:e,escaped:r}){let l=(e||"").match(Y.notSpaceStart)?.[0],n=t.replace(Y.endingNewline,"")+` `;return l?'
'+(r?n:te(n,!0))+`
`:"
"+(r?n:te(n,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
`}list(t){let e=t.ordered,r=t.start,l="";for(let i=0;i `+l+" `}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+te(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let e="",r="";for(let n=0;n${l}`),` `+e+` `+l+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${te(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let l=this.parser.parseInline(r),n=xt(t);if(n===null)return l;t=n;let a='
    ",a}image({href:t,title:e,text:r,tokens:l}){l&&(r=this.parser.parseInline(l,this.parser.textRenderer));let n=xt(t);if(n===null)return te(r);t=n;let a=`${r}{let i=n[a].flat(1/0);r=r.concat(this.walkTokens(i,e))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let l={...r};if(l.async=this.defaults.async||l.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=e.renderers[n.name];a?e.renderers[n.name]=function(...i){let s=n.renderer.apply(this,i);return s===!1&&(s=a.apply(this,i)),s}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[n.level];a?a.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),l.extensions=e),r.renderer){let n=this.defaults.renderer||new Be(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let i=a,s=r.renderer[i],o=n[i];n[i]=(...c)=>{let p=s.apply(n,c);return p===!1&&(p=o.apply(n,c)),p||""}}l.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new Pe(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let i=a,s=r.tokenizer[i],o=n[i];n[i]=(...c)=>{let p=s.apply(n,c);return p===!1&&(p=o.apply(n,c)),p}}l.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new ye;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let i=a,s=r.hooks[i],o=n[i];ye.passThroughHooks.has(a)?n[i]=c=>{if(this.defaults.async&&ye.passThroughHooksRespectAsync.has(a))return Promise.resolve(s.call(n,c)).then(u=>o.call(n,u));let p=s.call(n,c);return o.call(n,p)}:n[i]=(...c)=>{let p=s.apply(n,c);return p===!1&&(p=o.apply(n,c)),p}}l.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;l.walkTokens=function(i){let s=[];return s.push(a.call(this,i)),n&&(s=s.concat(n.call(this,i))),s}}this.defaults={...this.defaults,...l}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ie.lex(t,e??this.defaults)}parser(t,e){return se.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let l={...r},n={...this.defaults,...l},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&l.async===!1)return a(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 e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=t);let i=n.hooks?n.hooks.provideLexer():t?ie.lex:ie.lexInline,s=n.hooks?n.hooks.provideParser():t?se.parse:se.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(e):e).then(o=>i(o,n)).then(o=>n.hooks?n.hooks.processAllTokens(o):o).then(o=>n.walkTokens?Promise.all(this.walkTokens(o,n.walkTokens)).then(()=>o):o).then(o=>s(o,n)).then(o=>n.hooks?n.hooks.postprocess(o):o).catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let o=i(e,n);n.hooks&&(o=n.hooks.processAllTokens(o)),n.walkTokens&&this.walkTokens(o,n.walkTokens);let c=s(o,n);return n.hooks&&(c=n.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(t,e){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t){let l="

    An error occurred:

    "+te(r.message+"",!0)+"
    ";return e?Promise.resolve(l):l}if(e)return Promise.reject(r);throw r}}},pe=new cn;function P(t,e){return pe.parse(t,e)}P.options=P.setOptions=function(t){return pe.setOptions(t),P.defaults=pe.defaults,Xt(P.defaults),P};P.getDefaults=et;P.defaults=de;P.use=function(...t){return pe.use(...t),P.defaults=pe.defaults,Xt(P.defaults),P};P.walkTokens=function(t,e){return pe.walkTokens(t,e)};P.parseInline=pe.parseInline;P.Parser=se;P.parser=se.parse;P.Renderer=Be;P.TextRenderer=ot;P.Lexer=ie;P.lexer=ie.lex;P.Tokenizer=Pe;P.Hooks=ye;P.parse=P;P.options;P.setOptions;P.use;P.walkTokens;P.parseInline;se.parse;ie.lex;function Cr(t){if(typeof t=="function"&&(t={highlight:t}),!t||typeof t.highlight!="function")throw new Error("Must provide highlight function");return typeof t.langPrefix!="string"&&(t.langPrefix="language-"),typeof t.emptyLangClass!="string"&&(t.emptyLangClass=""),{async:!!t.async,walkTokens(e){if(e.type!=="code")return;const r=Rt(e.lang);if(t.async)return Promise.resolve(t.highlight(e.text,r,e.lang||"")).then(St(e));const l=t.highlight(e.text,r,e.lang||"");if(l 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.");St(e)(l)},useNewRenderer:!0,renderer:{code(e,r,l){typeof e=="object"&&(l=e.escaped,r=e.lang,e=e.text);const n=Rt(r),a=n?t.langPrefix+Lt(n):t.emptyLangClass,i=a?` class="${a}"`:"";return e=e.replace(/\n$/,""),`
    ${l?e:Lt(e,!0)}
    
    `}}}}function Rt(t){return(t||"").match(/\S*/)[0]}function St(t){return e=>{typeof e=="string"&&e!==t.text&&(t.escaped=!0,t.text=e)}}const un=/[&<>"']/,Rr=new RegExp(un.source,"g"),hn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Sr=new RegExp(hn.source,"g"),Ar={"&":"&","<":"<",">":">",'"':""","'":"'"},At=t=>Ar[t];function Lt(t,e){if(e){if(un.test(t))return t.replace(Rr,At)}else if(hn.test(t))return t.replace(Sr,At);return t}var qe={},le={},ae={},zt;function pn(){if(zt)return ae;zt=1;var t=ae&&ae.__awaiter||function(l,n,a,i){function s(o){return o instanceof a?o:new a(function(c){c(o)})}return new(a||(a=Promise))(function(o,c){function p(k){try{h(i.next(k))}catch(m){c(m)}}function u(k){try{h(i.throw(k))}catch(m){c(m)}}function h(k){k.done?o(k.value):s(k.value).then(p,u)}h((i=i.apply(l,n||[])).next())})},e=ae&&ae.__generator||function(l,n){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,c;return c={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function p(h){return function(k){return u([h,k])}}function u(h){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,h[0]&&(a=0)),a;)try{if(i=1,s&&(o=h[0]&2?s.return:h[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,h[1])).done)return o;switch(s=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return a.label++,{value:h[1],done:!1};case 5:a.label++,s=h[1],h=[0];continue;case 7:h=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){a=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]"u")return Promise.reject(new Error("This is a library for the browser!"));if(n.getLoadingState()===r.LOADED)return n.instance.getSiteKey()===a?Promise.resolve(n.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(n.getLoadingState()===r.LOADING)return a!==n.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(o,c){n.successfulLoadingConsumers.push(function(p){return o(p)}),n.errorLoadingRunnable.push(function(p){return c(p)})});n.instanceSiteKey=a,n.setLoadingState(r.LOADING);var s=new n;return new Promise(function(o,c){s.loadScript(a,i.useRecaptchaNet||!1,i.useEnterprise||!1,i.renderParameters?i.renderParameters:{},i.customUrl).then(function(){n.setLoadingState(r.LOADED);var p=s.doExplicitRender(grecaptcha,a,i.explicitRenderParameters?i.explicitRenderParameters:{},i.useEnterprise||!1),u=new e.ReCaptchaInstance(a,p,grecaptcha);n.successfulLoadingConsumers.forEach(function(h){return h(u)}),n.successfulLoadingConsumers=[],i.autoHideBadge&&u.hideBadge(),n.instance=u,o(u)}).catch(function(p){n.errorLoadingRunnable.forEach(function(u){return u(p)}),n.errorLoadingRunnable=[],c(p)})})},n.getInstance=function(){return n.instance},n.setLoadingState=function(a){n.loadingState=a},n.getLoadingState=function(){return n.loadingState===null?r.NOT_LOADED:n.loadingState},n.prototype.loadScript=function(a,i,s,o,c){var p=this;i===void 0&&(i=!1),s===void 0&&(s=!1),o===void 0&&(o={}),c===void 0&&(c="");var u=document.createElement("script");u.setAttribute("recaptcha-v3-script",""),u.setAttribute("async",""),u.setAttribute("defer","");var h="https://www.google.com/recaptcha/api.js";i?s?h="https://recaptcha.net/recaptcha/enterprise.js":h="https://recaptcha.net/recaptcha/api.js":s&&(h="https://www.google.com/recaptcha/enterprise.js"),c&&(h=c),o.render&&(o.render=void 0);var k=this.buildQueryString(o);return u.src=h+"?render=explicit"+k,new Promise(function(m,b){u.addEventListener("load",p.waitForScriptToLoad(function(){m(u)},s),!1),u.onerror=function(z){n.setLoadingState(r.NOT_LOADED),b(z)},document.head.appendChild(u)})},n.prototype.buildQueryString=function(a){var i=Object.keys(a);return i.length<1?"":"&"+Object.keys(a).filter(function(s){return!!a[s]}).map(function(s){return s+"="+a[s]}).join("&")},n.prototype.waitForScriptToLoad=function(a,i){var s=this;return function(){window.grecaptcha===void 0?setTimeout(function(){s.waitForScriptToLoad(a,i)},n.SCRIPT_LOAD_DELAY):i?window.grecaptcha.enterprise.ready(function(){a()}):window.grecaptcha.ready(function(){a()})}},n.prototype.doExplicitRender=function(a,i,s,o){var c=t({sitekey:i},s);return s.container?o?a.enterprise.render(s.container,c):a.render(s.container,c):o?a.enterprise.render(c):a.render(c)},n.loadingState=null,n.instance=null,n.instanceSiteKey=null,n.successfulLoadingConsumers=[],n.errorLoadingRunnable=[],n.SCRIPT_LOAD_DELAY=25,n})();return le.load=l.load,le.getInstance=l.getInstance,le}var Et;function zr(){return Et||(Et=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReCaptchaInstance=t.getInstance=t.load=void 0;var e=Lr();Object.defineProperty(t,"load",{enumerable:!0,get:function(){return e.load}}),Object.defineProperty(t,"getInstance",{enumerable:!0,get:function(){return e.getInstance}});var r=pn();Object.defineProperty(t,"ReCaptchaInstance",{enumerable:!0,get:function(){return r.ReCaptchaInstance}})})(qe)),qe}var Ir=zr();const Tt=({size:t})=>j("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:t,height:t},[j("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),j("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Er=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},j("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),Tr=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},j("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),_r=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[j("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),j("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),jr=({active:t=!1})=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[j("path",{d:`M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z${t?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"}`,fill:t?"red":"currentColor"})]),Mr=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[j("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),j("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Pr=()=>j("svg",{width:"16",height:"16",ariaHidden:"true"},j("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Br=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},j("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),Hr=()=>j("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},j("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Ur=()=>j("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},j("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),Re=({size:t=100})=>j("svg",{width:t,height:t,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},j("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},j("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Dr=()=>j("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[j("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),j("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]),Nr=()=>ge("WALINE_USER_META",{nick:"",mail:"",link:""}),Vr=()=>ge("WALINE_COMMENT_BOX_EDITOR",""),Or="WALINE_LIKE",qr=ge(Or,[]),dn=()=>qr,Fr="WALINE_REACTION",Wr=ge(Fr,{}),Zr=()=>Wr,_t={},Gr=t=>{const e=_t[t]??(_t[t]=Ir.load(t,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:r=>e.then(l=>l.execute(r))}},Kr=t=>({execute:async e=>{const{load:r}=jn("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1});await r();const l=window.turnstile;return new Promise(n=>{l?.ready(()=>{l.render(".wl-captcha-container",{sitekey:t,action:e,size:"compact",callback:n})})})}}),Qr="WALINE_USER",Xr=ge(Qr,{}),ct=()=>Xr,Yr=["nick","mail","link"],jt=t=>t.filter(e=>Yr.includes(e)),Mt=["//unpkg.com/@waline/emojis@1.1.0/weibo"],Jr=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],el=t=>new Promise((e,r)=>{if(t.size>128e3)return r(new Error("File too large! File size limit 128KB"));const l=new FileReader;l.readAsDataURL(t),l.onload=()=>e(l.result),l.onerror=r}),tl=t=>t?'

    TeX is not available in preview

    ':'TeX is not available in preview',nl=t=>{const e=async(r,l={})=>fetch(`https://api.giphy.com/v1/gifs/${r}?${new URLSearchParams({lang:t,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...l}).toString()}`).then(n=>n.json()).then(({data:n})=>n.map(a=>({title:a.title,src:a.images.downsized_medium.url})));return{search:r=>e("search",{q:r,offset:"0"}),default:()=>e("trending",{}),more:(r,l=0)=>e("search",{q:r,offset:l.toString()})}},rl=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/,ll=/{let e=0;return t.replace(sl,(r,l,n)=>{if(n)return`${n}`;if(l==="<")return"<";let a;Fe[l]?a=Fe[l]:(a=Pt[e],Fe[l]=a);const i=`${l}`;return e=++e%Pt.length,i})},cl=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],ne=t=>Object.fromEntries(t.map((e,r)=>[cl[r],e]));var ul=ne(["Benutzername","Der Benutzername darf nicht weniger als 3 Bytes umfassen.","E-Mail","Bitte bestätigen Sie Ihre E-Mail-Adresse.","Webseite","Optional","Kommentieren Sie hier...","Noch keine Kommentare.","Senden","Gefällt mir","Gefällt mir nicht mehr","Antworten","Antwort abbrechen","Kommentare","Aktualisieren","Mehr laden...","Vorschau","Emoji","Ein Bild hochladen","Vor einigen Sekunden","Vor einigen Minuten","Vor einigen Stunden","Vor einigen Tagen","Gerade eben","Hochladen läuft","Anmelden","Abmelden","Admin","Angeheftet","Wörter","Bitte geben Sie Kommentare zwischen $0 und $1 Wörtern ein! Aktuelle Anzahl der Wörter: $2","Anonym","Zwerge","Hobbits","Ents","Magier","Elfen","Maïar","GIF","Nach einem GIF suchen","Profil","Genehmigt","Ausstehend","Spam","Lösen","Älteste","Neueste","Am beliebtesten","Was denken Sie?"]),Bt=ne(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words! Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),Ht=ne(["Nombre de usuario","El nombre de usuario no puede tener menos de 3 bytes.","Correo electrónico","Por favor confirma tu dirección de correo electrónico.","Sitio web","Opcional","Comenta aquí...","Sin comentarios todavía.","Enviar","Like","Anular like","Responder","Anular respuesta","Comentarios","Recargar","Cargar Más...","Previsualizar","Emoji","Subir Imagen","segundos atrás","minutos atrás","horas atrás","días atrás","justo ahora","Subiendo","Iniciar sesión","cerrar sesión","Admin","Fijado","Palabras",`Por favor escriba entre $0 y $1 palabras! El número actual de palabras: $2`,"Anónimo","Enanos","Hobbits","Ents","Magos","Elfos","Maiar","GIF","Buscar GIF","Perfil","Aprobado","Esperando","Spam","Desfijar","Más antiguos","Más recientes","Más vistos","¿Qué piensas?"]),Ut=ne(["Pseudo","Le pseudo ne peut pas faire moins de 3 octets.","E-mail","Veuillez confirmer votre adresse e-mail.","Site Web","Optionnel","Commentez ici...","Aucun commentaire pour l'instant.","Envoyer","J'aime","Annuler le j'aime","Répondre","Annuler la réponse","Commentaires","Actualiser","Charger plus...","Aperçu","Emoji","Télécharger une image","Il y a quelques secondes","Il y a quelques minutes","Il y a quelques heures","Il y a quelques jours","À l'instant","Téléchargement en cours","Connexion","Déconnexion","Admin","Épinglé","Mots",`Veuillez saisir des commentaires entre $0 et $1 mots ! Nombre actuel de mots : $2`,"Anonyme","Nains","Hobbits","Ents","Mages","Elfes","Maïar","GIF","Rechercher un GIF","Profil","Approuvé","En attente","Indésirable","Détacher","Le plus ancien","Dernier","Le plus populaire","Qu'en pensez-vous ?"]),Dt=ne(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません! 現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),hl=ne(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras! Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),Nt=ne(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов! Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),Vt=ne(["Tên","Tên không được nhỏ hơn 3 ký tự.","E-Mail","Vui lòng xác nhập địa chỉ email của bạn.","Website","Tùy chọn","Hãy bình luận có văn hoá!","Chưa có bình luận","Gửi","Thích","Bỏ thích","Trả lời","Hủy bỏ","bình luận","Làm mới","Tải thêm...","Xem trước","Emoji","Tải lên hình ảnh","giây trước","phút trước","giờ trước","ngày trước","Vừa xong","Đang tải lên","Đăng nhập","đăng xuất","Quản trị viên","Dính","từ",`Bình luận phải có độ dài giữa $0 và $1 từ! Số từ hiện tại: $2`,"Vô danh","Người lùn","Người tí hon","Thần rừng","Pháp sư","Tiên tộc","Maiar","Ảnh GIF","Tìm kiếm ảnh GIF","thông tin cá nhân","Đã được phê duyệt","Đang chờ đợi","Thư rác","Không dính","lâu đời nhất","muộn nhất","nóng nhất","What do you think?"]),Ot=ne(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 到 $1 字之间! 当前字数:$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),pl=ne(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 到 $1 字之間! 目前字數:$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]);const gn="en-US",Ye={zh:Ot,"zh-cn":Ot,"zh-tw":pl,en:Bt,"en-us":Bt,fr:Ut,"fr-fr":Ut,jp:Dt,"jp-jp":Dt,"pt-br":hl,ru:Nt,"ru-ru":Nt,vi:Vt,"vi-vn":Vt,de:ul,es:Ht,"es-mx":Ht},dl=t=>Ye[t.toLowerCase()]||Ye[gn.toLowerCase()],qt=t=>Object.keys(Ye).includes(t.toLowerCase())?t:gn,fn={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},gl=Object.keys(fn),Ne=Symbol("waline-config"),fl={key:0,class:"wl-reaction"},ml=["textContent"],vl={class:"wl-reaction-list"},kl=["onClick"],bl={class:"wl-reaction-img"},wl=["src","alt"],yl=["textContent"],xl=["textContent"];var $l=Se({__name:"ArticleReaction",setup(t){const e=Zr(),r=Je(Ne),l=H(-1),n=H([]),a=F(()=>r.value.locale),i=F(()=>{const{reaction:u}=r.value;return u!=null&&u.length?u:null}),s=F(()=>{var u;const{path:h}=r.value;return((u=i.value)==null?void 0:u.map((k,m)=>({icon:k,desc:a.value[`reaction${m}`],active:e.value[h]===m})))??null});let o;const c=async()=>{const{serverURL:u,lang:h,path:k}=r.value;if(!i.value)return;const m=new AbortController;o=m.abort.bind(m);const[b]=await Pn({serverURL:u,lang:h,paths:[k],type:i.value.map((z,d)=>`reaction${d}`),signal:m.signal});n.value=i.value.map((z,d)=>b[`reaction${d}`])},p=async u=>{if(l.value!==-1)return;const{serverURL:h,lang:k,path:m}=r.value,b=e.value[m];l.value=u,b!==void 0&&(await kt({serverURL:h,lang:k,path:m,type:`reaction${b}`,action:"desc"}),n.value[b]=Math.max(n.value[b]-1,0)),b!==u&&(await kt({serverURL:h,lang:k,path:m,type:`reaction${u}`}),n.value[u]=(n.value[u]||0)+1),b===u?delete e.value[m]:e.value[m]=u,l.value=-1};return He(()=>{xe(()=>[r.value.serverURL,r.value.path],()=>c())}),Gt(()=>{o?.()}),(u,h)=>s.value?(f(),v("div",fl,[x("div",{class:"wl-reaction-title",textContent:T(a.value.reactionTitle)},null,8,ml),x("ul",vl,[(f(!0),v(W,null,J(s.value,({active:k,icon:m,desc:b},z)=>(f(),v("li",{key:z,class:G(["wl-reaction-item",{active:k}]),onClick:d=>p(z)},[x("div",bl,[x("img",{src:m,alt:b},null,8,wl),l.value===z?(f(),he(A(Re),{key:0,class:"wl-reaction-loading"})):(f(),v("div",{key:1,class:"wl-reaction-votes",textContent:T(n.value[z]||0)},null,8,yl))]),x("div",{class:"wl-reaction-text",textContent:T(b)},null,8,xl)],10,kl))),128))])])):I("v-if",!0)}});const Cl=["data-index"],Rl=["src","title","onClick"];var Sl=Se({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(t){const e=t;let r=null;const l=ce("wall"),n=H({}),a=H([]),i=()=>{const u=Math.floor((l.value.getBoundingClientRect().width+e.gap)/(e.columnWidth+e.gap));return u>0?u:1},s=u=>new Array(u).fill(null).map(()=>[]),o=async u=>{var h;if(u>=e.items.length)return;await Kt();const k=Array.from(((h=l.value)==null?void 0:h.children)??[]).reduce((m,b)=>b.getBoundingClientRect().height{if(a.value.length===i()&&!u)return;a.value=s(i());const h=window.scrollY;await o(0),window.scrollTo({top:h})},p=u=>{n.value[u.target.src]=!0};return He(()=>{c(!0),r=new ResizeObserver(()=>{c()}),r.observe(l.value),Ge(()=>[e.items],()=>{n.value={},c(!0)}),Ge(()=>[e.columnWidth,e.gap],()=>{c()})}),_n(()=>{r.unobserve(l.value)}),(u,h)=>(f(),v("div",{ref_key:"wall",ref:l,class:"wl-gallery",style:vt({gap:`${u.gap}px`})},[(f(!0),v(W,null,J(a.value,(k,m)=>(f(),v("div",{key:m,class:"wl-gallery-column","data-index":m,style:vt({gap:`${u.gap}px`})},[(f(!0),v(W,null,J(k,b=>(f(),v(W,{key:b},[n.value[u.items[b].src]?I("v-if",!0):(f(),he(A(Re),{key:0,size:36,style:{margin:"20px auto"}})),x("img",{class:"wl-gallery-item",src:u.items[b].src,title:u.items[b].title,loading:"lazy",onLoad:p,onClick:z=>u.$emit("insert",`![](${u.items[b].src})`)},null,40,Rl)],64))),128))],12,Cl))),128))],4))}});const Al=t=>{try{t=decodeURI(t)}catch{}return t},mn=(t="")=>t.replace(/\/$/u,""),vn=t=>/^(https?:)?\/\//.test(t),Ll=t=>{const e=mn(t);return vn(e)?e:`https://${e}`},zl=t=>Array.isArray(t)?t:t?[0,t]:!1,be=(t,e)=>t==null||t===!0?e:t===!1?null:t,Il=({serverURL:t,path:e=location.pathname,lang:r=typeof navigator>"u"?"en-US":navigator.language,locale:l,meta:n=["nick","mail","link"],requiredMeta:a=[],dark:i=!1,pageSize:s=10,wordLimit:o,noCopyright:c=!1,login:p="enable",recaptchaV3Key:u="",turnstileKey:h="",commentSorting:k="latest",emoji:m=Mt,imageUploader:b,highlighter:z,texRenderer:d,search:w,reaction:N,...U})=>({serverURL:Ll(t),path:Al(e),lang:qt(r),locale:{...dl(qt(r)),...typeof l=="object"?l:{}},wordLimit:zl(o),meta:jt(n),requiredMeta:jt(a),dark:i,pageSize:s,commentSorting:k,login:p,noCopyright:c,recaptchaV3Key:u,turnstileKey:h,...U,reaction:N===!0?Jr:N||null,imageUploader:be(b,el),highlighter:be(z,ol),texRenderer:be(d,tl),emoji:be(m,Mt),search:be(w,nl(r))}),ut=t=>typeof t=="string",We="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bg-color:#1e1e1e;--waline-bg-color-light:#272727;--waline-bg-color-hover: #444;--waline-border-color:#333;--waline-disable-bg-color:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bg-color:#272727;--waline-info-color:#666}",El=t=>ut(t)?t==="auto"?`@media(prefers-color-scheme:dark){body${We}}`:`${t}${We}`:t===!0?`:root${We}`:"",Ze=(t,e)=>{let r=t.toString();for(;r.length{const e=Ze(t.getDate(),2),r=Ze(t.getMonth()+1,2);return`${Ze(t.getFullYear(),2)}-${r}-${e}`},_l=(t,e,r)=>{if(!t)return"";const l=ut(t)?new Date(t.includes(" ")?t.replace(/-/g,"/"):t):t,n=e.getTime()-l.getTime(),a=Math.floor(n/(24*3600*1e3));if(a===0){const i=n%864e5,s=Math.floor(i/(3600*1e3));if(s===0){const o=i%36e5,c=Math.floor(o/(60*1e3));if(c===0){const p=o%6e4;return`${Math.round(p/1e3)} ${r.seconds}`}return`${c} ${r.minutes}`}return`${s} ${r.hours}`}return a<0?r.now:a<8?`${a} ${r.days}`:Tl(l)},jl=/^[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])?)*$/,Ml=t=>jl.test(t),Pl="WALINE_EMOJI",Ft=ge(Pl,{}),Bl=t=>!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(t),Hl=t=>{const e=Bl(t);if(e){const r=Ft.value[t];if(r)return Promise.resolve(r)}return fetch(`${t}/info.json`).then(r=>r.json()).then(r=>{const l={folder:t,...r};return e&&(Ft.value[t]=l),l})},Wt=(t,e="",r="",l="")=>`${e?`${e}/`:""}${r}${t}${l?`.${l}`:""}`,Ul=t=>Promise.all(t?t.map(e=>ut(e)?Hl(mn(e)):Promise.resolve(e)):[]).then(e=>{const r={tabs:[],map:{}};return e.forEach(l=>{const{name:n,folder:a,icon:i,prefix:s="",type:o,items:c}=l;r.tabs.push({name:n,icon:Wt(i,a,s,o),items:c.map(p=>{const u=`${s}${p}`;return r.map[u]=Wt(p,a,s,o),u})})}),r}),Dl=t=>t.type.includes("image"),Zt=t=>{const e=Array.from(t).find(Dl);return e?e.getAsFile():null},Nl=/\$.*?\$/,Vl=/^\$(.*?)\$/,Ol=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,ql=t=>[{name:"blockMath",level:"block",tokenizer(e){const r=Ol.exec(e);if(r!==null)return{type:"html",raw:r[0],text:t(!0,r[1])}}},{name:"inlineMath",level:"inline",start(e){const r=e.search(Nl);return r!==-1?r:e.length},tokenizer(e){const r=Vl.exec(e);if(r!==null)return{type:"html",raw:r[0],text:t(!1,r[1])}}}],kn=(t="",e={})=>t.replace(/:(.+?):/g,(r,l)=>e[l]?`${l}`:r),Fl=(t,{emojiMap:e,highlighter:r,texRenderer:l})=>{const n=new cn;if(n.setOptions({breaks:!0}),r&&n.use(Cr({highlight:r})),l){const a=ql(l);n.use({extensions:a})}return n.parse(kn(t,e))},Wl=t=>t.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu),Zl=t=>t.match(/[\u4E00-\u9FD5]/gu),Gl=t=>{var e,r;return(((e=Wl(t))==null?void 0:e.reduce((l,n)=>l+(["",",","."].includes(n.trim())?0:n.trim().split(/\s+/u).length),0))??0)+(((r=Zl(t))==null?void 0:r.length)??0)},Kl=async()=>{const{userAgentData:t}=navigator;let e=navigator.userAgent;if(!t||t.platform!=="Windows")return e;const{platformVersion:r}=await t.getHighEntropyValues(["platformVersion"]);return r&&parseInt(r.split(".")[0])>=13&&(e=e.replace("Windows NT 10.0","Windows NT 11.0")),e},Ql={key:0,class:"wl-login-info"},Xl={class:"wl-avatar"},Yl=["title"],Jl=["title"],ea=["src"],ta=["title","textContent"],na={class:"wl-panel"},ra=["for","textContent"],la=["id","onUpdate:modelValue","name","type"],aa=["placeholder"],ia={class:"wl-preview"},sa=["innerHTML"],oa={class:"wl-footer"},ca={class:"wl-actions"},ua={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},ha=["title"],pa=["title"],da=["title","aria-label"],ga=["title"],fa={class:"wl-info"},ma={class:"wl-text-number"},va={key:0},ka=["textContent"],ba=["textContent"],wa=["disabled"],ya=["placeholder"],xa={key:1,class:"wl-loading"},$a={key:0,class:"wl-tab-wrapper"},Ca=["title","onClick"],Ra=["src","alt"],Sa={key:0,class:"wl-tabs"},Aa=["onClick"],La=["src","alt","title"],za=["title"];var bn=Se({__name:"CommentBox",props:{edit:{},rootId:{},replyId:{},replyUser:{}},emits:["log","cancelEdit","cancelReply","submit"],setup(t,{emit:e}){const r=t,l=e,n=Je(Ne),a=Vr(),i=Nr(),s=ct(),o=H({}),c=ce("textarea"),p=ce("image-uploader"),u=ce("emoji-button"),h=ce("emoji-popup"),k=ce("gif-button"),m=ce("gif-popup"),b=ce("gif-search"),z=H({tabs:[],map:{}}),d=H(0),w=H(!1),N=H(!1),U=H(!1),L=H(""),E=H(0),M=Sn({loading:!0,list:[]}),re=H(0),oe=H(!1),ze=H(""),$=H(!1),B=H(!1),C=F(()=>n.value.locale),O=F(()=>!!s.value.token),K=F(()=>n.value.imageUploader!==null),Q=y=>{const g=c.value,S=g.selectionStart,V=g.selectionEnd||0,R=g.scrollTop;a.value=g.value.substring(0,S)+y+g.value.substring(V,g.value.length),g.focus(),g.selectionStart=S+y.length,g.selectionEnd=S+y.length,g.scrollTop=R},me=({key:y,ctrlKey:g,metaKey:S})=>{$.value||(g||S)&&y==="Enter"&&ht()},Ie=async y=>{const g=`![${n.value.locale.uploading} ${y.name}]()`;Q(g),$.value=!0;try{const S=await n.value.imageUploader(y);a.value=a.value.replace(g,`\r ![${y.name}](${S})`)}catch(S){alert(S.message),a.value=a.value.replace(g,"")}finally{$.value=!1}},Ve=y=>{var g;if((g=y.dataTransfer)!=null&&g.items){const S=Zt(y.dataTransfer.items);S&&K.value&&(Ie(S),y.preventDefault())}},wn=y=>{if(y.clipboardData){const g=Zt(y.clipboardData.items);g&&K.value&&Ie(g)}},yn=()=>{const y=p.value;y.files&&K.value&&Ie(y.files[0]).then(()=>{y.value=""})},ht=async()=>{var y;const{serverURL:g,lang:S,login:V,wordLimit:R,requiredMeta:Z,recaptchaV3Key:q,turnstileKey:ee}=n.value,D={comment:ze.value,nick:i.value.nick,mail:i.value.mail,link:i.value.link,url:n.value.path,ua:await Kl()};if(!r.edit)if(s.value.token)D.nick=s.value.display_name,D.mail=s.value.email,D.link=s.value.url;else{if(V==="force")return;if(Z.includes("nick")&&!D.nick){o.value.nick.focus(),alert(C.value.nickError);return}if(Z.includes("mail")&&!D.mail||D.mail&&!Ml(D.mail)){o.value.mail.focus(),alert(C.value.mailError);return}D.nick||(D.nick=C.value.anonymous)}if(!D.comment){c.value.focus();return}if(!oe.value){alert(C.value.wordHint.replace("$0",R[0].toString()).replace("$1",R[1].toString()).replace("$2",E.value.toString()));return}D.comment=kn(D.comment,z.value.map),r.replyId&&r.rootId&&(D.pid=r.replyId,D.rid=r.rootId,D.at=r.replyUser),$.value=!0;try{q&&(D.recaptchaV3=await Gr(q).execute("social")),ee&&(D.turnstile=await Kr(ee).execute("social"));const Ee={serverURL:g,lang:S,token:s.value.token,comment:D},Oe=await(r.edit?je({objectId:r.edit.objectId,...Ee}):Hn(Ee));if($.value=!1,Oe.errmsg){alert(Oe.errmsg);return}l("submit",Oe.data),a.value="",L.value="",await Kt(),r.replyId&&l("cancelReply"),(y=r.edit)!=null&&y.objectId&&l("cancelEdit")}catch(Ee){$.value=!1,alert(Ee.message)}},xn=y=>{y.preventDefault();const{lang:g,serverURL:S}=n.value;Dn({serverURL:S,lang:g}).then(V=>{s.value=V,(V.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(V)),l("log")})},$n=()=>{s.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),l("log")},pt=y=>{y.preventDefault();const{lang:g,serverURL:S}=n.value,V=800,R=800,Z=(window.innerWidth-V)/2,q=(window.innerHeight-R)/2,ee=new URLSearchParams({lng:g,token:s.value.token}),D=window.open(`${S}/ui/profile?${ee.toString()}`,"_blank",`width=${V},height=${R},left=${Z},top=${q},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);D?.postMessage({type:"TOKEN",data:s.value.token},"*")},Cn=y=>{var g,S,V,R;!((g=u.value)!=null&&g.contains(y.target))&&!((S=h.value)!=null&&S.contains(y.target))&&(w.value=!1),!((V=k.value)!=null&&V.contains(y.target))&&!((R=m.value)!=null&&R.contains(y.target))&&(N.value=!1)},dt=async y=>{var g;const{scrollTop:S,clientHeight:V,scrollHeight:R}=y.target,Z=(V+S)/R,q=n.value.search,ee=((g=b.value)==null?void 0:g.value)??"";Z<.9||M.loading||B.value||(M.loading=!0,(q.more&&M.list.length?await q.more(ee,M.list.length):await q.search(ee)).length?M.list=[...M.list,...q.more&&M.list.length?await q.more(ee,M.list.length):await q.search(ee)]:B.value=!0,M.loading=!1,setTimeout(()=>{y.target.scrollTop=S},50))},gt=In(y=>{M.list=[],B.value=!1,dt(y)},300);return ft("click",Cn),ft("message",({data:y})=>{!y||y.type!=="profile"||(s.value={...s.value,...y.data},[localStorage,sessionStorage].filter(g=>g.getItem("WALINE_USER")).forEach(g=>{g.setItem("WALINE_USER",JSON.stringify(s))}))}),xe([n,E],([y,g])=>{const{wordLimit:S}=y;S?gS[1]?(re.value=S[1],oe.value=!1):(re.value=S[1],oe.value=!0):(re.value=0,oe.value=!0)}),Ge(N,async y=>{var g;if(!y)return;const S=n.value.search;b.value&&(b.value.value=""),M.loading=!0,M.list=await(((g=S.default)==null?void 0:g.call(S))??S.search("")),M.loading=!1}),He(()=>{var y;(y=r.edit)!=null&&y.objectId&&(a.value=r.edit.orig),xe(()=>a.value,g=>{const{highlighter:S,texRenderer:V}=n.value;ze.value=g,L.value=Fl(g,{emojiMap:z.value.map,highlighter:S,texRenderer:V}),E.value=Gl(g),g?bt(c.value):bt.destroy(c.value)}),xe(()=>n.value.emoji,async g=>{z.value=await Ul(g)})}),(y,g)=>{var S,V;return f(),v("div",{key:A(s).token,class:"wl-comment"},[A(n).login!=="disable"&&O.value&&!((S=y.edit)!=null&&S.objectId)?(f(),v("div",Ql,[x("div",Xl,[x("button",{type:"submit",class:"wl-logout-btn",title:C.value.logout,onClick:$n},[X(A(Tt),{size:14})],8,Yl),x("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:C.value.profile,onClick:pt},[x("img",{src:A(s).avatar,alt:"avatar"},null,8,ea)],8,Jl)]),x("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:C.value.profile,onClick:pt,textContent:T(A(s).display_name)},null,8,ta)])):I("v-if",!0),x("div",na,[A(n).login!=="force"&&A(n).meta.length&&!O.value?(f(),v("div",{key:0,class:G(["wl-header",`item${A(n).meta.length}`])},[(f(!0),v(W,null,J(A(n).meta,R=>(f(),v("div",{key:R,class:"wl-header-item"},[x("label",{for:`wl-${R}`,textContent:T(C.value[R]+(A(n).requiredMeta.includes(R)||!A(n).requiredMeta.length?"":`(${C.value.optional})`))},null,8,ra),Te(x("input",{id:`wl-${R}`,ref_for:!0,ref:Z=>{Z&&(o.value[R]=Z)},"onUpdate:modelValue":Z=>A(i)[R]=Z,class:G(["wl-input",`wl-${R}`]),name:R,type:R==="mail"?"email":"text"},null,10,la),[[An,A(i)[R]]])]))),128))],2)):I("v-if",!0),Te(x("textarea",{id:"wl-edit",ref:"textarea","onUpdate:modelValue":g[0]||(g[0]=R=>zn(a)?a.value=R:null),class:"wl-editor",placeholder:y.replyUser?`@${y.replyUser}`:C.value.placeholder,onKeydown:me,onDrop:Ve,onPaste:wn},null,40,aa),[[Ln,A(a)]]),Te(x("div",ia,[g[7]||(g[7]=x("hr",null,null,-1)),x("h4",null,T(C.value.preview)+":",1),x("div",{class:"wl-content",innerHTML:L.value},null,8,sa)],512),[[mt,U.value]]),x("div",oa,[x("div",ca,[x("a",ua,[X(A(Pr))]),Te(x("button",{ref:"emoji-button",type:"button",class:G(["wl-action",{active:w.value}]),title:C.value.emoji,onClick:g[1]||(g[1]=R=>w.value=!w.value)},[X(A(Tr))],10,ha),[[mt,z.value.tabs.length]]),A(n).search?(f(),v("button",{key:0,ref:"gif-button",type:"button",class:G(["wl-action",{active:N.value}]),title:C.value.gif,onClick:g[2]||(g[2]=R=>N.value=!N.value)},[X(A(Dr))],10,pa)):I("v-if",!0),x("input",{id:"wl-image-upload",ref:"image-uploader",class:"upload","aria-hidden":"true",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:yn},null,544),K.value?(f(),v("label",{key:1,for:"wl-image-upload",class:"wl-action",title:C.value.uploadImage,"aria-label":C.value.uploadImage},[X(A(_r))],8,da)):I("v-if",!0),x("button",{type:"button",class:G(["wl-action",{active:U.value}]),title:C.value.preview,onClick:g[3]||(g[3]=R=>U.value=!U.value)},[X(A(Mr))],10,ga)]),x("div",fa,[g[9]||(g[9]=x("div",{class:"wl-captcha-container"},null,-1)),x("div",ma,[ue(T(E.value)+" ",1),A(n).wordLimit?(f(),v("span",va,[g[8]||(g[8]=ue("  /  ")),x("span",{class:G({illegal:!oe.value}),textContent:T(re.value)},null,10,ka)])):I("v-if",!0),ue("  "+T(C.value.word),1)]),A(n).login!=="disable"&&!O.value?(f(),v("button",{key:0,type:"button",class:"wl-btn",onClick:xn,textContent:T(C.value.login)},null,8,ba)):I("v-if",!0),A(n).login!=="force"||O.value?(f(),v("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:$.value,onClick:ht},[$.value?(f(),he(A(Re),{key:0,size:16})):(f(),v(W,{key:1},[ue(T(C.value.submit),1)],64))],8,wa)):I("v-if",!0)]),x("div",{ref:"gif-popup",class:G(["wl-gif-popup",{display:N.value}])},[x("input",{ref:"gif-search",type:"text",placeholder:C.value.gifSearchPlaceholder,onInput:g[4]||(g[4]=(...R)=>A(gt)&&A(gt)(...R))},null,40,ya),M.list.length?(f(),he(Sl,{key:0,items:M.list,"column-width":200,gap:6,onInsert:g[5]||(g[5]=R=>Q(R)),onScroll:dt},null,8,["items"])):I("v-if",!0),M.loading?(f(),v("div",xa,[X(A(Re),{size:30})])):I("v-if",!0)],2),x("div",{ref:"emoji-popup",class:G(["wl-emoji-popup",{display:w.value}])},[(f(!0),v(W,null,J(z.value.tabs,(R,Z)=>(f(),v(W,{key:R.name},[Z===d.value?(f(),v("div",$a,[(f(!0),v(W,null,J(R.items,q=>(f(),v("button",{key:q,type:"button",title:q,onClick:ee=>Q(`:${q}:`)},[w.value?(f(),v("img",{key:0,class:"wl-emoji",src:z.value.map[q],alt:q,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Ra)):I("v-if",!0)],8,Ca))),128))])):I("v-if",!0)],64))),128)),z.value.tabs.length>1?(f(),v("div",Sa,[(f(!0),v(W,null,J(z.value.tabs,(R,Z)=>(f(),v("button",{key:R.name,type:"button",class:G(["wl-tab",{active:d.value===Z}]),onClick:q=>d.value=Z},[x("img",{class:"wl-emoji",src:R.icon,alt:R.name,title:R.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,La)],10,Aa))),128))])):I("v-if",!0)],2)])]),y.replyId||(V=y.edit)!=null&&V.objectId?(f(),v("button",{key:1,type:"button",class:"wl-close",title:C.value.cancelReply,onClick:g[6]||(g[6]=R=>y.replyId?l("cancelReply"):l("cancelEdit"))},[X(A(Tt),{size:24})],8,za)):I("v-if",!0)])}}});const Ia=["id"],Ea={class:"wl-user","aria-hidden":"true"},Ta=["src"],_a={class:"wl-card"},ja={class:"wl-head"},Ma=["href"],Pa={key:1,class:"wl-nick"},Ba=["textContent"],Ha=["textContent"],Ua=["textContent"],Da=["textContent"],Na=["textContent"],Va={class:"wl-comment-actions"},Oa=["title"],qa=["title"],Fa={class:"wl-meta","aria-hidden":"true"},Wa=["data-value","textContent"],Za={key:0,class:"wl-content"},Ga={key:0},Ka=["href"],Qa=["innerHTML"],Xa={key:1,class:"wl-admin-actions"},Ya={class:"wl-comment-status"},Ja=["disabled","onClick","textContent"],ei={key:3,class:"wl-quote"};var ti=Se({__name:"CommentCard",props:{comment:{},edit:{},rootId:{},reply:{}},emits:["log","submit","delete","like","sticky","edit","reply","status"],setup(t,{emit:e}){const r=t,l=e,n=["approved","waiting","spam"],a=Je(Ne),i=dn(),s=En(),o=ct(),c=F(()=>a.value.locale),p=F(()=>{const{link:d}=r.comment;return d?vn(d)?d:`https://${d}`:""}),u=F(()=>i.value.includes(r.comment.objectId)),h=F(()=>_l(new Date(r.comment.time),s.value,c.value)),k=F(()=>o.value.type==="administrator"),m=F(()=>r.comment.user_id&&o.value.objectId===r.comment.user_id),b=F(()=>{var d;return r.comment.objectId===((d=r.reply)==null?void 0:d.objectId)}),z=F(()=>{var d;return r.comment.objectId===((d=r.edit)==null?void 0:d.objectId)});return(d,w)=>{var N;const U=Tn("CommentCard",!0);return f(),v("div",{id:d.comment.objectId.toString(),class:"wl-card-item"},[x("div",Ea,[d.comment.avatar?(f(),v("img",{key:0,class:"wl-user-avatar",src:d.comment.avatar,alt:""},null,8,Ta)):I("v-if",!0),d.comment.type?(f(),he(A(Ur),{key:1})):I("v-if",!0)]),x("div",_a,[x("div",ja,[p.value?(f(),v("a",{key:0,class:"wl-nick",href:p.value,target:"_blank",rel:"nofollow noopener noreferrer"},T(d.comment.nick),9,Ma)):(f(),v("span",Pa,T(d.comment.nick),1)),d.comment.type==="administrator"?(f(),v("span",{key:2,class:"wl-badge",textContent:T(c.value.admin)},null,8,Ba)):I("v-if",!0),d.comment.label?(f(),v("span",{key:3,class:"wl-badge",textContent:T(d.comment.label)},null,8,Ha)):I("v-if",!0),d.comment.sticky?(f(),v("span",{key:4,class:"wl-badge",textContent:T(c.value.sticky)},null,8,Ua)):I("v-if",!0),typeof d.comment.level=="number"?(f(),v("span",{key:5,class:G(`wl-badge level${d.comment.level}`),textContent:T(c.value[`level${d.comment.level}`]||`Level ${d.comment.level}`)},null,10,Da)):I("v-if",!0),x("span",{class:"wl-time",textContent:T(h.value)},null,8,Na),x("div",Va,[k.value||m.value?(f(),v(W,{key:0},[x("button",{type:"button",class:"wl-edit",onClick:w[0]||(w[0]=L=>l("edit",d.comment))},[X(A(Hr))]),x("button",{type:"button",class:"wl-delete",onClick:w[1]||(w[1]=L=>l("delete",d.comment))},[X(A(Er))])],64)):I("v-if",!0),x("button",{type:"button",class:"wl-like",title:u.value?c.value.cancelLike:c.value.like,onClick:w[2]||(w[2]=L=>l("like",d.comment))},[X(A(jr),{active:u.value},null,8,["active"]),ue(" "+T("like"in d.comment?d.comment.like:""),1)],8,Oa),x("button",{type:"button",class:G(["wl-reply",{active:b.value}]),title:b.value?c.value.cancelReply:c.value.reply,onClick:w[3]||(w[3]=L=>l("reply",b.value?null:d.comment))},[X(A(Br))],10,qa)])]),x("div",Fa,[(f(),v(W,null,J(["addr","browser","os"],L=>(f(),v(W,null,[d.comment[L]?(f(),v("span",{key:L,class:G(`wl-${L}`),"data-value":d.comment[L],textContent:T(d.comment[L])},null,10,Wa)):I("v-if",!0)],64))),64))]),z.value?I("v-if",!0):(f(),v("div",Za,["reply_user"in d.comment&&d.comment.reply_user?(f(),v("p",Ga,[x("a",{href:"#"+d.comment.pid},"@"+T(d.comment.reply_user.nick),9,Ka),w[17]||(w[17]=x("span",null,": ",-1))])):I("v-if",!0),x("div",{innerHTML:d.comment.comment},null,8,Qa)])),k.value&&!z.value?(f(),v("div",Xa,[x("span",Ya,[(f(),v(W,null,J(n,L=>x("button",{key:L,type:"submit",class:G(`wl-btn wl-${L}`),disabled:d.comment.status===L,onClick:E=>l("status",{status:L,comment:d.comment}),textContent:T(c.value[L])},null,10,Ja)),64))]),k.value&&!("rid"in d.comment)?(f(),v("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:w[4]||(w[4]=L=>l("sticky",d.comment))},T(d.comment.sticky?c.value.unsticky:c.value.sticky),1)):I("v-if",!0)])):I("v-if",!0),b.value||z.value?(f(),v("div",{key:2,class:G({"wl-reply-wrapper":b.value,"wl-edit-wrapper":z.value})},[X(bn,{edit:d.edit,"reply-id":(N=d.reply)==null?void 0:N.objectId,"reply-user":d.comment.nick,"root-id":d.rootId,onLog:w[5]||(w[5]=L=>l("log")),onCancelReply:w[6]||(w[6]=L=>l("reply",null)),onCancelEdit:w[7]||(w[7]=L=>l("edit",null)),onSubmit:w[8]||(w[8]=L=>l("submit",L))},null,8,["edit","reply-id","reply-user","root-id"])],2)):I("v-if",!0),"children"in d.comment?(f(),v("div",ei,[(f(!0),v(W,null,J(d.comment.children,L=>(f(),he(U,{key:L.objectId,comment:L,reply:d.reply,edit:d.edit,"root-id":d.rootId,onLog:w[9]||(w[9]=E=>l("log")),onDelete:w[10]||(w[10]=E=>l("delete",E)),onEdit:w[11]||(w[11]=E=>l("edit",E)),onLike:w[12]||(w[12]=E=>l("like",E)),onReply:w[13]||(w[13]=E=>l("reply",E)),onStatus:w[14]||(w[14]=E=>l("status",E)),onSticky:w[15]||(w[15]=E=>l("sticky",E)),onSubmit:w[16]||(w[16]=E=>l("submit",E))},null,8,["comment","reply","edit","root-id"]))),128))])):I("v-if",!0)])],8,Ia)}}});const ni="3.6.0",ri={"data-waline":""},li={class:"wl-meta-head"},ai={class:"wl-count"},ii=["textContent"],si={class:"wl-sort"},oi=["onClick"],ci={class:"wl-cards"},ui={key:1,class:"wl-operation"},hi=["textContent"],pi={key:2,class:"wl-loading"},di=["textContent"],gi={key:4,class:"wl-operation"},fi=["textContent"],mi={key:5,class:"wl-power"};var ki=Se({__name:"WalineComment",props:{serverURL:{},path:{},meta:{},requiredMeta:{},wordLimit:{},pageSize:{},lang:{},locale:{},commentSorting:{},dark:{type:[String,Boolean]},login:{},noCopyright:{type:Boolean},recaptchaV3Key:{},turnstileKey:{},reaction:{type:[Array,Boolean]},emoji:{},search:{},highlighter:{type:Function},imageUploader:{type:Function},texRenderer:{type:Function}},setup(t){const e=t,r=ct(),l=dn(),n=H("loading"),a=H(0),i=H(1),s=H(0),o=F(()=>Il(e)),c=H(o.value.commentSorting),p=H([]),u=H(null),h=H(null),k=F(()=>El(o.value.dark)),m=F(()=>o.value.locale);Rn(k,{id:"waline-darkmode"});let b=null;const z=$=>{const{serverURL:B,path:C,pageSize:O}=o.value,K=new AbortController;n.value="loading",b?.(),Bn({serverURL:B,lang:o.value.lang,path:C,pageSize:O,sortBy:fn[c.value],page:$,signal:K.signal,token:r.value.token}).then(Q=>{n.value="success",a.value=Q.count,p.value.push(...Q.data),i.value=$,s.value=Q.totalPages}).catch(Q=>{Q.name!=="AbortError"&&(console.error(Q.message),n.value="error")}),b=K.abort.bind(K)},d=()=>{z(i.value+1)},w=()=>{a.value=0,p.value=[],z(1)},N=$=>{c.value!==$&&(c.value=$,w())},U=$=>{u.value=$},L=$=>{h.value=$},E=$=>{if(h.value)h.value.comment=$.comment,h.value.orig=$.orig;else if("rid"in $){const B=p.value.find(({objectId:C})=>C===$.rid);if(!B)return;Array.isArray(B.children)||(B.children=[]),B.children.push($)}else p.value.unshift($),a.value+=1},M=async({comment:$,status:B})=>{if($.status===B)return;const{serverURL:C,lang:O}=o.value;await je({serverURL:C,lang:O,token:r.value.token,objectId:$.objectId,comment:{status:B}}),$.status=B},re=async $=>{if("rid"in $)return;const{serverURL:B,lang:C}=o.value;await je({serverURL:B,lang:C,token:r.value.token,objectId:$.objectId,comment:{sticky:$.sticky?0:1}}),$.sticky=!$.sticky},oe=async({objectId:$})=>{if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:B,lang:C}=o.value;await Un({serverURL:B,lang:C,token:r.value.token,objectId:$}),p.value.some((O,K)=>O.objectId===$?(p.value=p.value.filter((Q,me)=>me!==K),!0):O.children.some((Q,me)=>Q.objectId===$?(p.value[K].children=O.children.filter((Ie,Ve)=>Ve!==me),!0):!1))},ze=async $=>{const{serverURL:B,lang:C}=o.value,{objectId:O}=$,K=l.value.includes(O);await je({serverURL:B,lang:C,objectId:O,token:r.value.token,comment:{like:!K}}),K?l.value=l.value.filter(Q=>Q!==O):(l.value=[...l.value,O],l.value.length>50&&(l.value=l.value.slice(-50))),$.like=Math.max(0,($.like||0)+(K?-1:1))};return Mn(Ne,o),He(()=>{xe(()=>[e.serverURL,e.path],()=>{w()})}),Gt(()=>{b?.()}),($,B)=>(f(),v("div",ri,[X($l),!u.value&&!h.value?(f(),he(bn,{key:0,onLog:w,onSubmit:E})):I("v-if",!0),x("div",li,[x("div",ai,[a.value?(f(),v("span",{key:0,class:"wl-num",textContent:T(a.value)},null,8,ii)):I("v-if",!0),ue(" "+T(m.value.comment),1)]),x("ul",si,[(f(!0),v(W,null,J(A(gl),C=>(f(),v("li",{key:C,class:G([C===c.value?"active":""]),onClick:O=>N(C)},T(m.value[C]),11,oi))),128))])]),x("div",ci,[(f(!0),v(W,null,J(p.value,C=>(f(),he(ti,{key:C.objectId,"root-id":C.objectId,comment:C,reply:u.value,edit:h.value,onLog:w,onReply:U,onEdit:L,onSubmit:E,onStatus:M,onDelete:oe,onSticky:re,onLike:ze},null,8,["root-id","comment","reply","edit"]))),128))]),n.value==="error"?(f(),v("div",ui,[x("button",{type:"button",class:"wl-btn",onClick:w,textContent:T(m.value.refresh)},null,8,hi)])):n.value==="loading"?(f(),v("div",pi,[X(A(Re),{size:30})])):p.value.length?i.value