@feedlog-ai/webcomponents 0.0.42 → 0.0.44

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.
Files changed (48) hide show
  1. package/README.md +6 -0
  2. package/dist/{esm/purify.es-B8AIqnOZ.js → cjs/browser-MBNPN4qV.js} +49 -3
  3. package/dist/cjs/feedlog-button_3.cjs.entry.js +6 -5
  4. package/dist/cjs/feedlog-issues-client.cjs.entry.js +48 -72
  5. package/dist/cjs/feedlog-issues.cjs.entry.js +1 -1
  6. package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/feedlog-issue/feedlog-issue.js +5 -4
  9. package/dist/collection/components/feedlog-issues/feedlog-issues.js +4 -4
  10. package/dist/collection/components/feedlog-issues-client/feedlog-issues-client.js +47 -26
  11. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +3 -3
  12. package/dist/collection/utils/markdown.js +2 -1
  13. package/dist/components/feedlog-badge.js +1 -1
  14. package/dist/components/feedlog-button.js +1 -1
  15. package/dist/components/feedlog-card.js +1 -1
  16. package/dist/components/feedlog-issue.js +1 -1
  17. package/dist/components/feedlog-issues-client.js +1 -1
  18. package/dist/components/feedlog-issues-list.js +1 -1
  19. package/dist/components/feedlog-issues.js +1 -1
  20. package/dist/components/{p-DLNSSGDc.js → p-B-jbJSEa.js} +1 -1
  21. package/dist/components/p-BWpmSn38.js +1 -0
  22. package/dist/components/{p-DzATWlAC.js → p-C-bUP9VO.js} +1 -1
  23. package/dist/components/{p-DMdb-G26.js → p-CIASvKvr.js} +1 -1
  24. package/dist/components/p-Du-VNLmx.js +2 -0
  25. package/dist/{cjs/purify.es-CfCgypMZ.js → esm/browser-BFRt9b48.js} +46 -5
  26. package/dist/esm/feedlog-button_3.entry.js +6 -5
  27. package/dist/esm/feedlog-issues-client.entry.js +47 -71
  28. package/dist/esm/feedlog-issues.entry.js +1 -1
  29. package/dist/esm/feedlog-toolkit.js +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
  32. package/dist/feedlog-toolkit/p-87583f75.entry.js +1 -0
  33. package/dist/feedlog-toolkit/{p-2901a753.entry.js → p-97d28b9d.entry.js} +1 -1
  34. package/dist/feedlog-toolkit/p-BFRt9b48.js +2 -0
  35. package/dist/feedlog-toolkit/{p-a7dcf9b6.entry.js → p-e8eb4cf5.entry.js} +1 -1
  36. package/dist/types/components/feedlog-issue/feedlog-issue.d.ts +2 -2
  37. package/dist/types/components/feedlog-issues/feedlog-issues.d.ts +2 -2
  38. package/dist/types/components/feedlog-issues-client/feedlog-issues-client.d.ts +4 -4
  39. package/dist/types/components/feedlog-issues-list/feedlog-issues-list.d.ts +2 -2
  40. package/dist/types/components.d.ts +14 -14
  41. package/dist/types/utils/markdown.d.ts +1 -0
  42. package/hydrate/index.js +97 -76
  43. package/hydrate/index.mjs +97 -76
  44. package/package.json +7 -4
  45. package/dist/components/p-RVHxnHRU.js +0 -1
  46. package/dist/components/p-TX_JzdfG.js +0 -3
  47. package/dist/feedlog-toolkit/p-0a9a5af2.entry.js +0 -1
  48. package/dist/feedlog-toolkit/p-B8AIqnOZ.js +0 -2
