@feedlog-ai/webcomponents 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/cjs/feedlog-badge.cjs.entry.js +2 -2
- package/dist/cjs/feedlog-button_3.cjs.entry.js +30 -3
- package/dist/cjs/feedlog-card.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-issues-client.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-issues.cjs.entry.js +2 -2
- package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
- package/dist/cjs/{index-Bk1-M_w_.js → index-CXKBwRlh.js} +663 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/feedlog-badge/feedlog-badge.css +50 -50
- package/dist/collection/components/feedlog-issue/feedlog-issue.css +89 -64
- package/dist/collection/components/feedlog-issue/feedlog-issue.js +28 -1
- package/dist/collection/components/feedlog-issue/feedlog-issue.stories.js +3 -2
- package/dist/collection/components/feedlog-issues/feedlog-issues.css +0 -2
- package/dist/collection/components/feedlog-issues/feedlog-issues.stories.js +3 -2
- package/dist/components/feedlog-badge.js +1 -1
- package/dist/components/feedlog-issue.js +1 -1
- package/dist/components/feedlog-issues-client.js +1 -1
- package/dist/components/feedlog-issues-list.js +1 -1
- package/dist/components/feedlog-issues.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-GzOCQT_k.js → p-BBbiSGNf.js} +1 -1
- package/dist/components/{p-BuX7UXwe.js → p-BRjVS8bz.js} +2 -2
- package/dist/components/{p-DMKFbFjj.js → p-CuFKEckF.js} +1 -1
- package/dist/components/p-DzATWlAC.js +1 -0
- package/dist/esm/feedlog-badge.entry.js +2 -2
- package/dist/esm/feedlog-button_3.entry.js +30 -3
- package/dist/esm/feedlog-card.entry.js +1 -1
- package/dist/esm/feedlog-issues-client.entry.js +1 -1
- package/dist/esm/feedlog-issues.entry.js +2 -2
- package/dist/esm/feedlog-toolkit.js +2 -2
- package/dist/esm/{index-CHawAwGP.js → index-CgNWSmzU.js} +663 -7
- package/dist/esm/loader.js +2 -2
- package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
- package/dist/feedlog-toolkit/{p-bc48ec0d.entry.js → p-32663f65.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-891c349f.entry.js +3 -0
- package/dist/feedlog-toolkit/p-CgNWSmzU.js +2 -0
- package/dist/feedlog-toolkit/{p-c974a35e.entry.js → p-c3e9b94b.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-da0268a8.entry.js +1 -0
- package/dist/feedlog-toolkit/{p-7f8133b3.entry.js → p-f22117ae.entry.js} +1 -1
- package/dist/types/components/feedlog-issue/feedlog-issue.d.ts +5 -0
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +25334 -0
- package/hydrate/index.mjs +25324 -0
- package/hydrate/package.json +12 -0
- package/package.json +10 -3
- package/dist/components/p-Chc3XZ5Y.js +0 -1
- package/dist/feedlog-toolkit/p-13089dc5.entry.js +0 -1
- package/dist/feedlog-toolkit/p-CHawAwGP.js +0 -2
- package/dist/feedlog-toolkit/p-f868da29.entry.js +0 -3
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { g as globalScripts, b as bootstrapLazy } from './index-CgNWSmzU.js';
|
|
2
|
+
export { s as setNonce } from './index-CgNWSmzU.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,g as t,b as a}from"./p-
|
|
1
|
+
import{p as e,g as t,b as a}from"./p-CgNWSmzU.js";export{s as setNonce}from"./p-CgNWSmzU.js";(()=>{const t=import.meta.url,s={};return""!==t&&(s.resourcesUrl=new URL(".",t).href),e(s)})().then((async e=>(await t(),a([["p-32663f65",[[257,"feedlog-card"]]],["p-da0268a8",[[257,"feedlog-badge",{variant:[1]}]]],["p-891c349f",[[1,"feedlog-issues-list",{issues:[16],limit:[2],theme:[1],getIssueUrl:[16],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],currentPage:[32]},null,{issues:[{resetPage:0}],limit:[{resetPage:0}]}],[257,"feedlog-button",{variant:[1],size:[1],disabled:[4],type:[1]}],[257,"feedlog-issue",{issue:[16],issueUrl:[1,"issue-url"],theme:[1]}]]],["p-f22117ae",[[1,"feedlog-issues",{issues:[16],maxWidth:[1,"max-width"],limit:[2],theme:[1025],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]]],["p-c3e9b94b",[[1,"feedlog-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],sortBy:[1,"sort-by"],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e}from"./p-
|
|
1
|
+
import{r as o,h as e}from"./p-CgNWSmzU.js";const a=class{constructor(e){o(this,e)}render(){return e("div",{key:"293a80e66adedfc1af29daf72390a4f464321b96",class:"feedlog-card"},e("slot",{key:"b7e5a827f89035e791d9c756db0f66198e6c5a38",name:"header"}),e("slot",{key:"da89fee0a01068c8438564848f218faa9c5d849e",name:"content"}),e("slot",{key:"30b05e80e4189c0f73810a48f64e072dfac83267",name:"footer"}))}};a.style=':host{display:block;font-family:ui-monospace, SFMono-Regular, \'SF Mono\', Menlo, Consolas, \'Liberation Mono\', monospace;--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-radius:0.625rem;--feedlog-card-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);--feedlog-card-hover-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)}:host(.dark){--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-border:oklch(0.269 0 0);--feedlog-card-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);--feedlog-card-hover-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3)}.feedlog-card{background-color:var(--feedlog-card);color:var(--feedlog-card-foreground);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-card-shadow);transition:box-shadow 0.15s ease;position:relative}.feedlog-card:hover{box-shadow:var(--feedlog-card-hover-shadow)}::slotted([slot="header"]){display:block}::slotted([slot="content"]){display:block}::slotted([slot="footer"]){display:block}';export{a as feedlog_card}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as e,c as t,h as n,H as r,a as o}from"./p-CgNWSmzU.js";const i=class{constructor(n){e(this,n),this.feedlogClick=t(this,"feedlogClick"),this.variant="default",this.size="default",this.disabled=!1,this.type="button",this.handleClick=e=>{this.disabled||this.feedlogClick.emit(e)}}render(){return n("button",{key:"6cdd8347def51592707b1fb9aab0dc565ca0f76f",type:this.type,class:`button button-${this.variant} ${"default"===this.size?"button-size-default":`button-size-${this.size}`}`,disabled:this.disabled,onClick:this.handleClick},n("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};i.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 a={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function l(e){a=e}var s={exec:()=>null};function c(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(d.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var u=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),d={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)}}>`)},h=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f=/ {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+|$)/,g=c(p).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),m=c(p).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,k=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=c(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",k).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x=c(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f).getRegex(),w="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,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",y).replace("tag",w).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$=c(b).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),A={blockquote:c(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:S,lheading:g,list:x,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:$,table:s,text:/^[^\n]+/},_=c("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),z={...A,lheading:m,table:_,paragraph:c(b).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex()},T={...A,html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:c(b).replace("hr",h).replace("heading"," *#{1,6} *[^\n]").replace("lheading",g).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^( {2,}|\\)\n(?!\s*$)/,E=/[\p{P}\p{S}]/u,M=/[\s\p{P}\p{S}]/u,P=/[^\s\p{P}\p{S}]/u,L=c(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,M).getRegex(),C=/(?!~)[\p{P}\p{S}]/u,D=/(?![*_])[\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(),O=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,q=c(O,"u").replace(/punct/g,E).getRegex(),B=c(O,"u").replace(/punct/g,C).getRegex(),F="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N=c(F,"gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,M).replace(/punct/g,E).getRegex(),j=c(F,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,C).getRegex(),U=c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,M).replace(/punct/g,E).getRegex(),H=c(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,D).getRegex(),Z=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,D).getRegex(),W=c(/\\(punct)/,"gu").replace(/punct/g,E).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(),G=c(y).replace("(?:--\x3e|$)","--\x3e").getRegex(),X=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",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,K=c(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=c(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",k).getRegex(),J=c(/^!?\[(ref)\](?:\[\])?/).replace("ref",k).getRegex(),ee=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,te={_backpedal:s,anyPunctuation:W,autolink:Y,blockSkip:I,br:R,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,delLDelim:s,delRDelim:s,emStrongLDelim:q,emStrongRDelimAst:N,emStrongRDelimUnd:U,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:K,nolink:J,punctuation:L,reflink:Q,reflinkSearch:c("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",J).getRegex(),tag:X,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:s},ne={...te,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},re={...te,emStrongRDelimAst:j,emStrongLDelim:B,delLDelim:H,delRDelim:Z,url:c(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ee).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",ee).getRegex()},oe={...re,br:c(R).replace("{2,}","*").getRegex(),text:c(re.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ie={normal:A,gfm:z,pedantic:T},ae={normal:te,gfm:re,breaks:oe,pedantic:ne},le={"&":"&","<":"<",">":">",'"':""","'":"'"},se=e=>le[e];function ce(e,t){if(t){if(d.escapeTest.test(e))return e.replace(d.escapeReplace,se)}else if(d.escapeTestNoEncode.test(e))return e.replace(d.escapeReplaceNoEncode,se);return e}function ue(e){try{e=encodeURI(e).replace(d.percentDecode,"%")}catch{return null}return e}function de(e,t){let n=e.replace(d.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(d.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(d.slashPipe,"|");return n}function he(e,t){let n=e.length;if(0===n)return"";let r=0;for(;r<n&&e.charAt(n-r-1)===t;)r++;return e.slice(0,n-r)}function fe(e,t=0){let n=t,r="";for(let t of e)if("\t"===t){let e=4-n%4;r+=" ".repeat(e),n+=e}else r+=t,n++;return r}function pe(e,t,n,r,o){let i=t.href,a=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}var ge=class{options;rules;lexer;constructor(e){this.options=e||a}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:he(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let o=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=he(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:he(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=he(t[0],"\n").split("\n"),n="",r="",o=[];for(;e.length>0;){let t,i=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),i=!0;else{if(i)break;a.push(e[t])}e=e.slice(t);let l=a.join("\n"),s=l.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;let u=o.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,i=t.raw+"\n"+e.join("\n"),a=this.blockquote(i);o[o.length-1]=a,n=n.substring(0,n.length-t.raw.length)+a.raw,r=r.substring(0,r.length-t.text.length)+a.text;break}if("list"!==u?.type);else{let t=u,i=t.raw+"\n"+e.join("\n"),a=this.list(i);o[o.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,r=r.substring(0,r.length-t.raw.length)+a.raw,e=i.substring(o.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),a=!1;for(;e;){let n=!1,r="",l="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=fe(t[2].split("\n",1)[0],t[1].length),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=s.search(this.rules.other.nonSpaceChar),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d),h=this.rules.other.blockquoteBeginRegex(d);for(;e;){let f,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c)||i.test(c)||a.test(c)||h.test(c)||t.test(c)||n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())l+="\n"+f.slice(d);else{if(u||s.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(s)||i.test(s)||n.test(s))break;l+="\n"+c}u=!c.trim(),r+=p+"\n",e=e.substring(p.length+1),s=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0)),o.items.push({type:"list_item",raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]}),o.raw+=r}let l=o.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e of o.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,""),"text"===e.tokens[0]?.type||"paragraph"===e.tokens[0]?.type){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=n.checked,o.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:"paragraph",raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!o.loose){let t=e.tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));o.loose=n}}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=de(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(let e of o)i.rows.push(de(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=he(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),pe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return pe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,o,i=[...r[0]].length-1,a=i,l=0,s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=s.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(o=[...n].length,r[3]||r[4]){a+=o;continue}if((r[5]||r[6])&&i%3&&!((i+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let t=[...r[0]][0].length,s=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}let c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n,o,i=[...r[0]].length-1,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=l.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(o=[...n].length,o!==i))continue;if(r[3]||r[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let t=[...r[0]][0].length,l=e.slice(0,i+r.index+t+o),s=l.slice(i,-i);return{type:"del",raw:l,text:s,tokens:this.lexer.inlineTokens(s)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],escaped:this.lexer.state.inRawBlock}}},me=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||a,this.options.tokenizer=this.options.tokenizer||new ge,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:d,block:ie.normal,inline:ae.normal};this.options.pedantic?(t.block=ie.pedantic,t.inline=ae.pedantic):this.options.gfm&&(t.block=ie.gfm,t.inline=this.options.breaks?ae.breaks:ae.gfm),this.tokenizer.rules=t}static get rules(){return{block:ie,inline:ae}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(d.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(d.tabCharGlobal," ").replace(d.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.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 this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r=e,o=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(r));)n=o[2]?o[2].length:0,r=r.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,a="";for(;e;){let n;if(i||(a=""),i=!1,this.options.extensions?.inline?.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,a)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e,r,a)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let o=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0;let r=t.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},be=class{options;parser;constructor(e){this.options=e||a}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(d.notSpaceStart)?.[0],o=e.replace(d.endingNewline,"")+"\n";return r?'<pre><code class="language-'+ce(r)+'">'+(n?o:ce(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:ce(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++)r+=this.listitem(e.items[t]);let o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let o=e.rows[t];n="";for(let e=0;e<o.length;e++)n+=this.tablecell(o[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ce(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=ue(e);if(null===o)return r;let i='<a href="'+(e=o)+'"';return t&&(i+=' title="'+ce(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=ue(e);if(null===o)return ce(n);let i=`<img src="${e=o}" alt="${n}"`;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)}},ke=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}},ve=class e{options;renderer;textRenderer;constructor(e){this.options=e||a,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ke}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==n||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=n||"";continue}}let o=r;switch(o.type){case"space":t+=this.renderer.space(o);break;case"hr":t+=this.renderer.hr(o);break;case"heading":t+=this.renderer.heading(o);break;case"code":t+=this.renderer.code(o);break;case"table":t+=this.renderer.table(o);break;case"blockquote":t+=this.renderer.blockquote(o);break;case"list":t+=this.renderer.list(o);break;case"checkbox":t+=this.renderer.checkbox(o);break;case"html":t+=this.renderer.html(o);break;case"def":t+=this.renderer.def(o);break;case"paragraph":t+=this.renderer.paragraph(o);break;case"text":t+=this.renderer.text(o);break;default:{let e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}let i=o;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"checkbox":n+=t.checkbox(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},xe=class{options;block;constructor(e){this.options=e||a}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?ve.parse:ve.parseInline}},we=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ve;Renderer=be;TextRenderer=ke;Lexer=me;Tokenizer=ge;Hooks=xe;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":n=n.concat(this.walkTokens(r.items,t));break;default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{let o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){let t=this.defaults.renderer||new be(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=e.renderer[n],o=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ge(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=e.tokenizer[n],o=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new xe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=e.hooks[n],o=t[n];t[n]=xe.passThroughHooks.has(n)?e=>{if(this.defaults.async&&xe.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await r.call(t,e);return o.call(t,n)})();let i=r.call(t,e);return o.call(t,i)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await r.apply(t,e);return!1===n&&(n=await o.apply(t,e)),n})();let n=r.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return me.lex(e,t??this.defaults)}parser(e,t){return ve.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.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(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(t):t,r=await(o.hooks?await o.hooks.provideLexer():e?me.lex:me.lexInline)(n,o),i=o.hooks?await o.hooks.processAllTokens(r):r;o.walkTokens&&await Promise.all(this.walkTokens(i,o.walkTokens));let a=await(o.hooks?await o.hooks.provideParser():e?ve.parse:ve.parseInline)(i,o);return o.hooks?await o.hooks.postprocess(a):a})().catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let n=(o.hooks?o.hooks.provideLexer():e?me.lex:me.lexInline)(t,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let r=(o.hooks?o.hooks.provideParser():e?ve.parse:ve.parseInline)(n,o);return o.hooks&&(r=o.hooks.postprocess(r)),r}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+ce(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ye(e,t){return we.parse(e,t)}ye.options=ye.setOptions=function(e){return we.setOptions(e),l(ye.defaults=we.defaults),ye},ye.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ye.defaults=a,ye.use=function(...e){return we.use(...e),l(ye.defaults=we.defaults),ye},ye.walkTokens=function(e,t){return we.walkTokens(e,t)},ye.parseInline=we.parseInline,ye.Parser=ve,ye.parser=ve.parse,ye.Renderer=be,ye.TextRenderer=ke,ye.Lexer=me,ye.lexer=me.lex,ye.Tokenizer=ge,ye.Hooks=xe,ye.parse=ye;
|
|
2
|
+
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
3
|
+
const{entries:Se,setPrototypeOf:$e,isFrozen:Ae,getPrototypeOf:_e,getOwnPropertyDescriptor:ze}=Object;let{freeze:Te,seal:Re,create:Ee}=Object,{apply:Me,construct:Pe}="undefined"!=typeof Reflect&&Reflect;Te||(Te=function(e){return e}),Re||(Re=function(e){return e}),Me||(Me=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Pe||(Pe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Le=Ge(Array.prototype.forEach),Ce=Ge(Array.prototype.lastIndexOf),De=Ge(Array.prototype.pop),Ie=Ge(Array.prototype.push),Oe=Ge(Array.prototype.splice),qe=Ge(String.prototype.toLowerCase),Be=Ge(String.prototype.toString),Fe=Ge(String.prototype.match),Ne=Ge(String.prototype.replace),je=Ge(String.prototype.indexOf),Ue=Ge(String.prototype.trim),He=Ge(Object.prototype.hasOwnProperty),Ze=Ge(RegExp.prototype.test),We=(Ye=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pe(Ye,t)});var Ye;function Ge(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Me(e,t,r)}}function Xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe;$e&&$e(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Ae(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Ve(e){for(let t=0;t<e.length;t++)He(e,t)||(e[t]=null);return e}function Ke(e){const t=Ee(null);for(const[n,r]of Se(e))He(e,n)&&(t[n]=Array.isArray(r)?Ve(r):r&&"object"==typeof r&&r.constructor===Object?Ke(r):r);return t}function Qe(e,t){for(;null!==e;){const n=ze(e,t);if(n){if(n.get)return Ge(n.get);if("function"==typeof n.value)return Ge(n.value)}e=_e(e)}return function(){return null}}const Je=Te(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),et=Te(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=Te(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nt=Te(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rt=Te(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ot=Te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),it=Te(["#text"]),at=Te(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),lt=Te(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),st=Te(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ct=Te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ut=Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dt=Re(/<%[\w\W]*|[\w\W]*%>/gm),ht=Re(/\$\{[\w\W]*/gm),ft=Re(/^data-[\-\w.\u00B7-\uFFFF]+$/),pt=Re(/^aria-[\-\w]+$/),gt=Re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mt=Re(/^(?:\w+script|data):/i),bt=Re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kt=Re(/^html$/i),vt=Re(/^[a-z][.\w]*(-[.\w]+)+$/i);var xt=Object.freeze({__proto__:null,ARIA_ATTR:pt,ATTR_WHITESPACE:bt,CUSTOM_ELEMENT:vt,DATA_ATTR:ft,DOCTYPE_NAME:kt,ERB_EXPR:dt,IS_ALLOWED_URI:gt,IS_SCRIPT_OR_DATA:mt,MUSTACHE_EXPR:ut,TMPLIT_EXPR:ht});const wt=function(){return"undefined"==typeof window?null:window};var yt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,g=c.prototype,m=Qe(g,"cloneNode"),b=Qe(g,"remove"),k=Qe(g,"nextSibling"),v=Qe(g,"childNodes"),x=Qe(g,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,y="";const{implementation:S,createNodeIterator:$,createDocumentFragment:A,getElementsByTagName:_}=r,{importNode:z}=o;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Se&&"function"==typeof x&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:R,ERB_EXPR:E,TMPLIT_EXPR:M,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:C,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:I}=xt;let{IS_ALLOWED_URI:O}=xt,q=null;const B=Xe({},[...Je,...et,...tt,...rt,...it]);let F=null;const N=Xe({},[...at,...lt,...st,...ct]);let j=Object.seal(Ee(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,H=null;const Z=Object.seal(Ee(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let W=!0,Y=!0,G=!1,X=!0,V=!1,K=!0,Q=!1,J=!1,ee=!1,te=!1,ne=!1,re=!1,oe=!0,ie=!1,ae=!0,le=!1,se={},ce=null;const ue=Xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const he=Xe({},["audio","video","img","source","image","track"]);let fe=null;const pe=Xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let ke=be,ve=!1,xe=null;const we=Xe({},[ge,me,be],Be);let ye=Xe({},["mi","mo","mn","ms","mtext"]),$e=Xe({},["annotation-xml"]);const Ae=Xe({},["title","style","font","a","script"]);let _e=null;const ze=["application/xhtml+xml","text/html"];let Re=null,Me=null;const Pe=r.createElement("form"),Ye=function(e){return e instanceof RegExp||e instanceof Function},Ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Me||Me!==e){if(e&&"object"==typeof e||(e={}),e=Ke(e),_e=-1===ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Re="application/xhtml+xml"===_e?Be:qe,q=He(e,"ALLOWED_TAGS")?Xe({},e.ALLOWED_TAGS,Re):B,F=He(e,"ALLOWED_ATTR")?Xe({},e.ALLOWED_ATTR,Re):N,xe=He(e,"ALLOWED_NAMESPACES")?Xe({},e.ALLOWED_NAMESPACES,Be):we,fe=He(e,"ADD_URI_SAFE_ATTR")?Xe(Ke(pe),e.ADD_URI_SAFE_ATTR,Re):pe,de=He(e,"ADD_DATA_URI_TAGS")?Xe(Ke(he),e.ADD_DATA_URI_TAGS,Re):he,ce=He(e,"FORBID_CONTENTS")?Xe({},e.FORBID_CONTENTS,Re):ue,U=He(e,"FORBID_TAGS")?Xe({},e.FORBID_TAGS,Re):Ke({}),H=He(e,"FORBID_ATTR")?Xe({},e.FORBID_ATTR,Re):Ke({}),se=!!He(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,V=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,le=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||gt,ke=e.NAMESPACE||be,ye=e.MATHML_TEXT_INTEGRATION_POINTS||ye,$e=e.HTML_INTEGRATION_POINTS||$e,j=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ye(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ye(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(Y=!1),ne&&(te=!0),se&&(q=Xe({},it),F=[],!0===se.html&&(Xe(q,Je),Xe(F,at)),!0===se.svg&&(Xe(q,et),Xe(F,lt),Xe(F,ct)),!0===se.svgFilters&&(Xe(q,tt),Xe(F,lt),Xe(F,ct)),!0===se.mathMl&&(Xe(q,rt),Xe(F,st),Xe(F,ct))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Z.tagCheck=e.ADD_TAGS:(q===B&&(q=Ke(q)),Xe(q,e.ADD_TAGS,Re))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Z.attributeCheck=e.ADD_ATTR:(F===N&&(F=Ke(F)),Xe(F,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&Xe(fe,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(ce===ue&&(ce=Ke(ce)),Xe(ce,e.FORBID_CONTENTS,Re)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Ke(ce)),Xe(ce,e.ADD_FORBID_CONTENTS,Re)),ae&&(q["#text"]=!0),Q&&Xe(q,["html","head","body"]),q.table&&(Xe(q,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw We('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw We('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,y=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i)),null!==w&&"string"==typeof y&&(y=w.createHTML(""));Te&&Te(e),Me=e}},Ve=Xe({},[...et,...tt,...nt]),ut=Xe({},[...rt,...ot]),dt=function(e){Ie(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},ht=function(e,t){try{Ie(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ie(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Fe(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===_e&&ke===be&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=w?w.createHTML(e):e;if(ke===be)try{t=(new f).parseFromString(o,_e)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(ke,"template",null);try{t.documentElement.innerHTML=ve?y:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ke===be?_.call(t,Q?"html":"body")[0]:Q?t.documentElement:i},pt=function(e){return $.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof s&&e instanceof s};function vt(e,t,r){Le(e,(e=>{e.call(n,t,r,Me)}))}const yt=function(e){let t=null;if(vt(T.beforeSanitizeElements,e,null),mt(e))return dt(e),!0;const r=Re(e.nodeName);if(vt(T.uponSanitizeElement,e,{tagName:r,allowedTags:q}),K&&e.hasChildNodes()&&!bt(e.firstElementChild)&&Ze(/<[/\w!]/g,e.innerHTML)&&Ze(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(K&&8===e.nodeType&&Ze(/<[/\w]/g,e.data))return dt(e),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(r))&&(!q[r]||U[r])){if(!U[r]&&$t(r)){if(j.tagNameCheck instanceof RegExp&&Ze(j.tagNameCheck,r))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(r))return!1}if(ae&&!ce[r]){const t=x(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=m(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,k(e))}}return dt(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:ke,tagName:"template"});const n=qe(e.tagName),r=qe(t.tagName);return!!xe[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===be?"svg"===n:t.namespaceURI===ge?"svg"===n&&("annotation-xml"===r||ye[r]):Boolean(Ve[n]):e.namespaceURI===ge?t.namespaceURI===be?"math"===n:t.namespaceURI===me?"math"===n&&$e[r]:Boolean(ut[n]):e.namespaceURI===be?!(t.namespaceURI===me&&!$e[r])&&!(t.namespaceURI===ge&&!ye[r])&&!ut[n]&&(Ae[n]||!Ve[n]):!("application/xhtml+xml"!==_e||!xe[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Ze(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&3===e.nodeType&&(t=e.textContent,Le([R,E,M],(e=>{t=Ne(t,e," ")})),e.textContent!==t&&(Ie(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt(T.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in Pe))return!1;if(Y&&!H[t]&&Ze(P,t));else if(W&&Ze(L,t));else if(Z.attributeCheck instanceof Function&&Z.attributeCheck(t,e));else if(!F[t]||H[t]){if(!($t(e)&&(j.tagNameCheck instanceof RegExp&&Ze(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&Ze(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t,e))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Ze(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(fe[t]);else if(Ze(O,Ne(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==je(n,"data:")||!de[e])if(G&&!Ze(C,Ne(n,D,"")));else if(n)return!1;return!0},$t=function(e){return"annotation-xml"!==e&&Fe(e,I)},At=function(e){vt(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||mt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:s}=i,c=Re(a),u=s;let d="value"===a?u:Ue(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,vt(T.uponSanitizeAttribute,e,r),d=r.attrValue,!ie||"id"!==c&&"name"!==c||(ht(a,e),d="user-content-"+d),K&&Ze(/((--!?|])>)|<\/(style|title|textarea)/i,d)){ht(a,e);continue}if("attributename"===c&&Fe(d,"href")){ht(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ht(a,e);continue}if(!X&&Ze(/\/>/i,d)){ht(a,e);continue}V&&Le([R,E,M],(e=>{d=Ne(d,e," ")}));const h=Re(e.nodeName);if(St(h,c,d)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(l);else switch(p.getAttributeType(h,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{l?e.setAttributeNS(l,a,d):e.setAttribute(a,d),mt(e)?dt(e):De(n.removed)}catch(t){ht(a,e)}}else ht(a,e)}vt(T.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null;const r=pt(t);for(vt(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)vt(T.uponSanitizeShadowNode,n,null),yt(n),At(n),n.content instanceof a&&e(n.content);vt(T.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw We("toString is not a function");if("string"!=typeof(e=e.toString()))throw We("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Ge(t),n.removed=[],"string"==typeof e&&(le=!1),le){if(e.nodeName){const t=Re(e.nodeName);if(!q[t]||U[t])throw We("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=ft("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!te&&!V&&!Q&&-1===e.indexOf("<"))return w&&re?w.createHTML(e):e;if(r=ft(e),!r)return te?null:re?y:""}r&&ee&&dt(r.firstChild);const u=pt(le?e:r);for(;l=u.nextNode();)yt(l),At(l),l.content instanceof a&&_t(l.content);if(le)return e;if(te){if(ne)for(c=A.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(F.shadowroot||F.shadowrootmode)&&(c=z.call(o,c,!0)),c}let d=Q?r.outerHTML:r.innerHTML;return Q&&q["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Ze(kt,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),V&&Le([R,E,M],(e=>{d=Ne(d,e," ")})),w&&re?w.createHTML(d):d},n.setConfig=function(){Ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Me=null,J=!1},n.isValidAttribute=function(e,t,n){Me||Ge({});const r=Re(e),o=Re(t);return St(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ie(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ce(T[e],t);return-1===n?void 0:Oe(T[e],n,1)[0]}return De(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function St(e){if(null==e||""===e)return"";const t=ye.parse(e,{gfm:!0,breaks:!0});return yt.sanitize(t,{ALLOWED_TAGS:["p","br","strong","em","b","i","u","s","code","pre","a","ul","ol","li","h1","h2","h3","h4","h5","h6","blockquote","hr","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel"]})}const $t=class{constructor(n){e(this,n),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 n=this.host.querySelector('[slot="media"]');t.classList.toggle("has-media",!!n)}renderPinIcon(){return n("svg",{class:"pin-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M12 17v5"}),n("path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16h1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2h1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"}))}renderUpvoteIcon(e){return n("svg",e?{class:"upvote-icon filled",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"}:{class:"upvote-icon outline",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M12 7l7 10H5l7-10z"}))}formatDate(e){try{const t=new Date(e),n=new Date,r=Math.floor((n.getTime()-t.getTime())/1e3);return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:r<2592e3?`${Math.floor(r/604800)}w ago`:t.toLocaleDateString()}catch(e){return"unknown date"}}getStatusBadgeLabel(){const{issue:e}=this;return"in_progress"===e.status?"In progress":"closed"===e.status&&"bug"===e.type?"Resolved":"closed"===e.status&&"enhancement"===e.type?"Implemented":null}renderExternalLinkIcon(){return n("svg",{class:"github-link-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},n("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),n("polyline",{points:"15 3 21 3 21 9"}),n("line",{x1:"10",y1:"14",x2:"21",y2:"3"}))}render(){var e,t;const{issue:o,issueUrl:i}=this;if(!o)return null;const a=new Date(o.updatedAt).getTime()>new Date(o.createdAt).getTime(),l=a?"Updated":"Created",s=a?o.updatedAt:o.createdAt,c=a?`Updated: ${o.updatedAt}`:`Created: ${o.createdAt}`,u=null!==(e=o.title)&&void 0!==e?e:"Untitled",d=o.repository.name,h=null!=d&&""!==d&&"unnamed repository"!==d.toLowerCase()?d:null,f=null!=o.repository.description&&""!==o.repository.description?o.repository.description:void 0,p=this.getStatusBadgeLabel(),g=null!==(t=o.githubIssueLink)&&void 0!==t?t:i,m=null!=g&&""!==g;return n(r,{class:"dark"===this.theme?"dark":"","data-upvoted":o.hasUpvoted?"true":"false"},n("div",{class:`issue-card issue-type-${o.type}`},n("div",{class:"issue-media",part:"media"},n("slot",{name:"media"})),n("div",{class:"issue-content"},n("div",{class:"issue-main"},n("div",{class:"issue-header-top"},n("div",{class:"issue-badges"},"bug"===o.type?n("feedlog-badge",{variant:"destructive"},"Bug"):n("feedlog-badge",{variant:"enhancement"},"Enhancement"),p&&n("feedlog-badge",{variant:"secondary"},p)),n("div",{class:"issue-meta-right"},o.pinnedAt&&n("div",{class:"pinned-indicator",title:"Pinned issue"},this.renderPinIcon()),n("span",{class:"issue-timestamp",title:c},l," ",this.formatDate(s)))),n("h3",{class:"issue-title"},u),null!=o.body&&""!==o.body&&n("div",{class:"issue-body",innerHTML:St(o.body)}),(null!=h||m||"bug"!==o.type)&&n("div",{class:"issue-footer"},(null!=h||m)&&n("div",{class:"issue-footer-meta"},null!=h&&n("span",{class:"repo-name",title:f},h),m&&n("a",{part:"github-link",class:"github-link",href:g,target:"_blank",rel:"noopener noreferrer",title:"View on GitHub"},this.renderExternalLinkIcon(),n("span",{class:"github-link-text"},"View on GitHub"))),"bug"!==o.type&&n("button",{part:"upvote-button",class:"upvote-button "+(o.hasUpvoted?"upvoted":""),onClick:e=>this.handleUpvote(e),title:o.hasUpvoted?"Remove upvote":"Upvote this issue"},n("div",{class:"upvote-action"},n("slot",{name:"upvote-icon"},this.renderUpvoteIcon(o.hasUpvoted)),n("span",{class:"upvote-label"},"Upvote")),n("div",{class:"reel-container"},n("span",{class:"upvote-count reel-number",key:o.upvoteCount},o.upvoteCount))))))))}get host(){return o(this)}};$t.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 At=class{constructor(n){e(this,n),this.feedlogUpvote=t(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.currentPage=1,this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)}}resetPage(){this.currentPage=1}renderEmptyStateIllustration(){return n("svg",{class:"empty-state-illustration",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"96",viewBox:"0 0 120 96",fill:"none","aria-hidden":"true"},n("path",{d:"M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z",fill:"var(--feedlog-empty-illustration-bg)",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linejoin":"round"}),n("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M44 52h32M44 60h24M44 68h28",stroke:"var(--feedlog-empty-illustration-muted)","stroke-width":"1.25","stroke-linecap":"round"}))}getVisibleIssues(){if(0===this.issues.length)return[];if(null==this.limit||this.issues.length<=this.limit)return this.issues;const e=(this.currentPage-1)*this.limit;return this.issues.slice(e,e+this.limit)}getPageNumbers(){if(null==this.limit)return[];const e=Math.ceil(this.issues.length/this.limit);if(e<=1)return[];const t=new Set([1,e]),n=Math.max(1,this.currentPage-1),r=Math.min(e,this.currentPage+1);for(let e=n;e<=r;e++)t.add(e);const o=Array.from(t).sort(((e,t)=>e-t)),i=[];for(let e=0;e<o.length;e++)e>0&&o[e]-o[e-1]>1&&i.push("ellipsis"),i.push(o[e]);return i}goToPage(e){const t=null!=this.limit?Math.ceil(this.issues.length/this.limit):1;this.currentPage=Math.max(1,Math.min(e,t))}renderPagination(){if(null==this.limit||this.issues.length<=this.limit)return null;const e=Math.ceil(this.issues.length/this.limit),t=this.getPageNumbers();return n("nav",{class:"pagination","aria-label":"Issues pagination"},n("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Previous page",disabled:this.currentPage<=1,onClick:()=>this.goToPage(this.currentPage-1)},"‹"),t.map(((e,t)=>"ellipsis"===e?n("span",{key:t,class:"pagination-ellipsis","aria-hidden":"true"},"…"):n("button",{key:t,type:"button",class:"pagination-btn","aria-current":e===this.currentPage?"page":void 0,onClick:()=>this.goToPage(e)},e))),n("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Next page",disabled:this.currentPage>=e,onClick:()=>this.goToPage(this.currentPage+1)},"›"))}render(){const e=this.getVisibleIssues();return n(r,{key:"474f5ca0d8edc94a8e9a03d83c6a977270391d65",class:"dark"===this.theme?"dark":""},n("div",{key:"8f2f8125653ec5f80b167945a33cefe483c1a001",class:"issues-list"},0===e.length?n("div",{class:"empty-state"},this.emptyStateTitle&&this.emptyStateMessage?n("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),n("h2",{class:"empty-state-title"},this.emptyStateTitle),n("p",{class:"empty-state-message"},this.emptyStateMessage)):n("p",null,"No issues found")):e.map((e=>{var t,r;return n("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(r=null===(t=this.getIssueUrl)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:void 0,theme:this.theme,onFeedlogUpvote:e=>this.handleUpvote(e)})}))),this.renderPagination())}static get watchers(){return{issues:[{resetPage:0}],limit:[{resetPage:0}]}}};At.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{i as feedlog_button,$t as feedlog_issue,At as feedlog_issues_list}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t=()=>{},e=":root{--feedlog-font-size:16px;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-popover:oklch(1 0 0);--feedlog-popover-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-muted-foreground:#717182;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-destructive:#d4183d;--feedlog-destructive-foreground:#ffffff;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-input-background:#f3f3f5;--feedlog-switch-background:#cbced4;--feedlog-ring:oklch(0.708 0 0);--feedlog-radius:0.625rem;--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-blue-900:oklch(0.379 0.146 265.522);--feedlog-font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace}.dark{--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-popover:oklch(0.145 0 0);--feedlog-popover-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-muted-foreground:oklch(0.708 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-foreground:oklch(0.637 0.237 25.331);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0)}";var n,o,s,i,r,l,c,f,u,a,h,d,p,g,v,$,m,b=Object.create,y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,O=t=>{throw TypeError(t)},M=(t,e)=>function(){return e||(0,t[k(t)[0]])((e={exports:{}}).exports,e),e.exports},x=(t,e,n)=>e.has(t)||O("Cannot "+n),E=(t,e,n)=>(x(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),P=(t,e,n)=>(x(t,e,"write to private field"),e.set(t,n),n),C=(t,e,n)=>(x(t,e,"access private method"),n),R=M({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=o(t,n)),e instanceof RegExp&&(e=o(e,n));var i=s(t,e,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+t.length,i[1]),post:n.slice(i[1]+e.length)}}function o(t,e){var n=e.match(t);return n?n[0]:null}function s(t,e,n){var o,s,i,r,l,c=n.indexOf(t),f=n.indexOf(e,c+1),u=c;if(c>=0&&f>0){if(t===e)return[c,f];for(o=[],i=n.length;u>=0&&!l;)u==c?(o.push(u),c=n.indexOf(t,u+1)):1==o.length?l=[o.pop(),f]:((s=o.pop())<i&&(i=s,r=f),f=n.indexOf(e,u+1)),u=c<f&&c>=0?c:f;o.length&&(l=[i,r])}return l}e.exports=n,n.range=s}}),W=M({"node_modules/brace-expansion/index.js"(t,e){var n=R();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(i).split("\\,").join(r).split("\\.").join(l)}(t),!0).map(f)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(o).join("\\").split(s).join("{").split(i).join("}").split(r).join(",").split(l).join(".")}function u(t){if(!t)return[""];var e=[],o=n("{","}",t);if(!o)return t.split(",");var s=o.body,i=o.post,r=o.pre.split(",");r[r.length-1]+="{"+s+"}";var l=u(i);return i.length&&(r[r.length-1]+=l.shift(),r.push.apply(r,l)),e.push.apply(e,r),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function g(t,e){var o=[],s=n("{","}",t);if(!s)return[t];var r=s.pre,l=s.post.length?g(s.post,!1):[""];if(/\$$/.test(s.pre))for(var f=0;f<l.length;f++)o.push(W=r+"{"+s.body+"}"+l[f]);else{var v,$,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),b=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),y=m||b,w=s.body.indexOf(",")>=0;if(!y&&!w)return s.post.match(/,(?!,).*\}/)?g(t=s.pre+"{"+s.body+i+s.post):[t];if(y)v=s.body.split(/\.\./);else if(1===(v=u(s.body)).length&&1===(v=g(v[0],!1).map(a)).length)return l.map((function(t){return s.pre+v[0]+t}));if(y){var k=c(v[0]),S=c(v[1]),j=Math.max(v[0].length,v[1].length),O=3==v.length?Math.abs(c(v[2])):1,M=d;S<k&&(O*=-1,M=p);var x=v.some(h);$=[];for(var E=k;M(E,S);E+=O){var N;if(b)"\\"===(N=String.fromCharCode(E))&&(N="");else if(N=E+"",x){var P=j-N.length;if(P>0){var C=Array(P+1).join("0");N=E<0?"-"+C+N.slice(1):C+N}}$.push(N)}}else{$=[];for(var R=0;R<v.length;R++)$.push.apply($,g(v[R],!1))}for(R=0;R<$.length;R++)for(f=0;f<l.length;f++){var W=r+$[R]+l[f];(!e||y||W)&&o.push(W)}}return o}}}),L=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(L||{}),z=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(z||{}),A="type",I="value",T="serialized:",_=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],s=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.i.has(n)?e.i.get(n):o}}))},D=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},F=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.o.u&&_(t,e))},U=(t,e)=>e in t,G=(t,e)=>(0,console.error)(t,e),V=new Map,B=new Map,H="s-id",Z="sty-id",q="c-id",J="slot-fb{display:contents}slot-fb[hidden]{display:none}",Y="undefined"!=typeof window?window:{},K={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},Q=t=>Promise.resolve(t),X=(()=>{try{return!!Y.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),tt=!!X&&(()=>!!Y.document&&Object.getOwnPropertyDescriptor(Y.document.adoptedStyleSheets,"length").writable)(),et=!1,nt=[],ot=[],st=(t,e)=>n=>{t.push(n),et||(et=!0,e&&4&K.u?lt(rt):K.raf(rt))},it=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){G(t)}t.length=0},rt=()=>{it(nt),it(ot),(et=nt.length>0)&&K.raf(rt)},lt=t=>Q().then(t),ct=st(ot,!0),ft=t=>"object"==(t=typeof t)||"function"===t,ut=((t,e,n)=>(n=null!=t?b(S(t)):{},((t,e,n,o)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of k(e))j.call(t,n)||undefined===n||y(t,n,{get:()=>e[n],enumerable:!(o=w(e,n))||o.enumerable});return t})(y(n,"default",{value:t,enumerable:!0}),t)))(W()),at=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ht={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},dt=t=>t.replace(/[[\]\\-]/g,"\\$&"),pt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gt=t=>t.join(""),vt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const o=[],s=[];let i=n+1,r=!1,l=!1,c=!1,f=!1,u=n,a="";t:for(;i<t.length;){const e=t.charAt(i);if("!"!==e&&"^"!==e||i!==n+1){if("]"===e&&r&&!c){u=i+1;break}if(r=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[r,c,f]]of Object.entries(ht))if(t.startsWith(e,i)){if(a)return["$.",!1,t.length-n,!0];i+=e.length,f?s.push(r):o.push(r),l=l||c;continue t}c=!1,a?(e>a?o.push(dt(a)+"-"+dt(e)):e===a&&o.push(dt(e)),a="",i++):t.startsWith("-]",i+1)?(o.push(dt(e+"-")),i+=2):t.startsWith("-",i+1)?(a=e,i+=2):(o.push(dt(e)),i++)}else c=!0,i++}else f=!0,i++}if(u<i)return["",!1,0,!1];if(!o.length&&!s.length)return["$.",!1,t.length-n,!0];if(0===s.length&&1===o.length&&/^\\?.$/.test(o[0])&&!f){const t=2===o[0].length?o[0].slice(-1):o[0];return[pt(t),!1,u-n,!1]}const h="["+(f?"^":"")+gt(o)+"]",d="["+(f?"":"^")+gt(s)+"]";return[o.length&&s.length?"("+h+"|"+d+")":o.length?h:d,l,u-n,!0]},$t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),mt=new Set(["!","?","+","*","@"]),bt=t=>mt.has(t),yt="(?!\\.)",wt=new Set(["[","."]),kt=new Set(["..","."]),St=new Set("().*{}+?[]^$\\!"),jt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot="[^/]",Mt=Ot+"*?",xt=Ot+"+?",Et=class t{constructor(t,e,p={}){N(this,d),((t,e,n)=>{((t,e,n)=>{e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),N(this,n),N(this,o),N(this,s,!1),N(this,i,[]),N(this,r),N(this,l),N(this,c),N(this,f,!1),N(this,u),N(this,a),N(this,h,!1),this.type=t,t&&P(this,o,!0),P(this,r,e),P(this,n,E(this,r)?E(E(this,r),n):this),P(this,u,E(this,n)===this?p:E(E(this,n),u)),P(this,c,E(this,n)===this?[]:E(E(this,n),c)),"!"!==t||E(E(this,n),f)||E(this,c).push(this),P(this,l,E(this,r)?E(E(this,r),i).length:0)}get hasMagic(){if(void 0!==E(this,o))return E(this,o);for(const t of E(this,i))if("string"!=typeof t&&(t.type||t.hasMagic))return P(this,o,!0);return E(this,o)}toString(){return void 0!==E(this,a)?E(this,a):P(this,a,this.type?this.type+"("+E(this,i).map((t=>t+"")).join("|")+")":E(this,i).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&E(n,r)===this))throw Error("invalid part: "+n);E(this,i).push(n)}}toJSON(){var t;const e=null===this.type?E(this,i).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...E(this,i).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===E(this,n)||E(E(this,n),f)&&"!"===(null==(t=E(this,r))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(E(this,n)===this)return!0;if(!(null==(e=E(this,r))?void 0:e.isStart()))return!1;if(0===E(this,l))return!0;const o=E(this,r);for(let e=0;e<E(this,l);e++){const n=E(o,i)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,o;if(E(this,n)===this)return!0;if("!"===(null==(t=E(this,r))?void 0:t.type))return!0;if(!(null==(e=E(this,r))?void 0:e.isEnd()))return!1;if(!this.type)return null==(o=E(this,r))?void 0:o.isEnd();const s=E(this,r)?E(E(this,r),i).length:0;return E(this,l)===s-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of E(this,i))n.copyIn(t);return n}static fromGlob(e,n={}){var o;const s=new t(null,void 0,n);return C(o=t,g,v).call(o,e,s,0,n),s}toMMPattern(){if(this!==E(this,n))return E(this,n).toMMPattern();const t=""+this,[e,s,i,r]=this.toRegExpSource();if(!(i||E(this,o)||E(this,u).nocase&&!E(this,u).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;const l=(E(this,u).nocase?"i":"")+(r?"u":"");return Object.assign(RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return E(this,u)}toRegExpSource(e){var l;const c=null!=e?e:!!E(this,u).dot;if(E(this,n)===this&&C(this,d,p).call(this),!this.type){const u=this.isStart()&&this.isEnd(),a=E(this,i).map((n=>{var i;const[r,l,c,f]="string"==typeof n?C(i=t,g,m).call(i,n,E(this,o),u):n.toRegExpSource(e);return P(this,o,E(this,o)||c),P(this,s,E(this,s)||f),r})).join("");let h="";if(this.isStart()&&"string"==typeof E(this,i)[0]&&(1!==E(this,i).length||!kt.has(E(this,i)[0]))){const t=wt,n=c&&t.has(a.charAt(0))||a.startsWith("\\.")&&t.has(a.charAt(2))||a.startsWith("\\.\\.")&&t.has(a.charAt(4)),o=!c&&!e&&t.has(a.charAt(0));h=n?"(?!(?:^|/)\\.\\.?(?:$|/))":o?yt:""}let d="";return this.isEnd()&&E(E(this,n),f)&&"!"===(null==(l=E(this,r))?void 0:l.type)&&(d="(?:$|\\/)"),[h+a+d,$t(a),P(this,o,!!E(this,o)),E(this,s)]}const a="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let b=C(this,d,$).call(this,c);if(this.isStart()&&this.isEnd()&&!b&&"!"!==this.type){const t=""+this;return P(this,i,[t]),this.type=null,P(this,o,void 0),[t,$t(""+this),!1,!1]}let y=!a||e||c?"":C(this,d,$).call(this,!0);y===b&&(y=""),y&&(b=`(?:${b})(?:${y})*?`);let w="";return w="!"===this.type&&E(this,h)?(this.isStart()&&!c?yt:"")+xt:v+b+("!"===this.type?"))"+(!this.isStart()||c||e?"":yt)+Mt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&y?")":"*"===this.type&&y?")?":")"+this.type),[w,$t(b),P(this,o,!!E(this,o)),E(this,s)]}};n=new WeakMap,o=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakMap,d=new WeakSet,p=function(){if(this!==E(this,n))throw Error("should only call on root");if(E(this,f))return this;let t;for(P(this,f,!0);t=E(this,c).pop();){if("!"!==t.type)continue;let e=t,n=E(e,r);for(;n;){for(let o=E(e,l)+1;!n.type&&o<E(n,i).length;o++)for(const e of E(t,i)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(E(n,i)[o])}e=n,n=E(e,r)}}return this},g=new WeakSet,v=function(t,e,n,s){var r,l;let c=!1,f=!1,u=-1,a=!1;if(null===e.type){let o=n,i="";for(;o<t.length;){const n=t.charAt(o++);if(c||"\\"===n)c=!c,i+=n;else if(f)o===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||o===u+2&&a||(f=!1),i+=n;else if("["!==n)if(s.noext||!bt(n)||"("!==t.charAt(o))i+=n;else{e.push(i),i="";const l=new Et(n,e);o=C(r=Et,g,v).call(r,t,l,o,s),e.push(l)}else f=!0,u=o,a=!1,i+=n}return e.push(i),o}let d=n+1,p=new Et(null,e);const $=[];let m="";for(;d<t.length;){const n=t.charAt(d++);if(c||"\\"===n)c=!c,m+=n;else if(f)d===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||d===u+2&&a||(f=!1),m+=n;else if("["!==n)if(bt(n)&&"("===t.charAt(d)){p.push(m),m="";const e=new Et(n,p);p.push(e),d=C(l=Et,g,v).call(l,t,e,d,s)}else if("|"!==n){if(")"===n)return""===m&&0===E(e,i).length&&P(e,h,!0),p.push(m),m="",e.push(...$,p),d;m+=n}else p.push(m),m="",$.push(p),p=new Et(null,e);else f=!0,u=d,a=!1,m+=n}return e.type=null,P(e,o,void 0),P(e,i,[t.substring(n-1)]),d},$=function(t){return E(this,i).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,o,i,r]=e.toRegExpSource(t);return P(this,s,E(this,s)||r),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},m=function(t,e,n=!1){let o=!1,s="",i=!1;for(let r=0;r<t.length;r++){const l=t.charAt(r);if(o)o=!1,s+=(St.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,o,l,c]=vt(t,r);if(l){s+=n,i=i||o,r+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?s+=jt(l):(s+=Ot,e=!0):(s+=n&&"*"===t?xt:Mt,e=!0)}else r===t.length-1?s+="\\\\":o=!0}return[s,$t(t),!!e,i]},N(Et,g);var Nt=Et,Pt=(t,e,n={})=>(at(e),!(!n.nocomment&&"#"===e.charAt(0))&&new ne(e,n).match(t)),Ct=/^\*+([^+@!?\*\[\(]*)$/,Rt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Wt=t=>e=>e.endsWith(t),Lt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),zt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),At=/^\*+\.\*+$/,It=t=>!t.startsWith(".")&&t.includes("."),Tt=t=>"."!==t&&".."!==t&&t.includes("."),_t=/^\.\*+$/,Dt=t=>"."!==t&&".."!==t&&t.startsWith("."),Ft=/^\*+$/,Ut=t=>0!==t.length&&!t.startsWith("."),Gt=t=>0!==t.length&&"."!==t&&".."!==t,Vt=/^\?+([^+@!?\*\[\(]*)?$/,Bt=([t,e=""])=>{const n=Jt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ht=([t,e=""])=>{const n=Yt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Zt=([t,e=""])=>{const n=Yt([t]);return e?t=>n(t)&&t.endsWith(e):n},qt=([t,e=""])=>{const n=Jt([t]);return e?t=>n(t)&&t.endsWith(e):n},Jt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Yt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Kt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Pt.sep="win32"===Kt?"\\":"/";var Qt=Symbol("globstar **");Pt.GLOBSTAR=Qt,Pt.filter=(t,e={})=>n=>Pt(n,t,e);var Xt=(t,e={})=>Object.assign({},t,e);Pt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Pt;const e=Pt;return Object.assign(((n,o,s={})=>e(n,o,Xt(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Xt(t,n))}static defaults(n){return e.defaults(Xt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,o={}){super(e,n,Xt(t,o))}static fromGlob(n,o={}){return e.AST.fromGlob(n,Xt(t,o))}},unescape:(n,o={})=>e.unescape(n,Xt(t,o)),escape:(n,o={})=>e.escape(n,Xt(t,o)),filter:(n,o={})=>e.filter(n,Xt(t,o)),defaults:n=>e.defaults(Xt(t,n)),makeRe:(n,o={})=>e.makeRe(n,Xt(t,o)),braceExpand:(n,o={})=>e.braceExpand(n,Xt(t,o)),match:(n,o,s={})=>e.match(n,o,Xt(t,s)),sep:e.sep,GLOBSTAR:Qt})};var te=(t,e={})=>(at(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ut.default)(t));Pt.braceExpand=te,Pt.makeRe=(t,e={})=>new ne(t,e).makeRe(),Pt.match=(t,e,n={})=>{const o=new ne(e,n);return t=t.filter((t=>o.match(t))),o.options.nonull&&!t.length&&t.push(e),t};var ee=/[?*]|[+@!]\(.*?\)|\[|\]/,ne=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Kt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&ee.test(t[2])||ee.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,o),this.set=o.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const o=t[n];1===n&&""===o&&""===t[0]||"."!==o&&""!==o||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const o=t[n-1];o&&"."!==o&&".."!==o&&"**"!==o&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let o=-1;for(;-1!==(o=n.indexOf("**",o+1));){let s=o;for(;"**"===n[s+1];)s++;s>o&&n.splice(o+1,s-o);const i=n[o+2],r=n[o+3];if(".."!==n[o+1])continue;if(!i||"."===i||".."===i||!r||"."===r||".."===r)continue;e=!0,n.splice(o,1);const l=n.slice(0);l[o]="**",t.push(l),o--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const o=n[t];1===t&&""===o&&""===n[0]||"."!==o&&""!==o||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let s=0;for(;-1!==(s=n.indexOf("..",s+1));){const t=n[s-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(s-1,2,...1===s&&"**"===n[s+1]?["."]:[]),0===n.length&&n.push(""),s-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const o=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);o&&(t[e]=o,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let o=0,s=0,i=[],r="";for(;o<t.length&&s<e.length;)if(t[o]===e[s])i.push("b"===r?e[s]:t[o]),o++,s++;else if(n&&"**"===t[o]&&e[s]===t[o+1])i.push(t[o]),o++;else if(n&&"**"===e[s]&&t[o]===e[s+1])i.push(e[s]),s++;else if("*"!==t[o]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[o]||!this.options.dot&&t[o].startsWith(".")||"**"===t[o])return!1;if("a"===r)return!1;r="b",i.push(e[s]),o++,s++}else{if("b"===r)return!1;r="a",i.push(t[o]),o++,s++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let o=0;o<t.length&&"!"===t.charAt(o);o++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const o=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),o=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),s="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=o?3:n?0:void 0,r=!s&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:s?0:void 0;if("number"==typeof i&&"number"==typeof r){const[n,o]=[t[i],e[r]];n.toLowerCase()===o.toLowerCase()&&(e[r]=n,r>i?e=e.slice(r):i>r&&(t=t.slice(i)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,r=0,l=t.length,c=e.length;i<l&&r<c;i++,r++){this.debug("matchOne loop");var f=e[r],u=t[i];if(this.debug(e,f,u),!1===f)return!1;if(f===Qt){this.debug("GLOBSTAR",[e,f,u]);var a=i,h=r+1;if(h===c){for(this.debug("** at the end");i<l;i++)if("."===t[i]||".."===t[i]||!o.dot&&"."===t[i].charAt(0))return!1;return!0}for(;a<l;){var d=t[a];if(this.debug("\nglobstar while",t,a,e,h,d),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,d),!0;if("."===d||".."===d||!o.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let s;if("string"==typeof f?(s=u===f,this.debug("string match",f,u,s)):(s=f.test(u),this.debug("pattern match",f,u,s)),!s)return!1}if(i===l&&r===c)return!0;if(i===l)return n;if(r===c)return i===l-1&&""===t[i];throw Error("wtf?")}braceExpand(){return te(this.pattern,this.options)}parse(t){at(t);const e=this.options;if("**"===t)return Qt;if(""===t)return"";let n,o=null;(n=t.match(Ft))?o=e.dot?Gt:Ut:(n=t.match(Ct))?o=(e.nocase?e.dot?zt:Lt:e.dot?Wt:Rt)(n[1]):(n=t.match(Vt))?o=(e.nocase?e.dot?Ht:Bt:e.dot?Zt:qt)(n):(n=t.match(At))?o=e.dot?Tt:It:(n=t.match(_t))&&(o=Dt);const s=Nt.fromGlob(t,this.options).toMMPattern();return o&&"object"==typeof s&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(e.nocase?["i"]:[]);let s=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))o.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Qt?Qt:t._src}));return e.forEach(((t,o)=>{const s=e[o+1],i=e[o-1];t===Qt&&i!==Qt&&(void 0===i?void 0!==s&&s!==Qt?e[o+1]="(?:\\/|"+n+"\\/)?"+s:e[o]=n:void 0===s?e[o-1]=i+"(?:\\/|"+n+")?":s!==Qt&&(e[o-1]=i+"(?:\\/|\\/"+n+"\\/)"+s,e[o+1]=Qt))})),e.filter((t=>t!==Qt)).join("/")})).join("|");const[i,r]=t.length>1?["(?:",")"]:["",""];s="^"+i+s+r+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=RegExp(s,[...o].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const o=this.slashSplit(t);this.debug(this.pattern,"split",o);const s=this.set;this.debug(this.pattern,"set",s);let i=o[o.length-1];if(!i)for(let t=o.length-2;!i&&t>=0;t--)i=o[t];for(let t=0;t<s.length;t++){const r=s[t];let l=o;if(n.matchBase&&1===r.length&&(l=[i]),this.matchOne(l,r,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Pt.defaults(t).Minimatch}};function oe(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}Pt.AST=Nt,Pt.Minimatch=ne,Pt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Pt.unescape=$t;var se=class t{static fromLocalValue(e){const n=e[A],o=I in e?e[I]:void 0;switch(n){case"string":case"boolean":return o;case"bigint":return BigInt(o);case"undefined":return;case"null":return null;case"number":return"NaN"===o?NaN:"-0"===o?-0:"Infinity"===o?1/0:"-Infinity"===o?-1/0:o;case"array":return o.map((e=>t.fromLocalValue(e)));case"date":return new Date(o);case"map":const e=new Map;for(const[n,s]of o){const o="object"==typeof n&&null!==n?t.fromLocalValue(n):n,i=t.fromLocalValue(s);e.set(o,i)}return e;case"object":const s={};for(const[e,n]of o)s[e]=t.fromLocalValue(n);return s;case"regexp":const{pattern:i,flags:r}=o;return RegExp(i,r);case"set":const l=new Set;for(const e of o)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(o);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(A))return!1;const e=t[A];return!!Object.values({...L,...z}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(I))}};((t,e)=>{for(var n in e)y(t,n,{get:e[n],enumerable:!0})})({},{err:()=>re,map:()=>le,ok:()=>ie,unwrap:()=>fe,unwrapErr:()=>ue});var ie=t=>({isOk:!0,isErr:!1,value:t}),re=t=>({isOk:!1,isErr:!0,value:t});function le(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ie(t))):ie(n)}if(t.isErr)return re(t.value);throw"should never get here"}var ce,fe=t=>{if(t.isOk)return t.value;throw t.value},ue=t=>{if(t.isErr)return t.value;throw t.value};function ae(){var t;const n=this.attachShadow({mode:"open"});if(void 0===ce&&(ce=null!=(t=function(t){if(!X)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),ce)tt?n.adoptedStyleSheets.push(ce):n.adoptedStyleSheets=[...n.adoptedStyleSheets,ce];else if(!X){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}var he=(t,e,n,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const s=document.createTextNode("");if(s["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const i=e["s-cr"].parentNode,r=de(i,"appendChild");if(void 0!==o){s["s-oo"]=o;const t=de(i,"childNodes"),e=[s];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>r.call(i,t)))}else r.call(i,s);t["s-ol"]=s,t["s-sh"]=e["s-hn"]};function de(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var pe=new WeakMap,ge=(t,e,n)=>{let o=B.get(t);X&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,B.set(t,o)},ve=(t,e)=>{var n,o,s;const i=$e(e),r=B.get(i);if(!Y.document)return i;if(t=11===t.nodeType?t:Y.document,r)if("string"==typeof r){let s,l=pe.get(t=t.head||t);l||pe.set(t,l=new Set);const c=t.querySelector(`[${Z}="${i}"]`);if(c)c.innerHTML=r;else if(!l.has(i)){s=Y.document.createElement("style"),s.innerHTML=r;const c=null!=(n=K.p)?n:oe(Y.document);if(null!=c&&s.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(X){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),tt?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=r+e.innerHTML:t.prepend(s)}else t.append(s);1&e.u&&t.insertBefore(s,null),4&e.u&&(s.innerHTML+=J),l&&l.add(i)}}else{let e=pe.get(t);if(e||pe.set(t,e=new Set),!e.has(i)){const n=null!=(s=t.defaultView)?s:t.ownerDocument.defaultView;let o;if(r.constructor===n.CSSStyleSheet)o=r;else{o=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)o.insertRule(r.cssRules[t].cssText,t)}tt?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i},$e=t=>"sc-"+t.v,me=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),be=(t,e,...n)=>{let o=null,s=null,i=!1,r=!1;const l=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!ft(o))&&(o+=""),i&&r?l[l.length-1].$+=o:l.push(i?ye(null,o):o),r=i)};if(c(n),e){e.key&&(s=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=ye(t,null);return f.m=e,l.length>0&&(f.k=l),f.S=s,f},ye=(t,e)=>({u:0,j:t,$:e,O:null,k:null,m:null,S:null}),we={},ke=(t,e,n,o,s,i,r,l=[])=>{let c,f,u,a;if(1===i.nodeType){if(c=i.getAttribute(q),c&&(f=c.split("."),f[0]===r||"0"===f[0])){u=je({u:0,M:f[0],N:f[1],P:f[2],C:f[3],j:i.tagName.toLowerCase(),O:i,m:{class:i.className||""}}),e.push(u),i.removeAttribute(q),t.k||(t.k=[]);const s=u.O.getAttribute("s-sn");"string"==typeof s&&("slot-fb"===u.j&&Oe(s,f[2],u,i,t,e,n,o,l),u.O["s-sn"]=s,u.O.removeAttribute("s-sn")),void 0!==u.C&&(t.k[u.C]=u),t=u,o&&"0"===u.P&&(o[u.C]=u.O)}if(i.shadowRoot)for(a=i.shadowRoot.childNodes.length-1;a>=0;a--)ke(t,e,n,o,s,i.shadowRoot.childNodes[a],r,l);const h=i.__childNodes||i.childNodes;for(a=h.length-1;a>=0;a--)ke(t,e,n,o,s,h[a],r,l)}else if(8===i.nodeType)f=i.nodeValue.split("."),(f[1]===r||"0"===f[1])&&(c=f[0],u=je({M:f[1],N:f[2],P:f[3],C:f[4]||"0",O:i,m:null,k:null,S:null,R:null,j:null,$:null}),"t"===c?(u.O=xe(i,3),u.O&&3===u.O.nodeType&&(u.$=u.O.textContent,e.push(u),i.remove(),r===u.M&&(t.k||(t.k=[]),t.k[u.C]=u),o&&"0"===u.P&&(o[u.C]=u.O))):"c"===c?(u.O=xe(i,8),u.O&&8===u.O.nodeType&&(e.push(u),i.remove())):u.M===r&&("s"===c?Oe(i["s-sn"]=f[5]||"",f[2],u,i,t,e,n,o,l):"r"===c&&o&&i.remove()));else if(t&&"style"===t.j){const e=ye(null,i.textContent);e.O=i,e.C="0",t.k=[e]}return t},Se=(t,e)=>{if(1===t.nodeType){const n=t[H]||t.getAttribute(H);n&&e.set(n,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)Se(t.shadowRoot.childNodes[o],e);const s=t.__childNodes||t.childNodes;for(o=0;o<s.length;o++)Se(s[o],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},je=t=>({u:0,M:null,N:null,P:null,C:"0",O:null,m:null,k:null,S:null,R:null,j:null,$:null,...t});function Oe(t,e,n,o,s,i,r,l,c){o["s-sr"]=!0,n.R=t||null,n.j="slot";const f=(null==s?void 0:s.O)?s.O["s-id"]||s.O.getAttribute("s-id"):"";if(l&&Y.document){const i=n.O=Y.document.createElement(n.j);n.R&&n.O.setAttribute("name",t),s.O.shadowRoot&&f&&f!==n.M?de(s.O,"insertBefore")(i,de(s.O,"children")[0]):de(de(o,"parentNode"),"insertBefore")(i,o),Me(c,e,t,o,n.M),o.remove(),"0"===n.P&&(l[n.C]=n.O)}else{const i=n.O,r=f&&f!==n.M&&s.O.shadowRoot;Me(c,e,t,o,r?f:n.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(s.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(o),r&&s.O.insertBefore(i,s.O.children[0])}i.push(n),r.push(n),s.k||(s.k=[]),s.k[n.C]=n}var Me=(t,e,n,o,s)=>{var i,r;let l=o.nextSibling;if(t[e]=t[e]||[],l&&!(null==(i=l.nodeValue)?void 0:i.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:o,node:l,hostId:s})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))},xe=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},Ee=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Ee("::slotted"),Ee(":host"),Ee(":host-context");var Ne,Pe=(t,e)=>"string"==typeof t&&t.startsWith(T)?t=function(t){return"string"==typeof t&&t.startsWith(T)?se.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||ft(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,Ce=t=>{var e;return null==(e=D(t))?void 0:e.$hostElement$},Re=(t,e)=>{const n=Ce(t);return{emit:t=>We(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},We=(t,e,n)=>{const o=K.ce(e,n);return t.dispatchEvent(o),o},Le=(t,e,n,o,s,i,r)=>{if(n===o)return;let l=U(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,s=Ae(n);let i=Ae(o);if((t["s-si"]||t["s-sc"])&&r){const n=t["s-sc"]||t["s-si"];i.push(n),s.forEach((t=>{t.startsWith(n)&&i.push(t)})),i=[...new Set(i)].filter((t=>t)),e.add(...i)}else e.remove(...s.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if(l||"o"!==e[0]||"n"!==e[1]){const r=ft(o);if((l||r&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const s=null==o?"":o;"list"===e?l=!1:null!=n&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!l||4&i||s)&&!r&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):U(Y,c)?c.slice(2):c[2]+e.slice(3),n||o){const s=e.endsWith(Ie);e=e.replace(Te,""),n&&K.rel(t,e,n,s),o&&K.ael(t,e,o,s)}},ze=/\s/,Ae=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ze):[]),Ie="Capture",Te=RegExp(Ie+"$"),_e=(t,e,n,o)=>{const s=11===e.O.nodeType&&e.O.host?e.O.host:e.O,i=t&&t.m||{},r=e.m||{};for(const t of De(Object.keys(i)))t in r||Le(s,t,i[t],void 0,n,e.u,o);for(const t of De(Object.keys(r)))Le(s,t,i[t],r[t],n,e.u,o)};function De(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Fe=!1,Ue=(t,e,n)=>{const o=e.k[n];let s,i,r=0;if(null!==o.$)s=o.O=Y.document.createTextNode(o.$);else{if(Fe||(Fe="svg"===o.j),!Y.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=o.O=Y.document.createElementNS(Fe?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.j),Fe&&"foreignObject"===o.j&&(Fe=!1),_e(null,o,Fe),o.k){const e="template"===o.j?s.content:s;for(r=0;r<o.k.length;++r)i=Ue(t,o,r),i&&e.appendChild(i)}"svg"===o.j?Fe=!1:"foreignObject"===s.tagName&&(Fe=!0)}return s["s-hn"]=Ne,s},Ge=(t,e,n,o,s,i)=>{let r,l=t;for(l.shadowRoot&&l.tagName===Ne&&(l=l.shadowRoot),"template"===n.j&&(l=l.content);s<=i;++s)o[s]&&(r=Ue(null,n,s),r&&(o[s].O=r,Ze(l,r,e)))},Ve=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},Be=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.S&&e.S&&(t.S=e.S),!0):t.S===e.S),He=(t,e,n=!1)=>{const o=e.O=t.O,s=t.k,i=e.k,r=e.j,l=e.$;null===l?(_e(t,e,Fe="svg"===r||"foreignObject"!==r&&Fe,n),null!==s&&null!==i?((t,e,n,o,s=!1)=>{let i,r,l=0,c=0,f=0,u=0,a=e.length-1,h=e[0],d=e[a],p=o.length-1,g=o[0],v=o[p];const $="template"===n.j?t.content:t;for(;l<=a&&c<=p;)if(null==h)h=e[++l];else if(null==d)d=e[--a];else if(null==g)g=o[++c];else if(null==v)v=o[--p];else if(Be(h,g,s))He(h,g,s),h=e[++l],g=o[++c];else if(Be(d,v,s))He(d,v,s),d=e[--a],v=o[--p];else if(Be(h,v,s))He(h,v,s),Ze($,h.O,d.O.nextSibling),h=e[++l],v=o[--p];else if(Be(d,g,s))He(d,g,s),Ze($,d.O,h.O),d=e[--a],g=o[++c];else{for(f=-1,u=l;u<=a;++u)if(e[u]&&null!==e[u].S&&e[u].S===g.S){f=u;break}f>=0?(r=e[f],r.j!==g.j?i=Ue(e&&e[c],n,f):(He(r,g,s),e[f]=void 0,i=r.O),g=o[++c]):(i=Ue(e&&e[c],n,c),g=o[++c]),i&&Ze(h.O.parentNode,i,h.O)}l>a?Ge(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&Ve(e,l,a)})(o,s,e,i,n):null!==i?(null!==t.$&&(o.textContent=""),Ge(o,null,e,i,0,i.length-1)):n||null===s?n&&null!==s&&null===i&&(e.k=s):Ve(s,0,s.length-1),Fe&&"svg"===r&&(Fe=!1)):t.$!==l&&(o.data=l)},Ze=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),qe=(t,e)=>{if(e&&!t.W&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.W=()=>{e["s-p"].splice(n-1,1),o()})))}},Je=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);qe(t,t.L);const n=()=>Ye(t,e);if(!e)return ct(n);queueMicrotask((()=>{n()}))},Ye=(t,e)=>{const n=t.$hostElement$,o=t.l;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return e?(t.A.length&&t.A.forEach((t=>t(n))),s=on(o,"componentWillLoad",void 0,n)):s=on(o,"componentWillUpdate",void 0,n),s=Ke(s,(()=>on(o,"componentWillRender",void 0,n))),Ke(s,(()=>Xe(t,o,e)))},Ke=(t,e)=>Qe(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Qe=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Xe=async(t,e,n)=>{var o;const s=t.$hostElement$,i=s["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,s=ve(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);tn(t,e,s,n),i&&(i.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(o=s["s-p"])?o:[],n=()=>en(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},tn=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,s=t.I||ye(null,null),i=(t=>t&&t.j===we)(e)?e:be(null,null,e);if(Ne=o.tagName,n&&i.m)for(const t of Object.keys(i.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=o[t]);i.j=null,i.u|=4,t.I=i,i.O=s.O=o.shadowRoot||o,He(s,i,n)})(t,e,o)}catch(e){G(e,t.$hostElement$)}return null},en=t=>{const e=t.$hostElement$,n=t.l,o=t.L;on(n,"componentDidRender",void 0,e),64&t.u?on(n,"componentDidUpdate",void 0,e):(t.u|=64,sn(e),on(n,"componentDidLoad",void 0,e),t.T(e),o||nn()),t.W&&(t.W(),t.W=void 0),512&t.u&<((()=>Je(t,!1))),t.u&=-517},nn=()=>{var t;lt((()=>We(Y,"appload",{detail:{namespace:"feedlog-toolkit"}}))),(null==(t=K._)?void 0:t.size)&&K._.clear()},on=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){G(t,o)}},sn=t=>t.classList.add("hydrated"),rn=(t,e,n,o)=>{const s=D(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const i=s.$hostElement$,r=s.i.get(e),l=s.u,c=s.l;if(n=Pe(n,o.t[e][0]),!(8&l&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n))){if(s.i.set(e,n),o.D){const t=o.D[e];t&&t.map((t=>{try{const[[o,i]]=Object.entries(t);(128&l||1&i)&&(c?c[o](n,r,e):s.A.push((()=>{s.l[o](n,r,e)})))}catch(t){G(t,i)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,r,e))return;Je(s,!1)}}},ln=(t,e,n)=>{var o,s;const i=t.prototype;{t.watchers&&!e.D&&(e.D=t.watchers),t.deserializers&&!e.F&&(e.F=t.deserializers),t.serializers&&!e.U&&(e.U=t.serializers);const r=Object.entries(null!=(o=e.t)?o:{});if(r.map((([t,[o]])=>{if(31&o||2&n&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>D(this).i.get(e))(0,t);const n=D(this),o=n?n.l:i;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=D(this);if(i){if(r)return void 0===(32&o?this[t]:i.$hostElement$[t])&&i.i.get(t)&&(s=i.i.get(t)),r.call(this,Pe(s,o)),void rn(this,t,s=32&o?this[t]:i.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return rn(this,t,s,e),void(1&n&&!i.l&&i.A.push((()=>{4096&e.t[t][0]&&i.l[t]!==i.i.get(t)&&(i.l[t]=s)})));const r=()=>{const n=i.l[t];!i.i.get(t)&&n&&i.i.set(t,n),i.l[t]=Pe(s,o),rn(this,t,i.l[t],e)};i.l?r():i.A.push((()=>{r()}))}}}})}})),1&n){const n=new Map;i.attributeChangedCallback=function(t,o,s){K.jmp((()=>{var l;const c=n.get(t),f=D(this);if(this.hasOwnProperty(c)&&(s=this[c],delete this[c]),i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=null==f?void 0:f.u;if(f&&n&&!(8&n)&&s!==o){const i=f.l,r=null==(l=e.D)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=i[r]&&(128&n||1&l)&&i[r].call(i,s,o,t)}))}return}const u=r.find((([t])=>t===c));u&&4&u[1][0]&&(s=null!==s&&"false"!==s);const a=Object.getOwnPropertyDescriptor(i,c);s==this[c]||a.get&&!a.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.D)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const o=e[1]||t;return n.set(o,t),o}))]))}}return t},cn=(t,e)=>{on(t,"connectedCallback",void 0,e)},fn=t=>{if(!(1&K.u)){const e=D(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.u)(null==e?void 0:e.l)?cn(e.l,t):(null==e?void 0:e.G)&&e.G.then((()=>cn(e.l,t)));else{let o;if(e.u|=1,o=t.getAttribute(H),o){if(1&n.u){const e=ve(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,o)=>{var s,i,r,l;const c=t.shadowRoot,f=[],u=[],a=c?[]:null,h=ye(e,null);h.O=t,!Y.document||K._&&K._.size||Se(Y.document.body,K._=new Map),t[H]=n,t.removeAttribute(H),o.I=ke(h,f,[],a,t,t,n,u);let d=0;const p=f.length;let g;for(;d<p;d++){g=f[d];const n=g.M+"."+g.N,o=K._.get(n),i=g.O;if(c){if((null==(s=g.j)?void 0:(""+s).includes("-"))&&"slot-fb"!==g.j&&!g.O.shadowRoot){const e=D(g.O);if(e){const n=$e(e.o),o=Y.document.querySelector(`style[sty-id="${n}"]`);o&&t.shadowRoot.append(o.cloneNode(!0))}}}else i["s-hn"]=e.toUpperCase(),"slot"===g.j&&(i["s-cr"]=t["s-cr"]);"slot"===g.j&&(g.R=g.O["s-sn"]||g.O.name||null,g.k?(g.u|=2,g.O.childNodes.length||g.k.forEach((t=>{g.O.appendChild(t.O)}))):g.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(i,o.nextSibling),o.parentNode.removeChild(o),c||(i["s-oo"]=parseInt(g.N))),o&&!o["s-id"]&&K._.delete(n)}const v=[],$=u.length;let m,b,y,w,k=0,S=0;for(;k<$;k++)if(m=u[k],m&&m.length)for(y=m.length,b=0;b<y;b++){if(w=m[b],v[w.hostId]||(v[w.hostId]=K._.get(w.hostId)),!v[w.hostId])continue;const t=v[w.hostId];t.shadowRoot&&w.node.parentElement!==t&&t.insertBefore(w.node,null==(r=null==(i=m[b-1])?void 0:i.node)?void 0:r.nextSibling),t.shadowRoot&&c||(w.slot["s-cr"]||(w.slot["s-cr"]=t["s-cr"],w.slot["s-cr"]=!w.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),he(w.node,w.slot,0,w.node["s-oo"]||S),(null==(l=w.node.parentElement)?void 0:l.shadowRoot)&&w.node.getAttribute&&w.node.getAttribute("slot")&&w.node.removeAttribute("slot")),S=(w.node["s-oo"]||S)+1}if(c){let e=0;const n=a.length;if(n){for(;e<n;e++){const t=a[e];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,n.v,o,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){qe(e,e.L=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.V){const s=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.V;if(!o)return;const s=V.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(V.set(o,t),t[n])),(t=>{G(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.v}#${e.B}" was not found`);o.isProxied||(n.D=o.watchers,n.U=o.serializers,n.F=o.deserializers,ln(o,n,2),o.isProxied=!0);const i=()=>{};e.u|=8;try{new o(e)}catch(e){G(e,t)}e.u&=-9,e.u|=128,i(),cn(e.l,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=$e(n);if(!B.has(e)){const o=()=>{};ge(e,t,!!(1&n.u)),o()}}}const s=e.L,i=()=>Je(e,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(t,e,n)}o()}},un=(t,e)=>{on(t,"disconnectedCallback",void 0,e||t)},an=(t,e={})=>{var n;if(!Y.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],s=e.exclude||[],i=Y.customElements,r=Y.document.head,l=r.querySelector("meta[charset]"),c=Y.document.createElement("style"),f=[];let u,a=!0;Object.assign(K,e),K.h=new URL(e.resourcesUrl||"./",Y.document.baseURI).href,K.u|=2,(()=>{if(!Y.document)return;const t=Y.document.querySelectorAll(`[${Z}]`);let e=0;for(;e<t.length;e++)ge(t[e].getAttribute(Z),me(t[e].innerHTML),!0)})();let h=!1;if(t.map((t=>{t[1].map((e=>{var n,r,l;const c={u:e[0],v:e[1],t:e[2],H:e[3]};4&c.u&&(h=!0),c.t=e[2],c.D=null!=(n=e[4])?n:{},c.U=null!=(r=e[5])?r:{},c.F=null!=(l=e[6])?l:{};const d=c.v,p=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={u:0,$hostElement$:t,o:e,i:new Map,Z:new Map};n.G=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ae.call(t,c)}connectedCallback(){D(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),u&&(clearTimeout(u),u=null),a?f.push(this):K.jmp((()=>fn(this))))}disconnectedCallback(){K.jmp((()=>(async t=>{if(!(1&K.u)){const e=D(t);(null==e?void 0:e.l)?un(e.l,t):(null==e?void 0:e.G)&&e.G.then((()=>un(e.l,t)))}pe.has(t)&&pe.delete(t),t.shadowRoot&&pe.has(t.shadowRoot)&&pe.delete(t.shadowRoot)})(this))),K.raf((()=>{var t;const e=D(this);if(!e)return;const n=f.findIndex((t=>t===this));n>-1&&f.splice(n,1),(null==(t=null==e?void 0:e.I)?void 0:t.O)instanceof Node&&!e.I.O.isConnected&&delete e.I.O}))}componentOnReady(){var t;return null==(t=D(this))?void 0:t.G}};c.V=t[0],s.includes(d)||i.get(d)||(o.push(d),i.define(d,ln(p,c,1)))}))})),o.length>0&&(h&&(c.textContent+=J),c.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=K.p)?n:oe(Y.document);null!=t&&c.setAttribute("nonce",t),r.insertBefore(c,l?l.nextSibling:r.firstChild)}a=!1,f.length?f.map((t=>t.connectedCallback())):K.jmp((()=>u=setTimeout(nn,30)))},hn=t=>K.p=t;export{we as H,Ce as a,an as b,Re as c,t as g,be as h,Q as p,F as r,hn as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,a as i}from"./p-CHawAwGP.js";function o(t){if("string"!=typeof t)return"";let s=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return s=s.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),s=s.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),s=s.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),s=s.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),s=s.replace(/<(embed|object)\b[^<]*>/gi,""),s=s.replace(/javascript:/gi,""),s=s.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),s}class r extends Error{constructor(t,s,e){super(t),this.statusCode=s,this.originalError=e,this.name="FeedlogError",Object.setPrototypeOf(this,r.prototype)}}class n extends r{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,n.prototype)}}class h extends r{constructor(t,s,e){super(t,s,e),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,h.prototype)}}class a extends r{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,a.prototype)}}class u{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new n("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const s=this.buildIssuesUrl(t),e=await this.fetchWithTimeout(s,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!e.ok)throw new h(`Failed to fetch issues: ${e.statusText}`,e.status);const i=await e.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof r)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new h("Network error: Unable to reach API",void 0,t);throw new r(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new n("Issue ID is required");try{const s=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,e=await this.fetchWithTimeout(s,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===e.status)throw new h("Issue not found",404);if(401===e.status)throw new h("Unauthorized",401);if(403===e.status)throw new h("Forbidden: Domain not allowed for this repository",403);if(!e.ok)throw new h(`Failed to toggle upvote: ${e.statusText}`,e.status);const i=await e.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof r)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new h("Network error: Unable to reach API",void 0,t);throw new r(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const s=new URL(`${this.endpoint}/api/issues`);if(t.repositoryIds){const e=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of e)s.searchParams.append("repositoryIds",t)}return t.type&&s.searchParams.set("type",t.type),t.sortBy&&s.searchParams.set("sortBy",t.sortBy),t.cursor&&s.searchParams.set("cursor",t.cursor),void 0!==t.limit&&s.searchParams.set("limit",t.limit.toString()),s.toString()}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,s){const e=new AbortController,i=setTimeout((()=>e.abort()),this.timeout);try{const o=await fetch(t,{...s,signal:e.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new a(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new n("Invalid API response: expected object");const s=t;if(!Array.isArray(s.issues))throw new n("Invalid API response: issues must be an array");if(!s.pagination||"object"!=typeof s.pagination)throw new n("Invalid API response: pagination is required");return{issues:s.issues.map((t=>this.validateIssue(t))),pagination:{cursor:s.pagination.cursor,hasMore:Boolean(s.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new n("Invalid issue: expected object");const s=t;if("string"!=typeof s.id)throw new n("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(String(s.type)))throw new n('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(String(s.status)))throw new n('Invalid issue: status must be "open", "in_progress", or "closed"');if(!s.repository||"object"!=typeof s.repository)throw new n("Invalid issue: repository is required");const e=s.repository;if("string"!=typeof e.id)throw new n("Invalid issue: repository must have id");const i=null!==s.githubIssueLink&&"string"==typeof s.githubIssueLink?String(s.githubIssueLink):null,r=s.title,h=null!=r&&""!==r?o(String(r)):null,a=s.body,u=null!=a&&""!==a?o(String(a)):null,c=e.name,l=null!=c&&""!==c?String(c):null,d=e.description,p=null!=d&&""!==d?o(String(d)):null;return{id:String(s.id),githubIssueLink:i,type:s.type||"bug",status:s.status||"open",pinnedAt:s.pinnedAt?String(s.pinnedAt):null,revision:Number(s.revision)||1,title:h,body:u,repository:{id:String(e.id),name:l,description:p},updatedAt:String(s.updatedAt)||(new Date).toISOString(),createdAt:String(s.createdAt)||(new Date).toISOString(),upvoteCount:Number(s.upvoteCount)||0,hasUpvoted:Boolean(s.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new n("Invalid upvote response: expected object");const s=t;if("boolean"!=typeof s.upvoted)throw new n("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof s.upvoteCount)throw new n("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof s.anonymousUserId)throw new n("Invalid upvote response: anonymousUserId must be a string");return{upvoted:s.upvoted,upvoteCount:s.upvoteCount,anonymousUserId:s.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const c=class{constructor(e){t(this,e),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogError=s(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:s,currentUpvoted:e,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(s)||0)+1;this.upvoteRequestIds.set(s,o),this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:!e,upvoteCount:e?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(s);if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((e=>e.id===s?Object.assign(Object.assign({},e),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):e)),this.feedlogUpvote.emit({issueId:s,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:e,upvoteCount:i}):t));const r=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:r})}}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw new Error("API key is required for the Feedlog SDK");this.sdk=new u(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const s=t instanceof Error?t.message:"Failed to initialize SDK";this.error=s,this.feedlogError.emit({error:s})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Couldn't load updates";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,s;const i=null===(s=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===s?void 0:s.getPropertyValue("--feedlog-background");return e("feedlog-issues",{key:"15ae96d7d7b51964026f873f8b97e10530ed02b4",style:i?{"--feedlog-background":i}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}get el(){return i(this)}};export{c as feedlog_issues_client}
|
|
1
|
+
import{r as t,c as s,h as e,a as i}from"./p-CgNWSmzU.js";function o(t){if("string"!=typeof t)return"";let s=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return s=s.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),s=s.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),s=s.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),s=s.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),s=s.replace(/<(embed|object)\b[^<]*>/gi,""),s=s.replace(/javascript:/gi,""),s=s.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),s}class r extends Error{constructor(t,s,e){super(t),this.statusCode=s,this.originalError=e,this.name="FeedlogError",Object.setPrototypeOf(this,r.prototype)}}class n extends r{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,n.prototype)}}class h extends r{constructor(t,s,e){super(t,s,e),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,h.prototype)}}class a extends r{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,a.prototype)}}class u{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new n("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const s=this.buildIssuesUrl(t),e=await this.fetchWithTimeout(s,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!e.ok)throw new h(`Failed to fetch issues: ${e.statusText}`,e.status);const i=await e.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof r)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new h("Network error: Unable to reach API",void 0,t);throw new r(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new n("Issue ID is required");try{const s=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,e=await this.fetchWithTimeout(s,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===e.status)throw new h("Issue not found",404);if(401===e.status)throw new h("Unauthorized",401);if(403===e.status)throw new h("Forbidden: Domain not allowed for this repository",403);if(!e.ok)throw new h(`Failed to toggle upvote: ${e.statusText}`,e.status);const i=await e.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof r)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new h("Network error: Unable to reach API",void 0,t);throw new r(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const s=new URL(`${this.endpoint}/api/issues`);if(t.repositoryIds){const e=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of e)s.searchParams.append("repositoryIds",t)}return t.type&&s.searchParams.set("type",t.type),t.sortBy&&s.searchParams.set("sortBy",t.sortBy),t.cursor&&s.searchParams.set("cursor",t.cursor),void 0!==t.limit&&s.searchParams.set("limit",t.limit.toString()),s.toString()}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,s){const e=new AbortController,i=setTimeout((()=>e.abort()),this.timeout);try{const o=await fetch(t,{...s,signal:e.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new a(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new n("Invalid API response: expected object");const s=t;if(!Array.isArray(s.issues))throw new n("Invalid API response: issues must be an array");if(!s.pagination||"object"!=typeof s.pagination)throw new n("Invalid API response: pagination is required");return{issues:s.issues.map((t=>this.validateIssue(t))),pagination:{cursor:s.pagination.cursor,hasMore:Boolean(s.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new n("Invalid issue: expected object");const s=t;if("string"!=typeof s.id)throw new n("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(String(s.type)))throw new n('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(String(s.status)))throw new n('Invalid issue: status must be "open", "in_progress", or "closed"');if(!s.repository||"object"!=typeof s.repository)throw new n("Invalid issue: repository is required");const e=s.repository;if("string"!=typeof e.id)throw new n("Invalid issue: repository must have id");const i=null!==s.githubIssueLink&&"string"==typeof s.githubIssueLink?String(s.githubIssueLink):null,r=s.title,h=null!=r&&""!==r?o(String(r)):null,a=s.body,u=null!=a&&""!==a?o(String(a)):null,c=e.name,l=null!=c&&""!==c?String(c):null,d=e.description,p=null!=d&&""!==d?o(String(d)):null;return{id:String(s.id),githubIssueLink:i,type:s.type||"bug",status:s.status||"open",pinnedAt:s.pinnedAt?String(s.pinnedAt):null,revision:Number(s.revision)||1,title:h,body:u,repository:{id:String(e.id),name:l,description:p},updatedAt:String(s.updatedAt)||(new Date).toISOString(),createdAt:String(s.createdAt)||(new Date).toISOString(),upvoteCount:Number(s.upvoteCount)||0,hasUpvoted:Boolean(s.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new n("Invalid upvote response: expected object");const s=t;if("boolean"!=typeof s.upvoted)throw new n("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof s.upvoteCount)throw new n("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof s.anonymousUserId)throw new n("Invalid upvote response: anonymousUserId must be a string");return{upvoted:s.upvoted,upvoteCount:s.upvoteCount,anonymousUserId:s.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const c=class{constructor(e){t(this,e),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogError=s(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:s,currentUpvoted:e,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(s)||0)+1;this.upvoteRequestIds.set(s,o),this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:!e,upvoteCount:e?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(s);if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((e=>e.id===s?Object.assign(Object.assign({},e),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):e)),this.feedlogUpvote.emit({issueId:s,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:e,upvoteCount:i}):t));const r=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:r})}}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw new Error("API key is required for the Feedlog SDK");this.sdk=new u(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const s=t instanceof Error?t.message:"Failed to initialize SDK";this.error=s,this.feedlogError.emit({error:s})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Couldn't load updates";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,s;const i=null===(s=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===s?void 0:s.getPropertyValue("--feedlog-background");return e("feedlog-issues",{key:"15ae96d7d7b51964026f873f8b97e10530ed02b4",style:i?{"--feedlog-background":i}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}get el(){return i(this)}};export{c as feedlog_issues_client}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as d}from"./p-CgNWSmzU.js";const o=class{constructor(d){e(this,d),this.variant="default"}render(){return d("span",{key:"22e5d49e033459b4e3e409ffa0e76641457ad740",class:`badge badge-${this.variant}`},d("slot",{key:"8f986c5150aa39034f090a258231e45363f9cac9"}))}};o.style=":host{display:inline-block;--feedlog-badge-font-size:0.75rem;--feedlog-badge-font-weight:500;--feedlog-badge-padding-x:0.625rem;--feedlog-badge-padding-y:0.125rem;--feedlog-badge-border-radius:9999px;--feedlog-blue-bg:#eff6ff;--feedlog-blue-text:#1e40af;--feedlog-blue-bg-hover:#dbeafe;--feedlog-red-bg:#fef2f2;--feedlog-red-text:#991b1b;--feedlog-red-bg-hover:#fee2e2;--feedlog-muted-bg:#f1f5f9;--feedlog-muted-text:#475569;--feedlog-muted-bg-hover:#e2e8f0}:host(.dark){--feedlog-blue-bg:rgba(37, 99, 235, 0.15);--feedlog-blue-text:#93c5fd;--feedlog-blue-bg-hover:rgba(37, 99, 235, 0.25);--feedlog-red-bg:rgba(220, 38, 38, 0.15);--feedlog-red-text:#fca5a5;--feedlog-red-bg-hover:rgba(220, 38, 38, 0.25);--feedlog-muted-bg:oklch(0.32 0.01 260);--feedlog-muted-text:oklch(0.8 0.02 260);--feedlog-muted-bg-hover:oklch(0.38 0.01 260)}.badge{display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;font-size:var(--feedlog-badge-font-size);font-weight:var(--feedlog-badge-font-weight);padding:var(--feedlog-badge-padding-y) var(--feedlog-badge-padding-x);border-radius:var(--feedlog-badge-border-radius);white-space:nowrap;transition:background-color 0.2s ease, color 0.2s ease;font-family:inherit;border:1px solid transparent}.badge-default{background-color:var(--feedlog-blue-bg);color:var(--feedlog-blue-text)}.badge-default:hover{background-color:var(--feedlog-blue-bg-hover)}.badge-enhancement{background-color:var(--feedlog-blue-bg);color:var(--feedlog-blue-text)}.badge-enhancement:hover{background-color:var(--feedlog-blue-bg-hover)}.badge-destructive{background-color:var(--feedlog-red-bg);color:var(--feedlog-red-text)}.badge-destructive:hover{background-color:var(--feedlog-red-bg-hover)}.badge-secondary{background-color:var(--feedlog-muted-bg);color:var(--feedlog-muted-text)}.badge-secondary:hover{background-color:var(--feedlog-muted-bg-hover)}";export{o as feedlog_badge}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as o,h as t,H as s}from"./p-
|
|
1
|
+
import{r as e,c as o,h as t,H as s}from"./p-CgNWSmzU.js";const d=class{constructor(t){e(this,t),this.feedlogUpvote=o(this,"feedlogUpvote"),this.feedlogLoadMore=o(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderErrorIcon(){return t("svg",{class:"error-icon",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),t("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))}renderIssuesList(){var e,o;return t("feedlog-issues-list",{issues:this.issues,limit:this.limit,theme:this.currentTheme,getIssueUrl:this.getIssueUrl,emptyStateTitle:null!==(e=this.emptyStateTitle)&&void 0!==e?e:"No updates yet",emptyStateMessage:null!==(o=this.emptyStateMessage)&&void 0!==o?o:"Check back later for new updates.",onFeedlogUpvote:e=>this.handleUpvote(e)})}render(){return t(s,{key:"96686863c5eb831e64993c681c7780e035c0e2b2",class:"dark"===this.currentTheme?"dark":""},t("div",{key:"54d01678053f4fe58eb547f9954f497402495a83",class:"issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&t("header",{key:"889aa47cb4ceea60ca4a5615f512793d726059d9",class:"issues-header"},t("div",{key:"8b4ac6a9ed0c6120ec838a1329416f3471cd2751",class:"header-content"},this.heading&&t("h1",{key:"cfc52f28bc5131715a5c7a0b9231e440b4c0b67c",class:"issues-title"},this.heading),this.subtitle&&t("p",{key:"8b4488546ceb6e807d689b8fca2b2fd85722f824",class:"issues-subtitle"},this.subtitle))),this.loading&&t("div",{key:"35c382f4417893c17951b73dedb12452e805668c",class:"loading-state",role:"status","aria-label":"Loading issues"},t("div",{key:"2d83dd9d40bf7b2a14744ee4a715108a9cdebd60",class:"loading-skeletons"},[1,2,3].map((e=>t("div",{key:e,class:"skeleton-card"},t("div",{class:"skeleton-content"},t("div",{class:"skeleton-header"},t("div",{class:"skeleton-badge"}),t("div",{class:"skeleton-timestamp"})),t("div",{class:"skeleton-main"},t("div",{class:"skeleton-title"}),t("div",{class:"skeleton-body"},t("div",{class:"skeleton-line"}),t("div",{class:"skeleton-line short"})),t("div",{class:"skeleton-repo"})),t("div",{class:"skeleton-footer"},t("div",{class:"skeleton-upvote"})))))))),this.error&&t("div",{key:"43efd42ce0d213131ba97d42d1f98c52515ea9fd",class:"error-state",role:"alert"},t("div",{key:"ad22b0378e290556c896c628dadabf6091bbf972",class:"error-state-content"},this.renderErrorIcon(),t("h2",{key:"9a9779f52de12aa2241ba9ddda6cf8297a4af84d",class:"error-state-title"},"Something went wrong"),t("p",{key:"c697040d37909d882730e5d9ab3a3b147061fc51",class:"error-state-message"},this.error))),!this.loading&&!this.error&&t("div",{key:"afc12552ff7ccc808c7191c1dd1e26d3b95bf2fd"},this.renderIssuesList(),this.hasMore&&t("div",{key:"0f6c84bdeda386e4eec439fb80f4ee1606b9b559",class:"load-more-container"},t("feedlog-button",{key:"e6983bd889a6cdfd4a4b8a06f3a6a97c2d276243",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}};d.style=":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-theme-bg:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-padding:2rem;--feedlog-min-height:100%;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-theme-bg:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3)}.issues-container{min-height:var(--feedlog-min-height);background-color:var(--feedlog-background, var(--feedlog-theme-bg, #ffffff));padding:var(--feedlog-padding);margin:0 auto;border-radius:var(--feedlog-radius)}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}";export{d as feedlog_issues}
|
|
@@ -6,6 +6,7 @@ import type { FeedlogIssue as FeedlogIssueType } from '@feedlog-ai/core';
|
|
|
6
6
|
* A component for displaying a single GitHub issue.
|
|
7
7
|
*/
|
|
8
8
|
export declare class FeedlogIssueComponent {
|
|
9
|
+
host: HTMLElement;
|
|
9
10
|
/**
|
|
10
11
|
* The issue to display
|
|
11
12
|
*/
|
|
@@ -27,6 +28,10 @@ export declare class FeedlogIssueComponent {
|
|
|
27
28
|
currentUpvoted: boolean;
|
|
28
29
|
currentCount: number;
|
|
29
30
|
}>;
|
|
31
|
+
componentDidLoad(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
|
+
private handleMediaSlotChange;
|
|
34
|
+
private updateMediaVisibility;
|
|
30
35
|
private handleUpvote;
|
|
31
36
|
/**
|
|
32
37
|
* Renders the pin icon SVG (Lucide/Feather style)
|