@feedlog-ai/webcomponents 0.0.27 → 0.0.28
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 +6 -5
- package/dist/cjs/feedlog-badge.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-button_3.cjs.entry.js +29 -2
- package/dist/cjs/feedlog-issues.cjs.entry.js +1 -1
- package/dist/collection/components/feedlog-badge/feedlog-badge.css +50 -50
- package/dist/collection/components/feedlog-issue/feedlog-issue.css +89 -64
- package/dist/collection/components/feedlog-issue/feedlog-issue.js +28 -1
- package/dist/collection/components/feedlog-issue/feedlog-issue.stories.js +3 -2
- package/dist/collection/components/feedlog-issues/feedlog-issues.css +0 -2
- package/dist/collection/components/feedlog-issues/feedlog-issues.stories.js +3 -2
- package/dist/components/feedlog-badge.js +1 -1
- package/dist/components/feedlog-issue.js +1 -1
- package/dist/components/feedlog-issues-client.js +1 -1
- package/dist/components/feedlog-issues-list.js +1 -1
- package/dist/components/feedlog-issues.js +1 -1
- package/dist/components/{p-BuX7UXwe.js → p-B85wbrJg.js} +2 -2
- package/dist/components/{p-GzOCQT_k.js → p-DrIHp7WA.js} +1 -1
- package/dist/components/p-DzATWlAC.js +1 -0
- package/dist/components/{p-DMKFbFjj.js → p-w376pIno.js} +1 -1
- package/dist/esm/feedlog-badge.entry.js +1 -1
- package/dist/esm/feedlog-button_3.entry.js +30 -3
- package/dist/esm/feedlog-issues.entry.js +1 -1
- package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
- package/dist/feedlog-toolkit/{p-7f8133b3.entry.js → p-08a0ec85.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-bf8244fc.entry.js +1 -0
- package/dist/feedlog-toolkit/p-def7865f.entry.js +3 -0
- package/dist/types/components/feedlog-issue/feedlog-issue.d.ts +5 -0
- package/package.json +2 -2
- package/dist/components/p-Chc3XZ5Y.js +0 -1
- package/dist/feedlog-toolkit/p-13089dc5.entry.js +0 -1
- package/dist/feedlog-toolkit/p-f868da29.entry.js +0 -3
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,H as o}from"./p-CHawAwGP.js";const r=class{constructor(n){e(this,n),this.feedlogClick=t(this,"feedlogClick"),this.variant="default",this.size="default",this.disabled=!1,this.type="button",this.handleClick=e=>{this.disabled||this.feedlogClick.emit(e)}}render(){return n("button",{key:"6cdd8347def51592707b1fb9aab0dc565ca0f76f",type:this.type,class:`button button-${this.variant} ${"default"===this.size?"button-size-default":`button-size-${this.size}`}`,disabled:this.disabled,onClick:this.handleClick},n("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};r.style=":host{display:inline-block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-ring:oklch(0.708 0 0);--feedlog-destructive:#d4183d;--feedlog-radius:0.625rem}:host(.dark){--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723)}button{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;font-size:0.875rem;font-weight:500;border-radius:calc(var(--feedlog-radius) - 2px);border:1px solid transparent;cursor:pointer;transition:all 0.15s ease;outline:none;font-family:inherit}button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}button:focus-visible{border-color:var(--feedlog-ring);box-shadow:0 0 0 3px color-mix(in oklab, var(--feedlog-ring) 50%, transparent)}.button-default{background-color:var(--feedlog-primary);color:var(--feedlog-primary-foreground);border-color:transparent}.button-default:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-primary) 90%, transparent)}.button-outline{background-color:var(--feedlog-background);color:var(--feedlog-foreground);border-color:var(--feedlog-border)}.button-outline:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}:host(.dark) .button-outline{background-color:transparent;border-color:var(--feedlog-input)}:host(.dark) .button-outline:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-accent) 50%, transparent)}.button-ghost{background-color:transparent;color:var(--feedlog-foreground);border-color:transparent}.button-ghost:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}.button-destructive{background-color:var(--feedlog-destructive);color:#ffffff;border-color:transparent}.button-destructive:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-destructive) 90%, transparent)}:host(.dark) .button-destructive{background-color:color-mix(in oklab, var(--feedlog-destructive) 60%, transparent)}.button-size-sm{height:2rem;padding:0 0.75rem;font-size:0.75rem}.button-size-sm:has(svg:only-child){width:2rem;padding:0}.button-size-default{height:2.25rem;padding:0.5rem 1rem}.button-size-lg{height:2.5rem;padding:0.625rem 1.5rem;font-size:1rem}button svg{pointer-events:none;flex-shrink:0;width:1rem;height:1rem}";var i={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function l(e){i=e}var a={exec:()=>null};function s(e,t=""){let n="string"==typeof e?e:e.source,o={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(u.caret,"$1"),n=n.replace(e,r),o},getRegex:()=>new RegExp(n,t)};return o}var c=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),u={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},d=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,h=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p=s(h).replace(/bull/g,f).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(),g=s(h).replace(/bull/g,f).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(),m=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),v=s(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f).getRegex(),w="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",y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x=s("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",y).replace("tag",w).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S=s(m).replace("hr",d).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),$={blockquote:s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",S).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:k,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:d,html:x,lheading:p,list:v,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:S,table:a,text:/^[^\n]+/},A=s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",d).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),_={...$,lheading:g,table:A,paragraph:s(m).replace("hr",d).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",A).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex()},z={...$,html:s("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y).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:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:s(m).replace("hr",d).replace("heading"," *#{1,6} *[^\n]").replace("lheading",p).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,R=/[\p{P}\p{S}]/u,E=/[\s\p{P}\p{S}]/u,P=/[^\s\p{P}\p{S}]/u,M=s(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,E).getRegex(),L=/(?!~)[\p{P}\p{S}]/u,C=/(?![*_])[\p{P}\p{S}]/u,D=s(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),I=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,O=s(I,"u").replace(/punct/g,R).getRegex(),q=s(I,"u").replace(/punct/g,L).getRegex(),B="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F=s(B,"gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,E).replace(/punct/g,R).getRegex(),N=s(B,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,L).getRegex(),j=s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,E).replace(/punct/g,R).getRegex(),U=s(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,C).getRegex(),H=s("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|[*_])/u).replace(/punctSpace/g,/(?![*_])[\s\p{P}\p{S}]/u).replace(/punct/g,C).getRegex(),Z=s(/\\(punct)/,"gu").replace(/punct/g,R).getRegex(),W=s(/^<(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(),Y=s(y).replace("(?:--\x3e|$)","--\x3e").getRegex(),G=s("^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",Y).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,V=s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",X).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=s(/^!?\[(label)\]\[(ref)\]/).replace("label",X).replace("ref",b).getRegex(),Q=s(/^!?\[(ref)\](?:\[\])?/).replace("ref",b).getRegex(),J=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ee={_backpedal:a,anyPunctuation:Z,autolink:W,blockSkip:D,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,delLDelim:a,delRDelim:a,emStrongLDelim:O,emStrongRDelimAst:F,emStrongRDelimUnd:j,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:Q,punctuation:M,reflink:K,reflinkSearch:s("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",Q).getRegex(),tag:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},te={...ee,link:s(/^!?\[(label)\]\((.*?)\)/).replace("label",X).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X).getRegex()},ne={...ee,emStrongRDelimAst:N,emStrongLDelim:q,delLDelim:U,delRDelim:H,url:s(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",J).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:s(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",J).getRegex()},oe={...ne,br:s(T).replace("{2,}","*").getRegex(),text:s(ne.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},re={normal:$,gfm:_,pedantic:z},ie={normal:ee,gfm:ne,breaks:oe,pedantic:te},le={"&":"&","<":"<",">":">",'"':""","'":"'"},ae=e=>le[e];function se(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,ae)}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,ae);return e}function ce(e){try{e=encodeURI(e).replace(u.percentDecode,"%")}catch{return null}return e}function ue(e,t){let n=e.replace(u.findPipe,((e,t,n)=>{let o=!1,r=t;for(;--r>=0&&"\\"===n[r];)o=!o;return o?"|":" |"})).split(u.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(u.slashPipe,"|");return n}function de(e,t){let n=e.length;if(0===n)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function fe(e,t=0){let n=t,o="";for(let t of e)if("\t"===t){let e=4-n%4;o+=" ".repeat(e),n+=e}else o+=t,n++;return o}function he(e,t,n,o,r){let i=t.href,l=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");o.state.inLink=!0;let s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:l,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,s}var pe=class{options;rules;lexer;constructor(e){this.options=e||i}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:de(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let o=e.match(n.other.indentCodeCompensation);if(null===o)return t;let r=o[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[o]=t;return o.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=de(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:de(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=de(t[0],"\n").split("\n"),n="",o="",r=[];for(;e.length>0;){let t,i=!1,l=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))l.push(e[t]),i=!0;else{if(i)break;l.push(e[t])}e=e.slice(t);let a=l.join("\n"),s=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,o=o?`${o}\n${s}`:s;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,r,!0),this.lexer.state.top=c,0===e.length)break;let u=r.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,o=o.substring(0,o.length-t.text.length)+l.text;break}if("list"!==u?.type);else{let t=u,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-u.raw.length)+l.raw,o=o.substring(0,o.length-t.raw.length)+l.raw,e=i.substring(r.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:r,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),o=n.length>1,r={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let n=!1,o="",a="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let s=fe(t[2].split("\n",1)[0],t[1].length),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,a=s.trimStart()):u?d=t[1].length+1:(d=s.search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=s.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(o+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),l=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let h,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),h=c):h=c.replace(this.rules.other.tabCharGlobal," "),r.test(c)||i.test(c)||l.test(c)||f.test(c)||t.test(c)||n.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!c.trim())a+="\n"+h.slice(d);else{if(u||s.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||r.test(s)||i.test(s)||n.test(s))break;a+="\n"+c}u=!c.trim(),o+=p+"\n",e=e.substring(p.length+1),s=h.slice(d)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(l=!0)),r.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),r.raw+=o}let a=r.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),r.raw=r.raw.trimEnd();for(let e of r.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,""),"text"===e.tokens[0]?.type||"paragraph"===e.tokens[0]?.type){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=n.checked,r.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:"paragraph",raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!r.loose){let t=e.tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=n}}if(r.loose)for(let e of r.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:o}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ue(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===o.length){for(let e of o)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(let e of r)i.rows.push(ue(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=de(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let o=0;o<e.length;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),he(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return he(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!o[1]&&!o[2]||!n||this.rules.inline.punctuation.exec(n))){let n,r,i=[...o[0]].length-1,l=i,a=0,s="*"===o[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=s.exec(t));){if(n=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!n)continue;if(r=[...n].length,o[3]||o[4]){l+=r;continue}if((o[5]||o[6])&&i%3&&!((i+r)%3)){a+=r;continue}if(l-=r,l>0)continue;r=Math.min(r,r+l+a);let t=[...o[0]][0].length,s=e.slice(0,i+o.index+t+r);if(Math.min(i,r)%2){let e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}let c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),o=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&o&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let o=this.rules.inline.delLDelim.exec(e);if(o&&(!o[1]||!n||this.rules.inline.punctuation.exec(n))){let n,r,i=[...o[0]].length-1,l=i,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=a.exec(t));){if(n=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!n||(r=[...n].length,r!==i))continue;if(o[3]||o[4]){l+=r;continue}if(l-=r,l>0)continue;r=Math.min(r,r+l);let t=[...o[0]][0].length,a=e.slice(0,i+o.index+t+r),s=a.slice(i,-i);return{type:"del",raw:a,text:s,tokens:this.lexer.inlineTokens(s)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let o;do{o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(o!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],escaped:this.lexer.state.inRawBlock}}},ge=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,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 t={other:u,block:re.normal,inline:ie.normal};this.options.pedantic?(t.block=re.pedantic,t.inline=ie.pedantic):this.options.gfm&&(t.block=re.gfm,t.inline=this.options.breaks?ie.breaks:ie.gfm),this.tokenizer.rules=t}static get rules(){return{block:re,inline:ie}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(u.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(u.tabCharGlobal," ").replace(u.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((n=>!!(o=n.call({lexer:this},e,t))&&(e=e.substring(o.raw.length),t.push(o),!0))))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let n=t.at(-1);1===o.raw.length&&void 0!==n?n.raw+="\n":t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.text,this.inlineQueue.at(-1).src=n.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},t.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let r=e;if(this.options.extensions?.startBlock){let t,n=1/0,o=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(r=e.substring(0,n+1))}if(this.state.top&&(o=this.tokenizer.paragraph(r))){let i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+o.raw,i.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(o),n=r.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(o)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,o=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,r.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(o));)n=r[2]?r[2].length:0,o=o.slice(0,r.index+n)+"["+"a".repeat(r[0].length-n-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let i=!1,l="";for(;e;){let n;if(i||(l=""),i=!1,this.options.extensions?.inline?.some((o=>!!(n=o.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let o=t.at(-1);"text"===n.type&&"text"===o?.type?(o.raw+=n.raw,o.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,o,l)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e,o,l)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let r=e;if(this.options.extensions?.startInline){let t,n=1/0,o=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(r=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(r)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),i=!0;let o=t.at(-1);"text"===o?.type?(o.raw+=n.raw,o.text+=n.text):t.push(n)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},me=class{options;parser;constructor(e){this.options=e||i}space(e){return""}code({text:e,lang:t,escaped:n}){let o=(t||"").match(u.notSpaceStart)?.[0],r=e.replace(u.endingNewline,"")+"\n";return o?'<pre><code class="language-'+se(o)+'">'+(n?r:se(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:se(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,o="";for(let t=0;t<e.items.length;t++)o+=this.listitem(e.items[t]);let r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+o+"</"+r+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let o="";for(let t=0;t<e.rows.length;t++){let r=e.rows[t];n="";for(let e=0;e<r.length;e++)n+=this.tablecell(r[e]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+o+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${se(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let o=this.parser.parseInline(n),r=ce(e);if(null===r)return o;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+se(t)+'"'),i+=">"+o+"</a>",i}image({href:e,title:t,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));let r=ce(e);if(null===r)return se(n);let i=`<img src="${e=r}" alt="${n}"`;return t&&(i+=` title="${se(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:se(e.text)}},be=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ke=class e{options;renderer;textRenderer;constructor(e){this.options=e||i,this.options.renderer=this.options.renderer||new me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new be}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t="";for(let n=0;n<e.length;n++){let o=e[n];if(this.options.extensions?.renderers?.[o.type]){let e=o,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==n||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=n||"";continue}}let r=o;switch(r.type){case"space":t+=this.renderer.space(r);break;case"hr":t+=this.renderer.hr(r);break;case"heading":t+=this.renderer.heading(r);break;case"code":t+=this.renderer.code(r);break;case"table":t+=this.renderer.table(r);break;case"blockquote":t+=this.renderer.blockquote(r);break;case"list":t+=this.renderer.list(r);break;case"checkbox":t+=this.renderer.checkbox(r);break;case"html":t+=this.renderer.html(r);break;case"def":t+=this.renderer.def(r);break;case"paragraph":t+=this.renderer.paragraph(r);break;case"text":t+=this.renderer.text(r);break;default:{let e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){let n="";for(let o=0;o<e.length;o++){let r=e[o];if(this.options.extensions?.renderers?.[r.type]){let e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}let i=r;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"checkbox":n+=t.checkbox(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},ve=class{options;block;constructor(e){this.options=e||i}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ge.lex:ge.lexInline}provideParser(){return this.block?ke.parse:ke.parseInline}},we=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ke;Renderer=me;TextRenderer=be;Lexer=ge;Tokenizer=pe;Hooks=ve;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let o of e.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of e.rows)for(let e of o)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":n=n.concat(this.walkTokens(o.items,t));break;default:{let e=o;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((o=>{let r=e[o].flat(1/0);n=n.concat(this.walkTokens(r,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let o=e.renderer.apply(this,t);return!1===o&&(o=n.apply(this,t)),o}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){let t=this.defaults.renderer||new me(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=e.renderer[n],r=t[n];t[n]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new pe(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=e.tokenizer[n],r=t[n];t[n]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ve;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=e.hooks[n],r=t[n];t[n]=ve.passThroughHooks.has(n)?e=>{if(this.defaults.async&&ve.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await o.call(t,e);return r.call(t,n)})();let i=o.call(t,e);return r.call(t,i)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await o.apply(t,e);return!1===n&&(n=await r.apply(t,e)),n})();let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,o=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(o.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ge.lex(e,t??this.defaults)}parser(e,t){return ke.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let o={...n},r={...this.defaults,...o},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===o.async)return i(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 t>"u"||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let n=r.hooks?await r.hooks.preprocess(t):t,o=await(r.hooks?await r.hooks.provideLexer():e?ge.lex:ge.lexInline)(n,r),i=r.hooks?await r.hooks.processAllTokens(o):o;r.walkTokens&&await Promise.all(this.walkTokens(i,r.walkTokens));let l=await(r.hooks?await r.hooks.provideParser():e?ke.parse:ke.parseInline)(i,r);return r.hooks?await r.hooks.postprocess(l):l})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let n=(r.hooks?r.hooks.provideLexer():e?ge.lex:ge.lexInline)(t,r);r.hooks&&(n=r.hooks.processAllTokens(n)),r.walkTokens&&this.walkTokens(n,r.walkTokens);let o=(r.hooks?r.hooks.provideParser():e?ke.parse:ke.parseInline)(n,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+se(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ye(e,t){return we.parse(e,t)}ye.options=ye.setOptions=function(e){return we.setOptions(e),l(ye.defaults=we.defaults),ye},ye.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ye.defaults=i,ye.use=function(...e){return we.use(...e),l(ye.defaults=we.defaults),ye},ye.walkTokens=function(e,t){return we.walkTokens(e,t)},ye.parseInline=we.parseInline,ye.Parser=ke,ye.parser=ke.parse,ye.Renderer=me,ye.TextRenderer=be,ye.Lexer=ge,ye.lexer=ge.lex,ye.Tokenizer=pe,ye.Hooks=ve,ye.parse=ye;
|
|
2
|
-
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
3
|
-
const{entries:xe,setPrototypeOf:Se,isFrozen:$e,getPrototypeOf:Ae,getOwnPropertyDescriptor:_e}=Object;let{freeze:ze,seal:Te,create:Re}=Object,{apply:Ee,construct:Pe}="undefined"!=typeof Reflect&&Reflect;ze||(ze=function(e){return e}),Te||(Te=function(e){return e}),Ee||(Ee=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),Pe||(Pe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const Me=Ye(Array.prototype.forEach),Le=Ye(Array.prototype.lastIndexOf),Ce=Ye(Array.prototype.pop),De=Ye(Array.prototype.push),Ie=Ye(Array.prototype.splice),Oe=Ye(String.prototype.toLowerCase),qe=Ye(String.prototype.toString),Be=Ye(String.prototype.match),Fe=Ye(String.prototype.replace),Ne=Ye(String.prototype.indexOf),je=Ye(String.prototype.trim),Ue=Ye(Object.prototype.hasOwnProperty),He=Ye(RegExp.prototype.test),Ze=(We=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pe(We,t)});var We;function Ye(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return Ee(e,t,o)}}function Ge(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oe;Se&&Se(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&($e(t)||(t[o]=e),r=e)}e[r]=!0}return e}function Xe(e){for(let t=0;t<e.length;t++)Ue(e,t)||(e[t]=null);return e}function Ve(e){const t=Re(null);for(const[n,o]of xe(e))Ue(e,n)&&(t[n]=Array.isArray(o)?Xe(o):o&&"object"==typeof o&&o.constructor===Object?Ve(o):o);return t}function Ke(e,t){for(;null!==e;){const n=_e(e,t);if(n){if(n.get)return Ye(n.get);if("function"==typeof n.value)return Ye(n.value)}e=Ae(e)}return function(){return null}}const Qe=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Je=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),et=ze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),tt=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nt=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ot=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rt=ze(["#text"]),it=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),lt=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),at=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),st=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ct=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ut=Te(/<%[\w\W]*|[\w\W]*%>/gm),dt=Te(/\$\{[\w\W]*/gm),ft=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),ht=Te(/^aria-[\-\w]+$/),pt=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gt=Te(/^(?:\w+script|data):/i),mt=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=Te(/^html$/i),kt=Te(/^[a-z][.\w]*(-[.\w]+)+$/i);var vt=Object.freeze({__proto__:null,ARIA_ATTR:ht,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:kt,DATA_ATTR:ft,DOCTYPE_NAME:bt,ERB_EXPR:ut,IS_ALLOWED_URI:pt,IS_SCRIPT_OR_DATA:gt,MUSTACHE_EXPR:ct,TMPLIT_EXPR:dt});const wt=function(){return"undefined"==typeof window?null:window};var yt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const r=o,i=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:a,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:p}=t,g=c.prototype,m=Ke(g,"cloneNode"),b=Ke(g,"remove"),k=Ke(g,"nextSibling"),v=Ke(g,"childNodes"),w=Ke(g,"parentNode");if("function"==typeof a){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let y,x="";const{implementation:S,createNodeIterator:$,createDocumentFragment:A,getElementsByTagName:_}=o,{importNode:z}=r;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof xe&&"function"==typeof w&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:R,ERB_EXPR:E,TMPLIT_EXPR:P,DATA_ATTR:M,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:C,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:I}=vt;let{IS_ALLOWED_URI:O}=vt,q=null;const B=Ge({},[...Qe,...Je,...et,...nt,...rt]);let F=null;const N=Ge({},[...it,...lt,...at,...st]);let j=Object.seal(Re(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,H=null;const Z=Object.seal(Re(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let W=!0,Y=!0,G=!1,X=!0,V=!1,K=!0,Q=!1,J=!1,ee=!1,te=!1,ne=!1,oe=!1,re=!0,ie=!1,le=!0,ae=!1,se={},ce=null;const ue=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const fe=Ge({},["audio","video","img","source","image","track"]);let he=null;const pe=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let ke=be,ve=!1,we=null;const ye=Ge({},[ge,me,be],qe);let Se=Ge({},["mi","mo","mn","ms","mtext"]),$e=Ge({},["annotation-xml"]);const Ae=Ge({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ee=null,Pe=null;const We=o.createElement("form"),Ye=function(e){return e instanceof RegExp||e instanceof Function},Xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Pe||Pe!==e){if(e&&"object"==typeof e||(e={}),e=Ve(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===_e?qe:Oe,q=Ue(e,"ALLOWED_TAGS")?Ge({},e.ALLOWED_TAGS,Ee):B,F=Ue(e,"ALLOWED_ATTR")?Ge({},e.ALLOWED_ATTR,Ee):N,we=Ue(e,"ALLOWED_NAMESPACES")?Ge({},e.ALLOWED_NAMESPACES,qe):ye,he=Ue(e,"ADD_URI_SAFE_ATTR")?Ge(Ve(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=Ue(e,"ADD_DATA_URI_TAGS")?Ge(Ve(fe),e.ADD_DATA_URI_TAGS,Ee):fe,ce=Ue(e,"FORBID_CONTENTS")?Ge({},e.FORBID_CONTENTS,Ee):ue,U=Ue(e,"FORBID_TAGS")?Ge({},e.FORBID_TAGS,Ee):Ve({}),H=Ue(e,"FORBID_ATTR")?Ge({},e.FORBID_ATTR,Ee):Ve({}),se=!!Ue(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,V=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,le=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||pt,ke=e.NAMESPACE||be,Se=e.MATHML_TEXT_INTEGRATION_POINTS||Se,$e=e.HTML_INTEGRATION_POINTS||$e,j=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ye(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ye(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(Y=!1),ne&&(te=!0),se&&(q=Ge({},rt),F=[],!0===se.html&&(Ge(q,Qe),Ge(F,it)),!0===se.svg&&(Ge(q,Je),Ge(F,lt),Ge(F,st)),!0===se.svgFilters&&(Ge(q,et),Ge(F,lt),Ge(F,st)),!0===se.mathMl&&(Ge(q,nt),Ge(F,at),Ge(F,st))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Z.tagCheck=e.ADD_TAGS:(q===B&&(q=Ve(q)),Ge(q,e.ADD_TAGS,Ee))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Z.attributeCheck=e.ADD_ATTR:(F===N&&(F=Ve(F)),Ge(F,e.ADD_ATTR,Ee))),e.ADD_URI_SAFE_ATTR&&Ge(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(ce===ue&&(ce=Ve(ce)),Ge(ce,e.FORBID_CONTENTS,Ee)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Ve(ce)),Ge(ce,e.ADD_FORBID_CONTENTS,Ee)),le&&(q["#text"]=!0),Q&&Ge(q,["html","head","body"]),q.table&&(Ge(q,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,x=y.createHTML("")}else void 0===y&&(y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,i)),null!==y&&"string"==typeof x&&(x=y.createHTML(""));ze&&ze(e),Pe=e}},ct=Ge({},[...Je,...et,...tt]),ut=Ge({},[...nt,...ot]),dt=function(e){De(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){b(e)}},ft=function(e,t){try{De(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){De(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ht=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Be(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===_e&&ke===be&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=y?y.createHTML(e):e;if(ke===be)try{t=(new h).parseFromString(r,_e)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(ke,"template",null);try{t.documentElement.innerHTML=ve?x:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),ke===be?_.call(t,Q?"html":"body")[0]:Q?t.documentElement:i},gt=function(e){return $.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},kt=function(e){return"function"==typeof s&&e instanceof s};function yt(e,t,o){Me(e,(e=>{e.call(n,t,o,Pe)}))}const xt=function(e){let t=null;if(yt(T.beforeSanitizeElements,e,null),mt(e))return dt(e),!0;const o=Ee(e.nodeName);if(yt(T.uponSanitizeElement,e,{tagName:o,allowedTags:q}),K&&e.hasChildNodes()&&!kt(e.firstElementChild)&&He(/<[/\w!]/g,e.innerHTML)&&He(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(K&&8===e.nodeType&&He(/<[/\w]/g,e.data))return dt(e),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(o))&&(!q[o]||U[o])){if(!U[o]&&$t(o)){if(j.tagNameCheck instanceof RegExp&&He(j.tagNameCheck,o))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(o))return!1}if(le&&!ce[o]){const t=w(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=m(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,k(e))}}return dt(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ke,tagName:"template"});const n=Oe(e.tagName),o=Oe(t.tagName);return!!we[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===be?"svg"===n:t.namespaceURI===ge?"svg"===n&&("annotation-xml"===o||Se[o]):Boolean(ct[n]):e.namespaceURI===ge?t.namespaceURI===be?"math"===n:t.namespaceURI===me?"math"===n&&$e[o]:Boolean(ut[n]):e.namespaceURI===be?!(t.namespaceURI===me&&!$e[o])&&!(t.namespaceURI===ge&&!Se[o])&&!ut[n]&&(Ae[n]||!ct[n]):!("application/xhtml+xml"!==_e||!we[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!He(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&3===e.nodeType&&(t=e.textContent,Me([R,E,P],(e=>{t=Fe(t,e," ")})),e.textContent!==t&&(De(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt(T.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in o||n in We))return!1;if(Y&&!H[t]&&He(M,t));else if(W&&He(L,t));else if(Z.attributeCheck instanceof Function&&Z.attributeCheck(t,e));else if(!F[t]||H[t]){if(!($t(e)&&(j.tagNameCheck instanceof RegExp&&He(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&He(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t,e))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&He(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(he[t]);else if(He(O,Fe(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ne(n,"data:")||!de[e])if(G&&!He(C,Fe(n,D,"")));else if(n)return!1;return!0},$t=function(e){return"annotation-xml"!==e&&Be(e,I)},At=function(e){yt(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||mt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:l,namespaceURI:a,value:s}=i,c=Ee(l),u=s;let d="value"===l?u:je(u);if(o.attrName=c,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,yt(T.uponSanitizeAttribute,e,o),d=o.attrValue,!ie||"id"!==c&&"name"!==c||(ft(l,e),d="user-content-"+d),K&&He(/((--!?|])>)|<\/(style|title|textarea)/i,d)){ft(l,e);continue}if("attributename"===c&&Be(d,"href")){ft(l,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){ft(l,e);continue}if(!X&&He(/\/>/i,d)){ft(l,e);continue}V&&Me([R,E,P],(e=>{d=Fe(d,e," ")}));const f=Ee(e.nodeName);if(St(f,c,d)){if(y&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(f,c)){case"TrustedHTML":d=y.createHTML(d);break;case"TrustedScriptURL":d=y.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,l,d):e.setAttribute(l,d),mt(e)?dt(e):Ce(n.removed)}catch(t){ft(l,e)}}else ft(l,e)}yt(T.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null;const o=gt(t);for(yt(T.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)yt(T.uponSanitizeShadowNode,n,null),xt(n),At(n),n.content instanceof l&&e(n.content);yt(T.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,a=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!kt(e)){if("function"!=typeof e.toString)throw Ze("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ze("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Xe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!q[t]||U[t])throw Ze("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)o=ht("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!te&&!V&&!Q&&-1===e.indexOf("<"))return y&&oe?y.createHTML(e):e;if(o=ht(e),!o)return te?null:oe?x:""}o&&ee&&dt(o.firstChild);const u=gt(ae?e:o);for(;a=u.nextNode();)xt(a),At(a),a.content instanceof l&&_t(a.content);if(ae)return e;if(te){if(ne)for(c=A.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(F.shadowroot||F.shadowrootmode)&&(c=z.call(r,c,!0)),c}let d=Q?o.outerHTML:o.innerHTML;return Q&&q["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&He(bt,o.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+d),V&&Me([R,E,P],(e=>{d=Fe(d,e," ")})),y&&oe?y.createHTML(d):d},n.setConfig=function(){Xe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Pe=null,J=!1},n.isValidAttribute=function(e,t,n){Pe||Xe({});const o=Ee(e),r=Ee(t);return St(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&De(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Le(T[e],t);return-1===n?void 0:Ie(T[e],n,1)[0]}return Ce(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function xt(e){if(null==e||""===e)return"";const t=ye.parse(e,{gfm:!0,breaks:!0});return yt.sanitize(t,{ALLOWED_TAGS:["p","br","strong","em","b","i","u","s","code","pre","a","ul","ol","li","h1","h2","h3","h4","h5","h6","blockquote","hr","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel"]})}const St=class{constructor(n){e(this,n),this.feedlogUpvote=t(this,"feedlogUpvote"),this.theme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit({issueId:this.issue.id,currentUpvoted:this.issue.hasUpvoted,currentCount:this.issue.upvoteCount})}}renderPinIcon(){return n("svg",{class:"pin-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M12 17v5"}),n("path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16h1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2h1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"}))}renderUpvoteIcon(e){return n("svg",e?{class:"upvote-icon filled",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"}:{class:"upvote-icon outline",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M12 7l7 10H5l7-10z"}))}formatDate(e){try{const t=new Date(e),n=new Date,o=Math.floor((n.getTime()-t.getTime())/1e3);return o<60?"just now":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:t.toLocaleDateString()}catch(e){return"unknown date"}}getStatusBadgeLabel(){const{issue:e}=this;return"in_progress"===e.status?"In progress":"closed"===e.status&&"bug"===e.type?"Resolved":"closed"===e.status&&"enhancement"===e.type?"Implemented":null}renderExternalLinkIcon(){return n("svg",{class:"github-link-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),n("polyline",{points:"15 3 21 3 21 9"}),n("line",{x1:"10",y1:"14",x2:"21",y2:"3"}))}render(){var e,t;const{issue:r,issueUrl:i}=this;if(!r)return null;const l=new Date(r.updatedAt).getTime()>new Date(r.createdAt).getTime(),a=l?"Updated":"Created",s=l?r.updatedAt:r.createdAt,c=l?`Updated: ${r.updatedAt}`:`Created: ${r.createdAt}`,u=null!==(e=r.title)&&void 0!==e?e:"Untitled",d=r.repository.name,f=null!=d&&""!==d&&"unnamed repository"!==d.toLowerCase()?d:null,h=null!=r.repository.description&&""!==r.repository.description?r.repository.description:void 0,p=this.getStatusBadgeLabel(),g=null!==(t=r.githubIssueLink)&&void 0!==t?t:i,m=null!=g&&""!==g;return n(o,{class:"dark"===this.theme?"dark":"","data-upvoted":r.hasUpvoted?"true":"false"},n("div",{class:`issue-card issue-type-${r.type}`},n("div",{class:"issue-content"},n("div",{class:"issue-header"},n("div",{class:"issue-header-left"},n("div",{class:"issue-type-badge"},"bug"===r.type?n("feedlog-badge",{variant:"destructive"},"Bug"):n("feedlog-badge",{variant:"enhancement"},"Enhancement")),p&&n("feedlog-badge",{variant:"secondary"},p),r.pinnedAt&&n("div",{class:"pinned-indicator",title:"Pinned issue"},this.renderPinIcon())),n("span",{class:"issue-timestamp",title:c},a," ",this.formatDate(s))),n("div",{class:"issue-main"},n("h3",{class:"issue-title"},u),null!=r.body&&""!==r.body&&n("div",{class:"issue-body",innerHTML:xt(r.body)}),n("div",{class:"issue-repository"},null!=f&&n("span",{class:"repo-name",title:h},f),m&&n("a",{part:"github-link",class:"github-link",href:g,target:"_blank",rel:"noopener noreferrer",title:"View on GitHub"},this.renderExternalLinkIcon(),n("span",{class:"github-link-text"},"View on GitHub"))),"bug"!==r.type&&n("div",{class:"issue-footer"},n("button",{part:"upvote-button",class:"upvote-button "+(r.hasUpvoted?"upvoted":""),onClick:e=>this.handleUpvote(e),title:r.hasUpvoted?"Remove upvote":"Upvote this issue"},n("div",{class:"upvote-action"},n("slot",{name:"upvote-icon"},this.renderUpvoteIcon(r.hasUpvoted)),n("span",{class:"upvote-label"},"Upvote")),n("div",{class:"reel-container"},n("span",{class:"upvote-count reel-number",key:r.upvoteCount},r.upvoteCount))))))))}};St.style=":host{display:block;font-family:ui-sans-serif,\\n system-ui,\\n -apple-system,\\n BlinkMacSystemFont,\\n 'Segoe UI',\\n Roboto,\\n 'Helvetica Neue',\\n Arial,\\n sans-serif;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#f1f5f9;--feedlog-muted-foreground:#64748b;--feedlog-border:rgba(0, 0, 0, 0.08);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-card-padding:1.25rem;--feedlog-title-font-size:0.9375rem;--feedlog-title-font-weight:600;--feedlog-body-font-size:0.8125rem;--feedlog-body-line-height:1.5;--feedlog-timestamp-font-size:0.6875rem;--feedlog-timestamp-color:var(--feedlog-muted-foreground);--feedlog-card-accent-width:3px;--feedlog-icon-color:var(--feedlog-muted-foreground);--feedlog-icon-color-muted:var(--feedlog-muted-foreground);--feedlog-pin-color:var(--feedlog-accent-color);--feedlog-upvote-icon-color:var(--feedlog-blue-600);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.1), 0 2px 6px -2px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-background:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-900-30:color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);--feedlog-red-900-30:color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);--feedlog-upvote-icon-color:var(--feedlog-blue-400);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.4)}.issue-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);transition:box-shadow 0.2s ease,\\n transform 0.2s ease;position:relative;overflow:hidden}.issue-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--feedlog-card-accent-width);background:var(--feedlog-accent-color)}.issue-card.issue-type-bug::before{background:var(--feedlog-destructive)}.issue-card:hover{box-shadow:var(--feedlog-shadow-hover)}.issue-content{padding:var(--feedlog-card-padding);padding-left:calc(var(--feedlog-card-padding) + var(--feedlog-card-accent-width));display:flex;flex-direction:column;gap:0.875rem}.issue-header{display:flex;align-items:flex-start;justify-content:space-between;gap:0.75rem;min-height:1.5rem}.issue-header-left{display:flex;align-items:center;gap:0.375rem;flex-wrap:wrap}.issue-type-badge{width:fit-content}.pinned-indicator{display:flex;align-items:center;color:var(--feedlog-pin-color, var(--feedlog-accent-color));opacity:0.9}.pin-icon{width:0.875rem;height:0.875rem;color:inherit}.issue-timestamp{font-size:var(--feedlog-timestamp-font-size);color:var(--feedlog-timestamp-color);white-space:nowrap;flex-shrink:0;cursor:help}.issue-main{display:flex;flex-direction:column;gap:0}.issue-footer{display:flex;align-items:center;justify-content:flex-end;margin-top:0.75rem}.issue-title{color:var(--feedlog-card-foreground);font-size:var(--feedlog-title-font-size);font-weight:var(--feedlog-title-font-weight);margin:0 0 0.5rem 0;line-height:1.4;word-break:break-word}.issue-body{color:var(--feedlog-muted-foreground);font-size:var(--feedlog-body-font-size);line-height:var(--feedlog-body-line-height);margin:0 0 0.75rem 0;word-break:break-word}.issue-body :first-child{margin-top:0}.issue-body :last-child{margin-bottom:0}.issue-body p{margin:0 0 0.5em 0}.issue-body p:last-child{margin-bottom:0}.issue-body a{color:var(--feedlog-accent-color);text-decoration:none}.issue-body a:hover{text-decoration:underline}.issue-body code{background-color:var(--feedlog-muted);padding:0.125em 0.375em;border-radius:0.25rem;font-size:0.9em}.issue-body pre{margin:0.5em 0;padding:0.75rem;background-color:var(--feedlog-muted);border-radius:0.25rem;overflow-x:auto;font-size:0.85em}.issue-body pre code{background:none;padding:0}.issue-body strong{font-weight:600}.issue-body ul,.issue-body ol{margin:0.5em 0;padding-left:1.25em}.issue-body li{margin:0.25em 0}.issue-body blockquote{margin:0.5em 0;padding-left:1em;border-left:3px solid var(--feedlog-muted);color:var(--feedlog-muted-foreground)}.issue-repository{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);flex-wrap:wrap}.repo-name{font-weight:500}.github-link{display:inline-flex;align-items:center;gap:0.25rem;color:var(--feedlog-accent-color);text-decoration:none;font-weight:500;font-size:0.75rem;padding:0.125rem 0.375rem;border-radius:0.25rem;transition:background-color 0.15s ease,\\n color 0.15s ease}.github-link:hover{text-decoration:underline}.github-link-icon{flex-shrink:0;color:inherit}.github-link-text{white-space:nowrap}.github-number{color:var(--feedlog-blue-600);font-weight:600}:host(.dark) .github-number{color:var(--feedlog-blue-400)}.upvote-button{display:inline-flex;flex-direction:row;align-items:center;border-radius:0.375rem;background-color:#ffffff;border:1px solid #e2e8f0;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);flex-shrink:0;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);overflow:hidden;padding:0.375rem 0.75rem;gap:0.5rem;font-family:inherit;line-height:1}.upvote-button:hover{background-color:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04)}.upvote-button:active{transform:translateY(0);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)}.upvote-button.upvoted{background-color:#eff6ff;border-color:#bfdbfe}.upvote-button.upvoted:hover{background-color:#dbeafe;border-color:#93c5fd}.upvote-action{display:flex;flex-direction:row;align-items:center;gap:0.375rem;color:#475569;font-size:0.875rem;font-weight:600;transition:color 0.2s ease}.upvote-button:hover .upvote-action{color:#0f172a}.upvote-button.upvoted .upvote-action{color:#2563eb}.upvote-button.upvoted:hover .upvote-action{color:#1d4ed8}.upvote-icon{width:1.125rem;height:1.125rem;min-width:1.125rem;min-height:1.125rem;color:inherit;flex-shrink:0;display:block;vertical-align:middle;transition:transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)}.upvote-button:hover .upvote-icon{transform:translateY(-2px)}.upvote-button:active .upvote-icon{transform:translateY(0) scale(0.9)}.upvote-icon.filled{color:inherit}.upvote-icon.outline{color:inherit}.reel-container{position:relative;display:inline-flex;align-items:center;height:1.25rem;overflow:hidden;border-left:1px solid #e2e8f0;padding-left:0.5rem;transition:border-color 0.2s ease}.upvote-button:hover .reel-container{border-color:#cbd5e1}.upvote-button.upvoted .reel-container{border-color:#bfdbfe}.upvote-button.upvoted:hover .reel-container{border-color:#93c5fd}.upvote-count{font-size:0.875rem;font-weight:600;color:#475569;transition:color 0.2s ease;line-height:1.25rem}.upvote-button:hover .upvote-count{color:#0f172a}.upvote-button.upvoted .upvote-count{color:#2563eb}.upvote-button.upvoted:hover .upvote-count{color:#1d4ed8}.reel-number{display:inline-block;animation:reelIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards}@keyframes reelIn{0%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:1}}:host(.dark) .upvote-button{background-color:var(--feedlog-card);border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover{background-color:var(--feedlog-muted);border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted{background-color:rgba(37, 99, 235, 0.15);border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover{background-color:rgba(37, 99, 235, 0.25);border-color:rgba(37, 99, 235, 0.4)}:host(.dark) .upvote-action,:host(.dark) .upvote-count{color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button:hover .upvote-action,:host(.dark) .upvote-button:hover .upvote-count{color:var(--feedlog-card-foreground)}:host(.dark) .upvote-button.upvoted .upvote-action,:host(.dark) .upvote-button.upvoted .upvote-count{color:var(--feedlog-blue-400)}:host(.dark) .upvote-button.upvoted:hover .upvote-action,:host(.dark) .upvote-button.upvoted:hover .upvote-count{color:var(--feedlog-blue-300)}:host(.dark) .reel-container{border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover .reel-container{border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted .reel-container{border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover .reel-container{border-color:rgba(37, 99, 235, 0.4)}";const $t=class{constructor(n){e(this,n),this.feedlogUpvote=t(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.currentPage=1,this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)}}resetPage(){this.currentPage=1}renderEmptyStateIllustration(){return n("svg",{class:"empty-state-illustration",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"96",viewBox:"0 0 120 96",fill:"none","aria-hidden":"true"},n("path",{d:"M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z",fill:"var(--feedlog-empty-illustration-bg)",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linejoin":"round"}),n("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M44 52h32M44 60h24M44 68h28",stroke:"var(--feedlog-empty-illustration-muted)","stroke-width":"1.25","stroke-linecap":"round"}))}getVisibleIssues(){if(0===this.issues.length)return[];if(null==this.limit||this.issues.length<=this.limit)return this.issues;const e=(this.currentPage-1)*this.limit;return this.issues.slice(e,e+this.limit)}getPageNumbers(){if(null==this.limit)return[];const e=Math.ceil(this.issues.length/this.limit);if(e<=1)return[];const t=new Set([1,e]),n=Math.max(1,this.currentPage-1),o=Math.min(e,this.currentPage+1);for(let e=n;e<=o;e++)t.add(e);const r=Array.from(t).sort(((e,t)=>e-t)),i=[];for(let e=0;e<r.length;e++)e>0&&r[e]-r[e-1]>1&&i.push("ellipsis"),i.push(r[e]);return i}goToPage(e){const t=null!=this.limit?Math.ceil(this.issues.length/this.limit):1;this.currentPage=Math.max(1,Math.min(e,t))}renderPagination(){if(null==this.limit||this.issues.length<=this.limit)return null;const e=Math.ceil(this.issues.length/this.limit),t=this.getPageNumbers();return n("nav",{class:"pagination","aria-label":"Issues pagination"},n("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Previous page",disabled:this.currentPage<=1,onClick:()=>this.goToPage(this.currentPage-1)},"‹"),t.map(((e,t)=>"ellipsis"===e?n("span",{key:t,class:"pagination-ellipsis","aria-hidden":"true"},"…"):n("button",{key:t,type:"button",class:"pagination-btn","aria-current":e===this.currentPage?"page":void 0,onClick:()=>this.goToPage(e)},e))),n("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Next page",disabled:this.currentPage>=e,onClick:()=>this.goToPage(this.currentPage+1)},"›"))}render(){const e=this.getVisibleIssues();return n(o,{key:"474f5ca0d8edc94a8e9a03d83c6a977270391d65",class:"dark"===this.theme?"dark":""},n("div",{key:"8f2f8125653ec5f80b167945a33cefe483c1a001",class:"issues-list"},0===e.length?n("div",{class:"empty-state"},this.emptyStateTitle&&this.emptyStateMessage?n("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),n("h2",{class:"empty-state-title"},this.emptyStateTitle),n("p",{class:"empty-state-message"},this.emptyStateMessage)):n("p",null,"No issues found")):e.map((e=>{var t,o;return n("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(o=null===(t=this.getIssueUrl)||void 0===t?void 0:t.call(this,e))&&void 0!==o?o:void 0,theme:this.theme,onFeedlogUpvote:e=>this.handleUpvote(e)})}))),this.renderPagination())}static get watchers(){return{issues:[{resetPage:0}],limit:[{resetPage:0}]}}};$t.style=":host{display:block;--feedlog-muted-foreground:#64748b;--feedlog-foreground:oklch(0.145 0 0);--feedlog-empty-illustration-bg:oklch(0.96 0.01 260);--feedlog-empty-illustration-stroke:oklch(0.75 0.02 260);--feedlog-empty-illustration-muted:oklch(0.82 0.01 260)}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-empty-illustration-bg:oklch(0.28 0.02 260);--feedlog-empty-illustration-stroke:oklch(0.45 0.02 260);--feedlog-empty-illustration-muted:oklch(0.38 0.01 260)}.issues-list{display:flex;flex-direction:column;gap:0.5rem}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.empty-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;margin-inline:auto}.empty-state-illustration{margin-bottom:1.5rem;opacity:0.9}.empty-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.empty-state-message{margin:0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.pagination{display:flex;align-items:center;justify-content:center;gap:0.25rem;margin-top:1.5rem;flex-wrap:wrap}.pagination-btn{min-width:2rem;height:2rem;padding:0 0.5rem;color:var(--feedlog-foreground);background:transparent;border:1px solid var(--feedlog-border, oklch(0.9 0 0));border-radius:var(--feedlog-radius, 0.375rem);font-size:0.875rem;font-weight:500;cursor:pointer;transition:background-color 0.15s, border-color 0.15s}.pagination-btn:hover:not(:disabled){background:var(--feedlog-muted, oklch(0.96 0 0))}.pagination-btn[aria-current='page']{background:var(--feedlog-accent-color, oklch(0.55 0.2 250));color:white;border-color:var(--feedlog-accent-color, oklch(0.55 0.2 250))}.pagination-btn:disabled{opacity:0.5;cursor:not-allowed}.pagination-arrow{font-size:1.25rem;line-height:1}.pagination-ellipsis{padding:0 0.25rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}:host(.dark) .pagination-btn{border-color:oklch(0.4 0.02 260)}:host(.dark) .pagination-btn:hover:not(:disabled){background:oklch(0.35 0.02 260)}";export{r as feedlog_button,St as feedlog_issue,$t as feedlog_issues_list}
|