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

markdown-to-jsx

Package Overview
Dependencies
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-to-jsx - npm Package Compare versions

Comparing version 7.6.1 to 7.6.2

2

dist/index.modern.js

@@ -1,2 +0,2 @@

import*as e from"react";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}const n=["children","options"],r={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var i;!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(i||(i={}));const l=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},o=["style","script"],c=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,s=/mailto:/i,d=/\n{2,}$/,p=/^(\s*>[\s\S]*?)(?=\n{2,})/,u=/^ *> ?/gm,f=/^ {2,}\n/,h=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,m=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,k=/^(?:\n *)*\n/,x=/\r\n?/g,b=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,v=/^\[\^([^\]]+)]/,S=/\f/g,E=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,C=/^\s*?\[(x|\s)\]/,$=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,w=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,L=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,A=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,T=/^<!--[\s\S]*?(?:-->)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,R=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,D=/-([a-z])?/gi,j=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,N=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,P=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,_=/\t/g,W=/(^ *\||\| *$)/g,G=/^ *:-+: *$/,Z=/^ *:-+ *$/,q=/^ *-+: *$/,Q="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",V=new RegExp(`^([*_])\\1${Q}\\1\\1(?!\\1)`),X=new RegExp(`^([*_])${Q}\\1(?!\\1|\\w)`),J=new RegExp(`^==${Q}==`),K=new RegExp(`^~~${Q}~~`),Y=/^\\([^0-9A-Za-z\s])/,ee=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,te=/^\n+/,ne=/^([ \t]*)/,re=/\\([^\\])/g,ie=/ *\n+$/,le=/(?:^|\n)( *)$/,ae="(?:\\d+\\.)",oe="(?:[*+-])";function ce(e){return"( *)("+(1===e?ae:oe)+") +"}const se=ce(1),de=ce(2);function pe(e){return new RegExp("^"+(1===e?se:de))}const ue=pe(1),fe=pe(2);function he(e){return new RegExp("^"+(1===e?se:de)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ae:oe)+" )[^\\n]*)*(\\n|$)","gm")}const me=he(1),ge=he(2);function ye(e){const t=1===e?ae:oe;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const ke=ye(1),xe=ye(2);function be(e,t){const n=1===t,i=n?ke:xe,l=n?me:ge,a=n?ue:fe;return{match(e,t){const n=le.exec(t.prevCapture);return n&&(t.list||!t.inline&&!t.simple)?i.exec(e=n[1]+e):null},order:1,parse(e,t,r){const i=n?+e[2]:void 0,o=e[0].replace(d,"\n").match(l);let c=!1;return{items:o.map(function(e,n){const i=a.exec(e)[0].length,l=new RegExp("^ {1,"+i+"}","gm"),s=e.replace(l,"").replace(a,""),d=n===o.length-1,p=-1!==s.indexOf("\n\n")||d&&c;c=p;const u=r.inline,f=r.list;let h;r.list=!0,p?(r.inline=!1,h=s.replace(ie,"\n\n")):(r.inline=!0,h=s.replace(ie,""));const m=t(h,r);return r.inline=u,r.list=f,m}),ordered:n,start:i}},render:(t,n,i)=>e(t.ordered?"ol":"ul",{key:i.key,start:t.type===r.orderedList?t.start:void 0},t.items.map(function(t,r){return e("li",{key:r},n(t,i))}))}}const ve=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ee=[p,m,g,$,z,w,T,j,me,ke,ge,xe],Ce=[...Ee,/^[^\n]+(?: \n|\n{2,})/,L,B];function $e(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function we(e){return q.test(e)?"right":G.test(e)?"center":Z.test(e)?"left":null}function ze(e,t,n,i){const l=n.inTable;n.inTable=!0;let a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce((e,l)=>("|"===l.trim()?e.push(i?{type:r.tableSeparator}:{type:r.text,text:l}):""!==l&&e.push.apply(e,t(l,n)),e),[]);n.inTable=l;let o=[[]];return a.forEach(function(e,t){e.type===r.tableSeparator?0!==t&&t!==a.length-1&&o.push([]):(e.type!==r.text||null!=a[t+1]&&a[t+1].type!==r.tableSeparator||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function Le(e,t,n){n.inline=!0;const i=e[2]?e[2].replace(W,"").split("|").map(we):[],l=e[3]?function(e,t,n){return e.trim().split("\n").map(function(e){return ze(e,t,n,!0)})}(e[3],t,n):[],a=ze(e[1],t,n,!!l.length);return n.inline=!1,l.length?{align:i,cells:l,header:a,type:r.table}:{children:a,type:r.paragraph}}function Ae(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function Te(e){return function(t,n){return n.inline?e.exec(t):null}}function Oe(e){return function(t,n){return n.inline||n.simple?e.exec(t):null}}function Be(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Me(e){return function(t){return e.exec(t)}}function Re(e,t,n){if(t.inline||t.simple)return null;if(n&&!n.endsWith("\n"))return null;let r="";e.split("\n").every(e=>!Ee.some(t=>t.test(e))&&(r+=e+"\n",e.trim()));const i=r.trimEnd();return""==i?null:[r,i]}function Ie(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(re,"$1")}function De(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function je(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function Ne(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const He=(e,t,n)=>({children:De(t,e[1],n)});function Fe(){return{}}function Pe(){return null}function _e(...e){return e.filter(Boolean).join(" ")}function We(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],void 0!==r);)i.shift();return r||n}function Ge(n="",i={}){function d(e,n,...r){const l=We(i.overrides,`${e}.props`,{});return i.createElement(function(e,t){const n=We(t,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:We(t,`${e}.component`,e):e}(e,i.overrides),t({},n,l,{className:_e(null==n?void 0:n.className,l.className)||void 0}),...r)}function W(t){t=t.replace(E,"");let n=!1;i.forceInline?n=!0:i.forceBlock||(n=!1===P.test(t));const r=ie(re(n?t:`${t.trimEnd().replace(te,"")}\n\n`,{inline:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===i.wrapper)return r;const l=i.wrapper||(n?"span":"div");let a;if(r.length>1||i.forceWrapper)a=r;else{if(1===r.length)return a=r[0],"string"==typeof a?d("span",{key:"outer"},a):a;a=null}return e.createElement(l,{key:"outer"},a)}function G(t,n){const r=n.match(c);return r?r.reduce(function(n,r,a){const o=r.indexOf("=");if(-1!==o){const c=function(e){return-1!==e.indexOf("-")&&null===e.match(O)&&(e=e.replace(D,function(e,t){return t.toUpperCase()})),e}(r.slice(0,o)).trim(),s=function(e){const t=e[0];return('"'===t||"'"===t)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(r.slice(o+1).trim()),d=l[c]||c,p=n[d]=function(e,t,n,r){return"style"===t?n.split(/;\s?/).reduce(function(e,t){const n=t.slice(0,t.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t.slice(n.length+1).trim(),e},{}):"href"===t||"src"===t?r(n,e,t):(n.match(M)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(t,c,s,i.sanitizer);"string"==typeof p&&(L.test(p)||B.test(p))&&(n[d]=e.cloneElement(W(p.trim()),{key:a}))}else"style"!==r&&(n[l[r]||r]=!0);return n},{}):null}i.overrides=i.overrides||{},i.sanitizer=i.sanitizer||Ie,i.slugify=i.slugify||$e,i.namedCodesToUnicode=i.namedCodesToUnicode?t({},a,i.namedCodesToUnicode):a,i.createElement=i.createElement||e.createElement;const Z=[],q={},Q={[r.blockQuote]:{match:Be(p),order:1,parse:(e,t,n)=>({children:t(e[0].replace(u,""),n)}),render:(e,t,n)=>d("blockquote",{key:n.key},t(e.children,n))},[r.breakLine]:{match:Me(f),order:1,parse:Fe,render:(e,t,n)=>d("br",{key:n.key})},[r.breakThematic]:{match:Be(h),order:1,parse:Fe,render:(e,t,n)=>d("hr",{key:n.key})},[r.codeBlock]:{match:Be(g),order:0,parse:e=>({lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(e,n,r)=>d("pre",{key:r.key},d("code",t({},e.attrs,{className:e.lang?`lang-${e.lang}`:""}),e.text))},[r.codeFenced]:{match:Be(m),order:0,parse:e=>({attrs:G("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:r.codeBlock})},[r.codeInline]:{match:Oe(y),order:3,parse:e=>({text:e[2]}),render:(e,t,n)=>d("code",{key:n.key},e.text)},[r.footnote]:{match:Be(b),order:0,parse:e=>(Z.push({footnote:e[2],identifier:e[1]}),{}),render:Pe},[r.footnoteReference]:{match:Te(v),order:1,parse:e=>({target:`#${i.slugify(e[1],$e)}`,text:e[1]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href")},d("sup",{key:n.key},e.text))},[r.gfmTask]:{match:Te(C),order:1,parse:e=>({completed:"x"===e[1].toLowerCase()}),render:(e,t,n)=>d("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})},[r.heading]:{match:Be(i.enforceAtxHeadings?w:$),order:1,parse:(e,t,n)=>({children:De(t,e[2],n),id:i.slugify(e[2],$e),level:e[1].length}),render:(e,t,n)=>d(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n))},[r.headingSetext]:{match:Be(z),order:0,parse:(e,t,n)=>({children:De(t,e[1],n),level:"="===e[2]?1:2,type:r.heading})},[r.htmlBlock]:{match:Me(L),order:1,parse(e,t,n){const[,r]=e[3].match(ne),i=new RegExp(`^${r}`,"gm"),l=e[3].replace(i,""),a=(c=l,Ce.some(e=>e.test(c))?Ne:De);var c;const s=e[1].toLowerCase(),d=-1!==o.indexOf(s),p=(d?s:e[1]).trim(),u={attrs:G(p,e[2]),noInnerParse:d,tag:p};return n.inAnchor=n.inAnchor||"a"===s,d?u.text=e[3]:u.children=a(t,l,n),n.inAnchor=!1,u},render:(e,n,r)=>d(e.tag,t({key:r.key},e.attrs),e.text||(e.children?n(e.children,r):""))},[r.htmlSelfClosing]:{match:Me(B),order:1,parse(e){const t=e[1].trim();return{attrs:G(t,e[2]||""),tag:t}},render:(e,n,r)=>d(e.tag,t({},e.attrs,{key:r.key}))},[r.htmlComment]:{match:Me(T),order:1,parse:()=>({}),render:Pe},[r.image]:{match:Oe(Se),order:1,parse:e=>({alt:e[1],target:Ue(e[2]),title:e[3]}),render:(e,t,n)=>d("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i.sanitizer(e.target,"img","src")})},[r.link]:{match:Te(ve),order:3,parse:(e,t,n)=>({children:je(t,e[1],n),target:Ue(e[2]),title:e[3]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href"),title:e.title},t(e.children,n))},[r.linkAngleBraceStyleDetector]:{match:Te(U),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],type:r.link})},[r.linkBareUrlDetector]:{match:(e,t)=>t.inAnchor||i.disableAutoLink?null:Te(R)(e,t),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],title:void 0,type:r.link})},[r.linkMailtoDetector]:{match:Te(I),order:0,parse(e){let t=e[1],n=e[1];return s.test(n)||(n="mailto:"+n),{children:[{text:t.replace("mailto:",""),type:r.text}],target:n,type:r.link}}},[r.orderedList]:be(d,1),[r.unorderedList]:be(d,2),[r.newlineCoalescer]:{match:Be(k),order:3,parse:Fe,render:()=>"\n"},[r.paragraph]:{match:Re,order:3,parse:He,render:(e,t,n)=>d("p",{key:n.key},t(e.children,n))},[r.ref]:{match:Te(N),order:0,parse:e=>(q[e[1]]={target:e[2],title:e[4]},{}),render:Pe},[r.refImage]:{match:Oe(H),order:0,parse:e=>({alt:e[1]||void 0,ref:e[2]}),render:(e,t,n)=>q[e.ref]?d("img",{key:n.key,alt:e.alt,src:i.sanitizer(q[e.ref].target,"img","src"),title:q[e.ref].title}):null},[r.refLink]:{match:Te(F),order:0,parse:(e,t,n)=>({children:t(e[1],n),fallbackChildren:e[0],ref:e[2]}),render:(e,t,n)=>q[e.ref]?d("a",{key:n.key,href:i.sanitizer(q[e.ref].target,"a","href"),title:q[e.ref].title},t(e.children,n)):d("span",{key:n.key},e.fallbackChildren)},[r.table]:{match:Be(j),order:1,parse:Le,render(e,t,n){const r=e;return d("table",{key:n.key},d("thead",null,d("tr",null,r.header.map(function(e,i){return d("th",{key:i,style:Ae(r,i)},t(e,n))}))),d("tbody",null,r.cells.map(function(e,i){return d("tr",{key:i},e.map(function(e,i){return d("td",{key:i,style:Ae(r,i)},t(e,n))}))})))}},[r.text]:{match:Me(ee),order:4,parse:e=>({text:e[0].replace(A,(e,t)=>i.namedCodesToUnicode[t]?i.namedCodesToUnicode[t]:e)}),render:e=>e.text},[r.textBolded]:{match:Oe(V),order:2,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("strong",{key:n.key},t(e.children,n))},[r.textEmphasized]:{match:Oe(X),order:3,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("em",{key:n.key},t(e.children,n))},[r.textEscaped]:{match:Oe(Y),order:1,parse:e=>({text:e[1],type:r.text})},[r.textMarked]:{match:Oe(J),order:3,parse:He,render:(e,t,n)=>d("mark",{key:n.key},t(e.children,n))},[r.textStrikethroughed]:{match:Oe(K),order:3,parse:He,render:(e,t,n)=>d("del",{key:n.key},t(e.children,n))}};!0===i.disableParsingRawHTML&&(delete Q[r.htmlBlock],delete Q[r.htmlSelfClosing]);const re=function(e){let t=Object.keys(e);function n(r,i){let l=[];for(i.prevCapture=i.prevCapture||"";r;){let a=0;for(;a<t.length;){const o=t[a],c=e[o],s=c.match(r,i);if(s){const e=s[0];i.prevCapture+=e,r=r.substring(e.length);const t=c.parse(s,n,i);null==t.type&&(t.type=o),l.push(t);break}a++}}return i.prevCapture="",l}return t.sort(function(t,n){let r=e[t].order,i=e[n].order;return r!==i?r-i:t<n?-1:1}),function(e,t){return n(function(e){return e.replace(x,"\n").replace(S,"").replace(_," ")}(e),t)}}(Q),ie=(le=function(e,t){return function(n,r,i){const l=e[n.type].render;return t?t(()=>l(n,r,i),n,r,i):l(n,r,i)}}(Q,i.renderRule),function e(t,n={}){if(Array.isArray(t)){const r=n.key,i=[];let l=!1;for(let r=0;r<t.length;r++){n.key=r;const a=e(t[r],n),o="string"==typeof a;o&&l?i[i.length-1]+=a:null!==a&&i.push(a),l=o}return n.key=r,i}return le(t,e,n)});var le;const ae=W(n);return Z.length?d("div",null,ae,d("footer",{key:"footer"},Z.map(function(e){return d("div",{id:i.slugify(e.identifier,$e),key:e.identifier},e.identifier,ie(re(e.footnote,{inline:!0})))}))):ae}export default t=>{let{children:r="",options:i}=t,l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t.indexOf(n=l[r])>=0||(i[n]=e[n]);return i}(t,n);return e.cloneElement(Ge(r,i),l)};export{r as RuleType,Ge as compiler,Ie as sanitizer,$e as slugify};
import*as e from"react";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}const n=["children","options"],r={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var i;!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(i||(i={}));const l=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},o=["style","script"],c=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,s=/mailto:/i,d=/\n{2,}$/,p=/^(\s*>[\s\S]*?)(?=\n{2,})/,u=/^ *> ?/gm,f=/^ {2,}\n/,h=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,m=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,k=/^(?:\n *)*\n/,x=/\r\n?/g,b=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,v=/^\[\^([^\]]+)]/,S=/\f/g,E=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,C=/^\s*?\[(x|\s)\]/,$=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,w=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,L=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,A=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,T=/^<!--[\s\S]*?(?:-->)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,R=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,D=/-([a-z])?/gi,j=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,N=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,P=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,_=/\t/g,G=/(^ *\||\| *$)/g,W=/^ *:-+: *$/,Z=/^ *:-+ *$/,q=/^ *-+: *$/,Q="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",V=new RegExp(`^([*_])\\1${Q}\\1\\1(?!\\1)`),X=new RegExp(`^([*_])${Q}\\1(?!\\1|\\w)`),J=new RegExp(`^==${Q}==`),K=new RegExp(`^~~${Q}~~`),Y=/^\\([^0-9A-Za-z\s])/,ee=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,te=/^\n+/,ne=/^([ \t]*)/,re=/\\([^\\])/g,ie=/ *\n+$/,le=/(?:^|\n)( *)$/,ae="(?:\\d+\\.)",oe="(?:[*+-])";function ce(e){return"( *)("+(1===e?ae:oe)+") +"}const se=ce(1),de=ce(2);function pe(e){return new RegExp("^"+(1===e?se:de))}const ue=pe(1),fe=pe(2);function he(e){return new RegExp("^"+(1===e?se:de)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ae:oe)+" )[^\\n]*)*(\\n|$)","gm")}const me=he(1),ge=he(2);function ye(e){const t=1===e?ae:oe;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const ke=ye(1),xe=ye(2);function be(e,t){const n=1===t,i=n?ke:xe,l=n?me:ge,a=n?ue:fe;return{match(e,t){const n=le.exec(t.prevCapture);return n&&(t.list||!t.inline&&!t.simple)?i.exec(e=n[1]+e):null},order:1,parse(e,t,r){const i=n?+e[2]:void 0,o=e[0].replace(d,"\n").match(l);let c=!1;return{items:o.map(function(e,n){const i=a.exec(e)[0].length,l=new RegExp("^ {1,"+i+"}","gm"),s=e.replace(l,"").replace(a,""),d=n===o.length-1,p=-1!==s.indexOf("\n\n")||d&&c;c=p;const u=r.inline,f=r.list;let h;r.list=!0,p?(r.inline=!1,h=s.replace(ie,"\n\n")):(r.inline=!0,h=s.replace(ie,""));const m=t(h,r);return r.inline=u,r.list=f,m}),ordered:n,start:i}},render:(t,n,i)=>e(t.ordered?"ol":"ul",{key:i.key,start:t.type===r.orderedList?t.start:void 0},t.items.map(function(t,r){return e("li",{key:r},n(t,i))}))}}const ve=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ee=[p,m,g,$,z,w,T,j,me,ke,ge,xe],Ce=[...Ee,/^[^\n]+(?: \n|\n{2,})/,L,B];function $e(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function we(e){return q.test(e)?"right":W.test(e)?"center":Z.test(e)?"left":null}function ze(e,t,n,i){const l=n.inTable;n.inTable=!0;let a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce((e,l)=>("|"===l.trim()?e.push(i?{type:r.tableSeparator}:{type:r.text,text:l}):""!==l&&e.push.apply(e,t(l,n)),e),[]);n.inTable=l;let o=[[]];return a.forEach(function(e,t){e.type===r.tableSeparator?0!==t&&t!==a.length-1&&o.push([]):(e.type!==r.text||null!=a[t+1]&&a[t+1].type!==r.tableSeparator||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function Le(e,t,n){n.inline=!0;const i=e[2]?e[2].replace(G,"").split("|").map(we):[],l=e[3]?function(e,t,n){return e.trim().split("\n").map(function(e){return ze(e,t,n,!0)})}(e[3],t,n):[],a=ze(e[1],t,n,!!l.length);return n.inline=!1,l.length?{align:i,cells:l,header:a,type:r.table}:{children:a,type:r.paragraph}}function Ae(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function Te(e){return function(t,n){return n.inline?e.exec(t):null}}function Oe(e){return function(t,n){return n.inline||n.simple?e.exec(t):null}}function Be(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Me(e){return function(t){return e.exec(t)}}function Re(e,t){if(t.inline||t.simple)return null;let n="";e.split("\n").every(e=>!Ee.some(t=>t.test(e))&&(n+=e+"\n",e.trim()));const r=n.trimEnd();return""==r?null:[n,r]}function Ie(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(re,"$1")}function De(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function je(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function Ne(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const He=(e,t,n)=>({children:De(t,e[1],n)});function Fe(){return{}}function Pe(){return null}function _e(...e){return e.filter(Boolean).join(" ")}function Ge(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],void 0!==r);)i.shift();return r||n}function We(n="",i={}){function d(e,n,...r){const l=Ge(i.overrides,`${e}.props`,{});return i.createElement(function(e,t){const n=Ge(t,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ge(t,`${e}.component`,e):e}(e,i.overrides),t({},n,l,{className:_e(null==n?void 0:n.className,l.className)||void 0}),...r)}function G(t){t=t.replace(E,"");let n=!1;i.forceInline?n=!0:i.forceBlock||(n=!1===P.test(t));const r=ie(re(n?t:`${t.trimEnd().replace(te,"")}\n\n`,{inline:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===i.wrapper)return r;const l=i.wrapper||(n?"span":"div");let a;if(r.length>1||i.forceWrapper)a=r;else{if(1===r.length)return a=r[0],"string"==typeof a?d("span",{key:"outer"},a):a;a=null}return e.createElement(l,{key:"outer"},a)}function W(t,n){const r=n.match(c);return r?r.reduce(function(n,r,a){const o=r.indexOf("=");if(-1!==o){const c=function(e){return-1!==e.indexOf("-")&&null===e.match(O)&&(e=e.replace(D,function(e,t){return t.toUpperCase()})),e}(r.slice(0,o)).trim(),s=function(e){const t=e[0];return('"'===t||"'"===t)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(r.slice(o+1).trim()),d=l[c]||c,p=n[d]=function(e,t,n,r){return"style"===t?n.split(/;\s?/).reduce(function(e,t){const n=t.slice(0,t.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t.slice(n.length+1).trim(),e},{}):"href"===t||"src"===t?r(n,e,t):(n.match(M)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(t,c,s,i.sanitizer);"string"==typeof p&&(L.test(p)||B.test(p))&&(n[d]=e.cloneElement(G(p.trim()),{key:a}))}else"style"!==r&&(n[l[r]||r]=!0);return n},{}):null}i.overrides=i.overrides||{},i.sanitizer=i.sanitizer||Ie,i.slugify=i.slugify||$e,i.namedCodesToUnicode=i.namedCodesToUnicode?t({},a,i.namedCodesToUnicode):a,i.createElement=i.createElement||e.createElement;const Z=[],q={},Q={[r.blockQuote]:{match:Be(p),order:1,parse:(e,t,n)=>({children:t(e[0].replace(u,""),n)}),render:(e,t,n)=>d("blockquote",{key:n.key},t(e.children,n))},[r.breakLine]:{match:Me(f),order:1,parse:Fe,render:(e,t,n)=>d("br",{key:n.key})},[r.breakThematic]:{match:Be(h),order:1,parse:Fe,render:(e,t,n)=>d("hr",{key:n.key})},[r.codeBlock]:{match:Be(g),order:0,parse:e=>({lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(e,n,r)=>d("pre",{key:r.key},d("code",t({},e.attrs,{className:e.lang?`lang-${e.lang}`:""}),e.text))},[r.codeFenced]:{match:Be(m),order:0,parse:e=>({attrs:W("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:r.codeBlock})},[r.codeInline]:{match:Oe(y),order:3,parse:e=>({text:e[2]}),render:(e,t,n)=>d("code",{key:n.key},e.text)},[r.footnote]:{match:Be(b),order:0,parse:e=>(Z.push({footnote:e[2],identifier:e[1]}),{}),render:Pe},[r.footnoteReference]:{match:Te(v),order:1,parse:e=>({target:`#${i.slugify(e[1],$e)}`,text:e[1]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href")},d("sup",{key:n.key},e.text))},[r.gfmTask]:{match:Te(C),order:1,parse:e=>({completed:"x"===e[1].toLowerCase()}),render:(e,t,n)=>d("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})},[r.heading]:{match:Be(i.enforceAtxHeadings?w:$),order:1,parse:(e,t,n)=>({children:De(t,e[2],n),id:i.slugify(e[2],$e),level:e[1].length}),render:(e,t,n)=>d(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n))},[r.headingSetext]:{match:Be(z),order:0,parse:(e,t,n)=>({children:De(t,e[1],n),level:"="===e[2]?1:2,type:r.heading})},[r.htmlBlock]:{match:Me(L),order:1,parse(e,t,n){const[,r]=e[3].match(ne),i=new RegExp(`^${r}`,"gm"),l=e[3].replace(i,""),a=(c=l,Ce.some(e=>e.test(c))?Ne:De);var c;const s=e[1].toLowerCase(),d=-1!==o.indexOf(s),p=(d?s:e[1]).trim(),u={attrs:W(p,e[2]),noInnerParse:d,tag:p};return n.inAnchor=n.inAnchor||"a"===s,d?u.text=e[3]:u.children=a(t,l,n),n.inAnchor=!1,u},render:(e,n,r)=>d(e.tag,t({key:r.key},e.attrs),e.text||(e.children?n(e.children,r):""))},[r.htmlSelfClosing]:{match:Me(B),order:1,parse(e){const t=e[1].trim();return{attrs:W(t,e[2]||""),tag:t}},render:(e,n,r)=>d(e.tag,t({},e.attrs,{key:r.key}))},[r.htmlComment]:{match:Me(T),order:1,parse:()=>({}),render:Pe},[r.image]:{match:Oe(Se),order:1,parse:e=>({alt:e[1],target:Ue(e[2]),title:e[3]}),render:(e,t,n)=>d("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i.sanitizer(e.target,"img","src")})},[r.link]:{match:Te(ve),order:3,parse:(e,t,n)=>({children:je(t,e[1],n),target:Ue(e[2]),title:e[3]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href"),title:e.title},t(e.children,n))},[r.linkAngleBraceStyleDetector]:{match:Te(U),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],type:r.link})},[r.linkBareUrlDetector]:{match:(e,t)=>t.inAnchor||i.disableAutoLink?null:Te(R)(e,t),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],title:void 0,type:r.link})},[r.linkMailtoDetector]:{match:Te(I),order:0,parse(e){let t=e[1],n=e[1];return s.test(n)||(n="mailto:"+n),{children:[{text:t.replace("mailto:",""),type:r.text}],target:n,type:r.link}}},[r.orderedList]:be(d,1),[r.unorderedList]:be(d,2),[r.newlineCoalescer]:{match:Be(k),order:3,parse:Fe,render:()=>"\n"},[r.paragraph]:{match:Re,order:3,parse:He,render:(e,t,n)=>d("p",{key:n.key},t(e.children,n))},[r.ref]:{match:Te(N),order:0,parse:e=>(q[e[1]]={target:e[2],title:e[4]},{}),render:Pe},[r.refImage]:{match:Oe(H),order:0,parse:e=>({alt:e[1]||void 0,ref:e[2]}),render:(e,t,n)=>q[e.ref]?d("img",{key:n.key,alt:e.alt,src:i.sanitizer(q[e.ref].target,"img","src"),title:q[e.ref].title}):null},[r.refLink]:{match:Te(F),order:0,parse:(e,t,n)=>({children:t(e[1],n),fallbackChildren:e[0],ref:e[2]}),render:(e,t,n)=>q[e.ref]?d("a",{key:n.key,href:i.sanitizer(q[e.ref].target,"a","href"),title:q[e.ref].title},t(e.children,n)):d("span",{key:n.key},e.fallbackChildren)},[r.table]:{match:Be(j),order:1,parse:Le,render(e,t,n){const r=e;return d("table",{key:n.key},d("thead",null,d("tr",null,r.header.map(function(e,i){return d("th",{key:i,style:Ae(r,i)},t(e,n))}))),d("tbody",null,r.cells.map(function(e,i){return d("tr",{key:i},e.map(function(e,i){return d("td",{key:i,style:Ae(r,i)},t(e,n))}))})))}},[r.text]:{match:Me(ee),order:4,parse:e=>({text:e[0].replace(A,(e,t)=>i.namedCodesToUnicode[t]?i.namedCodesToUnicode[t]:e)}),render:e=>e.text},[r.textBolded]:{match:Oe(V),order:2,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("strong",{key:n.key},t(e.children,n))},[r.textEmphasized]:{match:Oe(X),order:3,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("em",{key:n.key},t(e.children,n))},[r.textEscaped]:{match:Oe(Y),order:1,parse:e=>({text:e[1],type:r.text})},[r.textMarked]:{match:Oe(J),order:3,parse:He,render:(e,t,n)=>d("mark",{key:n.key},t(e.children,n))},[r.textStrikethroughed]:{match:Oe(K),order:3,parse:He,render:(e,t,n)=>d("del",{key:n.key},t(e.children,n))}};!0===i.disableParsingRawHTML&&(delete Q[r.htmlBlock],delete Q[r.htmlSelfClosing]);const re=function(e){let t=Object.keys(e);function n(r,i){let l=[];for(i.prevCapture=i.prevCapture||"";r;){let a=0;for(;a<t.length;){const o=t[a],c=e[o],s=c.match(r,i);if(s){const e=s[0];i.prevCapture+=e,r=r.substring(e.length);const t=c.parse(s,n,i);null==t.type&&(t.type=o),l.push(t);break}a++}}return i.prevCapture="",l}return t.sort(function(t,n){let r=e[t].order,i=e[n].order;return r!==i?r-i:t<n?-1:1}),function(e,t){return n(function(e){return e.replace(x,"\n").replace(S,"").replace(_," ")}(e),t)}}(Q),ie=(le=function(e,t){return function(n,r,i){const l=e[n.type].render;return t?t(()=>l(n,r,i),n,r,i):l(n,r,i)}}(Q,i.renderRule),function e(t,n={}){if(Array.isArray(t)){const r=n.key,i=[];let l=!1;for(let r=0;r<t.length;r++){n.key=r;const a=e(t[r],n),o="string"==typeof a;o&&l?i[i.length-1]+=a:null!==a&&i.push(a),l=o}return n.key=r,i}return le(t,e,n)});var le;const ae=G(n);return Z.length?d("div",null,ae,d("footer",{key:"footer"},Z.map(function(e){return d("div",{id:i.slugify(e.identifier,$e),key:e.identifier},e.identifier,ie(re(e.footnote,{inline:!0})))}))):ae}export default t=>{let{children:r="",options:i}=t,l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t.indexOf(n=l[r])>=0||(i[n]=e[n]);return i}(t,n);return e.cloneElement(We(r,i),l)};export{r as RuleType,We as compiler,Ie as sanitizer,$e as slugify};
//# sourceMappingURL=index.modern.js.map

@@ -1,2 +0,2 @@

import*as e from"react";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},r.apply(this,arguments)}var n,t=["children","options"],i={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(n||(n={}));var a=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(function(e,r){return e[r.toLowerCase()]=r,e},{class:"className",for:"htmlFor"}),o={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},l=["style","script"],c=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,u=/mailto:/i,s=/\n{2,}$/,d=/^(\s*>[\s\S]*?)(?=\n{2,})/,f=/^ *> ?/gm,p=/^ {2,}\n/,h=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,m=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,k=/^(?:\n *)*\n/,v=/\r\n?/g,x=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,b=/^\[\^([^\]]+)]/,S=/\f/g,E=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,C=/^\s*?\[(x|\s)\]/,w=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,T=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,O=/^<!--[\s\S]*?(?:-->)/,$=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,R=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,D=/-([a-z])?/gi,j=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,N=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,P=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,_=/\t/g,W=/(^ *\||\| *$)/g,G=/^ *:-+: *$/,Z=/^ *:-+ *$/,q=/^ *-+: *$/,Q="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",V=new RegExp("^([*_])\\1"+Q+"\\1\\1(?!\\1)"),X=new RegExp("^([*_])"+Q+"\\1(?!\\1|\\w)"),J=new RegExp("^=="+Q+"=="),K=new RegExp("^~~"+Q+"~~"),Y=/^\\([^0-9A-Za-z\s])/,ee=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,re=/^\n+/,ne=/^([ \t]*)/,te=/\\([^\\])/g,ie=/ *\n+$/,ae=/(?:^|\n)( *)$/,oe="(?:\\d+\\.)",le="(?:[*+-])";function ce(e){return"( *)("+(1===e?oe:le)+") +"}var ue=ce(1),se=ce(2);function de(e){return new RegExp("^"+(1===e?ue:se))}var fe=de(1),pe=de(2);function he(e){return new RegExp("^"+(1===e?ue:se)+"[^\\n]*(?:\\n(?!\\1"+(1===e?oe:le)+" )[^\\n]*)*(\\n|$)","gm")}var me=he(1),ge=he(2);function ye(e){var r=1===e?oe:le;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}var ke=ye(1),ve=ye(2);function xe(e,r){var n=1===r,t=n?ke:ve,a=n?me:ge,o=n?fe:pe;return{match:function(e,r){var n=ae.exec(r.prevCapture);return n&&(r.list||!r.inline&&!r.simple)?t.exec(e=n[1]+e):null},order:1,parse:function(e,r,t){var i=n?+e[2]:void 0,l=e[0].replace(s,"\n").match(a),c=!1;return{items:l.map(function(e,n){var i=o.exec(e)[0].length,a=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(a,"").replace(o,""),s=n===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=t.inline,h=t.list;t.list=!0,d?(t.inline=!1,f=u.replace(ie,"\n\n")):(t.inline=!0,f=u.replace(ie,""));var m=r(f,t);return t.inline=p,t.list=h,m}),ordered:n,start:i}},render:function(r,n,t){return e(r.ordered?"ol":"ul",{key:t.key,start:r.type===i.orderedList?r.start:void 0},r.items.map(function(r,i){return e("li",{key:i},n(r,t))}))}}}var be=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ee=[d,m,g,w,L,z,O,j,me,ke,ge,ve],Ce=[].concat(Ee,[/^[^\n]+(?: \n|\n{2,})/,A,B]);function we(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function ze(e){return q.test(e)?"right":G.test(e)?"center":Z.test(e)?"left":null}function Le(e,r,n,t){var a=n.inTable;n.inTable=!0;var o=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,a){return"|"===a.trim()?e.push(t?{type:i.tableSeparator}:{type:i.text,text:a}):""!==a&&e.push.apply(e,r(a,n)),e},[]);n.inTable=a;var l=[[]];return o.forEach(function(e,r){e.type===i.tableSeparator?0!==r&&r!==o.length-1&&l.push([]):(e.type!==i.text||null!=o[r+1]&&o[r+1].type!==i.tableSeparator||(e.text=e.text.trimEnd()),l[l.length-1].push(e))}),l}function Ae(e,r,n){n.inline=!0;var t=e[2]?e[2].replace(W,"").split("|").map(ze):[],a=e[3]?function(e,r,n){return e.trim().split("\n").map(function(e){return Le(e,r,n,!0)})}(e[3],r,n):[],o=Le(e[1],r,n,!!a.length);return n.inline=!1,a.length?{align:t,cells:a,header:o,type:i.table}:{children:o,type:i.paragraph}}function Te(e,r){return null==e.align[r]?{}:{textAlign:e.align[r]}}function Oe(e){return function(r,n){return n.inline?e.exec(r):null}}function $e(e){return function(r,n){return n.inline||n.simple?e.exec(r):null}}function Be(e){return function(r,n){return n.inline||n.simple?null:e.exec(r)}}function Me(e){return function(r){return e.exec(r)}}function Re(e,r,n){if(r.inline||r.simple)return null;if(n&&!n.endsWith("\n"))return null;var t="";e.split("\n").every(function(e){return!Ee.some(function(r){return r.test(e)})&&(t+=e+"\n",e.trim())});var i=t.trimEnd();return""==i?null:[t,i]}function Ie(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(te,"$1")}function De(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function je(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function Ne(e,r,n){var t=n.inline||!1;n.inline=!1;var i=e(r,n);return n.inline=t,i}var He=function(e,r,n){return{children:De(r,e[1],n)}};function Fe(){return{}}function Pe(){return null}function _e(){return[].slice.call(arguments).filter(Boolean).join(" ")}function We(e,r,n){for(var t=e,i=r.split(".");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||n}function Ge(e,r){var n=We(r,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:We(r,e+".component",e):e}function Ze(n,t){var s;function W(e,n){var i,a=We(t.overrides,e+".props",{});return(i=t).createElement.apply(i,[Ge(e,t.overrides),r({},n,a,{className:_e(null==n?void 0:n.className,a.className)||void 0})].concat([].slice.call(arguments,2)))}function G(r){r=r.replace(E,"");var n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===P.test(r));for(var i=oe(ae(n?r:r.trimEnd().replace(re,"")+"\n\n",{inline:n}));"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===t.wrapper)return i;var a,o=t.wrapper||(n?"span":"div");if(i.length>1||t.forceWrapper)a=i;else{if(1===i.length)return"string"==typeof(a=i[0])?W("span",{key:"outer"},a):a;a=null}return e.createElement(o,{key:"outer"},a)}function Z(r,n){var i=n.match(c);return i?i.reduce(function(n,i,o){var l=i.indexOf("=");if(-1!==l){var c=function(e){return-1!==e.indexOf("-")&&null===e.match($)&&(e=e.replace(D,function(e,r){return r.toUpperCase()})),e}(i.slice(0,l)).trim(),u=function(e){var r=e[0];return('"'===r||"'"===r)&&e.length>=2&&e[e.length-1]===r?e.slice(1,-1):e}(i.slice(l+1).trim()),s=a[c]||c,d=n[s]=function(e,r,n,t){return"style"===r?n.split(/;\s?/).reduce(function(e,r){var n=r.slice(0,r.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=r.slice(n.length+1).trim(),e},{}):"href"===r||"src"===r?t(n,e,r):(n.match(M)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(r,c,u,t.sanitizer);"string"==typeof d&&(A.test(d)||B.test(d))&&(n[s]=e.cloneElement(G(d.trim()),{key:o}))}else"style"!==i&&(n[a[i]||i]=!0);return n},{}):null}void 0===n&&(n=""),void 0===t&&(t={}),t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||Ie,t.slugify=t.slugify||we,t.namedCodesToUnicode=t.namedCodesToUnicode?r({},o,t.namedCodesToUnicode):o,t.createElement=t.createElement||e.createElement;var q=[],Q={},te=((s={})[i.blockQuote]={match:Be(d),order:1,parse:function(e,r,n){return{children:r(e[0].replace(f,""),n)}},render:function(e,r,n){return W("blockquote",{key:n.key},r(e.children,n))}},s[i.breakLine]={match:Me(p),order:1,parse:Fe,render:function(e,r,n){return W("br",{key:n.key})}},s[i.breakThematic]={match:Be(h),order:1,parse:Fe,render:function(e,r,n){return W("hr",{key:n.key})}},s[i.codeBlock]={match:Be(g),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return W("pre",{key:t.key},W("code",r({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},s[i.codeFenced]={match:Be(m),order:0,parse:function(e){return{attrs:Z("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:i.codeBlock}}},s[i.codeInline]={match:$e(y),order:3,parse:function(e){return{text:e[2]}},render:function(e,r,n){return W("code",{key:n.key},e.text)}},s[i.footnote]={match:Be(x),order:0,parse:function(e){return q.push({footnote:e[2],identifier:e[1]}),{}},render:Pe},s[i.footnoteReference]={match:Oe(b),order:1,parse:function(e){return{target:"#"+t.slugify(e[1],we),text:e[1]}},render:function(e,r,n){return W("a",{key:n.key,href:t.sanitizer(e.target,"a","href")},W("sup",{key:n.key},e.text))}},s[i.gfmTask]={match:Oe(C),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,r,n){return W("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})}},s[i.heading]={match:Be(t.enforceAtxHeadings?z:w),order:1,parse:function(e,r,n){return{children:De(r,e[2],n),id:t.slugify(e[2],we),level:e[1].length}},render:function(e,r,n){return W("h"+e.level,{id:e.id,key:n.key},r(e.children,n))}},s[i.headingSetext]={match:Be(L),order:0,parse:function(e,r,n){return{children:De(r,e[1],n),level:"="===e[2]?1:2,type:i.heading}}},s[i.htmlBlock]={match:Me(A),order:1,parse:function(e,r,n){var t,i=e[3].match(ne),a=new RegExp("^"+i[1],"gm"),o=e[3].replace(a,""),c=(t=o,Ce.some(function(e){return e.test(t)})?Ne:De),u=e[1].toLowerCase(),s=-1!==l.indexOf(u),d=(s?u:e[1]).trim(),f={attrs:Z(d,e[2]),noInnerParse:s,tag:d};return n.inAnchor=n.inAnchor||"a"===u,s?f.text=e[3]:f.children=c(r,o,n),n.inAnchor=!1,f},render:function(e,n,t){return W(e.tag,r({key:t.key},e.attrs),e.text||(e.children?n(e.children,t):""))}},s[i.htmlSelfClosing]={match:Me(B),order:1,parse:function(e){var r=e[1].trim();return{attrs:Z(r,e[2]||""),tag:r}},render:function(e,n,t){return W(e.tag,r({},e.attrs,{key:t.key}))}},s[i.htmlComment]={match:Me(O),order:1,parse:function(){return{}},render:Pe},s[i.image]={match:$e(Se),order:1,parse:function(e){return{alt:e[1],target:Ue(e[2]),title:e[3]}},render:function(e,r,n){return W("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:t.sanitizer(e.target,"img","src")})}},s[i.link]={match:Oe(be),order:3,parse:function(e,r,n){return{children:je(r,e[1],n),target:Ue(e[2]),title:e[3]}},render:function(e,r,n){return W("a",{key:n.key,href:t.sanitizer(e.target,"a","href"),title:e.title},r(e.children,n))}},s[i.linkAngleBraceStyleDetector]={match:Oe(U),order:0,parse:function(e){return{children:[{text:e[1],type:i.text}],target:e[1],type:i.link}}},s[i.linkBareUrlDetector]={match:function(e,r){return r.inAnchor||t.disableAutoLink?null:Oe(R)(e,r)},order:0,parse:function(e){return{children:[{text:e[1],type:i.text}],target:e[1],title:void 0,type:i.link}}},s[i.linkMailtoDetector]={match:Oe(I),order:0,parse:function(e){var r=e[1],n=e[1];return u.test(n)||(n="mailto:"+n),{children:[{text:r.replace("mailto:",""),type:i.text}],target:n,type:i.link}}},s[i.orderedList]=xe(W,1),s[i.unorderedList]=xe(W,2),s[i.newlineCoalescer]={match:Be(k),order:3,parse:Fe,render:function(){return"\n"}},s[i.paragraph]={match:Re,order:3,parse:He,render:function(e,r,n){return W("p",{key:n.key},r(e.children,n))}},s[i.ref]={match:Oe(N),order:0,parse:function(e){return Q[e[1]]={target:e[2],title:e[4]},{}},render:Pe},s[i.refImage]={match:$e(H),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,r,n){return Q[e.ref]?W("img",{key:n.key,alt:e.alt,src:t.sanitizer(Q[e.ref].target,"img","src"),title:Q[e.ref].title}):null}},s[i.refLink]={match:Oe(F),order:0,parse:function(e,r,n){return{children:r(e[1],n),fallbackChildren:e[0],ref:e[2]}},render:function(e,r,n){return Q[e.ref]?W("a",{key:n.key,href:t.sanitizer(Q[e.ref].target,"a","href"),title:Q[e.ref].title},r(e.children,n)):W("span",{key:n.key},e.fallbackChildren)}},s[i.table]={match:Be(j),order:1,parse:Ae,render:function(e,r,n){var t=e;return W("table",{key:n.key},W("thead",null,W("tr",null,t.header.map(function(e,i){return W("th",{key:i,style:Te(t,i)},r(e,n))}))),W("tbody",null,t.cells.map(function(e,i){return W("tr",{key:i},e.map(function(e,i){return W("td",{key:i,style:Te(t,i)},r(e,n))}))})))}},s[i.text]={match:Me(ee),order:4,parse:function(e){return{text:e[0].replace(T,function(e,r){return t.namedCodesToUnicode[r]?t.namedCodesToUnicode[r]:e})}},render:function(e){return e.text}},s[i.textBolded]={match:$e(V),order:2,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return W("strong",{key:n.key},r(e.children,n))}},s[i.textEmphasized]={match:$e(X),order:3,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return W("em",{key:n.key},r(e.children,n))}},s[i.textEscaped]={match:$e(Y),order:1,parse:function(e){return{text:e[1],type:i.text}}},s[i.textMarked]={match:$e(J),order:3,parse:He,render:function(e,r,n){return W("mark",{key:n.key},r(e.children,n))}},s[i.textStrikethroughed]={match:$e(K),order:3,parse:He,render:function(e,r,n){return W("del",{key:n.key},r(e.children,n))}},s);!0===t.disableParsingRawHTML&&(delete te[i.htmlBlock],delete te[i.htmlSelfClosing]);var ie,ae=function(e){var r=Object.keys(e);function n(t,i){var a=[];for(i.prevCapture=i.prevCapture||"";t;)for(var o=0;o<r.length;){var l=r[o],c=e[l],u=c.match(t,i);if(u){var s=u[0];i.prevCapture+=s,t=t.substring(s.length);var d=c.parse(u,n,i);null==d.type&&(d.type=l),a.push(d);break}o++}return i.prevCapture="",a}return r.sort(function(r,n){var t=e[r].order,i=e[n].order;return t!==i?t-i:r<n?-1:1}),function(e,r){return n(function(e){return e.replace(v,"\n").replace(S,"").replace(_," ")}(e),r)}}(te),oe=(ie=function(e,r){return function(n,t,i){var a=e[n.type].render;return r?r(function(){return a(n,t,i)},n,t,i):a(n,t,i)}}(te,t.renderRule),function e(r,n){if(void 0===n&&(n={}),Array.isArray(r)){for(var t=n.key,i=[],a=!1,o=0;o<r.length;o++){n.key=o;var l=e(r[o],n),c="string"==typeof l;c&&a?i[i.length-1]+=l:null!==l&&i.push(l),a=c}return n.key=t,i}return ie(r,e,n)}),le=G(n);return q.length?W("div",null,le,W("footer",{key:"footer"},q.map(function(e){return W("div",{id:t.slugify(e.identifier,we),key:e.identifier},e.identifier,oe(ae(e.footnote,{inline:!0})))}))):le}export default function(r){var n=r.children,i=void 0===n?"":n,a=r.options,o=function(e,r){if(null==e)return{};var n,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(i[n]=e[n]);return i}(r,t);return e.cloneElement(Ze(i,a),o)}export{i as RuleType,Ze as compiler,Ie as sanitizer,we as slugify};
import*as e from"react";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},r.apply(this,arguments)}var n,t=["children","options"],i={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(n||(n={}));var a=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(function(e,r){return e[r.toLowerCase()]=r,e},{class:"className",for:"htmlFor"}),o={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},l=["style","script"],c=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,u=/mailto:/i,s=/\n{2,}$/,d=/^(\s*>[\s\S]*?)(?=\n{2,})/,f=/^ *> ?/gm,p=/^ {2,}\n/,h=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,m=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,k=/^(?:\n *)*\n/,v=/\r\n?/g,x=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,b=/^\[\^([^\]]+)]/,S=/\f/g,E=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,C=/^\s*?\[(x|\s)\]/,w=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,T=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,O=/^<!--[\s\S]*?(?:-->)/,$=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,R=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,D=/-([a-z])?/gi,j=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,N=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,P=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,_=/\t/g,G=/(^ *\||\| *$)/g,W=/^ *:-+: *$/,Z=/^ *:-+ *$/,q=/^ *-+: *$/,Q="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",V=new RegExp("^([*_])\\1"+Q+"\\1\\1(?!\\1)"),X=new RegExp("^([*_])"+Q+"\\1(?!\\1|\\w)"),J=new RegExp("^=="+Q+"=="),K=new RegExp("^~~"+Q+"~~"),Y=/^\\([^0-9A-Za-z\s])/,ee=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,re=/^\n+/,ne=/^([ \t]*)/,te=/\\([^\\])/g,ie=/ *\n+$/,ae=/(?:^|\n)( *)$/,oe="(?:\\d+\\.)",le="(?:[*+-])";function ce(e){return"( *)("+(1===e?oe:le)+") +"}var ue=ce(1),se=ce(2);function de(e){return new RegExp("^"+(1===e?ue:se))}var fe=de(1),pe=de(2);function he(e){return new RegExp("^"+(1===e?ue:se)+"[^\\n]*(?:\\n(?!\\1"+(1===e?oe:le)+" )[^\\n]*)*(\\n|$)","gm")}var me=he(1),ge=he(2);function ye(e){var r=1===e?oe:le;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}var ke=ye(1),ve=ye(2);function xe(e,r){var n=1===r,t=n?ke:ve,a=n?me:ge,o=n?fe:pe;return{match:function(e,r){var n=ae.exec(r.prevCapture);return n&&(r.list||!r.inline&&!r.simple)?t.exec(e=n[1]+e):null},order:1,parse:function(e,r,t){var i=n?+e[2]:void 0,l=e[0].replace(s,"\n").match(a),c=!1;return{items:l.map(function(e,n){var i=o.exec(e)[0].length,a=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(a,"").replace(o,""),s=n===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=t.inline,h=t.list;t.list=!0,d?(t.inline=!1,f=u.replace(ie,"\n\n")):(t.inline=!0,f=u.replace(ie,""));var m=r(f,t);return t.inline=p,t.list=h,m}),ordered:n,start:i}},render:function(r,n,t){return e(r.ordered?"ol":"ul",{key:t.key,start:r.type===i.orderedList?r.start:void 0},r.items.map(function(r,i){return e("li",{key:i},n(r,t))}))}}}var be=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ee=[d,m,g,w,L,z,O,j,me,ke,ge,ve],Ce=[].concat(Ee,[/^[^\n]+(?: \n|\n{2,})/,A,B]);function we(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function ze(e){return q.test(e)?"right":W.test(e)?"center":Z.test(e)?"left":null}function Le(e,r,n,t){var a=n.inTable;n.inTable=!0;var o=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,a){return"|"===a.trim()?e.push(t?{type:i.tableSeparator}:{type:i.text,text:a}):""!==a&&e.push.apply(e,r(a,n)),e},[]);n.inTable=a;var l=[[]];return o.forEach(function(e,r){e.type===i.tableSeparator?0!==r&&r!==o.length-1&&l.push([]):(e.type!==i.text||null!=o[r+1]&&o[r+1].type!==i.tableSeparator||(e.text=e.text.trimEnd()),l[l.length-1].push(e))}),l}function Ae(e,r,n){n.inline=!0;var t=e[2]?e[2].replace(G,"").split("|").map(ze):[],a=e[3]?function(e,r,n){return e.trim().split("\n").map(function(e){return Le(e,r,n,!0)})}(e[3],r,n):[],o=Le(e[1],r,n,!!a.length);return n.inline=!1,a.length?{align:t,cells:a,header:o,type:i.table}:{children:o,type:i.paragraph}}function Te(e,r){return null==e.align[r]?{}:{textAlign:e.align[r]}}function Oe(e){return function(r,n){return n.inline?e.exec(r):null}}function $e(e){return function(r,n){return n.inline||n.simple?e.exec(r):null}}function Be(e){return function(r,n){return n.inline||n.simple?null:e.exec(r)}}function Me(e){return function(r){return e.exec(r)}}function Re(e,r){if(r.inline||r.simple)return null;var n="";e.split("\n").every(function(e){return!Ee.some(function(r){return r.test(e)})&&(n+=e+"\n",e.trim())});var t=n.trimEnd();return""==t?null:[n,t]}function Ie(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(te,"$1")}function De(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function je(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function Ne(e,r,n){var t=n.inline||!1;n.inline=!1;var i=e(r,n);return n.inline=t,i}var He=function(e,r,n){return{children:De(r,e[1],n)}};function Fe(){return{}}function Pe(){return null}function _e(){return[].slice.call(arguments).filter(Boolean).join(" ")}function Ge(e,r,n){for(var t=e,i=r.split(".");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||n}function We(e,r){var n=Ge(r,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ge(r,e+".component",e):e}function Ze(n,t){var s;function G(e,n){var i,a=Ge(t.overrides,e+".props",{});return(i=t).createElement.apply(i,[We(e,t.overrides),r({},n,a,{className:_e(null==n?void 0:n.className,a.className)||void 0})].concat([].slice.call(arguments,2)))}function W(r){r=r.replace(E,"");var n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===P.test(r));for(var i=oe(ae(n?r:r.trimEnd().replace(re,"")+"\n\n",{inline:n}));"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===t.wrapper)return i;var a,o=t.wrapper||(n?"span":"div");if(i.length>1||t.forceWrapper)a=i;else{if(1===i.length)return"string"==typeof(a=i[0])?G("span",{key:"outer"},a):a;a=null}return e.createElement(o,{key:"outer"},a)}function Z(r,n){var i=n.match(c);return i?i.reduce(function(n,i,o){var l=i.indexOf("=");if(-1!==l){var c=function(e){return-1!==e.indexOf("-")&&null===e.match($)&&(e=e.replace(D,function(e,r){return r.toUpperCase()})),e}(i.slice(0,l)).trim(),u=function(e){var r=e[0];return('"'===r||"'"===r)&&e.length>=2&&e[e.length-1]===r?e.slice(1,-1):e}(i.slice(l+1).trim()),s=a[c]||c,d=n[s]=function(e,r,n,t){return"style"===r?n.split(/;\s?/).reduce(function(e,r){var n=r.slice(0,r.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=r.slice(n.length+1).trim(),e},{}):"href"===r||"src"===r?t(n,e,r):(n.match(M)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(r,c,u,t.sanitizer);"string"==typeof d&&(A.test(d)||B.test(d))&&(n[s]=e.cloneElement(W(d.trim()),{key:o}))}else"style"!==i&&(n[a[i]||i]=!0);return n},{}):null}void 0===n&&(n=""),void 0===t&&(t={}),t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||Ie,t.slugify=t.slugify||we,t.namedCodesToUnicode=t.namedCodesToUnicode?r({},o,t.namedCodesToUnicode):o,t.createElement=t.createElement||e.createElement;var q=[],Q={},te=((s={})[i.blockQuote]={match:Be(d),order:1,parse:function(e,r,n){return{children:r(e[0].replace(f,""),n)}},render:function(e,r,n){return G("blockquote",{key:n.key},r(e.children,n))}},s[i.breakLine]={match:Me(p),order:1,parse:Fe,render:function(e,r,n){return G("br",{key:n.key})}},s[i.breakThematic]={match:Be(h),order:1,parse:Fe,render:function(e,r,n){return G("hr",{key:n.key})}},s[i.codeBlock]={match:Be(g),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return G("pre",{key:t.key},G("code",r({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},s[i.codeFenced]={match:Be(m),order:0,parse:function(e){return{attrs:Z("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:i.codeBlock}}},s[i.codeInline]={match:$e(y),order:3,parse:function(e){return{text:e[2]}},render:function(e,r,n){return G("code",{key:n.key},e.text)}},s[i.footnote]={match:Be(x),order:0,parse:function(e){return q.push({footnote:e[2],identifier:e[1]}),{}},render:Pe},s[i.footnoteReference]={match:Oe(b),order:1,parse:function(e){return{target:"#"+t.slugify(e[1],we),text:e[1]}},render:function(e,r,n){return G("a",{key:n.key,href:t.sanitizer(e.target,"a","href")},G("sup",{key:n.key},e.text))}},s[i.gfmTask]={match:Oe(C),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,r,n){return G("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})}},s[i.heading]={match:Be(t.enforceAtxHeadings?z:w),order:1,parse:function(e,r,n){return{children:De(r,e[2],n),id:t.slugify(e[2],we),level:e[1].length}},render:function(e,r,n){return G("h"+e.level,{id:e.id,key:n.key},r(e.children,n))}},s[i.headingSetext]={match:Be(L),order:0,parse:function(e,r,n){return{children:De(r,e[1],n),level:"="===e[2]?1:2,type:i.heading}}},s[i.htmlBlock]={match:Me(A),order:1,parse:function(e,r,n){var t,i=e[3].match(ne),a=new RegExp("^"+i[1],"gm"),o=e[3].replace(a,""),c=(t=o,Ce.some(function(e){return e.test(t)})?Ne:De),u=e[1].toLowerCase(),s=-1!==l.indexOf(u),d=(s?u:e[1]).trim(),f={attrs:Z(d,e[2]),noInnerParse:s,tag:d};return n.inAnchor=n.inAnchor||"a"===u,s?f.text=e[3]:f.children=c(r,o,n),n.inAnchor=!1,f},render:function(e,n,t){return G(e.tag,r({key:t.key},e.attrs),e.text||(e.children?n(e.children,t):""))}},s[i.htmlSelfClosing]={match:Me(B),order:1,parse:function(e){var r=e[1].trim();return{attrs:Z(r,e[2]||""),tag:r}},render:function(e,n,t){return G(e.tag,r({},e.attrs,{key:t.key}))}},s[i.htmlComment]={match:Me(O),order:1,parse:function(){return{}},render:Pe},s[i.image]={match:$e(Se),order:1,parse:function(e){return{alt:e[1],target:Ue(e[2]),title:e[3]}},render:function(e,r,n){return G("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:t.sanitizer(e.target,"img","src")})}},s[i.link]={match:Oe(be),order:3,parse:function(e,r,n){return{children:je(r,e[1],n),target:Ue(e[2]),title:e[3]}},render:function(e,r,n){return G("a",{key:n.key,href:t.sanitizer(e.target,"a","href"),title:e.title},r(e.children,n))}},s[i.linkAngleBraceStyleDetector]={match:Oe(U),order:0,parse:function(e){return{children:[{text:e[1],type:i.text}],target:e[1],type:i.link}}},s[i.linkBareUrlDetector]={match:function(e,r){return r.inAnchor||t.disableAutoLink?null:Oe(R)(e,r)},order:0,parse:function(e){return{children:[{text:e[1],type:i.text}],target:e[1],title:void 0,type:i.link}}},s[i.linkMailtoDetector]={match:Oe(I),order:0,parse:function(e){var r=e[1],n=e[1];return u.test(n)||(n="mailto:"+n),{children:[{text:r.replace("mailto:",""),type:i.text}],target:n,type:i.link}}},s[i.orderedList]=xe(G,1),s[i.unorderedList]=xe(G,2),s[i.newlineCoalescer]={match:Be(k),order:3,parse:Fe,render:function(){return"\n"}},s[i.paragraph]={match:Re,order:3,parse:He,render:function(e,r,n){return G("p",{key:n.key},r(e.children,n))}},s[i.ref]={match:Oe(N),order:0,parse:function(e){return Q[e[1]]={target:e[2],title:e[4]},{}},render:Pe},s[i.refImage]={match:$e(H),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,r,n){return Q[e.ref]?G("img",{key:n.key,alt:e.alt,src:t.sanitizer(Q[e.ref].target,"img","src"),title:Q[e.ref].title}):null}},s[i.refLink]={match:Oe(F),order:0,parse:function(e,r,n){return{children:r(e[1],n),fallbackChildren:e[0],ref:e[2]}},render:function(e,r,n){return Q[e.ref]?G("a",{key:n.key,href:t.sanitizer(Q[e.ref].target,"a","href"),title:Q[e.ref].title},r(e.children,n)):G("span",{key:n.key},e.fallbackChildren)}},s[i.table]={match:Be(j),order:1,parse:Ae,render:function(e,r,n){var t=e;return G("table",{key:n.key},G("thead",null,G("tr",null,t.header.map(function(e,i){return G("th",{key:i,style:Te(t,i)},r(e,n))}))),G("tbody",null,t.cells.map(function(e,i){return G("tr",{key:i},e.map(function(e,i){return G("td",{key:i,style:Te(t,i)},r(e,n))}))})))}},s[i.text]={match:Me(ee),order:4,parse:function(e){return{text:e[0].replace(T,function(e,r){return t.namedCodesToUnicode[r]?t.namedCodesToUnicode[r]:e})}},render:function(e){return e.text}},s[i.textBolded]={match:$e(V),order:2,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return G("strong",{key:n.key},r(e.children,n))}},s[i.textEmphasized]={match:$e(X),order:3,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return G("em",{key:n.key},r(e.children,n))}},s[i.textEscaped]={match:$e(Y),order:1,parse:function(e){return{text:e[1],type:i.text}}},s[i.textMarked]={match:$e(J),order:3,parse:He,render:function(e,r,n){return G("mark",{key:n.key},r(e.children,n))}},s[i.textStrikethroughed]={match:$e(K),order:3,parse:He,render:function(e,r,n){return G("del",{key:n.key},r(e.children,n))}},s);!0===t.disableParsingRawHTML&&(delete te[i.htmlBlock],delete te[i.htmlSelfClosing]);var ie,ae=function(e){var r=Object.keys(e);function n(t,i){var a=[];for(i.prevCapture=i.prevCapture||"";t;)for(var o=0;o<r.length;){var l=r[o],c=e[l],u=c.match(t,i);if(u){var s=u[0];i.prevCapture+=s,t=t.substring(s.length);var d=c.parse(u,n,i);null==d.type&&(d.type=l),a.push(d);break}o++}return i.prevCapture="",a}return r.sort(function(r,n){var t=e[r].order,i=e[n].order;return t!==i?t-i:r<n?-1:1}),function(e,r){return n(function(e){return e.replace(v,"\n").replace(S,"").replace(_," ")}(e),r)}}(te),oe=(ie=function(e,r){return function(n,t,i){var a=e[n.type].render;return r?r(function(){return a(n,t,i)},n,t,i):a(n,t,i)}}(te,t.renderRule),function e(r,n){if(void 0===n&&(n={}),Array.isArray(r)){for(var t=n.key,i=[],a=!1,o=0;o<r.length;o++){n.key=o;var l=e(r[o],n),c="string"==typeof l;c&&a?i[i.length-1]+=l:null!==l&&i.push(l),a=c}return n.key=t,i}return ie(r,e,n)}),le=W(n);return q.length?G("div",null,le,G("footer",{key:"footer"},q.map(function(e){return G("div",{id:t.slugify(e.identifier,we),key:e.identifier},e.identifier,oe(ae(e.footnote,{inline:!0})))}))):le}export default function(r){var n=r.children,i=void 0===n?"":n,a=r.options,o=function(e,r){if(null==e)return{};var n,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(i[n]=e[n]);return i}(r,t);return e.cloneElement(Ze(i,a),o)}export{i as RuleType,Ze as compiler,Ie as sanitizer,we as slugify};
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):(e||self).MarkdownToJSX=r(e.React)}(this,function(e){function r(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}}),r.default=e,r}var n=/*#__PURE__*/r(e);function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},t.apply(this,arguments)}var i,a=["children","options"],o={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(i||(i={}));var l=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(function(e,r){return e[r.toLowerCase()]=r,e},{class:"className",for:"htmlFor"}),c={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},u=["style","script"],s=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,d=/mailto:/i,f=/\n{2,}$/,p=/^(\s*>[\s\S]*?)(?=\n{2,})/,h=/^ *> ?/gm,m=/^ {2,}\n/,g=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,y=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,k=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,v=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,x=/^(?:\n *)*\n/,b=/\r\n?/g,S=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,E=/^\[\^([^\]]+)]/,C=/\f/g,w=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,O=/^\s*?\[(x|\s)\]/,z=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,M=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,R=/^<!--[\s\S]*?(?:-->)/,$=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,j=/^\{.*\}$/,I=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,D=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,N=/-([a-z])?/gi,P=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,_=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,W=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,G=/\t/g,Z=/(^ *\||\| *$)/g,q=/^ *:-+: *$/,X=/^ *:-+ *$/,Q=/^ *-+: *$/,V="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",J=new RegExp("^([*_])\\1"+V+"\\1\\1(?!\\1)"),K=new RegExp("^([*_])"+V+"\\1(?!\\1|\\w)"),Y=new RegExp("^=="+V+"=="),ee=new RegExp("^~~"+V+"~~"),re=/^\\([^0-9A-Za-z\s])/,ne=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,te=/^\n+/,ie=/^([ \t]*)/,ae=/\\([^\\])/g,oe=/ *\n+$/,le=/(?:^|\n)( *)$/,ce="(?:\\d+\\.)",ue="(?:[*+-])";function se(e){return"( *)("+(1===e?ce:ue)+") +"}var de=se(1),fe=se(2);function pe(e){return new RegExp("^"+(1===e?de:fe))}var he=pe(1),me=pe(2);function ge(e){return new RegExp("^"+(1===e?de:fe)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ce:ue)+" )[^\\n]*)*(\\n|$)","gm")}var ye=ge(1),ke=ge(2);function ve(e){var r=1===e?ce:ue;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}var xe=ve(1),be=ve(2);function Se(e,r){var n=1===r,t=n?xe:be,i=n?ye:ke,a=n?he:me;return{match:function(e,r){var n=le.exec(r.prevCapture);return n&&(r.list||!r.inline&&!r.simple)?t.exec(e=n[1]+e):null},order:1,parse:function(e,r,t){var o=n?+e[2]:void 0,l=e[0].replace(f,"\n").match(i),c=!1;return{items:l.map(function(e,n){var i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),s=n===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=t.inline,h=t.list;t.list=!0,d?(t.inline=!1,f=u.replace(oe,"\n\n")):(t.inline=!0,f=u.replace(oe,""));var m=r(f,t);return t.inline=p,t.list=h,m}),ordered:n,start:o}},render:function(r,n,t){return e(r.ordered?"ol":"ul",{key:t.key,start:r.type===o.orderedList?r.start:void 0},r.items.map(function(r,i){return e("li",{key:i},n(r,t))}))}}}var Ee=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Ce=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,we=[p,y,k,z,L,T,R,P,ye,xe,ke,be],Oe=[].concat(we,[/^[^\n]+(?: \n|\n{2,})/,A,B]);function ze(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Te(e){return Q.test(e)?"right":q.test(e)?"center":X.test(e)?"left":null}function Le(e,r,n,t){var i=n.inTable;n.inTable=!0;var a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,i){return"|"===i.trim()?e.push(t?{type:o.tableSeparator}:{type:o.text,text:i}):""!==i&&e.push.apply(e,r(i,n)),e},[]);n.inTable=i;var l=[[]];return a.forEach(function(e,r){e.type===o.tableSeparator?0!==r&&r!==a.length-1&&l.push([]):(e.type!==o.text||null!=a[r+1]&&a[r+1].type!==o.tableSeparator||(e.text=e.text.trimEnd()),l[l.length-1].push(e))}),l}function Ae(e,r,n){n.inline=!0;var t=e[2]?e[2].replace(Z,"").split("|").map(Te):[],i=e[3]?function(e,r,n){return e.trim().split("\n").map(function(e){return Le(e,r,n,!0)})}(e[3],r,n):[],a=Le(e[1],r,n,!!i.length);return n.inline=!1,i.length?{align:t,cells:i,header:a,type:o.table}:{children:a,type:o.paragraph}}function Me(e,r){return null==e.align[r]?{}:{textAlign:e.align[r]}}function Re(e){return function(r,n){return n.inline?e.exec(r):null}}function $e(e){return function(r,n){return n.inline||n.simple?e.exec(r):null}}function Be(e){return function(r,n){return n.inline||n.simple?null:e.exec(r)}}function je(e){return function(r){return e.exec(r)}}function Ie(e,r,n){if(r.inline||r.simple)return null;if(n&&!n.endsWith("\n"))return null;var t="";e.split("\n").every(function(e){return!we.some(function(r){return r.test(e)})&&(t+=e+"\n",e.trim())});var i=t.trimEnd();return""==i?null:[t,i]}function De(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(ae,"$1")}function Ne(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function Pe(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function _e(e,r,n){var t=n.inline||!1;n.inline=!1;var i=e(r,n);return n.inline=t,i}var He=function(e,r,n){return{children:Ne(r,e[1],n)}};function Fe(){return{}}function We(){return null}function Ge(){return[].slice.call(arguments).filter(Boolean).join(" ")}function Ze(e,r,n){for(var t=e,i=r.split(".");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||n}function qe(e,r){var n=Ze(r,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ze(r,e+".component",e):e}function Xe(e,r){var i;function a(e,n){var i,a=Ze(r.overrides,e+".props",{});return(i=r).createElement.apply(i,[qe(e,r.overrides),t({},n,a,{className:Ge(null==n?void 0:n.className,a.className)||void 0})].concat([].slice.call(arguments,2)))}function f(e){e=e.replace(w,"");var t=!1;r.forceInline?t=!0:r.forceBlock||(t=!1===W.test(e));for(var i=oe(ae(t?e:e.trimEnd().replace(te,"")+"\n\n",{inline:t}));"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===r.wrapper)return i;var o,l=r.wrapper||(t?"span":"div");if(i.length>1||r.forceWrapper)o=i;else{if(1===i.length)return"string"==typeof(o=i[0])?a("span",{key:"outer"},o):o;o=null}return n.createElement(l,{key:"outer"},o)}function Z(e,t){var i=t.match(s);return i?i.reduce(function(t,i,a){var o=i.indexOf("=");if(-1!==o){var c=function(e){return-1!==e.indexOf("-")&&null===e.match($)&&(e=e.replace(N,function(e,r){return r.toUpperCase()})),e}(i.slice(0,o)).trim(),u=function(e){var r=e[0];return('"'===r||"'"===r)&&e.length>=2&&e[e.length-1]===r?e.slice(1,-1):e}(i.slice(o+1).trim()),s=l[c]||c,d=t[s]=function(e,r,n,t){return"style"===r?n.split(/;\s?/).reduce(function(e,r){var n=r.slice(0,r.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=r.slice(n.length+1).trim(),e},{}):"href"===r||"src"===r?t(n,e,r):(n.match(j)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(e,c,u,r.sanitizer);"string"==typeof d&&(A.test(d)||B.test(d))&&(t[s]=n.cloneElement(f(d.trim()),{key:a}))}else"style"!==i&&(t[l[i]||i]=!0);return t},{}):null}void 0===e&&(e=""),void 0===r&&(r={}),r.overrides=r.overrides||{},r.sanitizer=r.sanitizer||De,r.slugify=r.slugify||ze,r.namedCodesToUnicode=r.namedCodesToUnicode?t({},c,r.namedCodesToUnicode):c,r.createElement=r.createElement||n.createElement;var q=[],X={},Q=((i={})[o.blockQuote]={match:Be(p),order:1,parse:function(e,r,n){return{children:r(e[0].replace(h,""),n)}},render:function(e,r,n){return a("blockquote",{key:n.key},r(e.children,n))}},i[o.breakLine]={match:je(m),order:1,parse:Fe,render:function(e,r,n){return a("br",{key:n.key})}},i[o.breakThematic]={match:Be(g),order:1,parse:Fe,render:function(e,r,n){return a("hr",{key:n.key})}},i[o.codeBlock]={match:Be(k),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,r,n){return a("pre",{key:n.key},a("code",t({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},i[o.codeFenced]={match:Be(y),order:0,parse:function(e){return{attrs:Z("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:o.codeBlock}}},i[o.codeInline]={match:$e(v),order:3,parse:function(e){return{text:e[2]}},render:function(e,r,n){return a("code",{key:n.key},e.text)}},i[o.footnote]={match:Be(S),order:0,parse:function(e){return q.push({footnote:e[2],identifier:e[1]}),{}},render:We},i[o.footnoteReference]={match:Re(E),order:1,parse:function(e){return{target:"#"+r.slugify(e[1],ze),text:e[1]}},render:function(e,n,t){return a("a",{key:t.key,href:r.sanitizer(e.target,"a","href")},a("sup",{key:t.key},e.text))}},i[o.gfmTask]={match:Re(O),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,r,n){return a("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})}},i[o.heading]={match:Be(r.enforceAtxHeadings?T:z),order:1,parse:function(e,n,t){return{children:Ne(n,e[2],t),id:r.slugify(e[2],ze),level:e[1].length}},render:function(e,r,n){return a("h"+e.level,{id:e.id,key:n.key},r(e.children,n))}},i[o.headingSetext]={match:Be(L),order:0,parse:function(e,r,n){return{children:Ne(r,e[1],n),level:"="===e[2]?1:2,type:o.heading}}},i[o.htmlBlock]={match:je(A),order:1,parse:function(e,r,n){var t,i=e[3].match(ie),a=new RegExp("^"+i[1],"gm"),o=e[3].replace(a,""),l=(t=o,Oe.some(function(e){return e.test(t)})?_e:Ne),c=e[1].toLowerCase(),s=-1!==u.indexOf(c),d=(s?c:e[1]).trim(),f={attrs:Z(d,e[2]),noInnerParse:s,tag:d};return n.inAnchor=n.inAnchor||"a"===c,s?f.text=e[3]:f.children=l(r,o,n),n.inAnchor=!1,f},render:function(e,r,n){return a(e.tag,t({key:n.key},e.attrs),e.text||(e.children?r(e.children,n):""))}},i[o.htmlSelfClosing]={match:je(B),order:1,parse:function(e){var r=e[1].trim();return{attrs:Z(r,e[2]||""),tag:r}},render:function(e,r,n){return a(e.tag,t({},e.attrs,{key:n.key}))}},i[o.htmlComment]={match:je(R),order:1,parse:function(){return{}},render:We},i[o.image]={match:$e(Ce),order:1,parse:function(e){return{alt:e[1],target:Ue(e[2]),title:e[3]}},render:function(e,n,t){return a("img",{key:t.key,alt:e.alt||void 0,title:e.title||void 0,src:r.sanitizer(e.target,"img","src")})}},i[o.link]={match:Re(Ee),order:3,parse:function(e,r,n){return{children:Pe(r,e[1],n),target:Ue(e[2]),title:e[3]}},render:function(e,n,t){return a("a",{key:t.key,href:r.sanitizer(e.target,"a","href"),title:e.title},n(e.children,t))}},i[o.linkAngleBraceStyleDetector]={match:Re(U),order:0,parse:function(e){return{children:[{text:e[1],type:o.text}],target:e[1],type:o.link}}},i[o.linkBareUrlDetector]={match:function(e,n){return n.inAnchor||r.disableAutoLink?null:Re(I)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:o.text}],target:e[1],title:void 0,type:o.link}}},i[o.linkMailtoDetector]={match:Re(D),order:0,parse:function(e){var r=e[1],n=e[1];return d.test(n)||(n="mailto:"+n),{children:[{text:r.replace("mailto:",""),type:o.text}],target:n,type:o.link}}},i[o.orderedList]=Se(a,1),i[o.unorderedList]=Se(a,2),i[o.newlineCoalescer]={match:Be(x),order:3,parse:Fe,render:function(){return"\n"}},i[o.paragraph]={match:Ie,order:3,parse:He,render:function(e,r,n){return a("p",{key:n.key},r(e.children,n))}},i[o.ref]={match:Re(_),order:0,parse:function(e){return X[e[1]]={target:e[2],title:e[4]},{}},render:We},i[o.refImage]={match:$e(H),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,t){return X[e.ref]?a("img",{key:t.key,alt:e.alt,src:r.sanitizer(X[e.ref].target,"img","src"),title:X[e.ref].title}):null}},i[o.refLink]={match:Re(F),order:0,parse:function(e,r,n){return{children:r(e[1],n),fallbackChildren:e[0],ref:e[2]}},render:function(e,n,t){return X[e.ref]?a("a",{key:t.key,href:r.sanitizer(X[e.ref].target,"a","href"),title:X[e.ref].title},n(e.children,t)):a("span",{key:t.key},e.fallbackChildren)}},i[o.table]={match:Be(P),order:1,parse:Ae,render:function(e,r,n){var t=e;return a("table",{key:n.key},a("thead",null,a("tr",null,t.header.map(function(e,i){return a("th",{key:i,style:Me(t,i)},r(e,n))}))),a("tbody",null,t.cells.map(function(e,i){return a("tr",{key:i},e.map(function(e,i){return a("td",{key:i,style:Me(t,i)},r(e,n))}))})))}},i[o.text]={match:je(ne),order:4,parse:function(e){return{text:e[0].replace(M,function(e,n){return r.namedCodesToUnicode[n]?r.namedCodesToUnicode[n]:e})}},render:function(e){return e.text}},i[o.textBolded]={match:$e(J),order:2,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return a("strong",{key:n.key},r(e.children,n))}},i[o.textEmphasized]={match:$e(K),order:3,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return a("em",{key:n.key},r(e.children,n))}},i[o.textEscaped]={match:$e(re),order:1,parse:function(e){return{text:e[1],type:o.text}}},i[o.textMarked]={match:$e(Y),order:3,parse:He,render:function(e,r,n){return a("mark",{key:n.key},r(e.children,n))}},i[o.textStrikethroughed]={match:$e(ee),order:3,parse:He,render:function(e,r,n){return a("del",{key:n.key},r(e.children,n))}},i);!0===r.disableParsingRawHTML&&(delete Q[o.htmlBlock],delete Q[o.htmlSelfClosing]);var V,ae=function(e){var r=Object.keys(e);function n(t,i){var a=[];for(i.prevCapture=i.prevCapture||"";t;)for(var o=0;o<r.length;){var l=r[o],c=e[l],u=c.match(t,i);if(u){var s=u[0];i.prevCapture+=s,t=t.substring(s.length);var d=c.parse(u,n,i);null==d.type&&(d.type=l),a.push(d);break}o++}return i.prevCapture="",a}return r.sort(function(r,n){var t=e[r].order,i=e[n].order;return t!==i?t-i:r<n?-1:1}),function(e,r){return n(function(e){return e.replace(b,"\n").replace(C,"").replace(G," ")}(e),r)}}(Q),oe=(V=function(e,r){return function(n,t,i){var a=e[n.type].render;return r?r(function(){return a(n,t,i)},n,t,i):a(n,t,i)}}(Q,r.renderRule),function e(r,n){if(void 0===n&&(n={}),Array.isArray(r)){for(var t=n.key,i=[],a=!1,o=0;o<r.length;o++){n.key=o;var l=e(r[o],n),c="string"==typeof l;c&&a?i[i.length-1]+=l:null!==l&&i.push(l),a=c}return n.key=t,i}return V(r,e,n)}),le=f(e);return q.length?a("div",null,le,a("footer",{key:"footer"},q.map(function(e){return a("div",{id:r.slugify(e.identifier,ze),key:e.identifier},e.identifier,oe(ae(e.footnote,{inline:!0})))}))):le}var Qe=function(e){var r=e.children,t=void 0===r?"":r,i=e.options,o=function(e,r){if(null==e)return{};var n,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(i[n]=e[n]);return i}(e,a);return n.cloneElement(Xe(t,i),o)};return Object.assign(Qe,{compiler:Xe,RuleType:o}),Qe});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):(e||self).MarkdownToJSX=r(e.React)}(this,function(e){function r(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}}),r.default=e,r}var n=/*#__PURE__*/r(e);function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},t.apply(this,arguments)}var i,a=["children","options"],o={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",tableSeparator:"26",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};!function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(i||(i={}));var l=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(function(e,r){return e[r.toLowerCase()]=r,e},{class:"className",for:"htmlFor"}),c={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},u=["style","script"],s=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,d=/mailto:/i,f=/\n{2,}$/,p=/^(\s*>[\s\S]*?)(?=\n{2,})/,h=/^ *> ?/gm,m=/^ {2,}\n/,g=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,y=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,k=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,v=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,x=/^(?:\n *)*\n/,b=/\r\n?/g,S=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,E=/^\[\^([^\]]+)]/,C=/\f/g,w=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,O=/^\s*?\[(x|\s)\]/,z=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,A=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,M=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,R=/^<!--[\s\S]*?(?:-->)/,$=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,j=/^\{.*\}$/,I=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,D=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,N=/-([a-z])?/gi,P=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,_=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,G=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,W=/\t/g,Z=/(^ *\||\| *$)/g,q=/^ *:-+: *$/,X=/^ *:-+ *$/,Q=/^ *-+: *$/,V="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",J=new RegExp("^([*_])\\1"+V+"\\1\\1(?!\\1)"),K=new RegExp("^([*_])"+V+"\\1(?!\\1|\\w)"),Y=new RegExp("^=="+V+"=="),ee=new RegExp("^~~"+V+"~~"),re=/^\\([^0-9A-Za-z\s])/,ne=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,te=/^\n+/,ie=/^([ \t]*)/,ae=/\\([^\\])/g,oe=/ *\n+$/,le=/(?:^|\n)( *)$/,ce="(?:\\d+\\.)",ue="(?:[*+-])";function se(e){return"( *)("+(1===e?ce:ue)+") +"}var de=se(1),fe=se(2);function pe(e){return new RegExp("^"+(1===e?de:fe))}var he=pe(1),me=pe(2);function ge(e){return new RegExp("^"+(1===e?de:fe)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ce:ue)+" )[^\\n]*)*(\\n|$)","gm")}var ye=ge(1),ke=ge(2);function ve(e){var r=1===e?ce:ue;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}var xe=ve(1),be=ve(2);function Se(e,r){var n=1===r,t=n?xe:be,i=n?ye:ke,a=n?he:me;return{match:function(e,r){var n=le.exec(r.prevCapture);return n&&(r.list||!r.inline&&!r.simple)?t.exec(e=n[1]+e):null},order:1,parse:function(e,r,t){var o=n?+e[2]:void 0,l=e[0].replace(f,"\n").match(i),c=!1;return{items:l.map(function(e,n){var i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),s=n===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=t.inline,h=t.list;t.list=!0,d?(t.inline=!1,f=u.replace(oe,"\n\n")):(t.inline=!0,f=u.replace(oe,""));var m=r(f,t);return t.inline=p,t.list=h,m}),ordered:n,start:o}},render:function(r,n,t){return e(r.ordered?"ol":"ul",{key:t.key,start:r.type===o.orderedList?r.start:void 0},r.items.map(function(r,i){return e("li",{key:i},n(r,t))}))}}}var Ee=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Ce=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,we=[p,y,k,z,L,T,R,P,ye,xe,ke,be],Oe=[].concat(we,[/^[^\n]+(?: \n|\n{2,})/,A,B]);function ze(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Te(e){return Q.test(e)?"right":q.test(e)?"center":X.test(e)?"left":null}function Le(e,r,n,t){var i=n.inTable;n.inTable=!0;var a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,i){return"|"===i.trim()?e.push(t?{type:o.tableSeparator}:{type:o.text,text:i}):""!==i&&e.push.apply(e,r(i,n)),e},[]);n.inTable=i;var l=[[]];return a.forEach(function(e,r){e.type===o.tableSeparator?0!==r&&r!==a.length-1&&l.push([]):(e.type!==o.text||null!=a[r+1]&&a[r+1].type!==o.tableSeparator||(e.text=e.text.trimEnd()),l[l.length-1].push(e))}),l}function Ae(e,r,n){n.inline=!0;var t=e[2]?e[2].replace(Z,"").split("|").map(Te):[],i=e[3]?function(e,r,n){return e.trim().split("\n").map(function(e){return Le(e,r,n,!0)})}(e[3],r,n):[],a=Le(e[1],r,n,!!i.length);return n.inline=!1,i.length?{align:t,cells:i,header:a,type:o.table}:{children:a,type:o.paragraph}}function Me(e,r){return null==e.align[r]?{}:{textAlign:e.align[r]}}function Re(e){return function(r,n){return n.inline?e.exec(r):null}}function $e(e){return function(r,n){return n.inline||n.simple?e.exec(r):null}}function Be(e){return function(r,n){return n.inline||n.simple?null:e.exec(r)}}function je(e){return function(r){return e.exec(r)}}function Ie(e,r){if(r.inline||r.simple)return null;var n="";e.split("\n").every(function(e){return!we.some(function(r){return r.test(e)})&&(n+=e+"\n",e.trim())});var t=n.trimEnd();return""==t?null:[n,t]}function De(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function Ue(e){return e.replace(ae,"$1")}function Ne(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function Pe(e,r,n){var t=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;var a=e(r,n);return n.inline=t,n.simple=i,a}function _e(e,r,n){var t=n.inline||!1;n.inline=!1;var i=e(r,n);return n.inline=t,i}var He=function(e,r,n){return{children:Ne(r,e[1],n)}};function Fe(){return{}}function Ge(){return null}function We(){return[].slice.call(arguments).filter(Boolean).join(" ")}function Ze(e,r,n){for(var t=e,i=r.split(".");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||n}function qe(e,r){var n=Ze(r,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ze(r,e+".component",e):e}function Xe(e,r){var i;function a(e,n){var i,a=Ze(r.overrides,e+".props",{});return(i=r).createElement.apply(i,[qe(e,r.overrides),t({},n,a,{className:We(null==n?void 0:n.className,a.className)||void 0})].concat([].slice.call(arguments,2)))}function f(e){e=e.replace(w,"");var t=!1;r.forceInline?t=!0:r.forceBlock||(t=!1===G.test(e));for(var i=oe(ae(t?e:e.trimEnd().replace(te,"")+"\n\n",{inline:t}));"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===r.wrapper)return i;var o,l=r.wrapper||(t?"span":"div");if(i.length>1||r.forceWrapper)o=i;else{if(1===i.length)return"string"==typeof(o=i[0])?a("span",{key:"outer"},o):o;o=null}return n.createElement(l,{key:"outer"},o)}function Z(e,t){var i=t.match(s);return i?i.reduce(function(t,i,a){var o=i.indexOf("=");if(-1!==o){var c=function(e){return-1!==e.indexOf("-")&&null===e.match($)&&(e=e.replace(N,function(e,r){return r.toUpperCase()})),e}(i.slice(0,o)).trim(),u=function(e){var r=e[0];return('"'===r||"'"===r)&&e.length>=2&&e[e.length-1]===r?e.slice(1,-1):e}(i.slice(o+1).trim()),s=l[c]||c,d=t[s]=function(e,r,n,t){return"style"===r?n.split(/;\s?/).reduce(function(e,r){var n=r.slice(0,r.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=r.slice(n.length+1).trim(),e},{}):"href"===r||"src"===r?t(n,e,r):(n.match(j)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(e,c,u,r.sanitizer);"string"==typeof d&&(A.test(d)||B.test(d))&&(t[s]=n.cloneElement(f(d.trim()),{key:a}))}else"style"!==i&&(t[l[i]||i]=!0);return t},{}):null}void 0===e&&(e=""),void 0===r&&(r={}),r.overrides=r.overrides||{},r.sanitizer=r.sanitizer||De,r.slugify=r.slugify||ze,r.namedCodesToUnicode=r.namedCodesToUnicode?t({},c,r.namedCodesToUnicode):c,r.createElement=r.createElement||n.createElement;var q=[],X={},Q=((i={})[o.blockQuote]={match:Be(p),order:1,parse:function(e,r,n){return{children:r(e[0].replace(h,""),n)}},render:function(e,r,n){return a("blockquote",{key:n.key},r(e.children,n))}},i[o.breakLine]={match:je(m),order:1,parse:Fe,render:function(e,r,n){return a("br",{key:n.key})}},i[o.breakThematic]={match:Be(g),order:1,parse:Fe,render:function(e,r,n){return a("hr",{key:n.key})}},i[o.codeBlock]={match:Be(k),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,r,n){return a("pre",{key:n.key},a("code",t({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},i[o.codeFenced]={match:Be(y),order:0,parse:function(e){return{attrs:Z("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:o.codeBlock}}},i[o.codeInline]={match:$e(v),order:3,parse:function(e){return{text:e[2]}},render:function(e,r,n){return a("code",{key:n.key},e.text)}},i[o.footnote]={match:Be(S),order:0,parse:function(e){return q.push({footnote:e[2],identifier:e[1]}),{}},render:Ge},i[o.footnoteReference]={match:Re(E),order:1,parse:function(e){return{target:"#"+r.slugify(e[1],ze),text:e[1]}},render:function(e,n,t){return a("a",{key:t.key,href:r.sanitizer(e.target,"a","href")},a("sup",{key:t.key},e.text))}},i[o.gfmTask]={match:Re(O),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,r,n){return a("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})}},i[o.heading]={match:Be(r.enforceAtxHeadings?T:z),order:1,parse:function(e,n,t){return{children:Ne(n,e[2],t),id:r.slugify(e[2],ze),level:e[1].length}},render:function(e,r,n){return a("h"+e.level,{id:e.id,key:n.key},r(e.children,n))}},i[o.headingSetext]={match:Be(L),order:0,parse:function(e,r,n){return{children:Ne(r,e[1],n),level:"="===e[2]?1:2,type:o.heading}}},i[o.htmlBlock]={match:je(A),order:1,parse:function(e,r,n){var t,i=e[3].match(ie),a=new RegExp("^"+i[1],"gm"),o=e[3].replace(a,""),l=(t=o,Oe.some(function(e){return e.test(t)})?_e:Ne),c=e[1].toLowerCase(),s=-1!==u.indexOf(c),d=(s?c:e[1]).trim(),f={attrs:Z(d,e[2]),noInnerParse:s,tag:d};return n.inAnchor=n.inAnchor||"a"===c,s?f.text=e[3]:f.children=l(r,o,n),n.inAnchor=!1,f},render:function(e,r,n){return a(e.tag,t({key:n.key},e.attrs),e.text||(e.children?r(e.children,n):""))}},i[o.htmlSelfClosing]={match:je(B),order:1,parse:function(e){var r=e[1].trim();return{attrs:Z(r,e[2]||""),tag:r}},render:function(e,r,n){return a(e.tag,t({},e.attrs,{key:n.key}))}},i[o.htmlComment]={match:je(R),order:1,parse:function(){return{}},render:Ge},i[o.image]={match:$e(Ce),order:1,parse:function(e){return{alt:e[1],target:Ue(e[2]),title:e[3]}},render:function(e,n,t){return a("img",{key:t.key,alt:e.alt||void 0,title:e.title||void 0,src:r.sanitizer(e.target,"img","src")})}},i[o.link]={match:Re(Ee),order:3,parse:function(e,r,n){return{children:Pe(r,e[1],n),target:Ue(e[2]),title:e[3]}},render:function(e,n,t){return a("a",{key:t.key,href:r.sanitizer(e.target,"a","href"),title:e.title},n(e.children,t))}},i[o.linkAngleBraceStyleDetector]={match:Re(U),order:0,parse:function(e){return{children:[{text:e[1],type:o.text}],target:e[1],type:o.link}}},i[o.linkBareUrlDetector]={match:function(e,n){return n.inAnchor||r.disableAutoLink?null:Re(I)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:o.text}],target:e[1],title:void 0,type:o.link}}},i[o.linkMailtoDetector]={match:Re(D),order:0,parse:function(e){var r=e[1],n=e[1];return d.test(n)||(n="mailto:"+n),{children:[{text:r.replace("mailto:",""),type:o.text}],target:n,type:o.link}}},i[o.orderedList]=Se(a,1),i[o.unorderedList]=Se(a,2),i[o.newlineCoalescer]={match:Be(x),order:3,parse:Fe,render:function(){return"\n"}},i[o.paragraph]={match:Ie,order:3,parse:He,render:function(e,r,n){return a("p",{key:n.key},r(e.children,n))}},i[o.ref]={match:Re(_),order:0,parse:function(e){return X[e[1]]={target:e[2],title:e[4]},{}},render:Ge},i[o.refImage]={match:$e(H),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,t){return X[e.ref]?a("img",{key:t.key,alt:e.alt,src:r.sanitizer(X[e.ref].target,"img","src"),title:X[e.ref].title}):null}},i[o.refLink]={match:Re(F),order:0,parse:function(e,r,n){return{children:r(e[1],n),fallbackChildren:e[0],ref:e[2]}},render:function(e,n,t){return X[e.ref]?a("a",{key:t.key,href:r.sanitizer(X[e.ref].target,"a","href"),title:X[e.ref].title},n(e.children,t)):a("span",{key:t.key},e.fallbackChildren)}},i[o.table]={match:Be(P),order:1,parse:Ae,render:function(e,r,n){var t=e;return a("table",{key:n.key},a("thead",null,a("tr",null,t.header.map(function(e,i){return a("th",{key:i,style:Me(t,i)},r(e,n))}))),a("tbody",null,t.cells.map(function(e,i){return a("tr",{key:i},e.map(function(e,i){return a("td",{key:i,style:Me(t,i)},r(e,n))}))})))}},i[o.text]={match:je(ne),order:4,parse:function(e){return{text:e[0].replace(M,function(e,n){return r.namedCodesToUnicode[n]?r.namedCodesToUnicode[n]:e})}},render:function(e){return e.text}},i[o.textBolded]={match:$e(J),order:2,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return a("strong",{key:n.key},r(e.children,n))}},i[o.textEmphasized]={match:$e(K),order:3,parse:function(e,r,n){return{children:r(e[2],n)}},render:function(e,r,n){return a("em",{key:n.key},r(e.children,n))}},i[o.textEscaped]={match:$e(re),order:1,parse:function(e){return{text:e[1],type:o.text}}},i[o.textMarked]={match:$e(Y),order:3,parse:He,render:function(e,r,n){return a("mark",{key:n.key},r(e.children,n))}},i[o.textStrikethroughed]={match:$e(ee),order:3,parse:He,render:function(e,r,n){return a("del",{key:n.key},r(e.children,n))}},i);!0===r.disableParsingRawHTML&&(delete Q[o.htmlBlock],delete Q[o.htmlSelfClosing]);var V,ae=function(e){var r=Object.keys(e);function n(t,i){var a=[];for(i.prevCapture=i.prevCapture||"";t;)for(var o=0;o<r.length;){var l=r[o],c=e[l],u=c.match(t,i);if(u){var s=u[0];i.prevCapture+=s,t=t.substring(s.length);var d=c.parse(u,n,i);null==d.type&&(d.type=l),a.push(d);break}o++}return i.prevCapture="",a}return r.sort(function(r,n){var t=e[r].order,i=e[n].order;return t!==i?t-i:r<n?-1:1}),function(e,r){return n(function(e){return e.replace(b,"\n").replace(C,"").replace(W," ")}(e),r)}}(Q),oe=(V=function(e,r){return function(n,t,i){var a=e[n.type].render;return r?r(function(){return a(n,t,i)},n,t,i):a(n,t,i)}}(Q,r.renderRule),function e(r,n){if(void 0===n&&(n={}),Array.isArray(r)){for(var t=n.key,i=[],a=!1,o=0;o<r.length;o++){n.key=o;var l=e(r[o],n),c="string"==typeof l;c&&a?i[i.length-1]+=l:null!==l&&i.push(l),a=c}return n.key=t,i}return V(r,e,n)}),le=f(e);return q.length?a("div",null,le,a("footer",{key:"footer"},q.map(function(e){return a("div",{id:r.slugify(e.identifier,ze),key:e.identifier},e.identifier,oe(ae(e.footnote,{inline:!0})))}))):le}var Qe=function(e){var r=e.children,t=void 0===r?"":r,i=e.options,o=function(e,r){if(null==e)return{};var n,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(i[n]=e[n]);return i}(e,a);return n.cloneElement(Xe(t,i),o)};return Object.assign(Qe,{compiler:Xe,RuleType:o}),Qe});
//# sourceMappingURL=index.umd.js.map

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "7.6.1",
"version": "7.6.2",
"publishConfig": {

@@ -9,0 +9,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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