@feedlog-ai/webcomponents 0.0.41 → 0.0.43

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/hydrate/index.js CHANGED
@@ -5082,6 +5082,15 @@ class FeedlogCard {
5082
5082
  }; }
5083
5083
  }
5084
5084
 
5085
+ /**
5086
+ * Libraries such as isomorphic-dompurify's browser shim reference `self` at load time.
5087
+ * Node (SSR, Vite dev server) does not define `self`; align with `globalThis` before those modules run.
5088
+ */
5089
+ if (typeof globalThis !== 'undefined' &&
5090
+ typeof globalThis.self === 'undefined') {
5091
+ globalThis.self = globalThis;
5092
+ }
5093
+
5085
5094
  /**
5086
5095
  * marked v17.0.2 - a markdown parser
5087
5096
  * Copyright (c) 2018-2026, MarkedJS. (MIT License)
@@ -5154,7 +5163,7 @@ ${e}</tr>
5154
5163
  `}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>${O(e,true)}</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),i=X(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+O(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=X(e);if(i===null)return O(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${O(t)}"`),s+=">",s}text(e){return "tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:O(e.text)}};var $=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}};var b=class u{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $;}static parse(e,t){return new u(t).parse(e)}static parseInline(e,t){return new u(t).parseInline(e)}parse(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let s=r,a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==false||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=a||"";continue}}let i=r;switch(i.type){case "space":{t+=this.renderer.space(i);break}case "hr":{t+=this.renderer.hr(i);break}case "heading":{t+=this.renderer.heading(i);break}case "code":{t+=this.renderer.code(i);break}case "table":{t+=this.renderer.table(i);break}case "blockquote":{t+=this.renderer.blockquote(i);break}case "list":{t+=this.renderer.list(i);break}case "checkbox":{t+=this.renderer.checkbox(i);break}case "html":{t+=this.renderer.html(i);break}case "def":{t+=this.renderer.def(i);break}case "paragraph":{t+=this.renderer.paragraph(i);break}case "text":{t+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==false||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}let s=i;switch(s.type){case "escape":{n+=t.text(s);break}case "html":{n+=t.html(s);break}case "link":{n+=t.link(s);break}case "image":{n+=t.image(s);break}case "checkbox":{n+=t.checkbox(s);break}case "strong":{n+=t.strong(s);break}case "em":{n+=t.em(s);break}case "codespan":{n+=t.codespan(s);break}case "br":{n+=t.br(s);break}case "del":{n+=t.del(s);break}case "text":{n+=t.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}};var P=class{options;block;constructor(e){this.options=e||T;}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?x.lex:x.lexInline}provideParser(){return this.block?b.parse:b.parseInline}};var B=class{defaults=M();options=this.setOptions;parse=this.parseMarkdown(true);parseInline=this.parseMarkdown(false);Parser=b;Renderer=y;TextRenderer=$;Lexer=x;Tokenizer=w;Hooks=P;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 i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case "list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t));}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)));}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||false,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===false&&(o=s.apply(this,a)),o}:t.renderers[i.name]=i.renderer;}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]));}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens);}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new y(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c||""};}r.renderer=i;}if(n.tokenizer){let i=this.defaults.tokenizer||new w(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.tokenizer=i;}if(n.hooks){let i=this.defaults.hooks||new P;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];P.passThroughHooks.has(s)?i[a]=p=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(s))return (async()=>{let d=await o.call(i,p);return l.call(i,d)})();let c=o.call(i,p);return l.call(i,c)}:i[a]=(...p)=>{if(this.defaults.async)return (async()=>{let d=await o.apply(i,p);return d===false&&(d=await l.apply(i,p)),d})();let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.hooks=i;}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o};}this.defaults={...this.defaults,...r};}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return x.lex(e,t??this.defaults)}parser(e,t){return b.parse(e,t??this.defaults)}parseMarkdown(e){return (n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===true&&i.async===false)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return (async()=>{let o=s.hooks?await s.hooks.preprocess(n):n,p=await(s.hooks?await s.hooks.provideLexer():e?x.lex:x.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(p):p;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():e?b.parse:b.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let l=(s.hooks?s.hooks.provideLexer():e?x.lex:x.lexInline)(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():e?b.parse:b.parseInline)(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(e,t){return n=>{if(n.message+=`
5155
5164
  Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+O(n.message+"",true)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}};var L=new B;function g(u,e){return L.parse(u,e)}g.options=g.setOptions=function(u){return L.setOptions(u),g.defaults=L.defaults,H(g.defaults),g};g.getDefaults=M;g.defaults=T;g.use=function(...u){return L.use(...u),g.defaults=L.defaults,H(g.defaults),g};g.walkTokens=function(u,e){return L.walkTokens(u,e)};g.parseInline=L.parseInline;g.Parser=b;g.parser=b.parse;g.Renderer=y;g.TextRenderer=$;g.Lexer=x;g.lexer=x.lex;g.Tokenizer=w;g.Hooks=P;g.parse=g;
5156
5165
 
5157
- /*! @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 */
5166
+ /*! @license DOMPurify 3.3.3 | (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.3/LICENSE */
5158
5167
 
