@lemoncat7/dsh-knowledge 0.7.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +16 -15
  2. package/cordis.patch.yml +0 -1
  3. package/docs/architecture.md +37 -19
  4. package/docs/document-knowledge-design.zh-CN.md +2 -2
  5. package/docs/requirements.md +9 -5
  6. package/lib/api.js +5 -1
  7. package/lib/api.js.map +1 -1
  8. package/lib/client.d.ts +6 -0
  9. package/lib/client.d.ts.map +1 -0
  10. package/lib/client.js +224 -171
  11. package/lib/client.js.map +3 -3
  12. package/lib/config.d.ts +2 -0
  13. package/lib/config.d.ts.map +1 -1
  14. package/lib/config.js +5 -3
  15. package/lib/config.js.map +1 -1
  16. package/lib/documents/markdown.d.ts +33 -0
  17. package/lib/documents/markdown.d.ts.map +1 -0
  18. package/lib/documents/markdown.js +91 -0
  19. package/lib/documents/markdown.js.map +1 -0
  20. package/lib/documents/path.d.ts +4 -0
  21. package/lib/documents/path.d.ts.map +1 -0
  22. package/lib/documents/path.js +11 -0
  23. package/lib/documents/path.js.map +1 -0
  24. package/lib/documents/store.d.ts +32 -0
  25. package/lib/documents/store.d.ts.map +1 -0
  26. package/lib/documents/store.js +272 -0
  27. package/lib/documents/store.js.map +1 -0
  28. package/lib/domain.d.ts +2 -0
  29. package/lib/domain.d.ts.map +1 -1
  30. package/lib/domain.js +6 -0
  31. package/lib/domain.js.map +1 -1
  32. package/lib/extraction.d.ts.map +1 -1
  33. package/lib/extraction.js +210 -73
  34. package/lib/extraction.js.map +1 -1
  35. package/lib/index.d.ts +1 -1
  36. package/lib/index.d.ts.map +1 -1
  37. package/lib/index.js +9 -6
  38. package/lib/index.js.map +1 -1
  39. package/lib/local-provider.d.ts +2 -0
  40. package/lib/local-provider.d.ts.map +1 -1
  41. package/lib/local-provider.js +145 -79
  42. package/lib/local-provider.js.map +1 -1
  43. package/lib/recall.d.ts +7 -2
  44. package/lib/recall.d.ts.map +1 -1
  45. package/lib/recall.js +46 -30
  46. package/lib/recall.js.map +1 -1
  47. package/lib/retrieval.d.ts +14 -4
  48. package/lib/retrieval.d.ts.map +1 -1
  49. package/lib/retrieval.js +133 -25
  50. package/lib/retrieval.js.map +1 -1
  51. package/lib/theme-bridge.d.ts +23 -0
  52. package/lib/theme-bridge.d.ts.map +1 -0
  53. package/lib/theme-bridge.js +72 -0
  54. package/lib/theme-bridge.js.map +1 -0
  55. package/lib/tools.d.ts.map +1 -1
  56. package/lib/tools.js +165 -7
  57. package/lib/tools.js.map +1 -1
  58. package/lib/web-markdown-preview.d.ts +3 -0
  59. package/lib/web-markdown-preview.d.ts.map +1 -0
  60. package/lib/web-markdown-preview.js +24 -0
  61. package/lib/web-markdown-preview.js.map +1 -0
  62. package/lib/web.d.ts +1 -1
  63. package/lib/web.d.ts.map +1 -1
  64. package/lib/web.js +21 -10
  65. package/lib/web.js.map +1 -1
  66. package/package.json +16 -3
  67. package/web/app.js +338 -359
  68. package/web/index.html +1 -0
  69. package/web/markdown-preview.js +72 -0
  70. package/web/styles.css +177 -200
package/web/index.html CHANGED
@@ -10,6 +10,7 @@
10
10
  <meta name="dsh-knowledge-web" content="__DSH_KNOWLEDGE_WEB_PATH__">
11
11
  <title>DSH 知识库</title>
12
12
  <link rel="stylesheet" href="__DSH_KNOWLEDGE_WEB_PATH__/styles.css?v=__DSH_KNOWLEDGE_ASSET_VERSION__">
13
+ <script src="__DSH_KNOWLEDGE_WEB_PATH__/markdown-preview.js?v=__DSH_KNOWLEDGE_ASSET_VERSION__"></script>
13
14
  <script type="module" src="__DSH_KNOWLEDGE_WEB_PATH__/app.js?v=__DSH_KNOWLEDGE_ASSET_VERSION__"></script>
14
15
  </head>
15
16
  <body>