@@ -1 +1 @@
1
- import{r as e,c as t,h as r,H as o,a as n}from"./p-CgNWSmzU.js";import{a as i}from"./p-B8AIqnOZ.js";const s=class{constructor(r){e(this,r),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 r("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},r("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};s.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 l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function a(e){l=e}var d={exec:()=>null};function c(e,t=""){let r="string"==typeof e?e:e.source,o={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(h.caret,"$1"),r=r.replace(e,n),o},getRegex:()=>new RegExp(r,t)};return o}var u=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),h={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)}}>`)},f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,g=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,b=c(p).replace(/bull/g,g).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(),m=c(p).replace(/bull/g,g).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(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x=c(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",v).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),w=c(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,g).getRegex(),y="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",$=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,S=c("^ {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",$).replace("tag",y).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z=c(k).replace("hr",f).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",y).getRegex(),_={blockquote:c(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",z).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:f,html:S,lheading:b,list:w,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:z,table:d,text:/^[^\n]+/},A=c("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",f).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",y).getRegex(),P={..._,lheading:m,table:A,paragraph:c(k).replace("hr",f).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",y).getRegex()},R={..._,html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$).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:d,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:c(k).replace("hr",f).replace("heading"," *#{1,6} *[^\n]").replace("lheading",b).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M=/^( {2,}|\\)\n(?!\s*$)/,T=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,q=/[^\s\p{P}\p{S}]/u,E=c(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),L=/(?!~)[\p{P}\p{S}]/u,Z=/(?![*_])[\p{P}\p{S}]/u,I=c(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",u?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),B=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,D=c(B,"u").replace(/punct/g,T).getRegex(),j=c(B,"u").replace(/punct/g,L).getRegex(),U="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H=c(U,"gu").replace(/notPunctSpace/g,q).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),N=c(U,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,L).getRegex(),F=c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,q).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),V=c(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Z).getRegex(),O=c("^[^~]+(?=[^~])|(?!~)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,Z).getRegex(),G=c(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Y=c(/^<(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(),X=c($).replace("(?:--\x3e|$)","--\x3e").getRegex(),W=c("^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",X).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Q=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,J=c(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=c(/^!?\[(label)\]\[(ref)\]/).replace("label",Q).replace("ref",v).getRegex(),ee=c(/^!?\[(ref)\](?:\[\])?/).replace("ref",v).getRegex(),te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,re={_backpedal:d,anyPunctuation:G,autolink:Y,blockSkip:I,br:M,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:d,delLDelim:d,delRDelim:d,emStrongLDelim:D,emStrongRDelimAst:H,emStrongRDelimUnd:F,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:J,nolink:ee,punctuation:E,reflink:K,reflinkSearch:c("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",ee).getRegex(),tag:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:d},oe={...re,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",Q).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q).getRegex()},ne={...re,emStrongRDelimAst:N,emStrongLDelim:j,delLDelim:V,delRDelim:O,url:c(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",te).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:c(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",te).getRegex()},ie={...ne,br:c(M).replace("{2,}","*").getRegex(),text:c(ne.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},se={normal:_,gfm:P,pedantic:R},le={normal:re,gfm:ne,breaks:ie,pedantic:oe},ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},de=e=>ae[e];function ce(e,t){if(t){if(h.escapeTest.test(e))return e.replace(h.escapeReplace,de)}else if(h.escapeTestNoEncode.test(e))return e.replace(h.escapeReplaceNoEncode,de);return e}function ue(e){try{e=encodeURI(e).replace(h.percentDecode,"%")}catch{return null}return e}function he(e,t){let r=e.replace(h.findPipe,((e,t,r)=>{let o=!1,n=t;for(;--n>=0&&"\\"===r[n];)o=!o;return o?"|":" |"})).split(h.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(h.slashPipe,"|");return r}function fe(e,t){let r=e.length;if(0===r)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function ge(e,t=0){let r=t,o="";for(let t of e)if("\t"===t){let e=4-r%4;o+=" ".repeat(e),r+=e}else o+=t,r++;return o}function pe(e,t,r,o,n){let i=t.href,s=t.title||null,l=e[1].replace(n.other.outputLinkReplace,"$1");o.state.inLink=!0;let a={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:i,title:s,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,a}var be=class{options;rules;lexer;constructor(e){this.options=e||l}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:fe(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let o=e.match(r.other.indentCodeCompensation);if(null===o)return t;let n=o[1];return t.split("\n").map((e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[o]=t;return o.length>=n.length?e.slice(n.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:r}}}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=fe(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:fe(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=fe(t[0],"\n").split("\n"),r="",o="",n=[];for(;e.length>0;){let t,i=!1,s=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))s.push(e[t]),i=!0;else{if(i)break;s.push(e[t])}e=e.slice(t);let l=s.join("\n"),a=l.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${l}`:l,o=o?`${o}\n${a}`:a;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,n,!0),this.lexer.state.top=d,0===e.length)break;let c=n.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let t=c,i=t.raw+"\n"+e.join("\n"),s=this.blockquote(i);n[n.length-1]=s,r=r.substring(0,r.length-t.raw.length)+s.raw,o=o.substring(0,o.length-t.text.length)+s.text;break}if("list"!==c?.type);else{let t=c,i=t.raw+"\n"+e.join("\n"),s=this.list(i);n[n.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,o=o.substring(0,o.length-t.raw.length)+s.raw,e=i.substring(n.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:n,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),o=r.length>1,n={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let i=this.rules.other.listItemRegex(r),s=!1;for(;e;){let r=!1,o="",l="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let a=ge(t[2].split("\n",1)[0],t[1].length),d=e.split("\n",1)[0],c=!a.trim(),u=0;if(this.options.pedantic?(u=2,l=a.trimStart()):c?u=t[1].length+1:(u=a.search(this.rules.other.nonSpaceChar),u=u>4?1:u,l=a.slice(u),u+=t[1].length),c&&this.rules.other.blankLine.test(d)&&(o+=d+"\n",e=e.substring(d.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),i=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u),h=this.rules.other.blockquoteBeginRegex(u);for(;e;){let f,g=e.split("\n",1)[0];if(d=g,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),f=d):f=d.replace(this.rules.other.tabCharGlobal," "),n.test(d)||i.test(d)||s.test(d)||h.test(d)||t.test(d)||r.test(d))break;if(f.search(this.rules.other.nonSpaceChar)>=u||!d.trim())l+="\n"+f.slice(u);else{if(c||a.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(a)||i.test(a)||r.test(a))break;l+="\n"+d}c=!d.trim(),o+=g+"\n",e=e.substring(g.length+1),a=f.slice(u)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(s=!0)),n.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]}),n.raw+=o}let l=n.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),n.raw=n.raw.trimEnd();for(let e of n.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 r={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=r.checked,n.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=r.raw+e.tokens[0].raw,e.tokens[0].text=r.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(r)):e.tokens.unshift({type:"paragraph",raw:r.raw,text:r.raw,tokens:[r]}):e.tokens.unshift(r)}}if(!n.loose){let t=e.tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));n.loose=r}}if(n.loose)for(let e of n.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return n}}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," "),r=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:r,title:o}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=he(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.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<r.length;e++)i.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:i.align[e]});for(let e of n)i.rows.push(he(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=fe(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 r=0;for(let o=0;o<e.length;o++)if("\\"===e[o])o++;else if(e[o]===t[0])r++;else if(e[o]===t[1]&&(r--,r<0))return o;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),pe(t,{href:r&&r.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 r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return pe(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!o[1]&&!o[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,i=[...o[0]].length-1,s=i,l=0,a="*"===o[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=a.exec(t));){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r)continue;if(n=[...r].length,o[3]||o[4]){s+=n;continue}if((o[5]||o[6])&&i%3&&!((i+n)%3)){l+=n;continue}if(s-=n,s>0)continue;n=Math.min(n,n+s+l);let t=[...o[0]][0].length,a=e.slice(0,i+o.index+t+n);if(Math.min(i,n)%2){let e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}let d=a.slice(2,-2);return{type:"strong",raw:a,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),o=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&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,r=""){let o=this.rules.inline.delLDelim.exec(e);if(o&&(!o[1]||!r||this.rules.inline.punctuation.exec(r))){let r,n,i=[...o[0]].length-1,s=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=l.exec(t));){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r||(n=[...r].length,n!==i))continue;if(o[3]||o[4]){s+=n;continue}if(s-=n,s>0)continue;n=Math.min(n,n+s);let t=[...o[0]][0].length,l=e.slice(0,i+o.index+t+n),a=l.slice(i,-i);return{type:"del",raw:l,text:a,tokens:this.lexer.inlineTokens(a)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="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],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,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}}},me=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||l,this.options.tokenizer=this.options.tokenizer||new be,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:h,block:se.normal,inline:le.normal};this.options.pedantic?(t.block=se.pedantic,t.inline=le.pedantic):this.options.gfm&&(t.block=se.gfm,t.inline=this.options.breaks?le.breaks:le.gfm),this.tokenizer.rules=t}static get rules(){return{block:se,inline:le}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(h.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=[],r=!1){for(this.options.pedantic&&(e=e.replace(h.tabCharGlobal," ").replace(h.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((r=>!!(o=r.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 r=t.at(-1);1===o.raw.length&&void 0!==r?r.raw+="\n":t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let r=t.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.text,this.inlineQueue.at(-1).src=r.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 r=t.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.raw,this.inlineQueue.at(-1).src=r.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 n=e;if(this.options.extensions?.startBlock){let t,r=1/0,o=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(r=Math.min(r,t))})),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(this.state.top&&(o=this.tokenizer.paragraph(n))){let i=t.at(-1);r&&"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),r=n.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let r=t.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.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 r,o=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,n.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(o));)r=n[2]?n[2].length:0,o=o.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let i=!1,s="";for(;e;){let r;if(i||(s=""),i=!1,this.options.extensions?.inline?.some((o=>!!(r=o.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let o=t.at(-1);"text"===r.type&&"text"===o?.type?(o.raw+=r.raw,o.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,o,s)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,o,s)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(this.options.extensions?.startInline){let t,r=1/0,o=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(r=Math.min(r,t))})),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),i=!0;let o=t.at(-1);"text"===o?.type?(o.raw+=r.raw,o.text+=r.text):t.push(r)}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}},ke=class{options;parser;constructor(e){this.options=e||l}space(e){return""}code({text:e,lang:t,escaped:r}){let o=(t||"").match(h.notSpaceStart)?.[0],n=e.replace(h.endingNewline,"")+"\n";return o?'<pre><code class="language-'+ce(o)+'">'+(r?n:ce(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:ce(n,!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,r=e.start,o="";for(let t=0;t<e.items.length;t++)o+=this.listitem(e.items[t]);let n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+o+"</"+n+">\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="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let o="";for(let t=0;t<e.rows.length;t++){let n=e.rows[t];r="";for(let e=0;e<n.length;e++)r+=this.tablecell(n[e]);o+=this.tablerow({text:r})}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),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\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>${ce(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let o=this.parser.parseInline(r),n=ue(e);if(null===n)return o;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+ce(t)+'"'),i+=">"+o+"</a>",i}image({href:e,title:t,text:r,tokens:o}){o&&(r=this.parser.parseInline(o,this.parser.textRenderer));let n=ue(e);if(null===n)return ce(r);let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${ce(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ce(e.text)}},ve=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}},xe=class e{options;renderer;textRenderer;constructor(e){this.options=e||l,this.options.renderer=this.options.renderer||new ke,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ve}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e){let t="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let e=o,r=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==r||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=r||"";continue}}let n=o;switch(n.type){case"space":t+=this.renderer.space(n);break;case"hr":t+=this.renderer.hr(n);break;case"heading":t+=this.renderer.heading(n);break;case"code":t+=this.renderer.code(n);break;case"table":t+=this.renderer.table(n);break;case"blockquote":t+=this.renderer.blockquote(n);break;case"list":t+=this.renderer.list(n);break;case"checkbox":t+=this.renderer.checkbox(n);break;case"html":t+=this.renderer.html(n);break;case"def":t+=this.renderer.def(n);break;case"paragraph":t+=this.renderer.paragraph(n);break;case"text":t+=this.renderer.text(n);break;default:{let e='Token with "'+n.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 r="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=e||"";continue}}let i=n;switch(i.type){case"escape":case"text":r+=t.text(i);break;case"html":r+=t.html(i);break;case"link":r+=t.link(i);break;case"image":r+=t.image(i);break;case"checkbox":r+=t.checkbox(i);break;case"strong":r+=t.strong(i);break;case"em":r+=t.em(i);break;case"codespan":r+=t.codespan(i);break;case"br":r+=t.br(i);break;case"del":r+=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 r}},we=class{options;block;constructor(e){this.options=e||l}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?me.lex:me.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},ye=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=xe;Renderer=ke;TextRenderer=ve;Lexer=me;Tokenizer=be;Hooks=we;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let o of e)switch(r=r.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let o of e.header)r=r.concat(this.walkTokens(o.tokens,t));for(let o of e.rows)for(let e of o)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":r=r.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 n=e[o].flat(1/0);r=r.concat(this.walkTokens(n,t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let o=e.renderer.apply(this,t);return!1===o&&(o=r.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 r=t[e.level];r?r.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)})),r.extensions=t),e.renderer){let t=this.defaults.renderer||new ke(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let o=e.renderer[r],n=t[r];t[r]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new be(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let o=e.tokenizer[r],n=t[r];t[r]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new we;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let o=e.hooks[r],n=t[r];t[r]=we.passThroughHooks.has(r)?e=>{if(this.defaults.async&&we.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(t,e);return n.call(t,r)})();let i=o.call(t,e);return n.call(t,i)}:(...e)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(t,e);return!1===r&&(r=await n.apply(t,e)),r})();let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,o=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(o.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return me.lex(e,t??this.defaults)}parser(e,t){return xe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let o={...r},n={...this.defaults,...o},i=this.onError(!!n.silent,!!n.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(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(t):t,o=await(n.hooks?await n.hooks.provideLexer():e?me.lex:me.lexInline)(r,n),i=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(i,n.walkTokens));let s=await(n.hooks?await n.hooks.provideParser():e?xe.parse:xe.parseInline)(i,n);return n.hooks?await n.hooks.postprocess(s):s})().catch(i);try{n.hooks&&(t=n.hooks.preprocess(t));let r=(n.hooks?n.hooks.provideLexer():e?me.lex:me.lexInline)(t,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let o=(n.hooks?n.hooks.provideParser():e?xe.parse:xe.parseInline)(r,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(e){return i(e)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+ce(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function $e(e,t){return ye.parse(e,t)}function Se(e){if(null==e||""===e)return"";const t=$e.parse(e,{gfm:!0,breaks:!0,async:!1});if("string"!=typeof t)throw new Error("marked.parse returned a Promise; async markdown is not supported");return i.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"]})}$e.options=$e.setOptions=function(e){return ye.setOptions(e),a($e.defaults=ye.defaults),$e},$e.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},$e.defaults=l,$e.use=function(...e){return ye.use(...e),a($e.defaults=ye.defaults),$e},$e.walkTokens=function(e,t){return ye.walkTokens(e,t)},$e.parseInline=ye.parseInline,$e.Parser=xe,$e.parser=xe.parse,$e.Renderer=ke,$e.TextRenderer=ve,$e.Lexer=me,$e.lexer=me.lex,$e.Tokenizer=be,$e.Hooks=we,$e.parse=$e;const ze=class{constructor(r){e(this,r),this.feedlogUpvote=t(this,"feedlogUpvote"),this.theme="light",this.handleMediaSlotChange=()=>{this.updateMediaVisibility()},this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit({issueId:this.issue.id,currentUpvoted:this.issue.hasUpvoted,currentCount:this.issue.upvoteCount})}}componentDidLoad(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="media"]');t&&(t.addEventListener("slotchange",this.handleMediaSlotChange),this.updateMediaVisibility())}disconnectedCallback(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="media"]');t&&t.removeEventListener("slotchange",this.handleMediaSlotChange)}updateMediaVisibility(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(".issue-media");if(!t)return;const r=this.host.querySelector('[slot="media"]');t.classList.toggle("has-media",!!r)}renderPinIcon(){return r("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"},r("path",{d:"M12 17v5"}),r("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 r("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"},r("path",{d:"M12 7l7 10H5l7-10z"}))}formatDate(e){try{const t=new Date(e),r=new Date,o=Math.floor((r.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 r("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"},r("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r("polyline",{points:"15 3 21 3 21 9"}),r("line",{x1:"10",y1:"14",x2:"21",y2:"3"}))}render(){var e,t;const{issue:n,issueUrl:i}=this;if(!n)return null;const s=new Date(n.updatedAt).getTime()>new Date(n.createdAt).getTime(),l=s?"Updated":"Created",a=s?n.updatedAt:n.createdAt,d=s?`Updated: ${n.updatedAt}`:`Created: ${n.createdAt}`,c=null!==(e=n.title)&&void 0!==e?e:"Untitled",u=n.repository.name,h=null!=u&&""!==u&&"unnamed repository"!==u.toLowerCase()?u:null,f=null!=n.repository.description&&""!==n.repository.description?n.repository.description:void 0,g=this.getStatusBadgeLabel(),p=null!==(t=n.githubIssueLink)&&void 0!==t?t:i,b=null!=p&&""!==p;return r(o,{class:"dark"===this.theme?"dark":"","data-upvoted":n.hasUpvoted?"true":"false"},r("div",{class:`issue-card issue-type-${n.type}`},r("div",{class:"issue-media",part:"media"},r("slot",{name:"media"})),r("div",{class:"issue-content"},r("div",{class:"issue-main"},r("div",{class:"issue-header-top"},r("div",{class:"issue-badges"},"bug"===n.type?r("feedlog-badge",{variant:"destructive"},"Bug"):r("feedlog-badge",{variant:"enhancement"},"Enhancement"),g&&r("feedlog-badge",{variant:"secondary"},g)),r("div",{class:"issue-meta-right"},n.pinnedAt&&r("div",{class:"pinned-indicator",title:"Pinned issue"},this.renderPinIcon()),r("span",{class:"issue-timestamp",title:d},l," ",this.formatDate(a)))),r("h3",{class:"issue-title"},c),null!=n.body&&""!==n.body&&r("div",{class:"issue-body",innerHTML:Se(n.body)}),(null!=h||b||"bug"!==n.type)&&r("div",{class:"issue-footer"},(null!=h||b)&&r("div",{class:"issue-footer-meta"},null!=h&&r("span",{class:"repo-name",title:f},h),b&&r("a",{part:"github-link",class:"github-link",href:p,target:"_blank",rel:"noopener noreferrer",title:"View on GitHub"},this.renderExternalLinkIcon(),r("span",{class:"github-link-text"},"View on GitHub"))),"bug"!==n.type&&r("button",{part:"upvote-button",class:"upvote-button "+(n.hasUpvoted?"upvoted":""),onClick:e=>this.handleUpvote(e),title:n.hasUpvoted?"Remove upvote":"Upvote this issue"},r("div",{class:"upvote-action"},r("slot",{name:"upvote-icon"},this.renderUpvoteIcon(n.hasUpvoted)),r("span",{class:"upvote-label"},"Upvote")),r("div",{class:"reel-container"},r("span",{class:"upvote-count reel-number",key:n.upvoteCount},n.upvoteCount))))))))}get host(){return n(this)}};ze.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-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-card-padding:1.25rem;--feedlog-title-font-size:1.125rem;--feedlog-title-font-weight:600;--feedlog-body-font-size:0.875rem;--feedlog-body-line-height:1.6;--feedlog-timestamp-font-size:0.6875rem;--feedlog-timestamp-color:var(--feedlog-muted-foreground);--feedlog-card-radius:0.75rem;--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 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);--feedlog-shadow-hover-enhancement:0 8px 16px rgba(37, 99, 235, 0.08), 0 12px 24px rgba(37, 99, 235, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);--feedlog-shadow-hover-bug:0 8px 16px rgba(212, 24, 61, 0.08), 0 12px 24px rgba(212, 24, 61, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6)}: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-300:oklch(0.78 0.12 255);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-upvote-icon-color:var(--feedlog-blue-400);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);--feedlog-shadow-hover-enhancement:0 8px 16px rgba(59, 130, 246, 0.15), 0 12px 24px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);--feedlog-shadow-hover-bug:0 8px 16px rgba(220, 38, 38, 0.15), 0 12px 24px rgba(220, 38, 38, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08)}.issue-card{background:linear-gradient(180deg, var(--feedlog-card) 0%, color-mix(in oklab, var(--feedlog-card) 98%, var(--feedlog-muted) 2%) 100%);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-card-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.issue-type-enhancement:hover{box-shadow:var(--feedlog-shadow-hover-enhancement)}.issue-card.issue-type-bug:hover{box-shadow:var(--feedlog-shadow-hover-bug)}.issue-media{display:none;aspect-ratio:16 / 9;overflow:hidden;border-radius:var(--feedlog-card-radius, var(--feedlog-radius)) var(--feedlog-card-radius, var(--feedlog-radius)) 0 0;background-color:var(--feedlog-muted);border-bottom:1px solid var(--feedlog-border)}.issue-media.has-media{display:block}.issue-media ::slotted(img),.issue-media ::slotted(video){width:100%;height:100%;object-fit:cover;display:block}.issue-content{padding:var(--feedlog-card-padding);display:flex;flex-direction:column;gap:0.875rem}.issue-header-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:0.875rem}.issue-badges{display:flex;align-items:center;gap:0.375rem;flex-wrap:wrap;margin-left:-0.25rem}.issue-meta-right{display:flex;align-items:center;gap:0.5rem}.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;flex-direction:row;align-items:center;justify-content:space-between;gap:0.75rem;margin-top:0.75rem;padding-top:1rem;border-top:1px solid var(--feedlog-border);flex-wrap:wrap}.issue-footer-meta{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);flex-wrap:wrap}.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.3;letter-spacing:-0.015em;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.75em 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)}.repo-name{font-weight:500}.github-link{display:inline-flex;align-items:center;gap:0.25rem;color:var(--feedlog-muted-foreground);text-decoration:none;font-weight:500;font-size:0.75rem;padding:0.25rem 0.5rem;border-radius:0.375rem;transition:background-color 0.2s ease,\\n color 0.2s ease}.github-link:hover{color:var(--feedlog-card-foreground);background-color:var(--feedlog-muted)}.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:9999px;background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);border:1px solid #e2e8f0;cursor:pointer;transition:all 0.3s 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.875rem;gap:0.5rem;font-family:inherit;line-height:1}.upvote-button:hover{background:linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.08),\\n 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:linear-gradient(180deg, #eff6ff 0%, #e0e7ff 100%);border-color:#bfdbfe}.upvote-button.upvoted:hover{background:linear-gradient(180deg, #dbeafe 0%, #c7d2fe 100%);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:linear-gradient(180deg, var(--feedlog-card) 0%, color-mix(in oklab, var(--feedlog-card) 95%, var(--feedlog-muted) 5%) 100%);border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover{background:var(--feedlog-muted);border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted{background:linear-gradient(180deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%);border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover{background:linear-gradient(180deg, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0.3) 100%);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 _e=class{constructor(r){e(this,r),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 r("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"},r("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"}),r("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),r("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]),r=Math.max(1,this.currentPage-1),o=Math.min(e,this.currentPage+1);for(let e=r;e<=o;e++)t.add(e);const n=Array.from(t).sort(((e,t)=>e-t)),i=[];for(let e=0;e<n.length;e++)e>0&&n[e]-n[e-1]>1&&i.push("ellipsis"),i.push(n[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 r("nav",{class:"pagination","aria-label":"Issues pagination"},r("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?r("span",{key:`ellipsis-${t}`,class:"pagination-ellipsis","aria-hidden":"true"},"…"):r("button",{key:`page-${e}`,type:"button",class:"pagination-btn","aria-current":e===this.currentPage?"page":void 0,onClick:()=>this.goToPage(e)},e))),r("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 r(o,{key:"7721ed64730cd8e6b508fc829767ea79b2531628",class:"dark"===this.theme?"dark":""},r("div",{key:"6a2d83f46ce2391294cef018ec243dd13d06a063",class:"issues-list"},0===e.length?r("div",{class:"empty-state"},this.emptyStateTitle&&this.emptyStateMessage?r("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),r("h2",{class:"empty-state-title"},this.emptyStateTitle),r("p",{class:"empty-state-message"},this.emptyStateMessage)):r("p",null,"No issues found")):e.map((e=>{var t,o;return r("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}]}}};_e.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{s as feedlog_button,ze as feedlog_issue,_e as feedlog_issues_list}
1
+ import{r as e,c as t,h as r,H as o,a as n}from"./p-CgNWSmzU.js";import{D as i}from"./p-BFRt9b48.js";const s=class{constructor(r){e(this,r),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 r("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},r("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};s.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 l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function a(e){l=e}var d={exec:()=>null};function c(e,t=""){let r="string"==typeof e?e:e.source,o={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(h.caret,"$1"),r=r.replace(e,n),o},getRegex:()=>new RegExp(r,t)};return o}var u=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),h={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)}}>`)},f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,g=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,b=c(p).replace(/bull/g,g).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(),m=c(p).replace(/bull/g,g).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(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x=c(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",v).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),w=c(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,g).getRegex(),y="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",$=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,S=c("^ {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",$).replace("tag",y).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z=c(k).replace("hr",f).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",y).getRegex(),_={blockquote:c(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",z).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:f,html:S,lheading:b,list:w,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:z,table:d,text:/^[^\n]+/},A=c("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",f).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",y).getRegex(),P={..._,lheading:m,table:A,paragraph:c(k).replace("hr",f).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",y).getRegex()},R={..._,html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$).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:d,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:c(k).replace("hr",f).replace("heading"," *#{1,6} *[^\n]").replace("lheading",b).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M=/^( {2,}|\\)\n(?!\s*$)/,T=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,E=/[^\s\p{P}\p{S}]/u,q=c(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),L=/(?!~)[\p{P}\p{S}]/u,Z=/(?![*_])[\p{P}\p{S}]/u,B=c(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",u?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),D=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=c(D,"u").replace(/punct/g,T).getRegex(),j=c(D,"u").replace(/punct/g,L).getRegex(),H="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U=c(H,"gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),N=c(H,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,L).getRegex(),F=c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),V=c(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Z).getRegex(),G=c("^[^~]+(?=[^~])|(?!~)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,Z).getRegex(),O=c(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Y=c(/^<(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(),X=c($).replace("(?:--\x3e|$)","--\x3e").getRegex(),W=c("^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",X).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Q=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,J=c(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=c(/^!?\[(label)\]\[(ref)\]/).replace("label",Q).replace("ref",v).getRegex(),ee=c(/^!?\[(ref)\](?:\[\])?/).replace("ref",v).getRegex(),te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,re={_backpedal:d,anyPunctuation:O,autolink:Y,blockSkip:B,br:M,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:d,delLDelim:d,delRDelim:d,emStrongLDelim:I,emStrongRDelimAst:U,emStrongRDelimUnd:F,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:J,nolink:ee,punctuation:q,reflink:K,reflinkSearch:c("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",ee).getRegex(),tag:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:d},oe={...re,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",Q).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q).getRegex()},ne={...re,emStrongRDelimAst:N,emStrongLDelim:j,delLDelim:V,delRDelim:G,url:c(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",te).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:c(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",te).getRegex()},ie={...ne,br:c(M).replace("{2,}","*").getRegex(),text:c(ne.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},se={normal:_,gfm:P,pedantic:R},le={normal:re,gfm:ne,breaks:ie,pedantic:oe},ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},de=e=>ae[e];function ce(e,t){if(t){if(h.escapeTest.test(e))return e.replace(h.escapeReplace,de)}else if(h.escapeTestNoEncode.test(e))return e.replace(h.escapeReplaceNoEncode,de);return e}function ue(e){try{e=encodeURI(e).replace(h.percentDecode,"%")}catch{return null}return e}function he(e,t){let r=e.replace(h.findPipe,((e,t,r)=>{let o=!1,n=t;for(;--n>=0&&"\\"===r[n];)o=!o;return o?"|":" |"})).split(h.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(h.slashPipe,"|");return r}function fe(e,t){let r=e.length;if(0===r)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function ge(e,t=0){let r=t,o="";for(let t of e)if("\t"===t){let e=4-r%4;o+=" ".repeat(e),r+=e}else o+=t,r++;return o}function pe(e,t,r,o,n){let i=t.href,s=t.title||null,l=e[1].replace(n.other.outputLinkReplace,"$1");o.state.inLink=!0;let a={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:i,title:s,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,a}var be=class{options;rules;lexer;constructor(e){this.options=e||l}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:fe(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let o=e.match(r.other.indentCodeCompensation);if(null===o)return t;let n=o[1];return t.split("\n").map((e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[o]=t;return o.length>=n.length?e.slice(n.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:r}}}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=fe(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:fe(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=fe(t[0],"\n").split("\n"),r="",o="",n=[];for(;e.length>0;){let t,i=!1,s=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))s.push(e[t]),i=!0;else{if(i)break;s.push(e[t])}e=e.slice(t);let l=s.join("\n"),a=l.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${l}`:l,o=o?`${o}\n${a}`:a;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,n,!0),this.lexer.state.top=d,0===e.length)break;let c=n.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let t=c,i=t.raw+"\n"+e.join("\n"),s=this.blockquote(i);n[n.length-1]=s,r=r.substring(0,r.length-t.raw.length)+s.raw,o=o.substring(0,o.length-t.text.length)+s.text;break}if("list"!==c?.type);else{let t=c,i=t.raw+"\n"+e.join("\n"),s=this.list(i);n[n.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,o=o.substring(0,o.length-t.raw.length)+s.raw,e=i.substring(n.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:n,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),o=r.length>1,n={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let i=this.rules.other.listItemRegex(r),s=!1;for(;e;){let r=!1,o="",l="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;o=t[0],e=e.substring(o.length);let a=ge(t[2].split("\n",1)[0],t[1].length),d=e.split("\n",1)[0],c=!a.trim(),u=0;if(this.options.pedantic?(u=2,l=a.trimStart()):c?u=t[1].length+1:(u=a.search(this.rules.other.nonSpaceChar),u=u>4?1:u,l=a.slice(u),u+=t[1].length),c&&this.rules.other.blankLine.test(d)&&(o+=d+"\n",e=e.substring(d.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),i=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u),h=this.rules.other.blockquoteBeginRegex(u);for(;e;){let f,g=e.split("\n",1)[0];if(d=g,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),f=d):f=d.replace(this.rules.other.tabCharGlobal," "),n.test(d)||i.test(d)||s.test(d)||h.test(d)||t.test(d)||r.test(d))break;if(f.search(this.rules.other.nonSpaceChar)>=u||!d.trim())l+="\n"+f.slice(u);else{if(c||a.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(a)||i.test(a)||r.test(a))break;l+="\n"+d}c=!d.trim(),o+=g+"\n",e=e.substring(g.length+1),a=f.slice(u)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(s=!0)),n.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]}),n.raw+=o}let l=n.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),n.raw=n.raw.trimEnd();for(let e of n.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 r={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=r.checked,n.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=r.raw+e.tokens[0].raw,e.tokens[0].text=r.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(r)):e.tokens.unshift({type:"paragraph",raw:r.raw,text:r.raw,tokens:[r]}):e.tokens.unshift(r)}}if(!n.loose){let t=e.tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));n.loose=r}}if(n.loose)for(let e of n.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return n}}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," "),r=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:r,title:o}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=he(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.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<r.length;e++)i.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:i.align[e]});for(let e of n)i.rows.push(he(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=fe(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 r=0;for(let o=0;o<e.length;o++)if("\\"===e[o])o++;else if(e[o]===t[0])r++;else if(e[o]===t[1]&&(r--,r<0))return o;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),pe(t,{href:r&&r.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 r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return pe(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!o[1]&&!o[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,i=[...o[0]].length-1,s=i,l=0,a="*"===o[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=a.exec(t));){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r)continue;if(n=[...r].length,o[3]||o[4]){s+=n;continue}if((o[5]||o[6])&&i%3&&!((i+n)%3)){l+=n;continue}if(s-=n,s>0)continue;n=Math.min(n,n+s+l);let t=[...o[0]][0].length,a=e.slice(0,i+o.index+t+n);if(Math.min(i,n)%2){let e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}let d=a.slice(2,-2);return{type:"strong",raw:a,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),o=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&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,r=""){let o=this.rules.inline.delLDelim.exec(e);if(o&&(!o[1]||!r||this.rules.inline.punctuation.exec(r))){let r,n,i=[...o[0]].length-1,s=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(o=l.exec(t));){if(r=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!r||(n=[...r].length,n!==i))continue;if(o[3]||o[4]){s+=n;continue}if(s-=n,s>0)continue;n=Math.min(n,n+s);let t=[...o[0]][0].length,l=e.slice(0,i+o.index+t+n),a=l.slice(i,-i);return{type:"del",raw:l,text:a,tokens:this.lexer.inlineTokens(a)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="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],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,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}}},me=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||l,this.options.tokenizer=this.options.tokenizer||new be,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:h,block:se.normal,inline:le.normal};this.options.pedantic?(t.block=se.pedantic,t.inline=le.pedantic):this.options.gfm&&(t.block=se.gfm,t.inline=this.options.breaks?le.breaks:le.gfm),this.tokenizer.rules=t}static get rules(){return{block:se,inline:le}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(h.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=[],r=!1){for(this.options.pedantic&&(e=e.replace(h.tabCharGlobal," ").replace(h.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((r=>!!(o=r.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 r=t.at(-1);1===o.raw.length&&void 0!==r?r.raw+="\n":t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let r=t.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.text,this.inlineQueue.at(-1).src=r.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 r=t.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.raw,this.inlineQueue.at(-1).src=r.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 n=e;if(this.options.extensions?.startBlock){let t,r=1/0,o=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(r=Math.min(r,t))})),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(this.state.top&&(o=this.tokenizer.paragraph(n))){let i=t.at(-1);r&&"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),r=n.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let r=t.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.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 r,o=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,n.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(o));)r=n[2]?n[2].length:0,o=o.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let i=!1,s="";for(;e;){let r;if(i||(s=""),i=!1,this.options.extensions?.inline?.some((o=>!!(r=o.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let o=t.at(-1);"text"===r.type&&"text"===o?.type?(o.raw+=r.raw,o.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,o,s)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,o,s)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(this.options.extensions?.startInline){let t,r=1/0,o=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(r=Math.min(r,t))})),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),i=!0;let o=t.at(-1);"text"===o?.type?(o.raw+=r.raw,o.text+=r.text):t.push(r)}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}},ke=class{options;parser;constructor(e){this.options=e||l}space(e){return""}code({text:e,lang:t,escaped:r}){let o=(t||"").match(h.notSpaceStart)?.[0],n=e.replace(h.endingNewline,"")+"\n";return o?'<pre><code class="language-'+ce(o)+'">'+(r?n:ce(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:ce(n,!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,r=e.start,o="";for(let t=0;t<e.items.length;t++)o+=this.listitem(e.items[t]);let n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+o+"</"+n+">\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="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let o="";for(let t=0;t<e.rows.length;t++){let n=e.rows[t];r="";for(let e=0;e<n.length;e++)r+=this.tablecell(n[e]);o+=this.tablerow({text:r})}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),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\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>${ce(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let o=this.parser.parseInline(r),n=ue(e);if(null===n)return o;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+ce(t)+'"'),i+=">"+o+"</a>",i}image({href:e,title:t,text:r,tokens:o}){o&&(r=this.parser.parseInline(o,this.parser.textRenderer));let n=ue(e);if(null===n)return ce(r);let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${ce(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ce(e.text)}},ve=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}},xe=class e{options;renderer;textRenderer;constructor(e){this.options=e||l,this.options.renderer=this.options.renderer||new ke,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ve}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e){let t="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let e=o,r=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==r||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=r||"";continue}}let n=o;switch(n.type){case"space":t+=this.renderer.space(n);break;case"hr":t+=this.renderer.hr(n);break;case"heading":t+=this.renderer.heading(n);break;case"code":t+=this.renderer.code(n);break;case"table":t+=this.renderer.table(n);break;case"blockquote":t+=this.renderer.blockquote(n);break;case"list":t+=this.renderer.list(n);break;case"checkbox":t+=this.renderer.checkbox(n);break;case"html":t+=this.renderer.html(n);break;case"def":t+=this.renderer.def(n);break;case"paragraph":t+=this.renderer.paragraph(n);break;case"text":t+=this.renderer.text(n);break;default:{let e='Token with "'+n.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 r="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=e||"";continue}}let i=n;switch(i.type){case"escape":case"text":r+=t.text(i);break;case"html":r+=t.html(i);break;case"link":r+=t.link(i);break;case"image":r+=t.image(i);break;case"checkbox":r+=t.checkbox(i);break;case"strong":r+=t.strong(i);break;case"em":r+=t.em(i);break;case"codespan":r+=t.codespan(i);break;case"br":r+=t.br(i);break;case"del":r+=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 r}},we=class{options;block;constructor(e){this.options=e||l}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?me.lex:me.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},ye=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=xe;Renderer=ke;TextRenderer=ve;Lexer=me;Tokenizer=be;Hooks=we;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let o of e)switch(r=r.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let o of e.header)r=r.concat(this.walkTokens(o.tokens,t));for(let o of e.rows)for(let e of o)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":r=r.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 n=e[o].flat(1/0);r=r.concat(this.walkTokens(n,t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let o=e.renderer.apply(this,t);return!1===o&&(o=r.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 r=t[e.level];r?r.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)})),r.extensions=t),e.renderer){let t=this.defaults.renderer||new ke(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let o=e.renderer[r],n=t[r];t[r]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new be(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let o=e.tokenizer[r],n=t[r];t[r]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new we;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let o=e.hooks[r],n=t[r];t[r]=we.passThroughHooks.has(r)?e=>{if(this.defaults.async&&we.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(t,e);return n.call(t,r)})();let i=o.call(t,e);return n.call(t,i)}:(...e)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(t,e);return!1===r&&(r=await n.apply(t,e)),r})();let r=o.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,o=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(o.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return me.lex(e,t??this.defaults)}parser(e,t){return xe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let o={...r},n={...this.defaults,...o},i=this.onError(!!n.silent,!!n.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(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(t):t,o=await(n.hooks?await n.hooks.provideLexer():e?me.lex:me.lexInline)(r,n),i=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(i,n.walkTokens));let s=await(n.hooks?await n.hooks.provideParser():e?xe.parse:xe.parseInline)(i,n);return n.hooks?await n.hooks.postprocess(s):s})().catch(i);try{n.hooks&&(t=n.hooks.preprocess(t));let r=(n.hooks?n.hooks.provideLexer():e?me.lex:me.lexInline)(t,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let o=(n.hooks?n.hooks.provideParser():e?xe.parse:xe.parseInline)(r,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(e){return i(e)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+ce(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function $e(e,t){return ye.parse(e,t)}function Se(e){if(null==e||""===e)return"";const t=$e.parse(e,{gfm:!0,breaks:!0,async:!1});if("string"!=typeof t)throw new Error("marked.parse returned a Promise; async markdown is not supported");return i.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"]})}$e.options=$e.setOptions=function(e){return ye.setOptions(e),a($e.defaults=ye.defaults),$e},$e.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},$e.defaults=l,$e.use=function(...e){return ye.use(...e),a($e.defaults=ye.defaults),$e},$e.walkTokens=function(e,t){return ye.walkTokens(e,t)},$e.parseInline=ye.parseInline,$e.Parser=xe,$e.parser=xe.parse,$e.Renderer=ke,$e.TextRenderer=ve,$e.Lexer=me,$e.lexer=me.lex,$e.Tokenizer=be,$e.Hooks=we,$e.parse=$e;const ze=class{constructor(r){e(this,r),this.feedlogUpvote=t(this,"feedlogUpvote"),this.theme="light",this.handleMediaSlotChange=()=>{this.updateMediaVisibility()},this.handleUpvote=e=>{e.stopPropagation();const t=!this.issue.hasUpvoted;this.feedlogUpvote.emit({issueId:this.issue.id,upvoted:t,upvoteCount:Math.max(0,this.issue.upvoteCount+(t?1:-1))})}}componentDidLoad(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="media"]');t&&(t.addEventListener("slotchange",this.handleMediaSlotChange),this.updateMediaVisibility())}disconnectedCallback(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="media"]');t&&t.removeEventListener("slotchange",this.handleMediaSlotChange)}updateMediaVisibility(){var e;const t=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(".issue-media");if(!t)return;const r=this.host.querySelector('[slot="media"]');t.classList.toggle("has-media",!!r)}renderPinIcon(){return r("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"},r("path",{d:"M12 17v5"}),r("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 r("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"},r("path",{d:"M12 7l7 10H5l7-10z"}))}formatDate(e){try{const t=new Date(e),r=new Date,o=Math.floor((r.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 r("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"},r("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r("polyline",{points:"15 3 21 3 21 9"}),r("line",{x1:"10",y1:"14",x2:"21",y2:"3"}))}render(){var e,t;const{issue:n,issueUrl:i}=this;if(!n)return null;const s=new Date(n.updatedAt).getTime()>new Date(n.createdAt).getTime(),l=s?"Updated":"Created",a=s?n.updatedAt:n.createdAt,d=s?`Updated: ${n.updatedAt}`:`Created: ${n.createdAt}`,c=null!==(e=n.title)&&void 0!==e?e:"Untitled",u=n.repository.name,h=null!=u&&""!==u&&"unnamed repository"!==u.toLowerCase()?u:null,f=null!=n.repository.description&&""!==n.repository.description?n.repository.description:void 0,g=this.getStatusBadgeLabel(),p=null!==(t=n.githubIssueLink)&&void 0!==t?t:i,b=null!=p&&""!==p;return r(o,{class:"dark"===this.theme?"dark":"","data-upvoted":n.hasUpvoted?"true":"false"},r("div",{class:`issue-card issue-type-${n.type}`},r("div",{class:"issue-media",part:"media"},r("slot",{name:"media"})),r("div",{class:"issue-content"},r("div",{class:"issue-main"},r("div",{class:"issue-header-top"},r("div",{class:"issue-badges"},"bug"===n.type?r("feedlog-badge",{variant:"destructive"},"Bug"):r("feedlog-badge",{variant:"enhancement"},"Enhancement"),g&&r("feedlog-badge",{variant:"secondary"},g)),r("div",{class:"issue-meta-right"},n.pinnedAt&&r("div",{class:"pinned-indicator",title:"Pinned issue"},this.renderPinIcon()),r("span",{class:"issue-timestamp",title:d},l," ",this.formatDate(a)))),r("h3",{class:"issue-title"},c),null!=n.body&&""!==n.body&&r("div",{class:"issue-body",innerHTML:Se(n.body)}),(null!=h||b||"bug"!==n.type)&&r("div",{class:"issue-footer"},(null!=h||b)&&r("div",{class:"issue-footer-meta"},null!=h&&r("span",{class:"repo-name",title:f},h),b&&r("a",{part:"github-link",class:"github-link",href:p,target:"_blank",rel:"noopener noreferrer",title:"View on GitHub"},this.renderExternalLinkIcon(),r("span",{class:"github-link-text"},"View on GitHub"))),"bug"!==n.type&&r("button",{part:"upvote-button",class:"upvote-button "+(n.hasUpvoted?"upvoted":""),onClick:e=>this.handleUpvote(e),title:n.hasUpvoted?"Remove upvote":"Upvote this issue"},r("div",{class:"upvote-action"},r("slot",{name:"upvote-icon"},this.renderUpvoteIcon(n.hasUpvoted)),r("span",{class:"upvote-label"},"Upvote")),r("div",{class:"reel-container"},r("span",{class:"upvote-count reel-number",key:n.upvoteCount},n.upvoteCount))))))))}get host(){return n(this)}};ze.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-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-card-padding:1.25rem;--feedlog-title-font-size:1.125rem;--feedlog-title-font-weight:600;--feedlog-body-font-size:0.875rem;--feedlog-body-line-height:1.6;--feedlog-timestamp-font-size:0.6875rem;--feedlog-timestamp-color:var(--feedlog-muted-foreground);--feedlog-card-radius:0.75rem;--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 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);--feedlog-shadow-hover-enhancement:0 8px 16px rgba(37, 99, 235, 0.08), 0 12px 24px rgba(37, 99, 235, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);--feedlog-shadow-hover-bug:0 8px 16px rgba(212, 24, 61, 0.08), 0 12px 24px rgba(212, 24, 61, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6)}: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-300:oklch(0.78 0.12 255);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-upvote-icon-color:var(--feedlog-blue-400);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);--feedlog-shadow-hover-enhancement:0 8px 16px rgba(59, 130, 246, 0.15), 0 12px 24px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);--feedlog-shadow-hover-bug:0 8px 16px rgba(220, 38, 38, 0.15), 0 12px 24px rgba(220, 38, 38, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08)}.issue-card{background:linear-gradient(180deg, var(--feedlog-card) 0%, color-mix(in oklab, var(--feedlog-card) 98%, var(--feedlog-muted) 2%) 100%);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-card-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.issue-type-enhancement:hover{box-shadow:var(--feedlog-shadow-hover-enhancement)}.issue-card.issue-type-bug:hover{box-shadow:var(--feedlog-shadow-hover-bug)}.issue-media{display:none;aspect-ratio:16 / 9;overflow:hidden;border-radius:var(--feedlog-card-radius, var(--feedlog-radius)) var(--feedlog-card-radius, var(--feedlog-radius)) 0 0;background-color:var(--feedlog-muted);border-bottom:1px solid var(--feedlog-border)}.issue-media.has-media{display:block}.issue-media ::slotted(img),.issue-media ::slotted(video){width:100%;height:100%;object-fit:cover;display:block}.issue-content{padding:var(--feedlog-card-padding);display:flex;flex-direction:column;gap:0.875rem}.issue-header-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:0.875rem}.issue-badges{display:flex;align-items:center;gap:0.375rem;flex-wrap:wrap;margin-left:-0.25rem}.issue-meta-right{display:flex;align-items:center;gap:0.5rem}.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;flex-direction:row;align-items:center;justify-content:space-between;gap:0.75rem;margin-top:0.75rem;padding-top:1rem;border-top:1px solid var(--feedlog-border);flex-wrap:wrap}.issue-footer-meta{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);flex-wrap:wrap}.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.3;letter-spacing:-0.015em;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.75em 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)}.repo-name{font-weight:500}.github-link{display:inline-flex;align-items:center;gap:0.25rem;color:var(--feedlog-muted-foreground);text-decoration:none;font-weight:500;font-size:0.75rem;padding:0.25rem 0.5rem;border-radius:0.375rem;transition:background-color 0.2s ease,\\n color 0.2s ease}.github-link:hover{color:var(--feedlog-card-foreground);background-color:var(--feedlog-muted)}.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:9999px;background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);border:1px solid #e2e8f0;cursor:pointer;transition:all 0.3s 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.875rem;gap:0.5rem;font-family:inherit;line-height:1}.upvote-button:hover{background:linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.08),\\n 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:linear-gradient(180deg, #eff6ff 0%, #e0e7ff 100%);border-color:#bfdbfe}.upvote-button.upvoted:hover{background:linear-gradient(180deg, #dbeafe 0%, #c7d2fe 100%);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:linear-gradient(180deg, var(--feedlog-card) 0%, color-mix(in oklab, var(--feedlog-card) 95%, var(--feedlog-muted) 5%) 100%);border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover{background:var(--feedlog-muted);border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted{background:linear-gradient(180deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%);border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover{background:linear-gradient(180deg, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0.3) 100%);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 _e=class{constructor(r){e(this,r),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 r("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"},r("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"}),r("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),r("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]),r=Math.max(1,this.currentPage-1),o=Math.min(e,this.currentPage+1);for(let e=r;e<=o;e++)t.add(e);const n=Array.from(t).sort(((e,t)=>e-t)),i=[];for(let e=0;e<n.length;e++)e>0&&n[e]-n[e-1]>1&&i.push("ellipsis"),i.push(n[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 r("nav",{class:"pagination","aria-label":"Issues pagination"},r("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?r("span",{key:`ellipsis-${t}`,class:"pagination-ellipsis","aria-hidden":"true"},"…"):r("button",{key:`page-${e}`,type:"button",class:"pagination-btn","aria-current":e===this.currentPage?"page":void 0,onClick:()=>this.goToPage(e)},e))),r("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 r(o,{key:"b2b009625ec2cec47449afd7602202a9f95b8740",class:"dark"===this.theme?"dark":""},r("div",{key:"f108815569c064e45a78272a83f7048708470a3d",class:"issues-list"},0===e.length?r("div",{class:"empty-state"},this.emptyStateTitle&&this.emptyStateMessage?r("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),r("h2",{class:"empty-state-title"},this.emptyStateTitle),r("p",{class:"empty-state-message"},this.emptyStateMessage)):r("p",null,"No issues found")):e.map((e=>{var t,o;return r("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}]}}};_e.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{s as feedlog_button,ze as feedlog_issue,_e as feedlog_issues_list}
@@ -25,8 +25,8 @@ export declare class FeedlogIssueComponent {
25
25
  */
26
26
  feedlogUpvote: EventEmitter<{
27
27
  issueId: string;
28
- currentUpvoted: boolean;
29
- currentCount: number;
28
+ upvoted: boolean;
29
+ upvoteCount: number;
30
30
  }>;
31
31
  componentDidLoad(): void;
32
32
  disconnectedCallback(): void;
@@ -65,8 +65,8 @@ export declare class FeedlogIssues {
65
65
  */
66
66
  feedlogUpvote: EventEmitter<{
67
67
  issueId: string;
68
- currentUpvoted: boolean;
69
- currentCount: number;
68
+ upvoted: boolean;
69
+ upvoteCount: number;
70
70
  }>;
71
71
  /**
72
72
  * Event emitted to load more issues
@@ -11,6 +11,7 @@ export declare class FeedlogIssuesClient {
11
11
  * API key for Feedlog authentication (required)
12
12
  * The API key determines which repositories' issues are fetched
13
13
  */
14
+ /** Set via JS property only; not reflected to an HTML attribute (see Stencil `reflect`). */
14
15
  apiKey: string;
15
16
  /**
16
17
  * Filter issues by type: 'bug' or 'enhancement'
@@ -80,9 +81,6 @@ export declare class FeedlogIssuesClient {
80
81
  hasMore: boolean;
81
82
  isLoadingMore: boolean;
82
83
  private sdk;
83
- private previousType?;
84
- private previousLimit?;
85
- private previousSortBy?;
86
84
  /** Counter to track fetch operations and prevent stale updates */
87
85
  private fetchRequestId;
88
86
  /** Flag to prevent state updates after component disconnect */
@@ -91,7 +89,9 @@ export declare class FeedlogIssuesClient {
91
89
  private upvoteRequestIds;
92
90
  componentWillLoad(): Promise<void> | undefined;
93
91
  disconnectedCallback(): void;
94
- componentDidUpdate(): void;
92
+ handleQueryParamChange(newValue: 'bug' | 'enhancement' | number | SortBy | undefined, oldValue: typeof newValue): void;
93
+ handleSdkConfigChange(newValue: string | undefined, oldValue: string | undefined): void;
94
+ private resetAndRefetchIssues;
95
95
  private initializeSDK;
96
96
  private buildFetchParams;
97
97
  private fetchIssues;
@@ -37,8 +37,8 @@ export declare class FeedlogIssuesList {
37
37
  */
38
38
  feedlogUpvote: EventEmitter<{
39
39
  issueId: string;
40
- currentUpvoted: boolean;
41
- currentCount: number;
40
+ upvoted: boolean;
41
+ upvoteCount: number;
42
42
  }>;
43
43
  private renderEmptyStateIllustration;
44
44
  private handleUpvote;
@@ -143,7 +143,7 @@ export namespace Components {
143
143
  */
144
144
  interface FeedlogIssuesClient {
145
145
  /**
146
- * API key for Feedlog authentication (required) The API key determines which repositories' issues are fetched
146
+ * Set via JS property only; not reflected to an HTML attribute (see Stencil `reflect`).
147
147
  */
148
148
  "apiKey": string;
149
149
  /**
@@ -291,8 +291,8 @@ declare global {
291
291
  interface HTMLFeedlogIssueElementEventMap {
292
292
  "feedlogUpvote": {
293
293
  issueId: string;
294
- currentUpvoted: boolean;
295
- currentCount: number;
294
+ upvoted: boolean;
295
+ upvoteCount: number;
296
296
  };
297
297
  }
298
298
  /**
@@ -316,8 +316,8 @@ declare global {
316
316
  interface HTMLFeedlogIssuesElementEventMap {
317
317
  "feedlogUpvote": {
318
318
  issueId: string;
319
- currentUpvoted: boolean;
320
- currentCount: number;
319
+ upvoted: boolean;
320
+ upvoteCount: number;
321
321
  };
322
322
  "feedlogLoadMore": void;
323
323
  }
@@ -366,8 +366,8 @@ declare global {
366
366
  interface HTMLFeedlogIssuesListElementEventMap {
367
367
  "feedlogUpvote": {
368
368
  issueId: string;
369
- currentUpvoted: boolean;
370
- currentCount: number;
369
+ upvoted: boolean;
370
+ upvoteCount: number;
371
371
  };
372
372
  }
373
373
  /**
@@ -464,8 +464,8 @@ declare namespace LocalJSX {
464
464
  */
465
465
  "onFeedlogUpvote"?: (event: FeedlogIssueCustomEvent<{
466
466
  issueId: string;
467
- currentUpvoted: boolean;
468
- currentCount: number;
467
+ upvoted: boolean;
468
+ upvoteCount: number;
469
469
  }>) => void;
470
470
  /**
471
471
  * Theme variant: 'light' or 'dark'
@@ -538,8 +538,8 @@ declare namespace LocalJSX {
538
538
  */
539
539
  "onFeedlogUpvote"?: (event: FeedlogIssuesCustomEvent<{
540
540
  issueId: string;
541
- currentUpvoted: boolean;
542
- currentCount: number;
541
+ upvoted: boolean;
542
+ upvoteCount: number;
543
543
  }>) => void;
544
544
  /**
545
545
  * Custom subtitle for the issues section
@@ -558,7 +558,7 @@ declare namespace LocalJSX {
558
558
  */
559
559
  interface FeedlogIssuesClient {
560
560
  /**
561
- * API key for Feedlog authentication (required) The API key determines which repositories' issues are fetched
561
+ * Set via JS property only; not reflected to an HTML attribute (see Stencil `reflect`).
562
562
  */
563
563
  "apiKey": string;
564
564
  /**
@@ -647,8 +647,8 @@ declare namespace LocalJSX {
647
647
  */
648
648
  "onFeedlogUpvote"?: (event: FeedlogIssuesListCustomEvent<{
649
649
  issueId: string;
650
- currentUpvoted: boolean;
651
- currentCount: number;
650
+ upvoted: boolean;
651
+ upvoteCount: number;
652
652
  }>) => void;
653
653
  /**
654
654
  * Theme variant: 'light' or 'dark'
@@ -1,3 +1,4 @@
1
+ import '@feedlog-ai/core/ssr-globals';
1
2
  /**
2
3
  * Parse markdown to sanitized HTML for safe rendering.
3
4
  * Uses marked for parsing and DOMPurify for XSS protection.