5159
5168
  const {
5160
5169
  entries,
@@ -5452,7 +5461,7 @@ const _createHooksMap = function _createHooksMap() {
5452
5461
  function createDOMPurify() {
5453
5462
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
5454
5463
  const DOMPurify = root => createDOMPurify(root);
5455
- DOMPurify.version = '3.3.1';
5464
+ DOMPurify.version = '3.3.3';
5456
5465
  DOMPurify.removed = [];
5457
5466
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
5458
5467
  // Not running in a browser, provide a factory function
@@ -5747,7 +5756,7 @@ function createDOMPurify() {
5747
5756
  /* Parse profile info */
5748
5757
  if (USE_PROFILES) {
5749
5758
  ALLOWED_TAGS = addToSet({}, text);
5750
- ALLOWED_ATTR = [];
5759
+ ALLOWED_ATTR = create(null);
5751
5760
  if (USE_PROFILES.html === true) {
5752
5761
  addToSet(ALLOWED_TAGS, html$1);
5753
5762
  addToSet(ALLOWED_ATTR, html);
@@ -5768,6 +5777,13 @@ function createDOMPurify() {
5768
5777
  addToSet(ALLOWED_ATTR, xml);
5769
5778
  }
5770
5779
  }
5780
+ /* Prevent function-based ADD_ATTR / ADD_TAGS from leaking across calls */
5781
+ if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) {
5782
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
5783
+ }
5784
+ if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) {
5785
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
5786
+ }
5771
5787
  /* Merge configuration parameters */
5772
5788
  if (cfg.ADD_TAGS) {
5773
5789
  if (typeof cfg.ADD_TAGS === 'function') {
@@ -6165,6 +6181,10 @@ function createDOMPurify() {
6165
6181
  */
6166
6182
  // eslint-disable-next-line complexity
6167
6183
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
6184
+ /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
6185
+ if (FORBID_ATTR[lcName]) {
6186
+ return false;
6187
+ }
6168
6188
  /* Make sure attribute cannot clobber */
6169
6189
  if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
6170
6190
  return false;
@@ -6257,7 +6277,7 @@ function createDOMPurify() {
6257
6277
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
6258
6278
  }
6259
6279
  /* Work around a security issue with comments inside attributes */
6260
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
6280
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
6261
6281
  _removeAttribute(name, currentNode);
6262
6282
  continue;
6263
6283
  }
package/hydrate/index.mjs CHANGED
@@ -5080,6 +5080,15 @@ class FeedlogCard {
5080
5080
  }; }
5081
5081
  }
5082
5082
 
5083
+ /**
5084
+ * Libraries such as isomorphic-dompurify's browser shim reference `self` at load time.
5085
+ * Node (SSR, Vite dev server) does not define `self`; align with `globalThis` before those modules run.
5086
+ */
5087
+ if (typeof globalThis !== 'undefined' &&
5088
+ typeof globalThis.self === 'undefined') {
5089
+ globalThis.self = globalThis;
5090
+ }
5091
+
5083
5092
  /**
5084
5093
  * marked v17.0.2 - a markdown parser
5085
5094
  * Copyright (c) 2018-2026, MarkedJS. (MIT License)
@@ -5152,7 +5161,7 @@ ${e}</tr>
5152
5161
  `}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>${O(e,true)}</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),i=X(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+O(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=X(e);if(i===null)return O(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${O(t)}"`),s+=">",s}text(e){return "tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:O(e.text)}};var $=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}};var b=class u{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $;}static parse(e,t){return new u(t).parse(e)}static parseInline(e,t){return new u(t).parseInline(e)}parse(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let s=r,a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==false||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=a||"";continue}}let i=r;switch(i.type){case "space":{t+=this.renderer.space(i);break}case "hr":{t+=this.renderer.hr(i);break}case "heading":{t+=this.renderer.heading(i);break}case "code":{t+=this.renderer.code(i);break}case "table":{t+=this.renderer.table(i);break}case "blockquote":{t+=this.renderer.blockquote(i);break}case "list":{t+=this.renderer.list(i);break}case "checkbox":{t+=this.renderer.checkbox(i);break}case "html":{t+=this.renderer.html(i);break}case "def":{t+=this.renderer.def(i);break}case "paragraph":{t+=this.renderer.paragraph(i);break}case "text":{t+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==false||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}let s=i;switch(s.type){case "escape":{n+=t.text(s);break}case "html":{n+=t.html(s);break}case "link":{n+=t.link(s);break}case "image":{n+=t.image(s);break}case "checkbox":{n+=t.checkbox(s);break}case "strong":{n+=t.strong(s);break}case "em":{n+=t.em(s);break}case "codespan":{n+=t.codespan(s);break}case "br":{n+=t.br(s);break}case "del":{n+=t.del(s);break}case "text":{n+=t.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}};var P=class{options;block;constructor(e){this.options=e||T;}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?x.lex:x.lexInline}provideParser(){return this.block?b.parse:b.parseInline}};var B=class{defaults=M();options=this.setOptions;parse=this.parseMarkdown(true);parseInline=this.parseMarkdown(false);Parser=b;Renderer=y;TextRenderer=$;Lexer=x;Tokenizer=w;Hooks=P;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 i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case "list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t));}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)));}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||false,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===false&&(o=s.apply(this,a)),o}:t.renderers[i.name]=i.renderer;}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]));}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens);}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new y(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c||""};}r.renderer=i;}if(n.tokenizer){let i=this.defaults.tokenizer||new w(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.tokenizer=i;}if(n.hooks){let i=this.defaults.hooks||new P;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];P.passThroughHooks.has(s)?i[a]=p=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(s))return (async()=>{let d=await o.call(i,p);return l.call(i,d)})();let c=o.call(i,p);return l.call(i,c)}:i[a]=(...p)=>{if(this.defaults.async)return (async()=>{let d=await o.apply(i,p);return d===false&&(d=await l.apply(i,p)),d})();let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.hooks=i;}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o};}this.defaults={...this.defaults,...r};}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return x.lex(e,t??this.defaults)}parser(e,t){return b.parse(e,t??this.defaults)}parseMarkdown(e){return (n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===true&&i.async===false)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return (async()=>{let o=s.hooks?await s.hooks.preprocess(n):n,p=await(s.hooks?await s.hooks.provideLexer():e?x.lex:x.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(p):p;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():e?b.parse:b.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let l=(s.hooks?s.hooks.provideLexer():e?x.lex:x.lexInline)(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():e?b.parse:b.parseInline)(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(e,t){return n=>{if(n.message+=`
5153
5162
  Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+O(n.message+"",true)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}};var L=new B;function g(u,e){return L.parse(u,e)}g.options=g.setOptions=function(u){return L.setOptions(u),g.defaults=L.defaults,H(g.defaults),g};g.getDefaults=M;g.defaults=T;g.use=function(...u){return L.use(...u),g.defaults=L.defaults,H(g.defaults),g};g.walkTokens=function(u,e){return L.walkTokens(u,e)};g.parseInline=L.parseInline;g.Parser=b;g.parser=b.parse;g.Renderer=y;g.TextRenderer=$;g.Lexer=x;g.lexer=x.lex;g.Tokenizer=w;g.Hooks=P;g.parse=g;
5154
5163
 
5155
- /*! @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 */
5164
+ /*! @license DOMPurify 3.3.3 | (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.3/LICENSE */
5156
5165
 
5157
5166
  const {
5158
5167
  entries,
@@ -5450,7 +5459,7 @@ const _createHooksMap = function _createHooksMap() {
5450
5459
  function createDOMPurify() {
5451
5460
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
5452
5461
  const DOMPurify = root => createDOMPurify(root);
5453
- DOMPurify.version = '3.3.1';
5462
+ DOMPurify.version = '3.3.3';
5454
5463
  DOMPurify.removed = [];
5455
5464
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
5456
5465
  // Not running in a browser, provide a factory function
@@ -5745,7 +5754,7 @@ function createDOMPurify() {
5745
5754
  /* Parse profile info */
5746
5755
  if (USE_PROFILES) {
5747
5756
  ALLOWED_TAGS = addToSet({}, text);
5748
- ALLOWED_ATTR = [];
5757
+ ALLOWED_ATTR = create(null);
5749
5758
  if (USE_PROFILES.html === true) {
5750
5759
  addToSet(ALLOWED_TAGS, html$1);
5751
5760
  addToSet(ALLOWED_ATTR, html);
@@ -5766,6 +5775,13 @@ function createDOMPurify() {
5766
5775
  addToSet(ALLOWED_ATTR, xml);
5767
5776
  }
5768
5777
  }
5778
+ /* Prevent function-based ADD_ATTR / ADD_TAGS from leaking across calls */
5779
+ if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) {
5780
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
5781
+ }
5782
+ if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) {
5783
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
5784
+ }
5769
5785
  /* Merge configuration parameters */
5770
5786
  if (cfg.ADD_TAGS) {
5771
5787
  if (typeof cfg.ADD_TAGS === 'function') {
@@ -6163,6 +6179,10 @@ function createDOMPurify() {
6163
6179
  */
6164
6180
  // eslint-disable-next-line complexity
6165
6181
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
6182
+ /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
6183
+ if (FORBID_ATTR[lcName]) {
6184
+ return false;
6185
+ }
6166
6186
  /* Make sure attribute cannot clobber */
6167
6187
  if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
6168
6188
  return false;
@@ -6255,7 +6275,7 @@ function createDOMPurify() {
6255
6275
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
6256
6276
  }
6257
6277
  /* Work around a security issue with comments inside attributes */
6258
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
6278
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
6259
6279
  _removeAttribute(name, currentNode);
6260
6280
  continue;
6261
6281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedlog-ai/webcomponents",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "Stencil web components for Feedlog Toolkit - Data visualization components",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -66,7 +66,7 @@
66
66
  "clean": "rm -rf dist loader"
67
67
  },
68
68
  "dependencies": {
69
- "@feedlog-ai/core": "^0.0.41",
69
+ "@feedlog-ai/core": "^0.0.43",
70
70
  "dompurify": "^3.3.1",
71
71
  "marked": "^17.0.2"
72
72
  },
@@ -1,3 +0,0 @@
1
- import{t as e,p as t,H as n,c as r,h as o,a as i}from"./index.js";import{d as a}from"./p-DzATWlAC.js";var s={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function l(e){s=e}var c={exec:()=>null};function u(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(f.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var d=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),f={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+|$)/,p=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,g=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,m=u(g).replace(/bull/g,p).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(),b=u(g).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",v).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),w=u(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),y="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$=u("^ {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",S).replace("tag",y).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A=u(k).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",y).getRegex(),_={blockquote:u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:$,lheading:m,list:w,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:A,table:c,text:/^[^\n]+/},T=u("^ *([^\\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",y).getRegex(),z={..._,lheading:b,table:T,paragraph:u(k).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",T).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex()},R={..._,html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",S).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:c,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(k).replace("hr",h).replace("heading"," *#{1,6} *[^\n]").replace("lheading",m).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},E=/^( {2,}|\\)\n(?!\s*$)/,P=/[\p{P}\p{S}]/u,L=/[\s\p{P}\p{S}]/u,M=/[^\s\p{P}\p{S}]/u,D=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,L).getRegex(),C=/(?!~)[\p{P}\p{S}]/u,I=/(?![*_])[\p{P}\p{S}]/u,O=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",d?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),q=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,B=u(q,"u").replace(/punct/g,P).getRegex(),F=u(q,"u").replace(/punct/g,C).getRegex(),j="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N=u(j,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,L).replace(/punct/g,P).getRegex(),U=u(j,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,C).getRegex(),H=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,L).replace(/punct/g,P).getRegex(),Z=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,I).getRegex(),W=u("^[^~]+(?=[^~])|(?!~)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,I).getRegex(),Y=u(/\\(punct)/,"gu").replace(/punct/g,P).getRegex(),G=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),X=u(S).replace("(?:--\x3e|$)","--\x3e").getRegex(),V=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",X).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Q=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=u(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",v).getRegex(),ee=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",v).getRegex(),te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ne={_backpedal:c,anyPunctuation:Y,autolink:G,blockSkip:O,br:E,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:c,delLDelim:c,delRDelim:c,emStrongLDelim:B,emStrongRDelimAst:N,emStrongRDelimUnd:H,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Q,nolink:ee,punctuation:D,reflink:J,reflinkSearch:u("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",ee).getRegex(),tag:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:c},re={...ne,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",K).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K).getRegex()},oe={...ne,emStrongRDelimAst:U,emStrongLDelim:F,delLDelim:Z,delRDelim:W,url:u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",te).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",te).getRegex()},ie={...oe,br:u(E).replace("{2,}","*").getRegex(),text:u(oe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ae={normal:_,gfm:z,pedantic:R},se={normal:ne,gfm:oe,breaks:ie,pedantic:re},le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ce=e=>le[e];function ue(e,t){if(t){if(f.escapeTest.test(e))return e.replace(f.escapeReplace,ce)}else if(f.escapeTestNoEncode.test(e))return e.replace(f.escapeReplaceNoEncode,ce);return e}function de(e){try{e=encodeURI(e).replace(f.percentDecode,"%")}catch{return null}return e}function fe(e,t){let n=e.replace(f.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(f.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(f.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 pe(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 ge(e,t,n,r,o){let i=t.href,a=t.title||null,s=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}var me=class{options;rules;lexer;constructor(e){this.options=e||s}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 s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,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="",s="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=pe(t[2].split("\n",1)[0],t[1].length),c=e.split("\n",1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):u?d=t[1].length+1:(d=l.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.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),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let h,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),h=c):h=c.replace(this.rules.other.tabCharGlobal," "),o.test(c)||i.test(c)||a.test(c)||f.test(c)||t.test(c)||n.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+h.slice(d);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||i.test(l)||n.test(l))break;s+="\n"+c}u=!c.trim(),r+=p+"\n",e=e.substring(p.length+1),l=h.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(s),loose:!1,text:s,tokens:[]}),o.raw+=r}let s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.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=fe(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(fe(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)),ge(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 ge(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,s=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;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)continue;if(o=[...n].length,r[3]||r[4]){a+=o;continue}if((r[5]||r[6])&&i%3&&!((i+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);let t=[...r[0]][0].length,l=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,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,s=this.rules.inline.delRDelim;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||(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,s=e.slice(0,i+r.index+t+o),l=s.slice(i,-i);return{type:"del",raw:s,text:l,tokens:this.lexer.inlineTokens(l)}}}}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}}},be=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new me,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:f,block:ae.normal,inline:se.normal};this.options.pedantic?(t.block=ae.pedantic,t.inline=se.pedantic):this.options.gfm&&(t.block=ae.gfm,t.inline=this.options.breaks?se.breaks:se.gfm),this.tokenizer.rules=t}static get rules(){return{block:ae,inline:se}}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(f.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(f.tabCharGlobal," ").replace(f.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}},ke=class{options;parser;constructor(e){this.options=e||s}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(f.notSpaceStart)?.[0],o=e.replace(f.endingNewline,"")+"\n";return r?'<pre><code class="language-'+ue(r)+'">'+(n?o:ue(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:ue(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>${ue(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=de(e);if(null===o)return r;let i='<a href="'+(e=o)+'"';return t&&(i+=' title="'+ue(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=de(e);if(null===o)return ue(n);let i=`<img src="${e=o}" alt="${n}"`;return t&&(i+=` title="${ue(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ue(e.text)}},ve=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},xe=class e{options;renderer;textRenderer;constructor(e){this.options=e||s,this.options.renderer=this.options.renderer||new ke,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ve}static parse(t,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}},we=class{options;block;constructor(e){this.options=e||s}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?be.lex:be.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},ye=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=xe;Renderer=ke;TextRenderer=ve;Lexer=be;Tokenizer=me;Hooks=we;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 ke(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 me(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 we;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]=we.passThroughHooks.has(n)?e=>{if(this.defaults.async&&we.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 be.lex(e,t??this.defaults)}parser(e,t){return xe.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?be.lex:be.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?xe.parse:xe.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?be.lex:be.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?xe.parse:xe.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>"+ue(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Se(e,t){return ye.parse(e,t)}Se.options=Se.setOptions=function(e){return ye.setOptions(e),l(Se.defaults=ye.defaults),Se},Se.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Se.defaults=s,Se.use=function(...e){return ye.use(...e),l(Se.defaults=ye.defaults),Se},Se.walkTokens=function(e,t){return ye.walkTokens(e,t)},Se.parseInline=ye.parseInline,Se.Parser=xe,Se.parser=xe.parse,Se.Renderer=ke,Se.TextRenderer=ve,Se.Lexer=be,Se.lexer=be.lex,Se.Tokenizer=me,Se.Hooks=we,Se.parse=Se;
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:$e,setPrototypeOf:Ae,isFrozen:_e,getPrototypeOf:Te,getOwnPropertyDescriptor:ze}=Object;let{freeze:Re,seal:Ee,create:Pe}=Object,{apply:Le,construct:Me}="undefined"!=typeof Reflect&&Reflect;Re||(Re=function(e){return e}),Ee||(Ee=function(e){return e}),Le||(Le=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)}),Me||(Me=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 De=Xe(Array.prototype.forEach),Ce=Xe(Array.prototype.lastIndexOf),Ie=Xe(Array.prototype.pop),Oe=Xe(Array.prototype.push),qe=Xe(Array.prototype.splice),Be=Xe(String.prototype.toLowerCase),Fe=Xe(String.prototype.toString),je=Xe(String.prototype.match),Ne=Xe(String.prototype.replace),Ue=Xe(String.prototype.indexOf),He=Xe(String.prototype.trim),Ze=Xe(Object.prototype.hasOwnProperty),We=Xe(RegExp.prototype.test),Ye=(Ge=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Me(Ge,t)});var Ge;function Xe(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 Le(e,t,r)}}function Ve(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be;Ae&&Ae(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(_e(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Ke(e){for(let t=0;t<e.length;t++)Ze(e,t)||(e[t]=null);return e}function Qe(e){const t=Pe(null);for(const[n,r]of $e(e))Ze(e,n)&&(t[n]=Array.isArray(r)?Ke(r):r&&"object"==typeof r&&r.constructor===Object?Qe(r):r);return t}function Je(e,t){for(;null!==e;){const n=ze(e,t);if(n){if(n.get)return Xe(n.get);if("function"==typeof n.value)return Xe(n.value)}e=Te(e)}return function(){return null}}const et=Re(["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"]),tt=Re(["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"]),nt=Re(["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"]),rt=Re(["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"]),ot=Re(["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"]),it=Re(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),at=Re(["#text"]),st=Re(["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=Re(["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"]),ct=Re(["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"]),ut=Re(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dt=Ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ft=Ee(/<%[\w\W]*|[\w\W]*%>/gm),ht=Ee(/\$\{[\w\W]*/gm),pt=Ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),gt=Ee(/^aria-[\-\w]+$/),mt=Ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bt=Ee(/^(?:\w+script|data):/i),kt=Ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vt=Ee(/^html$/i),xt=Ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var wt=Object.freeze({__proto__:null,ARIA_ATTR:gt,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:xt,DATA_ATTR:pt,DOCTYPE_NAME:vt,ERB_EXPR:ft,IS_ALLOWED_URI:mt,IS_SCRIPT_OR_DATA:bt,MUSTACHE_EXPR:dt,TMPLIT_EXPR:ht});const yt=function(){return"undefined"==typeof window?null:window};var St=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt();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:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:p}=t,g=c.prototype,m=Je(g,"cloneNode"),b=Je(g,"remove"),k=Je(g,"nextSibling"),v=Je(g,"childNodes"),x=Je(g,"parentNode");if("function"==typeof s){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:T}=o;let z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof $e&&"function"==typeof x&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:R,ERB_EXPR:E,TMPLIT_EXPR:P,DATA_ATTR:L,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:C,CUSTOM_ELEMENT:I}=wt;let{IS_ALLOWED_URI:O}=wt,q=null;const B=Ve({},[...et,...tt,...nt,...ot,...at]);let F=null;const j=Ve({},[...st,...lt,...ct,...ut]);let N=Object.seal(Pe(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(Pe(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,se=!1,le={},ce=null;const ue=Ve({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const fe=Ve({},["audio","video","img","source","image","track"]);let he=null;const pe=Ve({},["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=Ve({},[ge,me,be],Fe);let ye=Ve({},["mi","mo","mn","ms","mtext"]),Se=Ve({},["annotation-xml"]);const Ae=Ve({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let ze=null,Ee=null;const Le=r.createElement("form"),Me=function(e){return e instanceof RegExp||e instanceof Function},Ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=Qe(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ze="application/xhtml+xml"===_e?Fe:Be,q=Ze(e,"ALLOWED_TAGS")?Ve({},e.ALLOWED_TAGS,ze):B,F=Ze(e,"ALLOWED_ATTR")?Ve({},e.ALLOWED_ATTR,ze):j,xe=Ze(e,"ALLOWED_NAMESPACES")?Ve({},e.ALLOWED_NAMESPACES,Fe):we,he=Ze(e,"ADD_URI_SAFE_ATTR")?Ve(Qe(pe),e.ADD_URI_SAFE_ATTR,ze):pe,de=Ze(e,"ADD_DATA_URI_TAGS")?Ve(Qe(fe),e.ADD_DATA_URI_TAGS,ze):fe,ce=Ze(e,"FORBID_CONTENTS")?Ve({},e.FORBID_CONTENTS,ze):ue,U=Ze(e,"FORBID_TAGS")?Ve({},e.FORBID_TAGS,ze):Qe({}),H=Ze(e,"FORBID_ATTR")?Ve({},e.FORBID_ATTR,ze):Qe({}),le=!!Ze(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,se=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||mt,ke=e.NAMESPACE||be,ye=e.MATHML_TEXT_INTEGRATION_POINTS||ye,Se=e.HTML_INTEGRATION_POINTS||Se,N=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(N.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(Y=!1),ne&&(te=!0),le&&(q=Ve({},at),F=[],!0===le.html&&(Ve(q,et),Ve(F,st)),!0===le.svg&&(Ve(q,tt),Ve(F,lt),Ve(F,ut)),!0===le.svgFilters&&(Ve(q,nt),Ve(F,lt),Ve(F,ut)),!0===le.mathMl&&(Ve(q,ot),Ve(F,ct),Ve(F,ut))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Z.tagCheck=e.ADD_TAGS:(q===B&&(q=Qe(q)),Ve(q,e.ADD_TAGS,ze))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Z.attributeCheck=e.ADD_ATTR:(F===j&&(F=Qe(F)),Ve(F,e.ADD_ATTR,ze))),e.ADD_URI_SAFE_ATTR&&Ve(he,e.ADD_URI_SAFE_ATTR,ze),e.FORBID_CONTENTS&&(ce===ue&&(ce=Qe(ce)),Ve(ce,e.FORBID_CONTENTS,ze)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Qe(ce)),Ve(ce,e.ADD_FORBID_CONTENTS,ze)),ae&&(q["#text"]=!0),Q&&Ve(q,["html","head","body"]),q.table&&(Ve(q,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ye('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(""));Re&&Re(e),Ee=e}},Xe=Ve({},[...tt,...nt,...rt]),Ke=Ve({},[...ot,...it]),dt=function(e){Oe(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},ft=function(e,t){try{Oe(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Oe(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ht=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=je(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 h).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)},gt=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof l&&e instanceof l};function kt(e,t,r){De(e,(e=>{e.call(n,t,r,Ee)}))}const xt=function(e){let t=null;if(kt(z.beforeSanitizeElements,e,null),gt(e))return dt(e),!0;const r=ze(e.nodeName);if(kt(z.uponSanitizeElement,e,{tagName:r,allowedTags:q}),K&&e.hasChildNodes()&&!bt(e.firstElementChild)&&We(/<[/\w!]/g,e.innerHTML)&&We(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(K&&8===e.nodeType&&We(/<[/\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(N.tagNameCheck instanceof RegExp&&We(N.tagNameCheck,r))return!1;if(N.tagNameCheck instanceof Function&&N.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=Be(e.tagName),r=Be(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(Xe[n]):e.namespaceURI===ge?t.namespaceURI===be?"math"===n:t.namespaceURI===me?"math"===n&&Se[r]:Boolean(Ke[n]):e.namespaceURI===be?!(t.namespaceURI===me&&!Se[r])&&!(t.namespaceURI===ge&&!ye[r])&&!Ke[n]&&(Ae[n]||!Xe[n]):!("application/xhtml+xml"!==_e||!xe[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!We(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&3===e.nodeType&&(t=e.textContent,De([R,E,P],(e=>{t=Ne(t,e," ")})),e.textContent!==t&&(Oe(n.removed,{element:e.cloneNode()}),e.textContent=t)),kt(z.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in Le))return!1;if(Y&&!H[t]&&We(L,t));else if(W&&We(M,t));else if(Z.attributeCheck instanceof Function&&Z.attributeCheck(t,e));else if(!F[t]||H[t]){if(!($t(e)&&(N.tagNameCheck instanceof RegExp&&We(N.tagNameCheck,e)||N.tagNameCheck instanceof Function&&N.tagNameCheck(e))&&(N.attributeNameCheck instanceof RegExp&&We(N.attributeNameCheck,t)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(t,e))||"is"===t&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&We(N.tagNameCheck,n)||N.tagNameCheck instanceof Function&&N.tagNameCheck(n))))return!1}else if(he[t]);else if(We(O,Ne(n,C,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ue(n,"data:")||!de[e])if(G&&!We(D,Ne(n,C,"")));else if(n)return!1;return!0},$t=function(e){return"annotation-xml"!==e&&je(e,I)},At=function(e){kt(z.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||gt(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:s,value:l}=i,c=ze(a),u=l;let d="value"===a?u:He(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,kt(z.uponSanitizeAttribute,e,r),d=r.attrValue,!ie||"id"!==c&&"name"!==c||(ft(a,e),d="user-content-"+d),K&&We(/((--!?|])>)|<\/(style|title|textarea)/i,d)){ft(a,e);continue}if("attributename"===c&&je(d,"href")){ft(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ft(a,e);continue}if(!X&&We(/\/>/i,d)){ft(a,e);continue}V&&De([R,E,P],(e=>{d=Ne(d,e," ")}));const f=ze(e.nodeName);if(St(f,c,d)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(s);else switch(p.getAttributeType(f,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),gt(e)?dt(e):Ie(n.removed)}catch(t){ft(a,e)}}else ft(a,e)}kt(z.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null;const r=pt(t);for(kt(z.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)kt(z.uponSanitizeShadowNode,n,null),xt(n),At(n),n.content instanceof a&&e(n.content);kt(z.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw Ye("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ye("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Ge(t),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=ze(e.nodeName);if(!q[t]||U[t])throw Ye("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=ht("\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=ht(e),!r)return te?null:re?y:""}r&&ee&&dt(r.firstChild);const u=pt(se?e:r);for(;s=u.nextNode();)xt(s),At(s),s.content instanceof a&&_t(s.content);if(se)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=T.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&&We(vt,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),V&&De([R,E,P],(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(){Ee=null,J=!1},n.isValidAttribute=function(e,t,n){Ee||Ge({});const r=ze(e),o=ze(t);return St(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Oe(z[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ce(z[e],t);return-1===n?void 0:qe(z[e],n,1)[0]}return Ie(z[e])},n.removeHooks=function(e){z[e]=[]},n.removeAllHooks=function(){z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),$t=Object.freeze({__proto__:null,default:St});function At(e){if(null==e||""===e)return"";const t=Se.parse(e,{gfm:!0,breaks:!0,async:!1});if("string"!=typeof t)throw new Error("marked.parse returned a Promise; async markdown is not supported");return St.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=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=r(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 o("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"},o("path",{d:"M12 17v5"}),o("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 o("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"},o("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 o("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"},o("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),o("polyline",{points:"15 3 21 3 21 9"}),o("line",{x1:"10",y1:"14",x2:"21",y2:"3"}))}render(){var e,t;const{issue:n,issueUrl:r}=this;if(!n)return null;const a=new Date(n.updatedAt).getTime()>new Date(n.createdAt).getTime(),s=a?"Updated":"Created",l=a?n.updatedAt:n.createdAt,c=a?`Updated: ${n.updatedAt}`:`Created: ${n.createdAt}`,u=null!==(e=n.title)&&void 0!==e?e:"Untitled",d=n.repository.name,f=null!=d&&""!==d&&"unnamed repository"!==d.toLowerCase()?d:null,h=null!=n.repository.description&&""!==n.repository.description?n.repository.description:void 0,p=this.getStatusBadgeLabel(),g=null!==(t=n.githubIssueLink)&&void 0!==t?t:r,m=null!=g&&""!==g;return o(i,{class:"dark"===this.theme?"dark":"","data-upvoted":n.hasUpvoted?"true":"false"},o("div",{class:`issue-card issue-type-${n.type}`},o("div",{class:"issue-media",part:"media"},o("slot",{name:"media"})),o("div",{class:"issue-content"},o("div",{class:"issue-main"},o("div",{class:"issue-header-top"},o("div",{class:"issue-badges"},"bug"===n.type?o("feedlog-badge",{variant:"destructive"},"Bug"):o("feedlog-badge",{variant:"enhancement"},"Enhancement"),p&&o("feedlog-badge",{variant:"secondary"},p)),o("div",{class:"issue-meta-right"},n.pinnedAt&&o("div",{class:"pinned-indicator",title:"Pinned issue"},this.renderPinIcon()),o("span",{class:"issue-timestamp",title:c},s," ",this.formatDate(l)))),o("h3",{class:"issue-title"},u),null!=n.body&&""!==n.body&&o("div",{class:"issue-body",innerHTML:At(n.body)}),(null!=f||m||"bug"!==n.type)&&o("div",{class:"issue-footer"},(null!=f||m)&&o("div",{class:"issue-footer-meta"},null!=f&&o("span",{class:"repo-name",title:h},f),m&&o("a",{part:"github-link",class:"github-link",href:g,target:"_blank",rel:"noopener noreferrer",title:"View on GitHub"},this.renderExternalLinkIcon(),o("span",{class:"github-link-text"},"View on GitHub"))),"bug"!==n.type&&o("button",{part:"upvote-button",class:"upvote-button "+(n.hasUpvoted?"upvoted":""),onClick:e=>this.handleUpvote(e),title:n.hasUpvoted?"Remove upvote":"Upvote this issue"},o("div",{class:"upvote-action"},o("slot",{name:"upvote-icon"},this.renderUpvoteIcon(n.hasUpvoted)),o("span",{class:"upvote-label"},"Upvote")),o("div",{class:"reel-container"},o("span",{class:"upvote-count reel-number",key:n.upvoteCount},n.upvoteCount))))))))}get host(){return this}static get style(){return":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)}"}},[257,"feedlog-issue",{issue:[16],issueUrl:[1,"issue-url"],theme:[1]}]);function Tt(){"undefined"!=typeof customElements&&["feedlog-issue","feedlog-badge"].forEach((t=>{switch(t){case"feedlog-issue":customElements.get(e(t))||customElements.define(e(t),_t);break;case"feedlog-badge":customElements.get(e(t))||a()}}))}Tt();export{_t as F,Tt as d,$t as p}
@@ -1,2 +0,0 @@
1
- /*! @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 */
2
- const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;r||(r=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return e.apply(t,i)}),c||(c=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});const u=A(Array.prototype.forEach),f=A(Array.prototype.lastIndexOf),p=A(Array.prototype.pop),m=A(Array.prototype.push),d=A(Array.prototype.splice),g=A(String.prototype.toLowerCase),h=A(String.prototype.toString),y=A(String.prototype.match),b=A(String.prototype.replace),w=A(String.prototype.indexOf),x=A(String.prototype.trim),v=A(Object.prototype.hasOwnProperty),T=A(RegExp.prototype.test),k=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(S,t)});var S;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return s(e,t,i)}}function E(e,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;t&&t(e,null);let r=i.length;for(;r--;){let t=i[r];if("string"==typeof t){const e=o(t);e!==t&&(n(i)||(i[r]=e),t=e)}e[t]=!0}return e}function _(e){for(let t=0;t<e.length;t++)v(e,t)||(e[t]=null);return e}function R(t){const n=l(null);for(const[i,o]of e(t))v(t,i)&&(n[i]=Array.isArray(o)?_(o):o&&"object"==typeof o&&o.constructor===Object?R(o):o);return n}function z(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=i(e)}return function(){return null}}const O=r(["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"]),D=r(["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"]),L=r(["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"]),M=r(["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"]),F=r(["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"]),I=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=r(["#text"]),N=r(["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"]),C=r(["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"]),j=r(["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"]),U=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\$\{[\w\W]*/gm),q=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=a(/^(?:\w+script|data):/i),G=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:V,DATA_ATTR:q,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:B,TMPLIT_EXPR:H});const Q=function(){return"undefined"==typeof window?null:window};var Z=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const i=e=>t(e);if(i.version="3.3.1",i.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return i.isSupported=!1,i;let{document:o}=n;const a=o,s=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:S,Node:A,Element:_,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:q,trustedTypes:Y}=n,$=_.prototype,G=z($,"cloneNode"),V=z($,"remove"),Z=z($,"nextSibling"),ee=z($,"childNodes"),te=z($,"parentNode");if("function"==typeof S){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ne,ie="";const{implementation:oe,createNodeIterator:re,createDocumentFragment:ae,getElementsByTagName:le}=o,{importNode:se}=a;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof e&&"function"==typeof te&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:fe,TMPLIT_EXPR:pe,DATA_ATTR:me,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:ye}=J;let{IS_ALLOWED_URI:be}=J,we=null;const xe=E({},[...O,...D,...L,...F,...P]);let ve=null;const Te=E({},[...N,...C,...j,...U]);let ke=Object.seal(l(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}})),Se=null,Ae=null;const Ee=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,Re=!0,ze=!1,Oe=!0,De=!1,Le=!0,Me=!1,Fe=!1,Ie=!1,Pe=!1,Ne=!1,Ce=!1,je=!0,Ue=!1,Be=!0,We=!1,He={},qe=null;const Ye=E({},["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 Xe=null;const $e=E({},["audio","video","img","source","image","track"]);let Ge=null;const Ke=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Ze=Qe,et=!1,tt=null;const nt=E({},[Ve,Je,Qe],h);let it=E({},["mi","mo","mn","ms","mtext"]),ot=E({},["annotation-xml"]);const rt=E({},["title","style","font","a","script"]);let at=null;const lt=["application/xhtml+xml","text/html"];let st=null,ct=null;const ut=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=R(e),at=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,st="application/xhtml+xml"===at?h:g,we=v(e,"ALLOWED_TAGS")?E({},e.ALLOWED_TAGS,st):xe,ve=v(e,"ALLOWED_ATTR")?E({},e.ALLOWED_ATTR,st):Te,tt=v(e,"ALLOWED_NAMESPACES")?E({},e.ALLOWED_NAMESPACES,h):nt,Ge=v(e,"ADD_URI_SAFE_ATTR")?E(R(Ke),e.ADD_URI_SAFE_ATTR,st):Ke,Xe=v(e,"ADD_DATA_URI_TAGS")?E(R($e),e.ADD_DATA_URI_TAGS,st):$e,qe=v(e,"FORBID_CONTENTS")?E({},e.FORBID_CONTENTS,st):Ye,Se=v(e,"FORBID_TAGS")?E({},e.FORBID_TAGS,st):R({}),Ae=v(e,"FORBID_ATTR")?E({},e.FORBID_ATTR,st):R({}),He=!!v(e,"USE_PROFILES")&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,je=!1!==e.SANITIZE_DOM,Ue=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,Ze=e.NAMESPACE||Qe,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,ot=e.HTML_INTEGRATION_POINTS||ot,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Re=!1),Ne&&(Pe=!0),He&&(we=E({},P),ve=[],!0===He.html&&(E(we,O),E(ve,N)),!0===He.svg&&(E(we,D),E(ve,C),E(ve,U)),!0===He.svgFilters&&(E(we,L),E(ve,C),E(ve,U)),!0===He.mathMl&&(E(we,F),E(ve,j),E(ve,U))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ee.tagCheck=e.ADD_TAGS:(we===xe&&(we=R(we)),E(we,e.ADD_TAGS,st))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ee.attributeCheck=e.ADD_ATTR:(ve===Te&&(ve=R(ve)),E(ve,e.ADD_ATTR,st))),e.ADD_URI_SAFE_ATTR&&E(Ge,e.ADD_URI_SAFE_ATTR,st),e.FORBID_CONTENTS&&(qe===Ye&&(qe=R(qe)),E(qe,e.FORBID_CONTENTS,st)),e.ADD_FORBID_CONTENTS&&(qe===Ye&&(qe=R(qe)),E(qe,e.ADD_FORBID_CONTENTS,st)),Be&&(we["#text"]=!0),Me&&E(we,["html","head","body"]),we.table&&(E(we,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,ie=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));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}}(Y,s)),null!==ne&&"string"==typeof ie&&(ie=ne.createHTML(""));r&&r(e),ct=e}},mt=E({},[...D,...L,...M]),dt=E({},[...F,...I]),gt=function(e){m(i.removed,{element:e});try{te(e).removeChild(e)}catch(t){V(e)}},ht=function(e,t){try{m(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ne)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=y(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Ze===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=ne?ne.createHTML(e):e;if(Ze===Qe)try{t=(new q).parseFromString(i,at)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=et?ie:i}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),Ze===Qe?le.call(t,Me?"html":"body")[0]:Me?t.documentElement:r},bt=function(e){return re.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof H&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof A&&e instanceof A};function vt(e,t,n){u(e,(e=>{e.call(i,t,n,ct)}))}const Tt=function(e){let t=null;if(vt(ce.beforeSanitizeElements,e,null),wt(e))return gt(e),!0;const n=st(e.nodeName);if(vt(ce.uponSanitizeElement,e,{tagName:n,allowedTags:we}),Le&&e.hasChildNodes()&&!xt(e.firstElementChild)&&T(/<[/\w!]/g,e.innerHTML)&&T(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Le&&8===e.nodeType&&T(/<[/\w]/g,e.data))return gt(e),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(n))&&(!we[n]||Se[n])){if(!Se[n]&&St(n)){if(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,n))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))return!1}if(Be&&!qe[n]){const t=te(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t)for(let i=n.length-1;i>=0;--i){const o=G(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,Z(e))}}return gt(e),!0}return e instanceof _&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=g(e.tagName),i=g(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Je?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===i||it[i]):Boolean(mt[n]):e.namespaceURI===Ve?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Je?"math"===n&&ot[i]:Boolean(dt[n]):e.namespaceURI===Qe?!(t.namespaceURI===Je&&!ot[i])&&!(t.namespaceURI===Ve&&!it[i])&&!dt[n]&&(rt[n]||!mt[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,u([ue,fe,pe],(e=>{t=b(t,e," ")})),e.textContent!==t&&(m(i.removed,{element:e.cloneNode()}),e.textContent=t)),vt(ce.afterSanitizeElements,e,null),!1):(gt(e),!0)},kt=function(e,t,n){if(je&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Re&&!Ae[t]&&T(me,t));else if(_e&&T(de,t));else if(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(t,e));else if(!ve[t]||Ae[t]){if(!(St(e)&&(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&T(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t,e))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ge[t]);else if(T(be,b(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!Xe[e])if(ze&&!T(ge,b(n,he,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&y(e,ye)},At=function(e){vt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||wt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0};let o=t.length;for(;o--;){const r=t[o],{name:a,namespaceURI:l,value:s}=r,c=st(a),f=s;let m="value"===a?f:x(f);if(n.attrName=c,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,vt(ce.uponSanitizeAttribute,e,n),m=n.attrValue,!Ue||"id"!==c&&"name"!==c||(ht(a,e),m="user-content-"+m),Le&&T(/((--!?|])>)|<\/(style|title|textarea)/i,m)){ht(a,e);continue}if("attributename"===c&&y(m,"href")){ht(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){ht(a,e);continue}if(!Oe&&T(/\/>/i,m)){ht(a,e);continue}De&&u([ue,fe,pe],(e=>{m=b(m,e," ")}));const d=st(e.nodeName);if(kt(d,c,m)){if(ne&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(d,c)){case"TrustedHTML":m=ne.createHTML(m);break;case"TrustedScriptURL":m=ne.createScriptURL(m)}if(m!==f)try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),wt(e)?gt(e):p(i.removed)}catch(t){ht(a,e)}}else ht(a,e)}vt(ce.afterSanitizeAttributes,e,null)},Et=function e(t){let n=null;const i=bt(t);for(vt(ce.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)vt(ce.uponSanitizeShadowNode,n,null),Tt(n),At(n),n.content instanceof c&&e(n.content);vt(ce.afterSanitizeShadowDOM,t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,r=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Fe||pt(t),i.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=st(e.nodeName);if(!we[t]||Se[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof A)n=yt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Pe&&!De&&!Me&&-1===e.indexOf("<"))return ne&&Ce?ne.createHTML(e):e;if(n=yt(e),!n)return Pe?null:Ce?ie:""}n&&Ie&&gt(n.firstChild);const s=bt(We?e:n);for(;r=s.nextNode();)Tt(r),At(r),r.content instanceof c&&Et(r.content);if(We)return e;if(Pe){if(Ne)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ve.shadowroot||ve.shadowrootmode)&&(l=se.call(a,l,!0)),l}let f=Me?n.outerHTML:n.innerHTML;return Me&&we["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(K,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),De&&u([ue,fe,pe],(e=>{f=b(f,e," ")})),ne&&Ce?ne.createHTML(f):f},i.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},i.clearConfig=function(){ct=null,Fe=!1},i.isValidAttribute=function(e,t,n){ct||pt({});const i=st(e),o=st(t);return kt(i,o,n)},i.addHook=function(e,t){"function"==typeof t&&m(ce[e],t)},i.removeHook=function(e,t){if(void 0!==t){const n=f(ce[e],t);return-1===n?void 0:d(ce[e],n,1)[0]}return p(ce[e])},i.removeHooks=function(e){ce[e]=[]},i.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}(),ee=Object.freeze({__proto__:null,default:Z});export{Z as a,ee as p}