@@ -0,0 +1,72 @@
1
+ "use strict";var DshKnowledgeMarkdown=(()=>{var Et=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var vr=Object.prototype.hasOwnProperty;var Ur=(t,e)=>{for(var n in e)Et(t,n,{get:e[n],enumerable:!0})},Fr=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $r(e))!vr.call(t,s)&&s!==n&&Et(t,s,{get:()=>e[s],enumerable:!(i=zr(e,s))||i.enumerable});return t};var Br=t=>Fr(Et({},"__esModule",{value:!0}),t);var xi={};Ur(xi,{renderMarkdown:()=>Ti});function An(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Hr(t){if(Array.isArray(t))return t}function Gr(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,s,o,c,a=[],h=!0,f=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(h=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);h=!0);}catch(b){f=!0,s=b}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(f)throw s}}return a}}function Wr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(t,e){return Hr(t)||Gr(t,e)||jr(t,e)||Wr()}function jr(t,e){if(t){if(typeof t=="string")return An(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(t,e):void 0}}var Fn=Object.entries,En=Object.setPrototypeOf,Yr=Object.isFrozen,Zr=Object.getPrototypeOf,Xr=Object.getOwnPropertyDescriptor,D=Object.freeze,P=Object.seal,Se=Object.create,Bn=typeof Reflect<"u"&&Reflect,Ct=Bn.apply,Nt=Bn.construct;D||(D=function(e){return e});P||(P=function(e){return e});Ct||(Ct=function(e,n){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return e.apply(n,s)});Nt||(Nt=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return new e(...i)});var fe=I(Array.prototype.forEach),Qr=I(Array.prototype.lastIndexOf),Rn=I(Array.prototype.pop),Me=I(Array.prototype.push),Vr=I(Array.prototype.splice),Ae=Array.isArray,ve=I(String.prototype.toLowerCase),Rt=I(String.prototype.toString),Ln=I(String.prototype.match),ze=I(String.prototype.replace),On=I(String.prototype.indexOf),Kr=I(String.prototype.trim),Jr=I(Number.prototype.toString),es=I(Boolean.prototype.toString),In=typeof BigInt>"u"?null:I(BigInt.prototype.toString),Dn=typeof Symbol>"u"?null:I(Symbol.prototype.toString),F=I(Object.prototype.hasOwnProperty),$e=I(Object.prototype.toString),N=I(RegExp.prototype.test),he=ts(TypeError);function I(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return Ct(t,e,i)}}function ts(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Nt(t,n)}}function _(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve;if(En&&En(t,null),!Ae(e))return t;let i=e.length;for(;i--;){let s=e[i];if(typeof s=="string"){let o=n(s);o!==s&&(Yr(e)||(e[i]=o),s=o)}t[s]=!0}return t}function ns(t){for(let e=0;e<t.length;e++)F(t,e)||(t[e]=null);return t}function H(t){let e=Se(null);for(let i of Fn(t)){var n=qr(i,2);let s=n[0],o=n[1];F(t,s)&&(Ae(o)?e[s]=ns(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=H(o):e[s]=o)}return e}function rs(t){switch(typeof t){case"string":return t;case"number":return Jr(t);case"boolean":return es(t);case"bigint":return In?In(t):"0";case"symbol":return Dn?Dn(t):"Symbol()";case"undefined":return $e(t);case"function":case"object":{if(t===null)return $e(t);let e=t,n=q(e,"toString");if(typeof n=="function"){let i=n(e);return typeof i=="string"?i:$e(i)}return $e(t)}default:return $e(t)}}function q(t,e){for(;t!==null;){let i=Xr(t,e);if(i){if(i.get)return I(i.get);if(typeof i.value=="function")return I(i.value)}t=Zr(t)}function n(){return null}return n}function ss(t){try{return N(t,""),!0}catch{return!1}}var Pn=D(["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"]),Lt=D(["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"]),Ot=D(["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"]),is=D(["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"]),It=D(["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"]),os=D(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cn=D(["#text"]),Nn=D(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Dt=D(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Mn=D(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),nt=D(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ls=P(/{{[\w\W]*|^[\w\W]*}}/g),as=P(/<%[\w\W]*|^[\w\W]*%>/g),cs=P(/\${[\w\W]*/g),us=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),ps=P(/^aria-[\-\w]+$/),zn=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hs=P(/^(?:\w+script|data):/i),fs=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gs=P(/^html$/i),ds=P(/^[a-z][.\w]*(-[.\w]+)+$/i),$n=P(/<[/\w!]/g),vn=P(/<[/\w]/g),ms=P(/<\/no(script|embed|frames)/i),ks=P(/\/>/i),B={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hn=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],bs=D(_({},Hn)),Ts=(function(){let t={};return fe(Hn,e=>{t[e]=P(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),D(t)})(),xs=function(){return typeof window>"u"?null:window},_s=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null,s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(i=n.getAttribute(s));let o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Un=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oe=function(e,n,i,s){return F(e,n)&&Ae(e[n])?_(s.base?H(s.base):{},e[n],s.transform):i},Pt=function(e,n,i){let s=F(e,n)?e[n]:void 0;return s&&typeof s=="object"?H(s):i()};function Gn(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xs(),e=p=>Gn(p);if(e.version="3.4.14",e.removed=[],!t||!t.document||t.document.nodeType!==B.document||!t.Element)return e.isSupported=!1,e;let n=t.document,i=n,s=i.currentScript;t.DocumentFragment;let o=t.HTMLTemplateElement,c=t.Node,a=t.Element,h=t.NodeFilter,f=t.NamedNodeMap;f===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let b=t.DOMParser,m=t.trustedTypes,x=a.prototype,C=q(x,"cloneNode"),w=q(x,"remove"),G=q(x,"nextSibling"),W=q(x,"childNodes"),ee=q(x,"parentNode"),Le=q(x,"shadowRoot"),Oe=q(x,"attributes"),te=c&&c.prototype?q(c.prototype,"nodeType"):null,Z=c&&c.prototype?q(c.prototype,"nodeName"):null,X=c&&c.prototype?q(c.prototype,"ownerDocument"):null,Ie=function(r){return te?te(r):r.nodeType},at=function(r){return Z?Z(r):r.nodeName};if(typeof o=="function"){let p=n.createElement("template");p.content&&p.content.ownerDocument&&(n=p.content.ownerDocument)}let $,ae="",ct,jt=!1,De=0,Yt=function(){if(De>0)throw he('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ke=function(r){Yt(),De++;try{return $.createHTML(r)}finally{De--}},ar=function(r){Yt(),De++;try{return $.createScriptURL(r)}finally{De--}},cr=function(){return jt||(ct=_s(m,s),jt=!0),ct},Ge=n,ut=Ge.implementation,Zt=Ge.createNodeIterator,ur=Ge.createDocumentFragment,pr=Ge.getElementsByTagName,hr=i.importNode,A=Un();e.isSupported=typeof Fn=="function"&&typeof ee=="function"&&ut&&ut.createHTMLDocument!==void 0;let fr=ls,gr=as,dr=cs,mr=us,kr=ps,br=hs,Xt=fs,Tr=ds,Qt=zn,E=null,pt=_({},[...Pn,...Lt,...Ot,...It,...Cn]),R=null,ht=_({},[...Nn,...Dt,...Mn,...nt]),Q=Object.seal(Se(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}})),Pe=null,Vt=null,re=Object.seal(Se(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Kt=!0,ft=!0,Jt=!1,en=!0,se=!1,ce=!0,ue=!1,gt=!1,We=null,qe=null,dt=!1,be=!1,je=!1,Ye=!1,tn=!0,nn=!1,rn="user-content-",mt=!0,kt=!1,Te={},xe=null,sn=_({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),on=null,ln=_({},["audio","video","img","source","image","track"]),an=null,cn=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",V="http://www.w3.org/1999/xhtml",_e=V,bt=!1,Tt=null,xr=_({},[Ze,Xe,V],Rt),un=D(["mi","mo","mn","ms","mtext"]),xt=_({},un),pn=D(["annotation-xml"]),_t=_({},pn),_r=_({},["title","style","font","a","script"]),Ce=null,wr=["application/xhtml+xml","text/html"],yr="text/html",O=null,we=null,Sr=n.createElement("form"),hn=function(r){return r instanceof RegExp||r instanceof Function},wt=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(we&&we===r)return;(!r||typeof r!="object")&&(r={}),r=H(r),Ce=wr.indexOf(r.PARSER_MEDIA_TYPE)===-1?yr:r.PARSER_MEDIA_TYPE,O=Ce==="application/xhtml+xml"?Rt:ve,E=oe(r,"ALLOWED_TAGS",pt,{transform:O}),R=oe(r,"ALLOWED_ATTR",ht,{transform:O}),Tt=oe(r,"ALLOWED_NAMESPACES",xr,{transform:Rt}),an=oe(r,"ADD_URI_SAFE_ATTR",cn,{transform:O,base:cn}),on=oe(r,"ADD_DATA_URI_TAGS",ln,{transform:O,base:ln}),xe=oe(r,"FORBID_CONTENTS",sn,{transform:O}),Pe=oe(r,"FORBID_TAGS",H({}),{transform:O}),Vt=oe(r,"FORBID_ATTR",H({}),{transform:O}),Te=F(r,"USE_PROFILES")?r.USE_PROFILES&&typeof r.USE_PROFILES=="object"?H(r.USE_PROFILES):r.USE_PROFILES:!1,Kt=r.ALLOW_ARIA_ATTR!==!1,ft=r.ALLOW_DATA_ATTR!==!1,Jt=r.ALLOW_UNKNOWN_PROTOCOLS||!1,en=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=r.SAFE_FOR_TEMPLATES||!1,ce=r.SAFE_FOR_XML!==!1,ue=r.WHOLE_DOCUMENT||!1,be=r.RETURN_DOM||!1,je=r.RETURN_DOM_FRAGMENT||!1,Ye=r.RETURN_TRUSTED_TYPE||!1,dt=r.FORCE_BODY||!1,tn=r.SANITIZE_DOM!==!1,nn=r.SANITIZE_NAMED_PROPS||!1,mt=r.KEEP_CONTENT!==!1,kt=r.IN_PLACE||!1,Qt=ss(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:zn,_e=typeof r.NAMESPACE=="string"?r.NAMESPACE:V,xt=Pt(r,"MATHML_TEXT_INTEGRATION_POINTS",()=>_({},un)),_t=Pt(r,"HTML_INTEGRATION_POINTS",()=>_({},pn));let l=Pt(r,"CUSTOM_ELEMENT_HANDLING",()=>Se(null));if(Q=Se(null),F(l,"tagNameCheck")&&hn(l.tagNameCheck)&&(Q.tagNameCheck=l.tagNameCheck),F(l,"attributeNameCheck")&&hn(l.attributeNameCheck)&&(Q.attributeNameCheck=l.attributeNameCheck),F(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),P(Q),se&&(ft=!1),je&&(be=!0),Te&&(E=_({},Cn),R=Se(null),Te.html===!0&&(_(E,Pn),_(R,Nn)),Te.svg===!0&&(_(E,Lt),_(R,Dt),_(R,nt)),Te.svgFilters===!0&&(_(E,Ot),_(R,Dt),_(R,nt)),Te.mathMl===!0&&(_(E,It),_(R,Mn),_(R,nt))),re.tagCheck=null,re.attributeCheck=null,F(r,"ADD_TAGS")&&(typeof r.ADD_TAGS=="function"?re.tagCheck=r.ADD_TAGS:Ae(r.ADD_TAGS)&&(E===pt&&(E=H(E)),_(E,r.ADD_TAGS,O))),F(r,"ADD_ATTR")&&(typeof r.ADD_ATTR=="function"?re.attributeCheck=r.ADD_ATTR:Ae(r.ADD_ATTR)&&(R===ht&&(R=H(R)),_(R,r.ADD_ATTR,O))),F(r,"ADD_FORBID_CONTENTS")&&Ae(r.ADD_FORBID_CONTENTS)&&(xe===sn&&(xe=H(xe)),_(xe,r.ADD_FORBID_CONTENTS,O)),mt&&(E["#text"]=!0),ue&&_(E,["html","head","body"]),E.table&&(_(E,["tbody"]),delete Pe.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let u=$;$=r.TRUSTED_TYPES_POLICY;try{ae=ke("")}catch(g){throw $=u,g}}else r.TRUSTED_TYPES_POLICY===null?($=void 0,ae=""):($===void 0&&($=cr()),$&&typeof ae=="string"&&(ae=ke("")));D&&D(r),we=r},fn=_({},[...Lt,...Ot,...is]),gn=_({},[...It,...os]),Ar=function(r,l,u){return l.namespaceURI===V?r==="svg":l.namespaceURI===Ze?r==="svg"&&(u==="annotation-xml"||xt[u]):!!fn[r]},Er=function(r,l,u){return l.namespaceURI===V?r==="math":l.namespaceURI===Xe?r==="math"&&_t[u]:!!gn[r]},Rr=function(r,l,u){return l.namespaceURI===Xe&&!_t[u]||l.namespaceURI===Ze&&!xt[u]?!1:!gn[r]&&(_r[r]||!fn[r])},Lr=function(r){let l=ee(r);(!l||!l.tagName)&&(l={namespaceURI:_e,tagName:"template"});let u=ve(r.tagName),g=ve(l.tagName);return Tt[r.namespaceURI]?r.namespaceURI===Xe?Ar(u,l,g):r.namespaceURI===Ze?Er(u,l,g):r.namespaceURI===V?Rr(u,l,g):!!(Ce==="application/xhtml+xml"&&Tt[r.namespaceURI]):!1},ie=function(r){Me(e.removed,{element:r});try{ee(r).removeChild(r)}catch{if(w(r),!ee(r))throw he("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dn=function(r,l,u){try{r.removeAttributeNode(l)}catch{try{r.removeAttribute(u)}catch{}}},Qe=function(r){Ve(r);let l=W(r);if(l){let g=[];fe(l,d=>{Me(g,d)}),fe(g,d=>{try{w(d)}catch{}})}let u=Oe(r);if(u)for(let g=u.length-1;g>=0;--g){let d=u[g],k=d&&d.name;typeof k=="string"&&dn(r,d,k)}},pe=function(r,l,u){if(!u)try{u=l.getAttributeNode(r)}catch{u=null}Me(e.removed,{attribute:u||null,from:l});try{u?l.removeAttributeNode(u):l.removeAttribute(r)}catch{try{l.removeAttribute(r)}catch{}}if(r==="is")if(be||je)try{ie(l)}catch{}else try{l.setAttribute(r,"")}catch{}},Or=function(r){let l=Oe(r);if(l)for(let u=l.length-1;u>=0;--u){let g=l[u],d=g&&g.name;typeof d!="string"||R[O(d)]||dn(r,g,d)}},Ve=function(r){let l=[r];for(;l.length>0;){let u=l.pop();Ie(u)===B.element&&Or(u);let d=W(u);if(d)for(let k=d.length-1;k>=0;--k)l.push(d[k])}},mn=function(r,l){return ce?r==="patchsrc"?!0:r==="for"&&l!=="label"&&l!=="output":!1},Ir=function(r){if(!ce)return;let l=[r];for(;l.length>0;){let u=l.pop(),g=Ie(u);if(g===B.processingInstruction||g===B.comment&&N(vn,u.data)){try{w(u)}catch{}continue}if(g===B.element){let k=u,S=O(at(u));try{k.hasAttribute&&k.hasAttribute("patchsrc")&&k.removeAttribute("patchsrc"),k.hasAttribute&&k.hasAttribute("for")&&mn("for",S)&&k.removeAttribute("for")}catch{}}let d=W(u);if(d)for(let k=d.length-1;k>=0;--k)l.push(d[k])}},kn=function(r){let l=null,u=null;if(dt)r="<remove></remove>"+r;else{let k=Ln(r,/^[\r\n\t ]+/);u=k&&k[0]}Ce==="application/xhtml+xml"&&_e===V&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");let g=$?ke(r):r;if(_e===V)try{l=new b().parseFromString(g,Ce)}catch{}if(!l||!l.documentElement){l=ut.createDocument(_e,"template",null);try{l.documentElement.innerHTML=bt?ae:g}catch{}}let d=l.body||l.documentElement;return r&&u&&d.insertBefore(n.createTextNode(u),d.childNodes[0]||null),_e===V?pr.call(l,ue?"html":"body")[0]:ue?l.documentElement:d},bn=function(r){let l=X?X(r):r.ownerDocument;return Zt.call(l||r,r,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Ke=function(r){return r=ze(r,fr," "),r=ze(r,gr," "),r=ze(r,dr," "),r},yt=function(r){var l;r.normalize();let u=X?X(r):r.ownerDocument,g=Zt.call(u||r,r,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null),d=g.nextNode();for(;d;)d.data=Ke(d.data),d=g.nextNode();let k=(l=r.querySelectorAll)===null||l===void 0?void 0:l.call(r,"template");k&&fe(k,S=>{ye(S.content)&&yt(S.content)})},Je=function(r){let l=Z?Z(r):null;return typeof l!="string"||O(l)!=="form"?!1:typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||r.attributes!==Oe(r)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function"||r.nodeType!==te(r)||r.childNodes!==W(r)},ye=function(r){if(!te||typeof r!="object"||r===null)return!1;try{return te(r)===B.documentFragment}catch{return!1}},Ne=function(r){if(!te||typeof r!="object"||r===null)return!1;try{return typeof te(r)=="number"}catch{return!1}};function K(p,r,l){p.length!==0&&fe(p,u=>{u.call(e,r,l,we)})}let Dr=function(r,l){return!!(ce&&r.hasChildNodes()&&!Ne(r.firstElementChild)&&N($n,r.textContent)&&N($n,r.innerHTML)||ce&&r.namespaceURI===V&&bs[l]&&(Ne(r.firstElementChild)||typeof r.textContent=="string"&&N(Ts[l],r.textContent))||r.nodeType===B.processingInstruction||ce&&r.nodeType===B.comment&&N(vn,r.data))},et=function(r,l){if(r instanceof RegExp)return N(r,l);if(r instanceof Function){for(var u=arguments.length,g=new Array(u>2?u-2:0),d=2;d<u;d++)g[d-2]=arguments[d];return!!r(l,...g)}return!1},Pr=function(r,l,u){if(!Pe[l]&&yn(l)&&et(Q.tagNameCheck,l))return!1;if(mt&&!xe[l]){let g=ee(r),d=W(r);if(d&&g){let k=d.length;for(let S=k-1;S>=0;--S){let L=r===u?C(d[S],!0):d[S];g.insertBefore(L,G(r))}}}return ie(r),!0},Tn=function(r,l,u,g){return r.length===0?l:l===u||l===g?H(l):l},xn=function(r,l){return r===l||ee(r)!==null?!1:(kt&&Ve(r),!0)},_n=function(r,l){if(K(A.beforeSanitizeElements,r,null),xn(r,l))return!0;if(Je(r))return ie(r),!0;let u=O(at(r));if(E=Tn(A.uponSanitizeElement,E,pt,We),K(A.uponSanitizeElement,r,{tagName:u,allowedTags:E}),xn(r,l))return!0;if(Dr(r,u))return ie(r),!0;if(Pe[u]||!(re.tagCheck instanceof Function&&re.tagCheck(u))&&!E[u]){let d=Pr(r,u,l);return d===!1&&K(A.afterSanitizeElements,r,null),d}if(Ie(r)===B.element&&!Lr(r)||(u==="noscript"||u==="noembed"||u==="noframes")&&N(ms,r.innerHTML))return ie(r),!0;if(se&&r.nodeType===B.text){let d=Ke(r.textContent);r.textContent!==d&&(Me(e.removed,{element:r.cloneNode()}),r.textContent=d)}return K(A.afterSanitizeElements,r,null),!1},wn=function(r,l,u){if(Vt[l]||mn(l,r)||tn&&(l==="id"||l==="name")&&(u in n||u in Sr))return!1;let g=R[l]||re.attributeCheck instanceof Function&&re.attributeCheck(l,r);return ft&&N(mr,l)||Kt&&N(kr,l)?!0:g?an[l]||N(Qt,ze(u,Xt,""))||(l==="src"||l==="xlink:href"||l==="href")&&r!=="script"&&On(u,"data:")===0&&on[r]||Jt&&!N(br,ze(u,Xt,""))?!0:!u:yn(r)&&et(Q.tagNameCheck,r)&&et(Q.attributeNameCheck,l,r)||l==="is"&&Q.allowCustomizedBuiltInElements&&et(Q.tagNameCheck,u)},Cr=_({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yn=function(r){return!Cr[ve(r)]&&N(Tr,r)},Nr=function(r,l,u,g){if($&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!u)switch(m.getAttributeType(r,l)){case"TrustedHTML":return ke(g);case"TrustedScriptURL":return ar(g)}return g},Mr=function(r,l,u,g){try{u?r.setAttributeNS(u,l,g):r.setAttribute(l,g),Je(r)?ie(r):Rn(e.removed)}catch{pe(l,r)}},Sn=function(r){K(A.beforeSanitizeAttributes,r,null);let l=r.attributes;if(!l||Je(r))return;R=Tn(A.uponSanitizeAttribute,R,ht,qe);let u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},g=l.length,d=O(r.nodeName);for(;g--;){let k=l[g],S=k.name,L=k.namespaceURI,v=k.value,U=O(S),At=v,z=S==="value"?At:Kr(At);if(u.attrName=U,u.attrValue=z,u.keepAttr=!0,u.forceKeepAttr=void 0,K(A.uponSanitizeAttribute,r,u),z=u.attrValue,nn&&(U==="id"||U==="name")&&On(z,rn)!==0&&(pe(S,r,k),z=rn+z),ce&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,z)){pe(S,r,k);continue}if(U==="attributename"&&Ln(z,"href")){pe(S,r,k);continue}if(!u.forceKeepAttr){if(!u.keepAttr){pe(S,r,k);continue}if(!en&&N(ks,z)){pe(S,r,k);continue}if(se&&(z=Ke(z)),!wn(d,U,z)){pe(S,r,k);continue}z=Nr(d,U,L,z),z!==At&&Mr(r,S,L,z)}}K(A.afterSanitizeAttributes,r,null)},tt=function(r){let l=null,u=bn(r);for(K(A.beforeSanitizeShadowDOM,r,null);l=u.nextNode();)if(K(A.uponSanitizeShadowNode,l,null),_n(l,r),Sn(l),ye(l.content)&&tt(l.content),Ie(l)===B.element){let g=Le(l);ye(g)&&(St(g),tt(g))}K(A.afterSanitizeShadowDOM,r,null)},St=function(r){let l=[{node:r,shadow:null}];for(;l.length>0;){let u=l.pop();if(u.shadow){tt(u.shadow);continue}let g=u.node,k=Ie(g)===B.element,S=W(g);if(S)for(let L=S.length-1;L>=0;--L)l.push({node:S[L],shadow:null});if(k){let L=Z?Z(g):null;if(typeof L=="string"&&O(L)==="template"){let v=g.content;ye(v)&&l.push({node:v,shadow:null})}}if(k){let L=Le(g);ye(L)&&l.push({node:null,shadow:L},{node:L,shadow:null})}}};return e.sanitize=function(p){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,u=null,g=null,d=null;if(bt=!p,bt&&(p="<!-->"),typeof p!="string"&&!Ne(p)&&(p=rs(p),typeof p!="string"))throw he("dirty is not a string, aborting");if(!e.isSupported)return p;gt?(E=We,R=qe):wt(r),(A.uponSanitizeElement.length>0||A.uponSanitizeAttribute.length>0)&&(E=H(E)),A.uponSanitizeAttribute.length>0&&(R=H(R)),e.removed=[];let k=kt&&typeof p!="string"&&Ne(p);if(k){Ir(p);let v=at(p);if(typeof v=="string"){let U=O(v);if(!E[U]||Pe[U])throw Qe(p),he("root node is forbidden and cannot be sanitized in-place")}if(Je(p))throw Qe(p),he("root node is clobbered and cannot be sanitized in-place");try{St(p)}catch(U){throw Qe(p),U}}else if(Ne(p))l=kn("<!---->"),u=l.ownerDocument.importNode(p,!0),u.nodeType===B.element&&u.nodeName==="BODY"||u.nodeName==="HTML"?l=u:l.appendChild(u),St(u);else{if(!be&&!se&&!ue&&p.indexOf("<")===-1)return $&&Ye?ke(p):p;if(l=kn(p),!l)return be?null:Ye?ae:""}l&&dt&&ie(l.firstChild);let S=k?p:l;try{let v=bn(S);for(;g=v.nextNode();)_n(g,S),Sn(g),ye(g.content)&&tt(g.content)}catch(v){throw k&&(Qe(p),fe(e.removed,U=>{U.element&&Ve(U.element)})),v}if(k)return fe(e.removed,v=>{v.element&&Ve(v.element)}),se&&yt(p),p;if(be){if(se&&yt(l),je)for(d=ur.call(l.ownerDocument);l.firstChild;)d.appendChild(l.firstChild);else d=l;return(R.shadowroot||R.shadowrootmode)&&(d=hr.call(i,d,!0)),d}let L=ue?l.outerHTML:l.innerHTML;return ue&&E["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&N(gs,l.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
3
+ `+L),se&&(L=Ke(L)),$&&Ye?ke(L):L},e.setConfig=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(p),gt=!0,We=E,qe=R},e.clearConfig=function(){we=null,gt=!1,We=null,qe=null,$=ct,ae=""},e.isValidAttribute=function(p,r,l){we||wt({});let u=O(p),g=O(r);return wn(u,g,l)},e.addHook=function(p,r){typeof r=="function"&&F(A,p)&&Me(A[p],r)},e.removeHook=function(p,r){if(F(A,p)){if(r!==void 0){let l=Qr(A[p],r);return l===-1?void 0:Vr(A[p],l,1)[0]}return Rn(A[p])}},e.removeHooks=function(p){F(A,p)&&(A[p]=[])},e.removeAllHooks=function(){A=Un()},e}var Wn=Gn();function vt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var me=vt();function Kn(t){me=t}var ge={exec:()=>null};function Ee(t){let e=[];return n=>{let i=Math.max(0,Math.min(3,n-1)),s=e[i];return s||(s=t(i),e[i]=s),s}}function T(t,e=""){let n=typeof t=="string"?t:t.source,i={replace:(s,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(M.caret,"$1"),n=n.replace(s,c),i},getRegex:()=>new RegExp(n,e)};return i}var ws=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),M={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,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ee(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ee(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ee(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ee(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ee(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ee(t=>new RegExp(`^ {0,${t}}>`))},ys=/^(?:[ \t]*(?:\n|$))+/,Ss=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,As=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Be=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Es=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ut=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Jn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,er=T(Jn).replace(/bull/g,Ut).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rs=T(Jn).replace(/bull/g,Ut).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ft=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ls=/^[^\n]+/,Bt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Os=T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Is=T(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ut).getRegex(),lt="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",Ht=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ds=T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ht).replace("tag",lt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tr=t=>T(Ft).replace("hr",Be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lt).getRegex(),Ps=tr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Cs=tr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ns=T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Cs).getRegex(),Gt={blockquote:Ns,code:Ss,def:Os,fences:As,heading:Es,hr:Be,html:Ds,lheading:er,list:Is,newline:ys,paragraph:Ps,table:ge,text:Ls},qn=T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lt).getRegex(),Ms={...Gt,lheading:Rs,table:qn,paragraph:T(Ft).replace("hr",Be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lt).getRegex()},zs={...Gt,html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ht).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:ge,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:T(Ft).replace("hr",Be).replace("heading",` *#{1,6} *[^
4
+ ]`).replace("lheading",er).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$s=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nr=/^( {2,}|\\)\n(?!\s*$)/,Us=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ne=/[\p{P}\p{S}]/u,Re=/[\s\p{P}\p{S}]/u,He=/[^\s\p{P}\p{S}]/u,Fs=T(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Re).getRegex(),Bs=/[\p{Pi}\p{Ps}"']/u,rr=/(?!~)[\p{P}\p{S}]/u,Hs=/(?!~)[\s\p{P}\p{S}]/u,Gs=/(?:[^\s\p{P}\p{S}]|~)/u,Ws=T(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ws?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,qs=T(sr,"u").replace(/punct/g,ne).getRegex(),js=T(sr,"u").replace(/punct/g,rr).getRegex(),Ys=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Zs=T(Ys,"u").replace(/openQuote/g,Bs).replace(/punct/g,ne).getRegex(),ir="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xs=T(ir,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Re).replace(/punct/g,ne).getRegex(),Qs=T(ir,"gu").replace(/notPunctSpace/g,Gs).replace(/punctSpace/g,Hs).replace(/punct/g,rr).getRegex(),Vs="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ks=T(Vs,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Re).replace(/punct/g,ne).getRegex(),Js=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Re).replace(/punct/g,ne).getRegex(),ei="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",ti=T(ei,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Re).replace(/punct/g,ne).getRegex(),ni=T(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ne).getRegex(),ri="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",si=T(ri,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Re).replace(/punct/g,ne).getRegex(),ii=T(/\\(punct)/,"gu").replace(/punct/g,ne).getRegex(),oi=T(/^<(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(),li=T(Ht).replace("(?:-->|$)","-->").getRegex(),ai=T("^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",li).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),st=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ci=T(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",st).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),or=T(/^!?\[(label)\]\[(ref)\]/).replace("label",st).replace("ref",Bt).getRegex(),lr=T(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bt).getRegex(),ui=T("reflink|nolink(?!\\()","g").replace("reflink",or).replace("nolink",lr).getRegex(),jn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Wt={_backpedal:ge,anyPunctuation:ii,autolink:oi,blockSkip:Ws,br:nr,code:vs,del:ge,delLDelim:ge,delRDelim:ge,emStrongLDelim:qs,emStrongRDelimAst:Xs,emStrongRDelimUnd:Js,escape:$s,link:ci,nolink:lr,punctuation:Fs,reflink:or,reflinkSearch:ui,tag:ai,text:Us,url:ge},pi={...Wt,emStrongLDelim:Zs,emStrongRDelimAst:Ks,emStrongRDelimUnd:ti,link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",st).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",st).getRegex()},Mt={...Wt,emStrongRDelimAst:Qs,emStrongLDelim:js,delLDelim:ni,delRDelim:si,url:T(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jn).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:T(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",jn).getRegex()},hi={...Mt,br:T(nr).replace("{2,}","*").getRegex(),text:T(Mt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},rt={normal:Gt,gfm:Ms,pedantic:zs},Ue={normal:Wt,gfm:Mt,breaks:hi,pedantic:pi},fi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Yn=t=>fi[t];function J(t,e){if(e){if(M.escapeTest.test(t))return t.replace(M.escapeReplace,Yn)}else if(M.escapeTestNoEncode.test(t))return t.replace(M.escapeReplaceNoEncode,Yn);return t}function Zn(t){try{t=encodeURI(t).replace(M.percentDecode,"%")}catch{return null}return t}function Xn(t,e){let n=t.replace(M.findPipe,(o,c,a)=>{let h=!1,f=c;for(;--f>=0&&a[f]==="\\";)h=!h;return h?"|":" |"}),i=n.split(M.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(M.slashPipe,"|");return i}function le(t,e,n){let i=t.length;if(i===0)return"";let s=0;for(;s<i;){let o=t.charAt(i-s-1);if(o===e&&!n)s++;else if(o!==e&&n)s++;else break}return t.slice(0,i-s)}function Qn(t){let e=t.split(`
5
+ `),n=e.length-1;for(;n>=0&&M.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
6
+ `)}function gi(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return n>0?-2:-1}function di(t,e=0){let n=e,i="";for(let s of t)if(s===" "){let o=4-n%4;i+=" ".repeat(o),n+=o}else i+=s,n++;return i}function Vn(t,e,n,i,s){let o=e.href,c=e.title||null,a=t[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:c,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,h}function mi(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(i===null)return e;let s=i[1];return e.split(`
7
+ `).map(o=>{let c=o.match(n.other.beginningSpace);if(c===null)return o;let[a]=c;return a.length>=s.length?o.slice(s.length):o}).join(`
8
+ `)}var it=class{options;rules;lexer;constructor(t){this.options=t||me}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Qn(e[0]),i=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:i}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],i=mi(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let i=le(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:le(e[0],`
9
+ `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:le(e[0],`
10
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=le(e[0],`
11
+ `).split(`
12
+ `),i="",s="",o=[];for(;n.length>0;){let c=!1,a=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))a.push(n[h]),c=!0;else if(!c)a.push(n[h]);else break;n=n.slice(h);let f=a.join(`
13
+ `),b=f.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
15
+ ${f}`:f,s=s?`${s}
16
+ ${b}`:b;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,o,!0),this.lexer.state.top=m,n.length===0)break;let x=o.at(-1);if(x?.type==="code")break;if(x?.type==="blockquote"){let C=x,w=n.join(`
17
+ `),G=C.raw+`
18
+ `+w.replace(this.rules.other.blockquoteSetextReplace2,""),W=this.blockquote(G);o[o.length-1]=W,i=`${i}
19
+ ${w}`,s=s.substring(0,s.length-C.text.length)+W.text;break}else if(x?.type==="list"){let C=x,w=C.raw+`
20
+ `+n.join(`
21
+ `),G=this.list(w);o[o.length-1]=G,i=i.substring(0,i.length-x.raw.length)+G.raw,s=s.substring(0,s.length-C.raw.length)+G.raw,n=w.substring(o.at(-1).raw.length).split(`
22
+ `);continue}}return{type:"blockquote",raw:i,tokens:o,text:s}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,s={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),c=!1;for(;t;){let h=!1,f="",b="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let m=di(e[2].split(`
23
+ `,1)[0],e[1].length),x=t.split(`
24
+ `,1)[0],C=!m.trim(),w=0;if(this.options.pedantic?(w=2,b=m.trimStart()):C?w=e[1].length+1:(w=m.search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=m.slice(w),w+=e[1].length),C&&this.rules.other.blankLine.test(x)&&(f+=x+`
25
+ `,t=t.substring(x.length+1),h=!0),!h){let G=this.rules.other.nextBulletRegex(w),W=this.rules.other.hrRegex(w),ee=this.rules.other.fencesBeginRegex(w),Le=this.rules.other.headingBeginRegex(w),Oe=this.rules.other.htmlBeginRegex(w),te=this.rules.other.blockquoteBeginRegex(w);for(;t;){let Z=t.split(`
26
+ `,1)[0],X;if(x=Z,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),X=x):X=x.replace(this.rules.other.tabCharGlobal," "),ee.test(x)||Le.test(x)||Oe.test(x)||te.test(x)||G.test(x)||W.test(x))break;if(X.search(this.rules.other.nonSpaceChar)>=w||!x.trim())b+=`
27
+ `+X.slice(w);else{if(C||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(m)||Le.test(m)||W.test(m))break;b+=`
28
+ `+x}C=!x.trim(),f+=Z+`
29
+ `,t=t.substring(Z.length+1),m=X.slice(w)}}s.loose||(c?s.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0)),s.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),s.raw+=f}let a=s.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h of s.items)if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),!s.loose){let f=h.tokens.filter(m=>m.type==="space"),b=f.length>0&&f.some(m=>this.rules.other.anyLine.test(m.raw));s.loose=b}for(let h of s.items){let f=h.tokens[0];if(h.task&&(f?.type==="text"||f?.type==="paragraph")){h.text=h.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let b=this.rules.other.listTaskCheckbox.exec(h.raw);if(b){let m={type:"checkbox",raw:b[0]+" ",checked:b[0]!=="[ ]"};h.checked=m.checked,s.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=m.raw+h.tokens[0].raw,h.tokens[0].text=m.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(m)):h.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):h.tokens.unshift(m)}}else h.task&&(h.task=!1)}if(s.loose)for(let h of s.items){h.loose=!0;for(let f of h.tokens)f.type==="text"&&(f.type="paragraph")}return s}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Qn(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:le(e[0],`
30
+ `),href:i,title:s}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Xn(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
31
+ `):[],o={type:"table",raw:le(e[0],`
32
+ `),header:[],align:[],rows:[]};if(n.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<n.length;c++)o.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:o.align[c]});for(let c of s)o.rows.push(Xn(c,o.header.length).map((a,h)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[h]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:le(e[0],`
33
+ `),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
34
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=le(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=gi(e[2],"()");if(o===-2)return;if(o>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Vn(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[i.toLowerCase()];if(!s){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Vn(n,s,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let s=[...i[0]].length-1,o,c,a=s,h=0,f=i[0][0],b=n===f,m=f==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*t.length+s);(i=m.exec(e))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(c=[...o].length,i[3]||i[4]){a+=c;continue}else if(i[5]||i[6]){if(s%3&&!((s+c)%3)){h+=c;continue}if(b)break}if(a-=c,a>0)continue;c=Math.min(c,c+a+h);let x=[...i[0]][0].length,C=t.slice(0,s+i.index+x+c);if(Math.min(s,c)%2){let G=C.slice(1,-1);return{type:"em",raw:C,text:G,tokens:this.lexer.inlineTokens(G)}}let w=C.slice(2,-2);return{type:"strong",raw:C,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let s=[...i[0]].length-1,o,c,a=s,h=this.rules.inline.delRDelim;for(h.lastIndex=0,e=e.slice(-1*t.length+s);(i=h.exec(e))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o||(c=[...o].length,c!==s))continue;if(i[3]||i[4]){a+=c;continue}if(a-=c,a>0)continue;c=Math.min(c,c+a);let f=[...i[0]][0].length,b=t.slice(0,s+i.index+f+c),m=b.slice(s,-s);return{type:"del",raw:b,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=e[1],i="mailto:"+n):(n=e[1],i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},j=class zt{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||me,this.options.tokenizer=this.options.tokenizer||new it,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 n={other:M,block:rt.normal,inline:Ue.normal};this.options.pedantic?(n.block=rt.pedantic,n.inline=Ue.pedantic):this.options.gfm&&(n.block=rt.gfm,this.options.breaks?n.inline=Ue.breaks:n.inline=Ue.gfm),this.tokenizer.rules=n}static get rules(){return{block:rt,inline:Ue}}static lex(e,n){return new zt(n).lex(e)}static lexInline(e,n){return new zt(n).inlineTokens(e)}lex(e){e=e.replace(M.carriageReturn,`
35
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));let s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let a=n.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
36
+ `:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
37
+ `)?"":`
38
+ `)+o.raw,a.text+=`
39
+ `+o.text,this.inlineQueue.at(-1).src=a.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
40
+ `)?"":`
41
+ `)+o.raw,a.text+=`
42
+ `+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let c=e;if(this.options.extensions?.startBlock){let a=1/0,h=e.slice(1),f;this.options.extensions.startBlock.forEach(b=>{f=b.call({lexer:this},h),typeof f=="number"&&f>=0&&(a=Math.min(a,f))}),a<1/0&&a>=0&&(c=e.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let a=n.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
43
+ `)?"":`
44
+ `)+o.raw,a.text+=`
45
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(o),i=c.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
46
+ `)?"":`
47
+ `)+o.raw,a.text+=`
48
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let i=e;if(this.tokens.links){let a=Object.keys(this.tokens.links);a.length>0&&(i=i.replace(this.tokenizer.rules.inline.reflinkSearch,h=>a.includes(h.slice(h.lastIndexOf("[")+1,-1))?"["+"a".repeat(h.length-2)+"]":h))}i=i.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),i=i.replace(this.tokenizer.rules.inline.blockSkip,(a,h,f)=>{let b=f?f.length:0;return a.slice(0,b)+"["+"a".repeat(a.length-b-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(f=>(a=f.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let f=n.at(-1);a.type==="text"&&f?.type==="text"?(f.raw+=a.raw,f.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,i,o)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,i,o)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let h=e;if(this.options.extensions?.startInline){let f=1/0,b=e.slice(1),m;this.options.extensions.startInline.forEach(x=>{m=x.call({lexer:this},b),typeof m=="number"&&m>=0&&(f=Math.min(f,m))}),f<1/0&&f>=0&&(h=e.substring(0,f+1))}if(a=this.tokenizer.inlineText(h)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;let f=n.at(-1);f?.type==="text"?(f.raw+=a.raw,f.text+=a.text):n.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},ot=class{options;parser;constructor(t){this.options=t||me}space(t){return""}code({text:t,lang:e,escaped:n}){let i=(e||"").match(M.notSpaceStart)?.[0],s=t.replace(M.endingNewline,"")+`
49
+ `;return i?'<pre><code class="language-'+J(i)+'">'+(n?s:J(s,!0))+`</code></pre>
50
+ `:"<pre><code>"+(n?s:J(s,!0))+`</code></pre>
51
+ `}blockquote({tokens:t}){return`<blockquote>
52
+ ${this.parser.parse(t)}</blockquote>
53
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
54
+ `}hr(t){return`<hr>
55
+ `}list(t){let e=t.ordered,n=t.start,i="";for(let c=0;c<t.items.length;c++){let a=t.items[c];i+=this.listitem(a)}let s=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
56
+ `+i+"</"+s+`>
57
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
58
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
59
+ `}table(t){let e="",n="";for(let s=0;s<t.header.length;s++)n+=this.tablecell(t.header[s]);e+=this.tablerow({text:n});let i="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];n="";for(let c=0;c<o.length;c++)n+=this.tablecell(o[c]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
60
+ <thead>
61
+ `+e+`</thead>
62
+ `+i+`</table>
63
+ `}tablerow({text:t}){return`<tr>
64
+ ${t}</tr>
65
+ `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
66
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${J(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),s=Zn(t);if(s===null)return i;t=s;let o='<a href="'+t+'"';return e&&(o+=' title="'+J(e)+'"'),o+=">"+i+"</a>",o}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let s=Zn(t);if(s===null)return J(n);t=s;let o=`<img src="${t}" alt="${J(n)}"`;return e&&(o+=` title="${J(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:J(t.text)}},qt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Y=class $t{options;renderer;textRenderer;constructor(e){this.options=e||me,this.options.renderer=this.options.renderer||new ot,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qt}static parse(e,n){return new $t(n).parse(e)}static parseInline(e,n){return new $t(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let c=s,a=this.options.extensions.renderers[c.type].call({parser:this},c);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(c.type)){n+=a||"";continue}}let o=s;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let c='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let i="";for(let s=0;s<e.length;s++){let o=e[s];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}let c=o;switch(c.type){case"escape":{i+=n.text(c);break}case"html":{i+=n.html(c);break}case"link":{i+=n.link(c);break}case"image":{i+=n.image(c);break}case"checkbox":{i+=n.checkbox(c);break}case"strong":{i+=n.strong(c);break}case"em":{i+=n.em(c);break}case"codespan":{i+=n.codespan(c);break}case"br":{i+=n.br(c);break}case"del":{i+=n.del(c);break}case"text":{i+=n.text(c);break}default:{let a='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},Fe=class{options;block;constructor(t){this.options=t||me}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?j.lex:j.lexInline}provideParser(t=this.block){return t?Y.parse:Y.parseInline}},ki=class{defaults=vt();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y;Renderer=ot;TextRenderer=qt;Lexer=j;Tokenizer=it;Hooks=Fe;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let i of t)switch(n=n.concat(e.call(this,i)),i.type){case"table":{let s=i;for(let o of s.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of s.rows)for(let c of o)n=n.concat(this.walkTokens(c.tokens,e));break}case"list":{let s=i;n=n.concat(this.walkTokens(s.items,e));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let c=s[o].flat(1/0);n=n.concat(this.walkTokens(c,e))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=e.renderers[s.name];o?e.renderers[s.name]=function(...c){let a=s.renderer.apply(this,c);return a===!1&&(a=o.apply(this,c)),a}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[s.level];o?o.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),i.extensions=e),n.renderer){let s=this.defaults.renderer||new ot(this.defaults);for(let o in n.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let c=o,a=n.renderer[c],h=s[c];s[c]=(...f)=>{let b=a.apply(s,f);return b===!1&&(b=h.apply(s,f)),b||""}}i.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new it(this.defaults);for(let o in n.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let c=o,a=n.tokenizer[c],h=s[c];s[c]=(...f)=>{let b=a.apply(s,f);return b===!1&&(b=h.apply(s,f)),b}}i.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new Fe;for(let o in n.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let c=o,a=n.hooks[c],h=s[c];Fe.passThroughHooks.has(o)?s[c]=f=>{if(this.defaults.async&&Fe.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await a.call(s,f);return h.call(s,m)})();let b=a.call(s,f);return h.call(s,b)}:s[c]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await a.apply(s,f);return m===!1&&(m=await h.apply(s,f)),m})();let b=a.apply(s,f);return b===!1&&(b=h.apply(s,f)),b}}i.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(c){let a=[];return a.push(o.call(this,c)),s&&(a=a.concat(s.call(this,c))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return j.lex(t,e??this.defaults)}parser(t,e){return Y.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let i={...n},s={...this.defaults,...i},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let c=s.hooks?await s.hooks.preprocess(e):e,a=await(s.hooks?await s.hooks.provideLexer(t):t?j.lex:j.lexInline)(c,s),h=s.hooks?await s.hooks.processAllTokens(a):a;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let f=await(s.hooks?await s.hooks.provideParser(t):t?Y.parse:Y.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(f):f})().catch(o);try{s.hooks&&(e=s.hooks.preprocess(e));let c=(s.hooks?s.hooks.provideLexer(t):t?j.lex:j.lexInline)(e,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let a=(s.hooks?s.hooks.provideParser(t):t?Y.parse:Y.parseInline)(c,s);return s.hooks&&(a=s.hooks.postprocess(a)),a}catch(c){return o(c)}}}onError(t,e){return n=>{if(n.message+=`
67
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+J(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}}},de=new ki;function y(t,e){return de.parse(t,e)}y.options=y.setOptions=function(t){return de.setOptions(t),y.defaults=de.defaults,Kn(y.defaults),y};y.getDefaults=vt;y.defaults=me;function bi(...t){return de.use(...t),y.defaults=de.defaults,Kn(y.defaults),y}y.use=bi;y.walkTokens=function(t,e){return de.walkTokens(t,e)};y.parseInline=de.parseInline;y.Parser=Y;y.parser=Y.parse;y.Renderer=ot;y.TextRenderer=qt;y.Lexer=j;y.lexer=j.lex;y.Tokenizer=it;y.Hooks=Fe;y.parse=y;var yi=y.options,Si=y.setOptions,Ai=y.walkTokens,Ei=y.parseInline;var Ri=Y.parse,Li=j.lex;y.use({gfm:!0,breaks:!1});function Ti(t){let e=y.parse(t,{async:!1}),n=Wn.sanitize(e,{FORBID_TAGS:["style","form","input","button","textarea","select","option","iframe","object","embed","svg","math","video","audio"],FORBID_ATTR:["style"],RETURN_TRUSTED_TYPE:!1,USE_PROFILES:{html:!0}}),i=document.createElement("template");i.innerHTML=n;for(let s of i.content.querySelectorAll("a"))s.target="_blank",s.rel="noopener noreferrer";return i.innerHTML}return Br(xi);})();
68
+ /*! Bundled license information:
69
+
70
+ dompurify/dist/purify.es.mjs:
71
+ (*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE *)
72
+ */