Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nlo/frontend-common

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nlo/frontend-common - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8-alpha.0

dist/components/common/nlo-markdown.vue.d.ts

1

dist/index.d.ts

@@ -5,1 +5,2 @@ export { LogService } from "./utils/logService";

export { default as PortalFooter } from "./components/portal/portal-footer.vue";
export { default as NLOMarkdown } from "./components/common/nlo-markdown.vue";

@@ -1,1 +0,49 @@

(function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a.index={},a.Vue))})(this,function(a,n){"use strict";class u{constructor(e){this.allowConsole=e}log(e,...r){this.allowConsole&&console.log(e,...r)}}const p=["base","meta","link","style","script","noscript"];let m;const _=()=>m;function h(t){return typeof t=="function"?t():n.unref(t)}function l(t,e=""){if(t instanceof Promise)return t;const r=h(t);if(!t||!r)return r;if(Array.isArray(r))return r.map(o=>l(o,e));if(typeof r=="object"){let o=!1;const s=Object.fromEntries(Object.entries(r).map(([c,i])=>c==="titleTemplate"||c.startsWith("on")?[c,n.unref(i)]:((typeof i=="function"||n.isRef(i))&&(o=!0),[c,l(i,c)])));return o&&p.includes(String(e))&&(s._dynamic=!0),s}return r}n.version.startsWith("3");const y=typeof window<"u",g="usehead";function d(){return n.getCurrentInstance()&&n.inject(g)||_()}function v(t,e={}){const r=d(),o=n.ref({});n.watchEffect(()=>{o.value=l(t)});const s=r.push(o.value,e);return n.watch(o,i=>s.patch(i)),n.getCurrentInstance()&&n.onBeforeUnmount(()=>{s.dispose()}),s}function H(t,e={}){return d().push(t,e)}function O(t,e={}){var o;const r=d();if(r){const s=y||!!((o=r.resolvedOptions)!=null&&o.document);return e.mode==="server"&&s||e.mode==="client"&&!s?void 0:s?v(t,e):H(t,e)}}const j={id:"nlportal",class:"nlportalHeader"},B=n.defineComponent({__name:"portal-header",props:{vertical:null,themeOverride:null,scriptBaseUrl:null,navigationItems:null,footer:null,portalDomain:null},setup(t){const e=t;return O({script:[{"data-menu-structure":JSON.stringify(e.navigationItems),id:"nlportal-header-script","data-portal-domain":e.portalDomain,"data-vertical":e.vertical,"data-regsrc":"50001","data-search-url":"/zoek?q=","data-theme-override":e.themeOverride,"data-footer":JSON.stringify(e.footer),src:`${e.scriptBaseUrl}/statics/nlportal-header.js`}]}),(r,o)=>(n.openBlock(),n.createElementBlock("div",j))}}),x="",f=(t,e)=>{const r=t.__vccOpts||t;for(const[o,s]of e)r[o]=s;return r},b=f(B,[["__scopeId","data-v-58037496"]]),w={},I={id:"nlportal-footer"};function S(t,e){return n.openBlock(),n.createElementBlock("footer",I)}const U=f(w,[["render",S]]);a.LogService=u,a.PortalFooter=U,a.PortalHeader=b,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
(function(Q,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],A):(Q=typeof globalThis<"u"?globalThis:Q||self,A(Q.index={},Q.Vue))})(this,function(Q,A){"use strict";class Jt{constructor(e){this.allowConsole=e}log(e,...t){this.allowConsole&&console.log(e,...t)}}const en=["base","meta","link","style","script","noscript"];let tn;const nn=()=>tn;function rn(i){return typeof i=="function"?i():A.unref(i)}function Ne(i,e=""){if(i instanceof Promise)return i;const t=rn(i);if(!i||!t)return t;if(Array.isArray(t))return t.map(n=>Ne(n,e));if(typeof t=="object"){let n=!1;const r=Object.fromEntries(Object.entries(t).map(([s,l])=>s==="titleTemplate"||s.startsWith("on")?[s,A.unref(l)]:((typeof l=="function"||A.isRef(l))&&(n=!0),[s,Ne(l,s)])));return n&&en.includes(String(e))&&(r._dynamic=!0),r}return t}A.version.startsWith("3");const an=typeof window<"u",sn="usehead";function ze(){return A.getCurrentInstance()&&A.inject(sn)||nn()}function ln(i,e={}){const t=ze(),n=A.ref({});A.watchEffect(()=>{n.value=Ne(i)});const r=t.push(n.value,e);return A.watch(n,l=>r.patch(l)),A.getCurrentInstance()&&A.onBeforeUnmount(()=>{r.dispose()}),r}function on(i,e={}){return ze().push(i,e)}function cn(i,e={}){var n;const t=ze();if(t){const r=an||!!((n=t.resolvedOptions)!=null&&n.document);return e.mode==="server"&&r||e.mode==="client"&&!r?void 0:r?ln(i,e):on(i,e)}}const un={id:"nlportal",class:"nlportalHeader"},pn=A.defineComponent({__name:"portal-header",props:{vertical:null,themeOverride:null,scriptBaseUrl:null,navigationItems:null,footer:null,portalDomain:null},setup(i){const e=i;return cn({script:[{"data-menu-structure":JSON.stringify(e.navigationItems),id:"nlportal-header-script","data-portal-domain":e.portalDomain,"data-vertical":e.vertical,"data-regsrc":"50001","data-search-url":"/zoek?q=","data-theme-override":e.themeOverride,"data-footer":JSON.stringify(e.footer),src:`${e.scriptBaseUrl}/statics/nlportal-header.js`}]}),(t,n)=>(A.openBlock(),A.createElementBlock("div",un))}}),Tr="",ct=(i,e)=>{const t=i.__vccOpts||i;for(const[n,r]of e)t[n]=r;return t},fn=ct(pn,[["__scopeId","data-v-58037496"]]),hn={},mn={id:"nlportal-footer"};function dn(i,e){return A.openBlock(),A.createElementBlock("footer",mn)}const gn=ct(hn,[["render",dn]]);function ut(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let oe=ut();function kn(i){oe=i}const pt=/[&<>"']/,_n=new RegExp(pt.source,"g"),ft=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,bn=new RegExp(ft.source,"g"),xn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ht=i=>xn[i];function D(i,e){if(e){if(pt.test(i))return i.replace(_n,ht)}else if(ft.test(i))return i.replace(bn,ht);return i}const wn=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function mt(i){return i.replace(wn,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const yn=/(^|[^\[])\^/g;function y(i,e){i=typeof i=="string"?i:i.source,e=e||"";const t={replace:(n,r)=>(r=r.source||r,r=r.replace(yn,"$1"),i=i.replace(n,r),t),getRegex:()=>new RegExp(i,e)};return t}const Tn=/[^\w:]/g,An=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function dt(i,e,t){if(i){let n;try{n=decodeURIComponent(mt(t)).replace(Tn,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!An.test(t)&&(t=Rn(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const be={},vn=/^[^:]+:\/*[^/]*$/,En=/^([^:]+:)[\s\S]*$/,Sn=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Rn(i,e){be[" "+i]||(vn.test(i)?be[" "+i]=i+"/":be[" "+i]=we(i,"/",!0)),i=be[" "+i];const t=i.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:i.replace(En,"$1")+e:e.charAt(0)==="/"?t?e:i.replace(Sn,"$1")+e:i+e}const xe={exec:function(){}};function W(i){let e=1,t,n;for(;e<arguments.length;e++){t=arguments[e];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i}function gt(i,e){const t=i.replace(/\|/g,(s,l,c)=>{let p=!1,b=l;for(;--b>=0&&c[b]==="\\";)p=!p;return p?"|":" |"}),n=t.split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function we(i,e,t){const n=i.length;if(n===0)return"";let r=0;for(;r<n;){const s=i.charAt(n-r-1);if(s===e&&!t)r++;else if(s!==e&&t)r++;else break}return i.slice(0,n-r)}function In(i,e){if(i.indexOf(e[1])===-1)return-1;const t=i.length;let n=0,r=0;for(;r<t;r++)if(i[r]==="\\")r++;else if(i[r]===e[0])n++;else if(i[r]===e[1]&&(n--,n<0))return r;return-1}function kt(i){i&&i.sanitize&&!i.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function _t(i,e){if(e<1)return"";let t="";for(;e>1;)e&1&&(t+=i),e>>=1,i+=i;return t+i}function bt(i,e,t,n){const r=e.href,s=e.title?D(e.title):null,l=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){n.state.inLink=!0;const c={type:"link",raw:t,href:r,title:s,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,c}return{type:"image",raw:t,href:r,title:s,text:D(l)}}function On(i,e){const t=i.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
`).map(r=>{const s=r.match(/^\s+/);if(s===null)return r;const[l]=s;return l.length>=n.length?r.slice(n.length):r}).join(`
`)}class Ce{constructor(e){this.options=e||oe}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:we(n,`
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=On(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const r=we(n,"#");(this.options.pedantic||!r||/ $/.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(n);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,s,l,c,p,b,k,T,w,m,U,B=t[1].trim();const X=B.length>1,v={type:"list",raw:"",ordered:X,start:X?+B.slice(0,-1):"",loose:!1,items:[]};B=X?`\\d{1,9}\\${B.slice(-1)}`:`\\${B}`,this.options.pedantic&&(B=X?B:"[*+-]");const E=new RegExp(`^( {0,3}${B})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(U=!1,!(!(t=E.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),k=t[2].split(`
`,1)[0].replace(/^\t+/,S=>" ".repeat(3*S.length)),T=e.split(`
`,1)[0],this.options.pedantic?(l=2,m=k.trimLeft()):(l=t[2].search(/[^ ]/),l=l>4?1:l,m=k.slice(l),l+=t[1].length),p=!1,!k&&/^ *$/.test(T)&&(n+=T+`
`,e=e.substring(T.length+1),U=!0),!U){const S=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),F=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),P=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),ee=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;e&&(w=e.split(`
`,1)[0],T=w,this.options.pedantic&&(T=T.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(P.test(T)||ee.test(T)||S.test(T)||F.test(e)));){if(T.search(/[^ ]/)>=l||!T.trim())m+=`
`+T.slice(l);else{if(p||k.search(/[^ ]/)>=4||P.test(k)||ee.test(k)||F.test(k))break;m+=`
`+T}!p&&!T.trim()&&(p=!0),n+=w+`
`,e=e.substring(w.length+1),k=T.slice(l)}}v.loose||(b?v.loose=!0:/\n *\n *$/.test(n)&&(b=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(m),r&&(s=r[0]!=="[ ] ",m=m.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:n,task:!!r,checked:s,loose:!1,text:m}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=m.trimRight(),v.raw=v.raw.trimRight();const Y=v.items.length;for(c=0;c<Y;c++)if(this.lexer.state.top=!1,v.items[c].tokens=this.lexer.blockTokens(v.items[c].text,[]),!v.loose){const S=v.items[c].tokens.filter(P=>P.type==="space"),F=S.length>0&&S.some(P=>/\n.*\n/.test(P.raw));v.loose=F}if(v.loose)for(c=0;c<Y;c++)v.items[c].loose=!0;return v}}html(e){const t=this.rules.block.html.exec(e);if(t){const n={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const r=this.options.sanitizer?this.options.sanitizer(t[0]):D(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(t){const n={type:"table",header:gt(t[1]).map(r=>({text:r})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(n.header.length===n.align.length){n.raw=t[0];let r=n.align.length,s,l,c,p;for(s=0;s<r;s++)/^ *-+: *$/.test(n.align[s])?n.align[s]="right":/^ *:-+: *$/.test(n.align[s])?n.align[s]="center":/^ *:-+ *$/.test(n.align[s])?n.align[s]="left":n.align[s]=null;for(r=n.rows.length,s=0;s<r;s++)n.rows[s]=gt(n.rows[s],n.header.length).map(b=>({text:b}));for(r=n.header.length,l=0;l<r;l++)n.header[l].tokens=this.lexer.inline(n.header[l].text);for(r=n.rows.length,l=0;l<r;l++)for(p=n.rows[l],c=0;c<p.length;c++)p[c].tokens=this.lexer.inline(p[c].text);return n}}}lheading(e){const 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){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const 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){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:D(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):D(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const l=we(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{const l=In(t[2],"()");if(l>-1){const p=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,p).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],s=l[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(n)?r=r.slice(1):r=r.slice(1,-1)),bt(t,{href:r&&r.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(/\s+/g," ");if(r=t[r.toLowerCase()],!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return bt(n,r,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=r[1]||r[2]||"";if(!s||s&&(n===""||this.rules.inline.punctuation.exec(n))){const l=r[0].length-1;let c,p,b=l,k=0;const T=r[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(T.lastIndex=0,t=t.slice(-1*e.length+l);(r=T.exec(t))!=null;){if(c=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!c)continue;if(p=c.length,r[3]||r[4]){b+=p;continue}else if((r[5]||r[6])&&l%3&&!((l+p)%3)){k+=p;continue}if(b-=p,b>0)continue;p=Math.min(p,p+b+k);const w=e.slice(0,l+r.index+(r[0].length-c.length)+p);if(Math.min(l,p)%2){const U=w.slice(1,-1);return{type:"em",raw:w,text:U,tokens:this.lexer.inlineTokens(U)}}const m=w.slice(2,-2);return{type:"strong",raw:w,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const r=/[^ ]/.test(n),s=/^ /.test(n)&&/ $/.test(n);return r&&s&&(n=n.substring(1,n.length-1)),n=D(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let r,s;return n[2]==="@"?(r=D(this.options.mangle?t(n[1]):n[1]),s="mailto:"+r):(r=D(n[1]),s=r),{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let r,s;if(n[2]==="@")r=D(this.options.mangle?t(n[0]):n[0]),s="mailto:"+r;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(l!==n[0]);r=D(n[0]),n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):D(n[0]):n[0]:r=D(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:r}}}}const d={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {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 *)+\\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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:xe,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};d._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,d._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,d.def=y(d.def).replace("label",d._label).replace("title",d._title).getRegex(),d.bullet=/(?:[*+-]|\d{1,9}[.)])/,d.listItemStart=y(/^( *)(bull) */).replace("bull",d.bullet).getRegex(),d.list=y(d.list).replace(/bull/g,d.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+d.def.source+")").getRegex(),d._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",d._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,d.html=y(d.html,"i").replace("comment",d._comment).replace("tag",d._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),d.paragraph=y(d._paragraph).replace("hr",d.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.blockquote=y(d.blockquote).replace("paragraph",d.paragraph).getRegex(),d.normal=W({},d),d.gfm=W({},d.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),d.gfm.table=y(d.gfm.table).replace("hr",d.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.gfm.paragraph=y(d._paragraph).replace("hr",d.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",d.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.pedantic=W({},d.normal,{html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",d._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(d.normal._paragraph).replace("hr",d.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",d.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const f={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};f._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",f.punctuation=y(f.punctuation).replace(/punctuation/g,f._punctuation).getRegex(),f.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,f.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,f._comment=y(d._comment).replace("(?:-->|$)","-->").getRegex(),f.emStrong.lDelim=y(f.emStrong.lDelim).replace(/punct/g,f._punctuation).getRegex(),f.emStrong.rDelimAst=y(f.emStrong.rDelimAst,"g").replace(/punct/g,f._punctuation).getRegex(),f.emStrong.rDelimUnd=y(f.emStrong.rDelimUnd,"g").replace(/punct/g,f._punctuation).getRegex(),f._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,f._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,f._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])?)+(?![-_])/,f.autolink=y(f.autolink).replace("scheme",f._scheme).replace("email",f._email).getRegex(),f._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,f.tag=y(f.tag).replace("comment",f._comment).replace("attribute",f._attribute).getRegex(),f._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,f._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,f._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,f.link=y(f.link).replace("label",f._label).replace("href",f._href).replace("title",f._title).getRegex(),f.reflink=y(f.reflink).replace("label",f._label).replace("ref",d._label).getRegex(),f.nolink=y(f.nolink).replace("ref",d._label).getRegex(),f.reflinkSearch=y(f.reflinkSearch,"g").replace("reflink",f.reflink).replace("nolink",f.nolink).getRegex(),f.normal=W({},f),f.pedantic=W({},f.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:y(/^!?\[(label)\]\((.*?)\)/).replace("label",f._label).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",f._label).getRegex()}),f.gfm=W({},f.normal,{escape:y(f.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),f.gfm.url=y(f.gfm.url,"i").replace("email",f.gfm._extended_email).getRegex(),f.breaks=W({},f.gfm,{br:y(f.br).replace("{2,}","*").getRegex(),text:y(f.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Ln(i){return i.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function xt(i){let e="",t,n;const r=i.length;for(t=0;t<r;t++)n=i.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),e+="&#"+n+";";return e}class J{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||oe,this.options.tokenizer=this.options.tokenizer||new Ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:d.normal,inline:f.normal};this.options.pedantic?(t.block=d.pedantic,t.inline=f.pedantic):this.options.gfm&&(t.block=d.gfm,this.options.breaks?t.inline=f.breaks:t.inline=f.gfm),this.tokenizer.rules=t}static get rules(){return{block:d,inline:f}}static lex(e,t){return new J(t).lex(e)}static lexInline(e,t){return new J(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
`),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(c,p,b)=>p+" ".repeat(b.length));let n,r,s,l;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
`+n.raw,r.text+=`
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
`+n.raw,r.text+=`
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let c=1/0;const p=e.slice(1);let b;this.options.extensions.startBlock.forEach(function(k){b=k.call({lexer:this},p),typeof b=="number"&&b>=0&&(c=Math.min(c,b))}),c<1/0&&c>=0&&(s=e.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){r=t[t.length-1],l&&r.type==="paragraph"?(r.raw+=`
`+n.raw,r.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),l=s.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=`
`+n.raw,r.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,s,l=e,c,p,b;if(this.tokens.links){const k=Object.keys(this.tokens.links);if(k.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)k.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,c.index)+"["+_t("a",c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,c.index)+"["+_t("a",c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.escapedEmSt.exec(l))!=null;)l=l.slice(0,c.index+c[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(p||(b=""),p=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(k=>(n=k.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){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),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):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),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,l,b)){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)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,xt)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,xt))){e=e.substring(n.raw.length),t.push(n);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let k=1/0;const T=e.slice(1);let w;this.options.extensions.startInline.forEach(function(m){w=m.call({lexer:this},T),typeof w=="number"&&w>=0&&(k=Math.min(k,w))}),k<1/0&&k>=0&&(s=e.substring(0,k+1))}if(n=this.tokenizer.inlineText(s,Ln)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(b=n.raw.slice(-1)),p=!0,r=t[t.length-1],r&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){const k="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return t}}class $e{constructor(e){this.options=e||oe}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(e,r);s!=null&&s!==e&&(n=!0,e=s)}return e=e.replace(/\n$/,"")+`
`,r?'<pre><code class="'+this.options.langPrefix+D(r)+'">'+(n?e:D(e,!0))+`</code></pre>
`:"<pre><code>"+(n?e:D(e,!0))+`</code></pre>
`}blockquote(e){return`<blockquote>
${e}</blockquote>
`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){const s=this.options.headerPrefix+r.slug(n);return`<h${t} id="${s}">${e}</h${t}>
`}return`<h${t}>${e}</h${t}>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(e,t,n){const r=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+r+s+`>
`+e+"</"+r+`>
`}listitem(e){return`<li>${e}</li>
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>
`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+t+`</table>
`}tablerow(e){return`<tr>
${e}</tr>
`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(e=dt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(e=dt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class wt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class yt{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do r++,n=e+"-"+r;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class V{constructor(e){this.options=e||oe,this.options.renderer=this.options.renderer||new $e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wt,this.slugger=new yt}static parse(e,t){return new V(t).parse(e)}static parseInline(e,t){return new V(t).parseInline(e)}parse(e,t=!0){let n="",r,s,l,c,p,b,k,T,w,m,U,B,X,v,E,Y,S,F,P;const ee=e.length;for(r=0;r<ee;r++){if(m=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[m.type]&&(P=this.options.extensions.renderers[m.type].call({parser:this},m),P!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(m.type))){n+=P||"";continue}switch(m.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{n+=this.renderer.heading(this.parseInline(m.tokens),m.depth,mt(this.parseInline(m.tokens,this.textRenderer)),this.slugger);continue}case"code":{n+=this.renderer.code(m.text,m.lang,m.escaped);continue}case"table":{for(T="",k="",c=m.header.length,s=0;s<c;s++)k+=this.renderer.tablecell(this.parseInline(m.header[s].tokens),{header:!0,align:m.align[s]});for(T+=this.renderer.tablerow(k),w="",c=m.rows.length,s=0;s<c;s++){for(b=m.rows[s],k="",p=b.length,l=0;l<p;l++)k+=this.renderer.tablecell(this.parseInline(b[l].tokens),{header:!1,align:m.align[l]});w+=this.renderer.tablerow(k)}n+=this.renderer.table(T,w);continue}case"blockquote":{w=this.parse(m.tokens),n+=this.renderer.blockquote(w);continue}case"list":{for(U=m.ordered,B=m.start,X=m.loose,c=m.items.length,w="",s=0;s<c;s++)E=m.items[s],Y=E.checked,S=E.task,v="",E.task&&(F=this.renderer.checkbox(Y),X?E.tokens.length>0&&E.tokens[0].type==="paragraph"?(E.tokens[0].text=F+" "+E.tokens[0].text,E.tokens[0].tokens&&E.tokens[0].tokens.length>0&&E.tokens[0].tokens[0].type==="text"&&(E.tokens[0].tokens[0].text=F+" "+E.tokens[0].tokens[0].text)):E.tokens.unshift({type:"text",text:F}):v+=F),v+=this.parse(E.tokens,X),w+=this.renderer.listitem(v,S,Y);n+=this.renderer.list(w,U,B);continue}case"html":{n+=this.renderer.html(m.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(m.tokens));continue}case"text":{for(w=m.tokens?this.parseInline(m.tokens):m.text;r+1<ee&&e[r+1].type==="text";)m=e[++r],w+=`
`+(m.tokens?this.parseInline(m.tokens):m.text);n+=t?this.renderer.paragraph(w):w;continue}default:{const Se='Token with "'+m.type+'" type was not found.';if(this.options.silent){console.error(Se);return}else throw new Error(Se)}}}return n}parseInline(e,t){t=t||this.renderer;let n="",r,s,l;const c=e.length;for(r=0;r<c;r++){if(s=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(l=this.options.extensions.renderers[s.type].call({parser:this},s),l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){n+=l||"";continue}switch(s.type){case"escape":{n+=t.text(s.text);break}case"html":{n+=t.html(s.text);break}case"link":{n+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break}case"image":{n+=t.image(s.href,s.title,s.text);break}case"strong":{n+=t.strong(this.parseInline(s.tokens,t));break}case"em":{n+=t.em(this.parseInline(s.tokens,t));break}case"codespan":{n+=t.codespan(s.text);break}case"br":{n+=t.br();break}case"del":{n+=t.del(this.parseInline(s.tokens,t));break}case"text":{n+=t.text(s.text);break}default:{const p='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(p);return}else throw new Error(p)}}}return n}}function g(i,e,t){if(typeof i>"u"||i===null)throw new Error("marked(): input parameter is undefined or null");if(typeof i!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=W({},g.defaults,e||{}),kt(e),t){const r=e.highlight;let s;try{s=J.lex(i,e)}catch(p){return t(p)}const l=function(p){let b;if(!p)try{e.walkTokens&&g.walkTokens(s,e.walkTokens),b=V.parse(s,e)}catch(k){p=k}return e.highlight=r,p?t(p):t(null,b)};if(!r||r.length<3||(delete e.highlight,!s.length))return l();let c=0;g.walkTokens(s,function(p){p.type==="code"&&(c++,setTimeout(()=>{r(p.text,p.lang,function(b,k){if(b)return l(b);k!=null&&k!==p.text&&(p.text=k,p.escaped=!0),c--,c===0&&l()})},0))}),c===0&&l();return}function n(r){if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An error occurred:</p><pre>"+D(r.message+"",!0)+"</pre>";throw r}try{const r=J.lex(i,e);if(e.walkTokens){if(e.async)return Promise.all(g.walkTokens(r,e.walkTokens)).then(()=>V.parse(r,e)).catch(n);g.walkTokens(r,e.walkTokens)}return V.parse(r,e)}catch(r){n(r)}}g.options=g.setOptions=function(i){return W(g.defaults,i),kn(g.defaults),g},g.getDefaults=ut,g.defaults=oe,g.use=function(...i){const e=g.defaults.extensions||{renderers:{},childTokens:{}};i.forEach(t=>{const n=W({},t);if(n.async=g.defaults.async||n.async,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if(r.renderer){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...l){let c=r.renderer.apply(this,l);return c===!1&&(c=s.apply(this,l)),c}:e.renderers[r.name]=r.renderer}if(r.tokenizer){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[r.level]?e[r.level].unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){const r=g.defaults.renderer||new $e;for(const s in t.renderer){const l=r[s];r[s]=(...c)=>{let p=t.renderer[s].apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.renderer=r}if(t.tokenizer){const r=g.defaults.tokenizer||new Ce;for(const s in t.tokenizer){const l=r[s];r[s]=(...c)=>{let p=t.tokenizer[s].apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.tokenizer=r}if(t.walkTokens){const r=g.defaults.walkTokens;n.walkTokens=function(s){let l=[];return l.push(t.walkTokens.call(this,s)),r&&(l=l.concat(r.call(this,s))),l}}g.setOptions(n)})},g.walkTokens=function(i,e){let t=[];for(const n of i)switch(t=t.concat(e.call(g,n)),n.type){case"table":{for(const r of n.header)t=t.concat(g.walkTokens(r.tokens,e));for(const r of n.rows)for(const s of r)t=t.concat(g.walkTokens(s.tokens,e));break}case"list":{t=t.concat(g.walkTokens(n.items,e));break}default:g.defaults.extensions&&g.defaults.extensions.childTokens&&g.defaults.extensions.childTokens[n.type]?g.defaults.extensions.childTokens[n.type].forEach(function(r){t=t.concat(g.walkTokens(n[r],e))}):n.tokens&&(t=t.concat(g.walkTokens(n.tokens,e)))}return t},g.parseInline=function(i,e){if(typeof i>"u"||i===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof i!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected");e=W({},g.defaults,e||{}),kt(e);try{const t=J.lexInline(i,e);return e.walkTokens&&g.walkTokens(t,e.walkTokens),V.parseInline(t,e)}catch(t){if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An error occurred:</p><pre>"+D(t.message+"",!0)+"</pre>";throw t}},g.Parser=V,g.parser=V.parse,g.Renderer=$e,g.TextRenderer=wt,g.Lexer=J,g.lexer=J.lex,g.Tokenizer=Ce,g.Slugger=yt,g.parse=g,g.options,g.setOptions,g.use,g.walkTokens,g.parseInline,V.parse,J.lex;/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */function ie(i){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(i)}function Pe(i,e){return Pe=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Pe(i,e)}function Dn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ye(i,e,t){return Dn()?ye=Reflect.construct:ye=function(r,s,l){var c=[null];c.push.apply(c,s);var p=Function.bind.apply(r,c),b=new p;return l&&Pe(b,l.prototype),b},ye.apply(null,arguments)}function j(i){return Mn(i)||Nn(i)||zn(i)||Cn()}function Mn(i){if(Array.isArray(i))return Ue(i)}function Nn(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function zn(i,e){if(i){if(typeof i=="string")return Ue(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ue(i,e)}}function Ue(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=i[t];return n}function Cn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $n=Object.hasOwnProperty,Tt=Object.setPrototypeOf,Pn=Object.isFrozen,Un=Object.getPrototypeOf,Fn=Object.getOwnPropertyDescriptor,C=Object.freeze,q=Object.seal,Hn=Object.create,At=typeof Reflect<"u"&&Reflect,Te=At.apply,Fe=At.construct;Te||(Te=function(e,t,n){return e.apply(t,n)}),C||(C=function(e){return e}),q||(q=function(e){return e}),Fe||(Fe=function(e,t){return ye(e,j(t))});var Bn=G(Array.prototype.forEach),vt=G(Array.prototype.pop),de=G(Array.prototype.push),Ae=G(String.prototype.toLowerCase),He=G(String.prototype.toString),Gn=G(String.prototype.match),Z=G(String.prototype.replace),Wn=G(String.prototype.indexOf),jn=G(String.prototype.trim),$=G(RegExp.prototype.test),Be=qn(TypeError);function G(i){return 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 Te(i,e,n)}}function qn(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Fe(i,t)}}function _(i,e,t){t=t||Ae,Tt&&Tt(i,null);for(var n=e.length;n--;){var r=e[n];if(typeof r=="string"){var s=t(r);s!==r&&(Pn(e)||(e[n]=s),r=s)}i[r]=!0}return i}function ae(i){var e=Hn(null),t;for(t in i)Te($n,i,[t])===!0&&(e[t]=i[t]);return e}function ve(i,e){for(;i!==null;){var t=Fn(i,e);if(t){if(t.get)return G(t.get);if(typeof t.value=="function")return G(t.value)}i=Un(i)}function n(r){return console.warn("fallback value for",r),null}return n}var Et=C(["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","section","select","shadow","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"]),Ge=C(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),We=C(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zn=C(["animate","color-profile","cursor","discard","fedropshadow","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"]),je=C(["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"]),Qn=C(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),St=C(["#text"]),Rt=C(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),qe=C(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","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"]),It=C(["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"]),Ee=C(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vn=q(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Xn=q(/<%[\w\W]*|[\w\W]*%>/gm),Yn=q(/\${[\w\W]*}/gm),Kn=q(/^data-[\-\w.\u00B7-\uFFFF]/),Jn=q(/^aria-[\-\w]+$/),er=q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tr=q(/^(?:\w+script|data):/i),nr=q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rr=q(/^html$/i),ir=function(){return typeof window>"u"?null:window},ar=function(e,t){if(ie(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:function(c){return c},createScriptURL:function(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Ot(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ir(),e=function(a){return Ot(a)};if(e.version="2.4.3",e.removed=[],!i||!i.document||i.document.nodeType!==9)return e.isSupported=!1,e;var t=i.document,n=i.document,r=i.DocumentFragment,s=i.HTMLTemplateElement,l=i.Node,c=i.Element,p=i.NodeFilter,b=i.NamedNodeMap,k=b===void 0?i.NamedNodeMap||i.MozNamedAttrMap:b,T=i.HTMLFormElement,w=i.DOMParser,m=i.trustedTypes,U=c.prototype,B=ve(U,"cloneNode"),X=ve(U,"nextSibling"),v=ve(U,"childNodes"),E=ve(U,"parentNode");if(typeof s=="function"){var Y=n.createElement("template");Y.content&&Y.content.ownerDocument&&(n=Y.content.ownerDocument)}var S=ar(m,t),F=S?S.createHTML(""):"",P=n,ee=P.implementation,Se=P.createNodeIterator,or=P.createDocumentFragment,cr=P.getElementsByTagName,ur=t.importNode,Lt={};try{Lt=ae(n).documentMode?n.documentMode:{}}catch{}var K={};e.isSupported=typeof E=="function"&&ee&&typeof ee.createHTMLDocument<"u"&&Lt!==9;var Ze=Vn,Qe=Xn,Ve=Yn,pr=Kn,fr=Jn,hr=tr,Dt=nr,Xe=er,I=null,Mt=_({},[].concat(j(Et),j(Ge),j(We),j(je),j(St))),M=null,Nt=_({},[].concat(j(Rt),j(qe),j(It),j(Ee))),R=Object.seal(Object.create(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}})),ge=null,Ye=null,zt=!0,Ke=!0,Ct=!1,ce=!1,se=!1,Je=!1,et=!1,ue=!1,Re=!1,Ie=!1,$t=!0,Pt=!1,mr="user-content-",tt=!0,ke=!1,pe={},fe=null,Ut=_({},["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"]),Ft=null,Ht=_({},["audio","video","img","source","image","track"]),nt=null,Bt=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oe="http://www.w3.org/1998/Math/MathML",Le="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml",he=te,rt=!1,it=null,dr=_({},[Oe,Le,te],He),le,gr=["application/xhtml+xml","text/html"],kr="text/html",O,me=null,_r=n.createElement("form"),Gt=function(a){return a instanceof RegExp||a instanceof Function},at=function(a){me&&me===a||((!a||ie(a)!=="object")&&(a={}),a=ae(a),le=gr.indexOf(a.PARSER_MEDIA_TYPE)===-1?le=kr:le=a.PARSER_MEDIA_TYPE,O=le==="application/xhtml+xml"?He:Ae,I="ALLOWED_TAGS"in a?_({},a.ALLOWED_TAGS,O):Mt,M="ALLOWED_ATTR"in a?_({},a.ALLOWED_ATTR,O):Nt,it="ALLOWED_NAMESPACES"in a?_({},a.ALLOWED_NAMESPACES,He):dr,nt="ADD_URI_SAFE_ATTR"in a?_(ae(Bt),a.ADD_URI_SAFE_ATTR,O):Bt,Ft="ADD_DATA_URI_TAGS"in a?_(ae(Ht),a.ADD_DATA_URI_TAGS,O):Ht,fe="FORBID_CONTENTS"in a?_({},a.FORBID_CONTENTS,O):Ut,ge="FORBID_TAGS"in a?_({},a.FORBID_TAGS,O):{},Ye="FORBID_ATTR"in a?_({},a.FORBID_ATTR,O):{},pe="USE_PROFILES"in a?a.USE_PROFILES:!1,zt=a.ALLOW_ARIA_ATTR!==!1,Ke=a.ALLOW_DATA_ATTR!==!1,Ct=a.ALLOW_UNKNOWN_PROTOCOLS||!1,ce=a.SAFE_FOR_TEMPLATES||!1,se=a.WHOLE_DOCUMENT||!1,ue=a.RETURN_DOM||!1,Re=a.RETURN_DOM_FRAGMENT||!1,Ie=a.RETURN_TRUSTED_TYPE||!1,et=a.FORCE_BODY||!1,$t=a.SANITIZE_DOM!==!1,Pt=a.SANITIZE_NAMED_PROPS||!1,tt=a.KEEP_CONTENT!==!1,ke=a.IN_PLACE||!1,Xe=a.ALLOWED_URI_REGEXP||Xe,he=a.NAMESPACE||te,a.CUSTOM_ELEMENT_HANDLING&&Gt(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(R.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Gt(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(R.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ce&&(Ke=!1),Re&&(ue=!0),pe&&(I=_({},j(St)),M=[],pe.html===!0&&(_(I,Et),_(M,Rt)),pe.svg===!0&&(_(I,Ge),_(M,qe),_(M,Ee)),pe.svgFilters===!0&&(_(I,We),_(M,qe),_(M,Ee)),pe.mathMl===!0&&(_(I,je),_(M,It),_(M,Ee))),a.ADD_TAGS&&(I===Mt&&(I=ae(I)),_(I,a.ADD_TAGS,O)),a.ADD_ATTR&&(M===Nt&&(M=ae(M)),_(M,a.ADD_ATTR,O)),a.ADD_URI_SAFE_ATTR&&_(nt,a.ADD_URI_SAFE_ATTR,O),a.FORBID_CONTENTS&&(fe===Ut&&(fe=ae(fe)),_(fe,a.FORBID_CONTENTS,O)),tt&&(I["#text"]=!0),se&&_(I,["html","head","body"]),I.table&&(_(I,["tbody"]),delete ge.tbody),C&&C(a),me=a)},Wt=_({},["mi","mo","mn","ms","mtext"]),jt=_({},["foreignobject","desc","title","annotation-xml"]),br=_({},["title","style","font","a","script"]),De=_({},Ge);_(De,We),_(De,Zn);var st=_({},je);_(st,Qn);var xr=function(a){var o=E(a);(!o||!o.tagName)&&(o={namespaceURI:he,tagName:"template"});var u=Ae(a.tagName),x=Ae(o.tagName);return it[a.namespaceURI]?a.namespaceURI===Le?o.namespaceURI===te?u==="svg":o.namespaceURI===Oe?u==="svg"&&(x==="annotation-xml"||Wt[x]):Boolean(De[u]):a.namespaceURI===Oe?o.namespaceURI===te?u==="math":o.namespaceURI===Le?u==="math"&&jt[x]:Boolean(st[u]):a.namespaceURI===te?o.namespaceURI===Le&&!jt[x]||o.namespaceURI===Oe&&!Wt[x]?!1:!st[u]&&(br[u]||!De[u]):!!(le==="application/xhtml+xml"&&it[a.namespaceURI]):!1},ne=function(a){de(e.removed,{element:a});try{a.parentNode.removeChild(a)}catch{try{a.outerHTML=F}catch{a.remove()}}},lt=function(a,o){try{de(e.removed,{attribute:o.getAttributeNode(a),from:o})}catch{de(e.removed,{attribute:null,from:o})}if(o.removeAttribute(a),a==="is"&&!M[a])if(ue||Re)try{ne(o)}catch{}else try{o.setAttribute(a,"")}catch{}},qt=function(a){var o,u;if(et)a="<remove></remove>"+a;else{var x=Gn(a,/^[\r\n\t ]+/);u=x&&x[0]}le==="application/xhtml+xml"&&he===te&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");var H=S?S.createHTML(a):a;if(he===te)try{o=new w().parseFromString(H,le)}catch{}if(!o||!o.documentElement){o=ee.createDocument(he,"template",null);try{o.documentElement.innerHTML=rt?F:H}catch{}}var z=o.body||o.documentElement;return a&&u&&z.insertBefore(n.createTextNode(u),z.childNodes[0]||null),he===te?cr.call(o,se?"html":"body")[0]:se?o.documentElement:z},Zt=function(a){return Se.call(a.ownerDocument||a,a,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},wr=function(a){return a instanceof T&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof k)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},_e=function(a){return ie(l)==="object"?a instanceof l:a&&ie(a)==="object"&&typeof a.nodeType=="number"&&typeof a.nodeName=="string"},re=function(a,o,u){K[a]&&Bn(K[a],function(x){x.call(e,o,u,me)})},Qt=function(a){var o;if(re("beforeSanitizeElements",a,null),wr(a)||$(/[\u0080-\uFFFF]/,a.nodeName))return ne(a),!0;var u=O(a.nodeName);if(re("uponSanitizeElement",a,{tagName:u,allowedTags:I}),a.hasChildNodes()&&!_e(a.firstElementChild)&&(!_e(a.content)||!_e(a.content.firstElementChild))&&$(/<[/\w]/g,a.innerHTML)&&$(/<[/\w]/g,a.textContent)||u==="select"&&$(/<template/i,a.innerHTML))return ne(a),!0;if(!I[u]||ge[u]){if(!ge[u]&&Xt(u)&&(R.tagNameCheck instanceof RegExp&&$(R.tagNameCheck,u)||R.tagNameCheck instanceof Function&&R.tagNameCheck(u)))return!1;if(tt&&!fe[u]){var x=E(a)||a.parentNode,H=v(a)||a.childNodes;if(H&&x)for(var z=H.length,N=z-1;N>=0;--N)x.insertBefore(B(H[N],!0),X(a))}return ne(a),!0}return a instanceof c&&!xr(a)||(u==="noscript"||u==="noembed")&&$(/<\/no(script|embed)/i,a.innerHTML)?(ne(a),!0):(ce&&a.nodeType===3&&(o=a.textContent,o=Z(o,Ze," "),o=Z(o,Qe," "),o=Z(o,Ve," "),a.textContent!==o&&(de(e.removed,{element:a.cloneNode()}),a.textContent=o)),re("afterSanitizeElements",a,null),!1)},Vt=function(a,o,u){if($t&&(o==="id"||o==="name")&&(u in n||u in _r))return!1;if(!(Ke&&!Ye[o]&&$(pr,o))){if(!(zt&&$(fr,o))){if(!M[o]||Ye[o]){if(!(Xt(a)&&(R.tagNameCheck instanceof RegExp&&$(R.tagNameCheck,a)||R.tagNameCheck instanceof Function&&R.tagNameCheck(a))&&(R.attributeNameCheck instanceof RegExp&&$(R.attributeNameCheck,o)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(o))||o==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&$(R.tagNameCheck,u)||R.tagNameCheck instanceof Function&&R.tagNameCheck(u))))return!1}else if(!nt[o]){if(!$(Xe,Z(u,Dt,""))){if(!((o==="src"||o==="xlink:href"||o==="href")&&a!=="script"&&Wn(u,"data:")===0&&Ft[a])){if(!(Ct&&!$(hr,Z(u,Dt,"")))){if(u)return!1}}}}}}return!0},Xt=function(a){return a.indexOf("-")>0},Yt=function(a){var o,u,x,H;re("beforeSanitizeAttributes",a,null);var z=a.attributes;if(z){var N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:M};for(H=z.length;H--;){o=z[H];var Me=o,L=Me.name,ot=Me.namespaceURI;if(u=L==="value"?o.value:jn(o.value),x=O(L),N.attrName=x,N.attrValue=u,N.keepAttr=!0,N.forceKeepAttr=void 0,re("uponSanitizeAttribute",a,N),u=N.attrValue,!N.forceKeepAttr&&(lt(L,a),!!N.keepAttr)){if($(/\/>/i,u)){lt(L,a);continue}ce&&(u=Z(u,Ze," "),u=Z(u,Qe," "),u=Z(u,Ve," "));var Kt=O(a.nodeName);if(Vt(Kt,x,u)){if(Pt&&(x==="id"||x==="name")&&(lt(L,a),u=mr+u),S&&ie(m)==="object"&&typeof m.getAttributeType=="function"&&!ot)switch(m.getAttributeType(Kt,x)){case"TrustedHTML":u=S.createHTML(u);break;case"TrustedScriptURL":u=S.createScriptURL(u);break}try{ot?a.setAttributeNS(ot,L,u):a.setAttribute(L,u),vt(e.removed)}catch{}}}}re("afterSanitizeAttributes",a,null)}},yr=function h(a){var o,u=Zt(a);for(re("beforeSanitizeShadowDOM",a,null);o=u.nextNode();)re("uponSanitizeShadowNode",o,null),!Qt(o)&&(o.content instanceof r&&h(o.content),Yt(o));re("afterSanitizeShadowDOM",a,null)};return e.sanitize=function(h){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,u,x,H,z;if(rt=!h,rt&&(h="<!-->"),typeof h!="string"&&!_e(h)){if(typeof h.toString!="function")throw Be("toString is not a function");if(h=h.toString(),typeof h!="string")throw Be("dirty is not a string, aborting")}if(!e.isSupported){if(ie(i.toStaticHTML)==="object"||typeof i.toStaticHTML=="function"){if(typeof h=="string")return i.toStaticHTML(h);if(_e(h))return i.toStaticHTML(h.outerHTML)}return h}if(Je||at(a),e.removed=[],typeof h=="string"&&(ke=!1),ke){if(h.nodeName){var N=O(h.nodeName);if(!I[N]||ge[N])throw Be("root node is forbidden and cannot be sanitized in-place")}}else if(h instanceof l)o=qt("<!---->"),u=o.ownerDocument.importNode(h,!0),u.nodeType===1&&u.nodeName==="BODY"||u.nodeName==="HTML"?o=u:o.appendChild(u);else{if(!ue&&!ce&&!se&&h.indexOf("<")===-1)return S&&Ie?S.createHTML(h):h;if(o=qt(h),!o)return ue?null:Ie?F:""}o&&et&&ne(o.firstChild);for(var Me=Zt(ke?h:o);x=Me.nextNode();)x.nodeType===3&&x===H||Qt(x)||(x.content instanceof r&&yr(x.content),Yt(x),H=x);if(H=null,ke)return h;if(ue){if(Re)for(z=or.call(o.ownerDocument);o.firstChild;)z.appendChild(o.firstChild);else z=o;return M.shadowroot&&(z=ur.call(t,z,!0)),z}var L=se?o.outerHTML:o.innerHTML;return se&&I["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&$(rr,o.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+o.ownerDocument.doctype.name+`>
`+L),ce&&(L=Z(L,Ze," "),L=Z(L,Qe," "),L=Z(L,Ve," ")),S&&Ie?S.createHTML(L):L},e.setConfig=function(h){at(h),Je=!0},e.clearConfig=function(){me=null,Je=!1},e.isValidAttribute=function(h,a,o){me||at({});var u=O(h),x=O(a);return Vt(u,x,o)},e.addHook=function(h,a){typeof a=="function"&&(K[h]=K[h]||[],de(K[h],a))},e.removeHook=function(h){if(K[h])return vt(K[h])},e.removeHooks=function(h){K[h]&&(K[h]=[])},e.removeAllHooks=function(){K={}},e}var sr=Ot();const lr=A.defineComponent({__name:"nlo-markdown",props:{markdown:null},setup(i){const e=i,t=A.ref(null);g.setOptions({headerIds:!1}),A.onMounted(()=>{n(e.markdown)}),A.watchEffect(()=>{n(e.markdown)});function n(r){const s=sr.sanitize(g(r)),l=t.value;l&&(l.innerHTML=s)}return(r,s)=>(A.openBlock(),A.createElementBlock("div",{ref_key:"markdownEl",ref:t},null,512))}});Q.LogService=Jt,Q.NLOMarkdown=lr,Q.PortalFooter=gn,Q.PortalHeader=fn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});

8

package.json
{
"name": "@nlo/frontend-common",
"version": "1.0.7",
"version": "1.0.8-alpha.0+33e071b",
"description": "Collection of utilities for creating consistent front-ends between verticals",

@@ -34,2 +34,4 @@ "main": "dist/index.mjs",

"devDependencies": {
"@types/dompurify": "2.4.0",
"@types/marked": "4.0.8",
"@vitejs/plugin-vue": "4.0.0",

@@ -45,2 +47,4 @@ "typescript": "4.9.4",

"cert-helper": "1.0.1",
"dompurify": "2.4.3",
"marked": "4.2.5",
"mkcert": "^1.5.1",

@@ -55,3 +59,3 @@ "yargs": "17.6.2"

},
"gitHead": "6924eca3f902ec81d2f428f4b9afd5b1e57bf146"
"gitHead": "33e071b8de554f75c227fb8ba39d7cd5dce50826"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc