From 7af26678268ca1c4c40213653be040a081020b53 Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Tue, 12 Nov 2024 00:21:15 -0500 Subject: [PATCH] docs: update site --- docs/markdown-to-jsx.js | 2 +- docs/markdown-to-jsx.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/markdown-to-jsx.js b/docs/markdown-to-jsx.js index b5ff31ef..6b4e851c 100644 --- a/docs/markdown-to-jsx.js +++ b/docs/markdown-to-jsx.js @@ -1,2 +1,2 @@ -!function(e,n,t,r){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var o=/*#__PURE__*/i(e),l=/*#__PURE__*/a(e),c=/*#__PURE__*/a(n),u=/*#__PURE__*/i(t),s=/*#__PURE__*/i(r);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(n,["children","math","block","errorColor","renderError","settings","as"]),f=u||(i?"div":"span"),m=null!=t?t:r,h=e.useState({innerHtml:""}),g=h[0],y=h[1];return e.useEffect(function(){try{var e=s.default.renderToString(m,p({displayMode:!!i,errorColor:a,throwOnError:!!l},c));y({innerHtml:e})}catch(e){if(!(e instanceof s.default.ParseError||e instanceof TypeError))throw e;y(l?{errorElement:l(e)}:{innerHtml:e.message})}},[i,m,a,l,c]),"errorElement"in g?g.errorElement:o.default.createElement(f,Object.assign({},d,{dangerouslySetInnerHTML:{__html:g.innerHtml}}))});function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n",lt:"<",nbsp:" ",quot:"“"},E=["style","script"],w=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,O=/mailto:/i,S=/\n{2,}$/,C=/^(\s*>[\s\S]*?)(?=\n{2,})/,j=/^ *> ?/gm,z=/^ {2,}\n/,M=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,R=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,A=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,T=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,I=/^(?:\n *)*\n/,L=/\r\n?/g,$=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,H=/^\[\^([^\]]+)]/,_=/\f/g,N=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,P=/^\s*?\[(x|\s)\]/,B=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,U=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,G=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,F=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,W=/^)/,q=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Z=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,J=/^\{.*\}$/,X=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,V=/^<([^ >]+@[^ >]+)>/,Q=/^<([^ >]+:\/[^ >]+)>/,K=/-([a-z])?/gi,Y=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,ee=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,ne=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,te=/^\[([^\]]*)\] ?\[([^\]]*)\]/,re=/(\[|\])/g,ie=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ae=/\t/g,oe=/(^ *\||\| *$)/g,le=/^ *:-+: *$/,ce=/^ *:-+ *$/,ue=/^ *-+: *$/,se="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",de=new RegExp("^([*_])\\1"+se+"\\1\\1(?!\\1)"),fe=new RegExp("^([*_])"+se+"\\1(?!\\1|\\w)"),pe=new RegExp("^=="+se+"=="),me=new RegExp("^~~"+se+"~~"),he=/^\\([^0-9A-Za-z\s])/,ge=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ye=/^\n+/,ve=/^([ \t]*)/,ke=/\\([^\\])/g,xe=/ *\n+$/,be=/(?:^|\n)( *)$/,Ee="(?:\\d+\\.)",we="(?:[*+-])";function Oe(e){return"( *)("+(1===e?Ee:we)+") +"}var Se=Oe(1),Ce=Oe(2);function je(e){return new RegExp("^"+(1===e?Se:Ce))}var ze=je(1),Me=je(2);function Re(e){return new RegExp("^"+(1===e?Se:Ce)+"[^\\n]*(?:\\n(?!\\1"+(1===e?Ee:we)+" )[^\\n]*)*(\\n|$)","gm")}var Ae=Re(1),Te=Re(2);function Ie(e){var n=1===e?Ee:we;return new RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}var Le=Ie(1),$e=Ie(2);function He(e,n){var t=1===n,r=t?Le:$e,i=t?Ae:Te,a=t?ze:Me;return{match:function(e,n,t){var i=be.exec(t);return i&&(n.list||!n.inline&&!n.simple)?r.exec(e=i[1]+e):null},order:1,parse:function(e,n,r){var o=t?+e[2]:void 0,l=e[0].replace(S,"\n").match(i),c=!1;return{items:l.map(function(e,t){var i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),s=t===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=r.inline,m=r.list;r.list=!0,d?(r.inline=!1,f=u.replace(xe,"\n\n")):(r.inline=!0,f=u.replace(xe,""));var h=n(f,r);return r.inline=p,r.list=m,h}),ordered:t,start:o}},render:function(n,t,r){return e(n.ordered?"ol":"ul",{key:r.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,i){return e("li",{key:i},t(n,r))}))}}}var _e=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Ne=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Pe=[C,R,A,B,U,D,W,Y,Ae,Le,Te,$e],Be=[].concat(Pe,[/^[^\n]+(?: \n|\n{2,})/,G,Z]);function De(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 Ue(e){return ue.test(e)?"right":le.test(e)?"center":ce.test(e)?"left":null}function Ge(e,n,t,r){var i=t.inTable;t.inTable=!0;var a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,i){return"|"===i.trim()?e.push(r?{type:"26"}:{type:"27",text:i}):""!==i&&e.push.apply(e,n(i,t)),e},[]);t.inTable=i;var o=[[]];return a.forEach(function(e,n){"26"===e.type?0!==n&&n!==a.length-1&&o.push([]):("27"!==e.type||null!=a[n+1]&&"26"!==a[n+1].type||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function Fe(e,n,t){t.inline=!0;var r=e[2]?e[2].replace(oe,"").split("|").map(Ue):[],i=e[3]?function(e,n,t){return e.trim().split("\n").map(function(e){return Ge(e,n,t,!0)})}(e[3],n,t):[],a=Ge(e[1],n,t,!!i.length);return t.inline=!1,i.length?{align:r,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function We(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function qe(e){return function(n,t){return t.inline?e.exec(n):null}}function Ze(e){return function(n,t){return t.inline||t.simple?e.exec(n):null}}function Je(e){return function(n,t){return t.inline||t.simple?null:e.exec(n)}}function Xe(e){return function(n){return e.exec(n)}}function Ve(e,n,t){if(n.inline||n.simple)return null;if(t&&!t.endsWith("\n"))return null;var r="";e.split("\n").every(function(e){return!Pe.some(function(n){return n.test(e)})&&(r+=e+"\n",e.trim())});var i=r.trimEnd();return""==i?null:[r,i]}function Qe(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Ke(e){return e.replace(ke,"$1")}function Ye(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!0,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function en(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!1,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function nn(e,n,t){var r=t.inline||!1;t.inline=!1;var i=e(n,t);return t.inline=r,i}var tn,rn,an,on,ln,cn,un,sn,dn,fn,pn=function(e,n,t){return{children:Ye(n,e[1],t)}};function mn(){return{}}function hn(){return null}function gn(){return[].slice.call(arguments).filter(Boolean).join(" ")}function yn(e,n,t){for(var r=e,i=n.split(".");i.length&&void 0!==(r=r[i[0]]);)i.shift();return r||t}function vn(e,n){var t=yn(n,e);return t?"function"==typeof t||"object"==typeof t&&"render"in t?t:yn(n,e+".component",e):e}function kn(e,n){var t;void 0===e&&(e=""),void 0===n&&(n={}),n.overrides=n.overrides||{},n.slugify=n.slugify||De,n.namedCodesToUnicode=n.namedCodesToUnicode?h({},b,n.namedCodesToUnicode):b;var r=n.createElement||l.createElement;function i(e,t){var i=yn(n.overrides,e+".props",{});return r.apply(void 0,[vn(e,n.overrides),h({},t,i,{className:gn(null==t?void 0:t.className,i.className)||void 0})].concat([].slice.call(arguments,2)))}function a(e){e=e.replace(N,"");var t=!1;n.forceInline?t=!0:n.forceBlock||(t=!1===ie.test(e));for(var r=p(f(t?e:e.trimEnd().replace(ye,"")+"\n\n",{inline:t}));"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===n.wrapper)return r;var a,o=n.wrapper||(t?"span":"div");if(r.length>1||n.forceWrapper)a=r;else{if(1===r.length)return"string"==typeof(a=r[0])?i("span",{key:"outer"},a):a;a=null}return l.createElement(o,{key:"outer"},a)}function o(e){var n=e.match(w);return n?n.reduce(function(e,n,t){var r=n.indexOf("=");if(-1!==r){var i=function(e){return-1!==e.indexOf("-")&&null===e.match(q)&&(e=e.replace(K,function(e,n){return n.toUpperCase()})),e}(n.slice(0,r)).trim(),o=function(e){var n=e[0];return('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(n.slice(r+1).trim()),c=x[i]||i,u=e[c]=function(e,n){return"style"===e?n.split(/;\s?/).reduce(function(e,n){var t=n.slice(0,n.indexOf(":"));return e[t.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(t.length+1).trim(),e},{}):"href"===e||"src"===e?Qe(n):(n.match(J)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(i,o);"string"==typeof u&&(G.test(u)||Z.test(u))&&(e[c]=l.cloneElement(a(u.trim()),{key:t}))}else"style"!==n&&(e[x[n]||n]=!0);return e},{}):null}var c=[],u={},s=((t={})[0]={match:Je(C),order:1,parse:function(e,n,t){return{children:n(e[0].replace(j,""),t)}},render:function(e,n,t){return i("blockquote",{key:t.key},n(e.children,t))}},t[1]={match:Xe(z),order:1,parse:mn,render:function(e,n,t){return i("br",{key:t.key})}},t[2]={match:Je(M),order:1,parse:mn,render:function(e,n,t){return i("hr",{key:t.key})}},t[3]={match:Je(A),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return i("pre",{key:t.key},i("code",h({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},t[4]={match:Je(R),order:0,parse:function(e){return{attrs:o(e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"}}},t[5]={match:Ze(T),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,t){return i("code",{key:t.key},e.text)}},t[6]={match:Je($),order:0,parse:function(e){return c.push({footnote:e[2],identifier:e[1]}),{}},render:hn},t[7]={match:qe(H),order:1,parse:function(e){return{target:"#"+n.slugify(e[1]),text:e[1]}},render:function(e,n,t){return i("a",{key:t.key,href:Qe(e.target)},i("sup",{key:t.key},e.text))}},t[8]={match:qe(P),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,n,t){return i("input",{checked:e.completed,key:t.key,readOnly:!0,type:"checkbox"})}},t[9]={match:Je(n.enforceAtxHeadings?D:B),order:1,parse:function(e,t,r){return{children:Ye(t,e[2],r),id:n.slugify(e[2]),level:e[1].length}},render:function(e,n,t){return i("h"+e.level,{id:e.id,key:t.key},n(e.children,t))}},t[10]={match:Je(U),order:0,parse:function(e,n,t){return{children:Ye(n,e[1],t),level:"="===e[2]?1:2,type:"9"}}},t[11]={match:Xe(G),order:1,parse:function(e,n,t){var r,i=e[3].match(ve),a=new RegExp("^"+i[1],"gm"),l=e[3].replace(a,""),c=(r=l,Be.some(function(e){return e.test(r)})?nn:Ye),u=e[1].toLowerCase(),s=-1!==E.indexOf(u),d={attrs:o(e[2]),noInnerParse:s,tag:(s?u:e[1]).trim()};return t.inAnchor=t.inAnchor||"a"===u,s?d.text=e[3]:d.children=c(n,l,t),t.inAnchor=!1,d},render:function(e,n,t){return i(e.tag,h({key:t.key},e.attrs),e.text||n(e.children,t))}},t[13]={match:Xe(Z),order:1,parse:function(e){return{attrs:o(e[2]||""),tag:e[1].trim()}},render:function(e,n,t){return i(e.tag,h({},e.attrs,{key:t.key}))}},t[12]={match:Xe(W),order:1,parse:function(){return{}},render:hn},t[14]={match:Ze(Ne),order:1,parse:function(e){return{alt:e[1],target:Ke(e[2]),title:e[3]}},render:function(e,n,t){return i("img",{key:t.key,alt:e.alt||void 0,title:e.title||void 0,src:Qe(e.target)})}},t[15]={match:qe(_e),order:3,parse:function(e,n,t){return{children:en(n,e[1],t),target:Ke(e[2]),title:e[3]}},render:function(e,n,t){return i("a",{key:t.key,href:Qe(e.target),title:e.title},n(e.children,t))}},t[16]={match:qe(Q),order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],type:"15"}}},t[17]={match:function(e,n){return n.inAnchor?null:qe(X)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"}}},t[18]={match:qe(V),order:0,parse:function(e){var n=e[1],t=e[1];return O.test(t)||(t="mailto:"+t),{children:[{text:n.replace("mailto:",""),type:"27"}],target:t,type:"15"}}},t[20]=He(i,1),t[33]=He(i,2),t[19]={match:Je(I),order:3,parse:mn,render:function(){return"\n"}},t[21]={match:Ve,order:3,parse:pn,render:function(e,n,t){return i("p",{key:t.key},n(e.children,t))}},t[22]={match:qe(ee),order:0,parse:function(e){return u[e[1]]={target:e[2],title:e[4]},{}},render:hn},t[23]={match:Ze(ne),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,t){return u[e.ref]?i("img",{key:t.key,alt:e.alt,src:Qe(u[e.ref].target),title:u[e.ref].title}):null}},t[24]={match:qe(te),order:0,parse:function(e,n,t){return{children:n(e[1],t),fallbackChildren:n(e[0].replace(re,"\\$1"),t),ref:e[2]}},render:function(e,n,t){return u[e.ref]?i("a",{key:t.key,href:Qe(u[e.ref].target),title:u[e.ref].title},n(e.children,t)):i("span",{key:t.key},n(e.fallbackChildren,t))}},t[25]={match:Je(Y),order:1,parse:Fe,render:function(e,n,t){var r=e;return i("table",{key:t.key},i("thead",null,i("tr",null,r.header.map(function(e,a){return i("th",{key:a,style:We(r,a)},n(e,t))}))),i("tbody",null,r.cells.map(function(e,a){return i("tr",{key:a},e.map(function(e,a){return i("td",{key:a,style:We(r,a)},n(e,t))}))})))}},t[27]={match:Xe(ge),order:4,parse:function(e){return{text:e[0].replace(F,function(e,t){return n.namedCodesToUnicode[t]?n.namedCodesToUnicode[t]:e})}},render:function(e){return e.text}},t[28]={match:Ze(de),order:2,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return i("strong",{key:t.key},n(e.children,t))}},t[29]={match:Ze(fe),order:3,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return i("em",{key:t.key},n(e.children,t))}},t[30]={match:Ze(he),order:1,parse:function(e){return{text:e[1],type:"27"}}},t[31]={match:Ze(pe),order:3,parse:pn,render:function(e,n,t){return i("mark",{key:t.key},n(e.children,t))}},t[32]={match:Ze(me),order:3,parse:pn,render:function(e,n,t){return i("del",{key:t.key},n(e.children,t))}},t);!0===n.disableParsingRawHTML&&(delete s[11],delete s[13]);var d,f=function(e){var n=Object.keys(e);function t(r,i){for(var a=[],o="";r;)for(var l=0;l=0||(i[t]=e[t]);return i}(e,k);return l.cloneElement(kn(t,r),i)}function bn(){var e=l.useState(document.getElementById("sample-content").textContent.trim()),n=e[0],t=e[1],r=l.useCallback(function(e){return t(e.target.value)},[]);/*#__PURE__*/return l.createElement("main",null,/*#__PURE__*/l.createElement(On,null),/*#__PURE__*/l.createElement(Sn,null,/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx",title:"Check out the markdown-to-jsx source code",rel:"noopener noreferrer"},/*#__PURE__*/l.createElement("img",{src:"./images/logo.svg",alt:"markdown-to-jsx logo"})),/*#__PURE__*/l.createElement(Cn,null,/*#__PURE__*/l.createElement("h1",null,/*#__PURE__*/l.createElement("code",null,"markdown-to-jsx")," is an easy-to-use markdown component that takes Github-flavored Markdown (GFM) and makes native JSX without dangerous hacks. "),/*#__PURE__*/l.createElement("h2",null,"It's lightweight, customizable, and happily supports React-like libraries.")),/*#__PURE__*/l.createElement(jn,null,"See the"," ",/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx/blob/main/README.md",rel:"noopener noreferrer"},"project README")," ","for detailed installation & usage instructions.")),/*#__PURE__*/l.createElement(Mn,null,/*#__PURE__*/l.createElement(Rn,{onInput:r,value:n}),/*#__PURE__*/l.createElement(An,null,/*#__PURE__*/l.createElement(xn,{options:In},n))))}var En="cornflowerblue",wn="#fefefe",On=t.createGlobalStyle(tn||(tn=f(["\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t\toutline-color: ",";\n\t}\n\n\thtml,\n\tbody,\n\t#root,\n\tmain {\n\t\tmargin: 0;\n\t\tmin-height: 100vh;\n\t}\n\n\thtml {\n\t\tbackground: #1a1c23;\n\t\tcolor: ",";\n\t\tfont-family: Inter, Helvetica Neue, Helvetica, sans-serif;\n\t\tfont-size: 14px;\n\t\tline-height: 1.5;\n\t}\n\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6 {\n\t\tmargin: 0 0 1rem;\n text-wrap: balance;\n\t}\n\n\th1 {\n\t\tfont-size: 2rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.8rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.6rem;\n\t}\n\n\th4 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th5 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th6 {\n\t\tfont-size: 1rem;\n\t}\n\n\ta {\n\t\tcolor: ",";\n\t\ttransition: color 200ms ease;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tcolor: color-mix(in srgb, "," 75%, transparent);\n\t\t}\n\t}\n\n :root {\n --code-bg: color-mix(in srgb, "," 15%, transparent);\n }\n\n\tcode {\n background: var(--code-bg) !important;\n border-radius: 2px;\n\t\tdisplay: inline-block;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: 0.9em;\n\t\tpadding: 0 4px;\n text-decoration: inherit;\n\t}\n\n\tpre code {\n\t\tborder: 0;\n\t\tdisplay: block;\n\t\tpadding: 1em;\n\t}\n\n\tmain {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 3rem 1.5rem 0;\n\t\tmargin: 0;\n\n\t\t@media all and (min-width: 1024px) {\n\t\t\tpadding: 3rem;\n\t\t}\n\t}\n\n p {\n text-wrap: balance;\n }\n"])),En,wn,En,En,En),Sn=u.default.header(rn||(rn=f(["\n flex-shrink: 0;\n margin-bottom: 2em;\n text-align: center;\n\n img {\n height: 100px;\n }\n"]))),Cn=u.default.p(an||(an=f(["\n font-size: 16px;\n margin-left: auto;\n margin-right: auto;\n max-width: 60vw;\n\n h1,\n h2 {\n font: inherit;\n }\n\n @media all and (max-width: 500px) {\n max-width: none;\n }\n\n @media all and (max-width: 1023px) {\n h1,\n h2 {\n display: block;\n margin-bottom: 1.5rem;\n }\n }\n"]))),jn=u.default.p(on||(on=f(["\n color: color-mix(in srgb, "," 20%, white);\n"])),wn),zn=t.css(ln||(ln=f(["\n flex: 0 0 50%;\n padding: 1em;\n"]))),Mn=u.default.section(cn||(cn=f(["\n display: flex;\n flex-grow: 1;\n margin-left: -1.5rem;\n margin-right: -1.5rem;\n\n @media all and (min-width: 1024px) {\n margin-left: 0;\n margin-right: 0;\n }\n\n @media all and (max-width: 500px) {\n flex-direction: column;\n }\n"]))),Rn=u.default.textarea(un||(un=f(["\n ",";\n background: color-mix(in srgb, "," 10%, transparent);\n border: 0;\n color: inherit;\n position: sticky;\n top: 0;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: inherit;\n max-height: 100vh;\n\n @media all and (max-width: 500px) {\n height: 300px;\n position: relative;\n }\n"])),zn,En),An=u.default.div(sn||(sn=f(["\n ",";\n padding-left: 2rem;\n padding-right: 1rem;\n overflow: auto;\n overflow-x: hidden;\n"])),zn),Tn=u.default.button(dn||(dn=f(["\n background: color-mix(in srgb, "," 50%, black);\n border: 1px solid color-mix(in srgb, "," 50%, transparent);\n border-radius: 2px;\n color: #fff;\n cursor: pointer;\n padding: 0.25em 0.75em;\n font: inherit;\n transition: background 200ms ease;\n\n &:hover,\n &:focus {\n background: ",";\n }\n\n &:active {\n background: color-mix(in srgb, "," 80%, black);\n }\n"])),En,En,En,En),In={overrides:{code:function(e){var n=l.useRef(null);return l.useEffect(function(){var t;n.current&&null!=(t=e.className)&&t.includes("lang-")&&window.hljs&&(window.hljs.highlightElement(n.current),n.current.removeAttribute("data-highlighted"))},[e.className,e.children]),/*#__PURE__*/l.createElement("code",d({},e,{ref:n}))},MyComponent:{component:function(e){/*#__PURE__*/return l.createElement(Tn,d({},e,{onClick:function(){alert("Look ma, I'm a real component!")}}))}}},renderRule:function(e,n,t,r){return"3"===n.type&&"latex"===n.lang?/*#__PURE__*/l.createElement(m,{as:"div",key:r.key,style:{margin:"1.5em 0"}},String.raw(fn||(fn=f(["",""])),n.text)):e()}};c.render(/*#__PURE__*/l.createElement(bn,null),document.getElementById("root"))}(React,ReactDOM,styled,katex); +!function(e,n,t,r){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n}var o=/*#__PURE__*/i(e),l=/*#__PURE__*/a(e),c=/*#__PURE__*/a(n),u=/*#__PURE__*/i(t),s=/*#__PURE__*/i(r);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(n,["children","math","block","errorColor","renderError","settings","as"]),f=u||(i?"div":"span"),m=null!=t?t:r,h=e.useState({innerHtml:""}),g=h[0],y=h[1];return e.useEffect(function(){try{var e=s.default.renderToString(m,p({displayMode:!!i,errorColor:a,throwOnError:!!l},c));y({innerHtml:e})}catch(e){if(!(e instanceof s.default.ParseError||e instanceof TypeError))throw e;y(l?{errorElement:l(e)}:{innerHtml:e.message})}},[i,m,a,l,c]),"errorElement"in g?g.errorElement:o.default.createElement(f,Object.assign({},d,{dangerouslySetInnerHTML:{__html:g.innerHtml}}))});function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n",lt:"<",nbsp:" ",quot:"“"},z=["style","script"],O=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,C=/mailto:/i,j=/\n{2,}$/,S=/^(\s*>[\s\S]*?)(?=\n{2,})/,M=/^ *> ?/gm,R=/^ {2,}\n/,A=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,T=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,$=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,I=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,H=/^(?:\n *)*\n/,L=/\r\n?/g,_=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,N=/^\[\^([^\]]+)]/,P=/\f/g,U=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,D=/^\s*?\[(x|\s)\]/,G=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,B=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,F=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,W=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,q=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Z=/^)/,J=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,X=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,V=/^\{.*\}$/,K=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Q=/^<([^ >]+@[^ >]+)>/,Y=/^<([^ >]+:\/[^ >]+)>/,ee=/-([a-z])?/gi,ne=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,te=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,re=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,ie=/^\[([^\]]*)\] ?\[([^\]]*)\]/,ae=/(\[|\])/g,oe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,le=/\t/g,ce=/(^ *\||\| *$)/g,ue=/^ *:-+: *$/,se=/^ *:-+ *$/,de=/^ *-+: *$/,fe="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",pe=new RegExp("^([*_])\\1"+fe+"\\1\\1(?!\\1)"),me=new RegExp("^([*_])"+fe+"\\1(?!\\1|\\w)"),he=new RegExp("^=="+fe+"=="),ge=new RegExp("^~~"+fe+"~~"),ye=/^\\([^0-9A-Za-z\s])/,ve=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ke=/^\n+/,xe=/^([ \t]*)/,be=/\\([^\\])/g,Ee=/ *\n+$/,we=/(?:^|\n)( *)$/,ze="(?:\\d+\\.)",Oe="(?:[*+-])";function Ce(e){return"( *)("+(1===e?ze:Oe)+") +"}var je=Ce(1),Se=Ce(2);function Me(e){return new RegExp("^"+(1===e?je:Se))}var Re=Me(1),Ae=Me(2);function Te(e){return new RegExp("^"+(1===e?je:Se)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ze:Oe)+" )[^\\n]*)*(\\n|$)","gm")}var $e=Te(1),Ie=Te(2);function He(e){var n=1===e?ze:Oe;return new RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}var Le=He(1),_e=He(2);function Ne(e,n){var t=1===n,r=t?Le:_e,i=t?$e:Ie,a=t?Re:Ae;return{match:function(e,n){var t=we.exec(n.prevCapture);return t&&(n.list||!n.inline&&!n.simple)?r.exec(e=t[1]+e):null},order:1,parse:function(e,n,r){var o=t?+e[2]:void 0,l=e[0].replace(j,"\n").match(i),c=!1;return{items:l.map(function(e,t){var i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),s=t===l.length-1,d=-1!==u.indexOf("\n\n")||s&&c;c=d;var f,p=r.inline,m=r.list;r.list=!0,d?(r.inline=!1,f=u.replace(Ee,"\n\n")):(r.inline=!0,f=u.replace(Ee,""));var h=n(f,r);return r.inline=p,r.list=m,h}),ordered:t,start:o}},render:function(n,t,r){return e(n.ordered?"ol":"ul",{key:r.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,i){return e("li",{key:i},t(n,r))}))}}}var Pe=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Ue=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,De=[S,T,$,G,F,B,Z,ne,$e,Le,Ie,_e],Ge=[].concat(De,[/^[^\n]+(?: \n|\n{2,})/,W,X]);function Be(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 Fe(e){return de.test(e)?"right":ue.test(e)?"center":se.test(e)?"left":null}function We(e,n,t,r){var i=t.inTable;t.inTable=!0;var a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(function(e,i){return"|"===i.trim()?e.push(r?{type:x}:{type:b,text:i}):""!==i&&e.push.apply(e,n(i,t)),e},[]);t.inTable=i;var o=[[]];return a.forEach(function(e,n){e.type===x?0!==n&&n!==a.length-1&&o.push([]):(e.type!==b||null!=a[n+1]&&a[n+1].type!==x||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function qe(e,n,t){t.inline=!0;var r=e[2]?e[2].replace(ce,"").split("|").map(Fe):[],i=e[3]?function(e,n,t){return e.trim().split("\n").map(function(e){return We(e,n,t,!0)})}(e[3],n,t):[],a=We(e[1],n,t,!!i.length);return t.inline=!1,i.length?{align:r,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function Ze(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function Je(e){return function(n,t){return t.inline?e.exec(n):null}}function Xe(e){return function(n,t){return t.inline||t.simple?e.exec(n):null}}function Ve(e){return function(n,t){return t.inline||t.simple?null:e.exec(n)}}function Ke(e){return function(n){return e.exec(n)}}function Qe(e,n,t){if(n.inline||n.simple)return null;if(t&&!t.endsWith("\n"))return null;var r="";e.split("\n").every(function(e){return!De.some(function(n){return n.test(e)})&&(r+=e+"\n",e.trim())});var i=r.trimEnd();return""==i?null:[r,i]}function Ye(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 en(e){return e.replace(be,"$1")}function nn(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!0,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function tn(e,n,t){var r=t.inline||!1,i=t.simple||!1;t.inline=!1,t.simple=!0;var a=e(n,t);return t.inline=r,t.simple=i,a}function rn(e,n,t){var r=t.inline||!1;t.inline=!1;var i=e(n,t);return t.inline=r,i}var an,on,ln,cn,un,sn,dn,fn,pn,mn,hn=function(e,n,t){return{children:nn(n,e[1],t)}};function gn(){return{}}function yn(){return null}function vn(){return[].slice.call(arguments).filter(Boolean).join(" ")}function kn(e,n,t){for(var r=e,i=n.split(".");i.length&&void 0!==(r=r[i[0]]);)i.shift();return r||t}function xn(e,n){var t=kn(n,e);return t?"function"==typeof t||"object"==typeof t&&"render"in t?t:kn(n,e+".component",e):e}function bn(e,n){var t;function r(e,t){var r,i=kn(n.overrides,e+".props",{});return(r=n).createElement.apply(r,[xn(e,n.overrides),h({},t,i,{className:vn(null==t?void 0:t.className,i.className)||void 0})].concat([].slice.call(arguments,2)))}function i(e){e=e.replace(U,"");var t=!1;n.forceInline?t=!0:n.forceBlock||(t=!1===oe.test(e));for(var i=f(d(t?e:e.trimEnd().replace(ke,"")+"\n\n",{inline:t}));"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===n.wrapper)return i;var a,o=n.wrapper||(t?"span":"div");if(i.length>1||n.forceWrapper)a=i;else{if(1===i.length)return"string"==typeof(a=i[0])?r("span",{key:"outer"},a):a;a=null}return l.createElement(o,{key:"outer"},a)}function a(e,t){var r=t.match(O);return r?r.reduce(function(t,r,a){var o=r.indexOf("=");if(-1!==o){var c=function(e){return-1!==e.indexOf("-")&&null===e.match(J)&&(e=e.replace(ee,function(e,n){return n.toUpperCase()})),e}(r.slice(0,o)).trim(),u=function(e){var n=e[0];return('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(o+1).trim()),s=E[c]||c,d=t[s]=function(e,n,t,r){return"style"===n?t.split(/;\s?/).reduce(function(e,n){var t=n.slice(0,n.indexOf(":"));return e[t.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(t.length+1).trim(),e},{}):"href"===n||"src"===n?r(t,e,n):(t.match(V)&&(t=t.slice(1,t.length-1)),"true"===t||"false"!==t&&t)}(e,c,u,n.sanitizer);"string"==typeof d&&(W.test(d)||X.test(d))&&(t[s]=l.cloneElement(i(d.trim()),{key:a}))}else"style"!==r&&(t[E[r]||r]=!0);return t},{}):null}void 0===e&&(e=""),void 0===n&&(n={}),n.overrides=n.overrides||{},n.sanitizer=n.sanitizer||Ye,n.slugify=n.slugify||Be,n.namedCodesToUnicode=n.namedCodesToUnicode?h({},w,n.namedCodesToUnicode):w,n.createElement=n.createElement||l.createElement;var o=[],c={},u=((t={})[0]={match:Ve(S),order:1,parse:function(e,n,t){return{children:n(e[0].replace(M,""),t)}},render:function(e,n,t){return r("blockquote",{key:t.key},n(e.children,t))}},t[1]={match:Ke(R),order:1,parse:gn,render:function(e,n,t){return r("br",{key:t.key})}},t[2]={match:Ve(A),order:1,parse:gn,render:function(e,n,t){return r("hr",{key:t.key})}},t[3]={match:Ve($),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}},render:function(e,n,t){return r("pre",{key:t.key},r("code",h({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))}},t[4]={match:Ve(T),order:0,parse:function(e){return{attrs:a("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"}}},t[5]={match:Xe(I),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,t){return r("code",{key:t.key},e.text)}},t[6]={match:Ve(_),order:0,parse:function(e){return o.push({footnote:e[2],identifier:e[1]}),{}},render:yn},t[7]={match:Je(N),order:1,parse:function(e){return{target:"#"+n.slugify(e[1],Be),text:e[1]}},render:function(e,t,i){return r("a",{key:i.key,href:n.sanitizer(e.target,"a","href")},r("sup",{key:i.key},e.text))}},t[8]={match:Je(D),order:1,parse:function(e){return{completed:"x"===e[1].toLowerCase()}},render:function(e,n,t){return r("input",{checked:e.completed,key:t.key,readOnly:!0,type:"checkbox"})}},t[9]={match:Ve(n.enforceAtxHeadings?B:G),order:1,parse:function(e,t,r){return{children:nn(t,e[2],r),id:n.slugify(e[2],Be),level:e[1].length}},render:function(e,n,t){return r("h"+e.level,{id:e.id,key:t.key},n(e.children,t))}},t[10]={match:Ve(F),order:0,parse:function(e,n,t){return{children:nn(n,e[1],t),level:"="===e[2]?1:2,type:"9"}}},t[11]={match:Ke(W),order:1,parse:function(e,n,t){var r,i=e[3].match(xe),o=new RegExp("^"+i[1],"gm"),l=e[3].replace(o,""),c=(r=l,Ge.some(function(e){return e.test(r)})?rn:nn),u=e[1].toLowerCase(),s=-1!==z.indexOf(u),d=(s?u:e[1]).trim(),f={attrs:a(d,e[2]),noInnerParse:s,tag:d};return t.inAnchor=t.inAnchor||"a"===u,s?f.text=e[3]:f.children=c(n,l,t),t.inAnchor=!1,f},render:function(e,n,t){return r(e.tag,h({key:t.key},e.attrs),e.text||(e.children?n(e.children,t):""))}},t[13]={match:Ke(X),order:1,parse:function(e){var n=e[1].trim();return{attrs:a(n,e[2]||""),tag:n}},render:function(e,n,t){return r(e.tag,h({},e.attrs,{key:t.key}))}},t[12]={match:Ke(Z),order:1,parse:function(){return{}},render:yn},t[14]={match:Xe(Ue),order:1,parse:function(e){return{alt:e[1],target:en(e[2]),title:e[3]}},render:function(e,t,i){return r("img",{key:i.key,alt:e.alt||void 0,title:e.title||void 0,src:n.sanitizer(e.target,"img","src")})}},t[k]={match:Je(Pe),order:3,parse:function(e,n,t){return{children:tn(n,e[1],t),target:en(e[2]),title:e[3]}},render:function(e,t,i){return r("a",{key:i.key,href:n.sanitizer(e.target,"a","href"),title:e.title},t(e.children,i))}},t[16]={match:Je(Y),order:0,parse:function(e){return{children:[{text:e[1],type:b}],target:e[1],type:k}}},t[17]={match:function(e,n){return n.inAnchor?null:Je(K)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:b}],target:e[1],title:void 0,type:k}}},t[18]={match:Je(Q),order:0,parse:function(e){var n=e[1],t=e[1];return C.test(t)||(t="mailto:"+t),{children:[{text:n.replace("mailto:",""),type:b}],target:t,type:k}}},t[20]=Ne(r,1),t[33]=Ne(r,2),t[19]={match:Ve(H),order:3,parse:gn,render:function(){return"\n"}},t[21]={match:Qe,order:3,parse:hn,render:function(e,n,t){return r("p",{key:t.key},n(e.children,t))}},t[22]={match:Je(te),order:0,parse:function(e){return c[e[1]]={target:e[2],title:e[4]},{}},render:yn},t[23]={match:Xe(re),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,t,i){return c[e.ref]?r("img",{key:i.key,alt:e.alt,src:n.sanitizer(c[e.ref].target,"img","src"),title:c[e.ref].title}):null}},t[24]={match:Je(ie),order:0,parse:function(e,n,t){return{children:n(e[1],t),fallbackChildren:n(e[0].replace(ae,"\\$1"),t),ref:e[2]}},render:function(e,t,i){return c[e.ref]?r("a",{key:i.key,href:n.sanitizer(c[e.ref].target,"a","href"),title:c[e.ref].title},t(e.children,i)):r("span",{key:i.key},t(e.fallbackChildren,i))}},t[25]={match:Ve(ne),order:1,parse:qe,render:function(e,n,t){var i=e;return r("table",{key:t.key},r("thead",null,r("tr",null,i.header.map(function(e,a){return r("th",{key:a,style:Ze(i,a)},n(e,t))}))),r("tbody",null,i.cells.map(function(e,a){return r("tr",{key:a},e.map(function(e,a){return r("td",{key:a,style:Ze(i,a)},n(e,t))}))})))}},t[b]={match:Ke(ve),order:4,parse:function(e){return{text:e[0].replace(q,function(e,t){return n.namedCodesToUnicode[t]?n.namedCodesToUnicode[t]:e})}},render:function(e){return e.text}},t[28]={match:Xe(pe),order:2,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return r("strong",{key:t.key},n(e.children,t))}},t[29]={match:Xe(me),order:3,parse:function(e,n,t){return{children:n(e[2],t)}},render:function(e,n,t){return r("em",{key:t.key},n(e.children,t))}},t[30]={match:Xe(ye),order:1,parse:function(e){return{text:e[1],type:b}}},t[31]={match:Xe(he),order:3,parse:hn,render:function(e,n,t){return r("mark",{key:t.key},n(e.children,t))}},t[32]={match:Xe(ge),order:3,parse:hn,render:function(e,n,t){return r("del",{key:t.key},n(e.children,t))}},t);!0===n.disableParsingRawHTML&&(delete u[11],delete u[13]);var s,d=function(e){var n=Object.keys(e);function t(r,i){var a=[];for(i.prevCapture=i.prevCapture||"";r;)for(var o=0;o=0||(i[t]=e[t]);return i}(e,v);return l.cloneElement(bn(t,r),i)}function wn(){var e=l.useState(document.getElementById("sample-content").textContent.trim()),n=e[0],t=e[1],r=l.useCallback(function(e){return t(e.target.value)},[]);/*#__PURE__*/return l.createElement("main",null,/*#__PURE__*/l.createElement(Cn,null),/*#__PURE__*/l.createElement(jn,null,/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx",title:"Check out the markdown-to-jsx source code",rel:"noopener noreferrer"},/*#__PURE__*/l.createElement("img",{src:"./images/logo.svg",alt:"markdown-to-jsx logo"})),/*#__PURE__*/l.createElement(Sn,null,/*#__PURE__*/l.createElement("h1",null,/*#__PURE__*/l.createElement("code",null,"markdown-to-jsx")," is an easy-to-use markdown component that takes Github-flavored Markdown (GFM) and makes native JSX without dangerous hacks. "),/*#__PURE__*/l.createElement("h2",null,"It's lightweight, customizable, and happily supports React-like libraries.")),/*#__PURE__*/l.createElement(Mn,null,"See the"," ",/*#__PURE__*/l.createElement("a",{target:"_blank",href:"https://github.com/quantizor/markdown-to-jsx/blob/main/README.md",rel:"noopener noreferrer"},"project README")," ","for detailed installation & usage instructions.")),/*#__PURE__*/l.createElement(An,null,/*#__PURE__*/l.createElement(Tn,{onInput:r,value:n}),/*#__PURE__*/l.createElement($n,null,/*#__PURE__*/l.createElement(En,{options:Hn},n))))}var zn="cornflowerblue",On="#fefefe",Cn=t.createGlobalStyle(an||(an=f(["\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t\toutline-color: ",";\n\t}\n\n\thtml,\n\tbody,\n\t#root,\n\tmain {\n\t\tmargin: 0;\n\t\tmin-height: 100vh;\n\t}\n\n\thtml {\n\t\tbackground: #1a1c23;\n\t\tcolor: ",";\n\t\tfont-family: Inter, Helvetica Neue, Helvetica, sans-serif;\n\t\tfont-size: 14px;\n\t\tline-height: 1.5;\n\t}\n\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6 {\n\t\tmargin: 0 0 1rem;\n text-wrap: balance;\n\t}\n\n\th1 {\n\t\tfont-size: 2rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.8rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.6rem;\n\t}\n\n\th4 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th5 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th6 {\n\t\tfont-size: 1rem;\n\t}\n\n\ta {\n\t\tcolor: ",";\n\t\ttransition: color 200ms ease;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tcolor: color-mix(in srgb, "," 75%, transparent);\n\t\t}\n\t}\n\n :root {\n --code-bg: color-mix(in srgb, "," 15%, transparent);\n }\n\n\tcode {\n background: var(--code-bg) !important;\n border-radius: 2px;\n\t\tdisplay: inline-block;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: 0.9em;\n\t\tpadding: 0 4px;\n text-decoration: inherit;\n\t}\n\n\tpre code {\n\t\tborder: 0;\n\t\tdisplay: block;\n\t\tpadding: 1em;\n\t}\n\n\tmain {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 3rem 1.5rem 0;\n\t\tmargin: 0;\n\n\t\t@media all and (min-width: 1024px) {\n\t\t\tpadding: 3rem;\n\t\t}\n\t}\n\n p {\n text-wrap: balance;\n }\n"])),zn,On,zn,zn,zn),jn=u.default.header(on||(on=f(["\n flex-shrink: 0;\n margin-bottom: 2em;\n text-align: center;\n\n img {\n height: 100px;\n }\n"]))),Sn=u.default.p(ln||(ln=f(["\n font-size: 16px;\n margin-left: auto;\n margin-right: auto;\n max-width: 60vw;\n\n h1,\n h2 {\n font: inherit;\n }\n\n @media all and (max-width: 500px) {\n max-width: none;\n }\n\n @media all and (max-width: 1023px) {\n h1,\n h2 {\n display: block;\n margin-bottom: 1.5rem;\n }\n }\n"]))),Mn=u.default.p(cn||(cn=f(["\n color: color-mix(in srgb, "," 20%, white);\n"])),On),Rn=t.css(un||(un=f(["\n flex: 0 0 50%;\n padding: 1em;\n"]))),An=u.default.section(sn||(sn=f(["\n display: flex;\n flex-grow: 1;\n margin-left: -1.5rem;\n margin-right: -1.5rem;\n\n @media all and (min-width: 1024px) {\n margin-left: 0;\n margin-right: 0;\n }\n\n @media all and (max-width: 500px) {\n flex-direction: column;\n }\n"]))),Tn=u.default.textarea(dn||(dn=f(["\n ",";\n background: color-mix(in srgb, "," 10%, transparent);\n border: 0;\n color: inherit;\n position: sticky;\n top: 0;\n font-family: 'Jetbrains Mono', Consolas, Monaco, monospace;\n font-size: inherit;\n max-height: 100vh;\n\n @media all and (max-width: 500px) {\n height: 300px;\n position: relative;\n }\n"])),Rn,zn),$n=u.default.div(fn||(fn=f(["\n ",";\n padding-left: 2rem;\n padding-right: 1rem;\n overflow: auto;\n overflow-x: hidden;\n"])),Rn),In=u.default.button(pn||(pn=f(["\n background: color-mix(in srgb, "," 50%, black);\n border: 1px solid color-mix(in srgb, "," 50%, transparent);\n border-radius: 2px;\n color: #fff;\n cursor: pointer;\n padding: 0.25em 0.75em;\n font: inherit;\n transition: background 200ms ease;\n\n &:hover,\n &:focus {\n background: ",";\n }\n\n &:active {\n background: color-mix(in srgb, "," 80%, black);\n }\n"])),zn,zn,zn,zn),Hn={overrides:{code:function(e){var n=l.useRef(null);return l.useEffect(function(){var t;n.current&&null!=(t=e.className)&&t.includes("lang-")&&window.hljs&&(window.hljs.highlightElement(n.current),n.current.removeAttribute("data-highlighted"))},[e.className,e.children]),/*#__PURE__*/l.createElement("code",d({},e,{ref:n}))},MyComponent:{component:function(e){/*#__PURE__*/return l.createElement(In,d({},e,{onClick:function(){alert("Look ma, I'm a real component!")}}))}}},renderRule:function(e,n,t,r){return"3"===n.type&&"latex"===n.lang?/*#__PURE__*/l.createElement(m,{as:"div",key:r.key,style:{margin:"1.5em 0"}},String.raw(mn||(mn=f(["",""])),n.text)):e()}};c.render(/*#__PURE__*/l.createElement(wn,null),document.getElementById("root"))}(React,ReactDOM,styled,katex); //# sourceMappingURL=markdown-to-jsx.js.map diff --git a/docs/markdown-to-jsx.js.map b/docs/markdown-to-jsx.js.map index 907b1cf1..3e74962e 100644 --- a/docs/markdown-to-jsx.js.map +++ b/docs/markdown-to-jsx.js.map @@ -1 +1 @@ -{"version":3,"file":"markdown-to-jsx.js","sources":["../node_modules/@matejmazur/react-katex/dist/react-katex.m.js","../dist/index.module.js","../site.tsx"],"sourcesContent":["import r,{memo as e,useState as n,useEffect as t}from\"react\";import o from\"katex\";function a(){return(a=Object.assign||function(r){for(var e=1;e=0||(o[n]=r[n]);return o}(e,[\"children\",\"math\",\"block\",\"errorColor\",\"renderError\",\"settings\",\"as\"]),d=u||(s?\"div\":\"span\"),p=null!=i?i:l,g=n({innerHtml:\"\"}),E=g[0],v=g[1];return t(function(){try{var r=o.renderToString(p,a({displayMode:!!s,errorColor:c,throwOnError:!!f},m));v({innerHtml:r})}catch(r){if(!(r instanceof o.ParseError||r instanceof TypeError))throw r;v(f?{errorElement:f(r)}:{innerHtml:r.message})}},[s,p,c,f,m]),\"errorElement\"in E?E.errorElement:r.createElement(d,Object.assign({},h,{dangerouslySetInnerHTML:{__html:E.innerHtml}}))});export default i;\n//# sourceMappingURL=react-katex.m.js.map\n","import*as e from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n\",lt:\"<\",nbsp:\" \",quot:\"“\"},c=[\"style\",\"script\"],l=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,u=/mailto:/i,s=/\\n{2,}$/,f=/^(\\s*>[\\s\\S]*?)(?=\\n{2,})/,d=/^ *> ?/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(?!`)/,v=/^(?:\\n *)*\\n/,k=/\\r\\n?/g,x=/^\\[\\^([^\\]]+)](:(.*)((\\n+ {4,}.*)|(\\n(?!\\[\\^).+))*)/,b=/^\\[\\^([^\\]]+)]/,E=/\\f/g,w=/^---[ \\t]*\\n(.|\\n)*\\n---[ \\t]*\\n/,S=/^\\s*?\\[(x|\\s)\\]/,C=/^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,A=/^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,O=/^([^\\n]+)\\n *(=|-){3,} *(?:\\n *)+\\n/,$=/^ *(?!<[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,L=/^)/,R=/^(data|aria|x)-[a-z_][a-z\\d_.-]*$/,z=/^ *<([a-z][a-z0-9:]*)(?:\\s+((?:<.*?>|[^>])*))?\\/?>(?!<\\/\\1>)(\\s*\\n)?/i,M=/^\\{.*\\}$/,I=/^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/,U=/^<([^ >]+@[^ >]+)>/,j=/^<([^ >]+:\\/[^ >]+)>/,B=/-([a-z])?/gi,N=/^(.*\\|.*)\\n(?: *(\\|? *[-:]+ *\\|[-| :]*)\\n((?:.*\\|.*\\n)*))?\\n?/,H=/^\\[([^\\]]*)\\]:\\s+]+)>?\\s*(\"([^\"]*)\")?/,D=/^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,P=/^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,_=/(\\[|\\])/g,F=/(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/,W=/\\t/g,G=/(^ *\\||\\| *$)/g,Z=/^ *:-+: *$/,q=/^ *:-+ *$/,V=/^ *-+: *$/,X=\"((?:\\\\[.*?\\\\][([].*?[)\\\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\\\n)*?)\",Q=new RegExp(\"^([*_])\\\\1\"+X+\"\\\\1\\\\1(?!\\\\1)\"),J=new RegExp(\"^([*_])\"+X+\"\\\\1(?!\\\\1|\\\\w)\"),K=new RegExp(\"^==\"+X+\"==\"),Y=new RegExp(\"^~~\"+X+\"~~\"),ee=/^\\\\([^0-9A-Za-z\\s])/,ne=/^[\\s\\S]+?(?=[^0-9A-Z\\s\\u00c0-\\uffff&#;.()'\"]|\\d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,re=/^\\n+/,te=/^([ \\t]*)/,ie=/\\\\([^\\\\])/g,ae=/ *\\n+$/,oe=/(?:^|\\n)( *)$/,ce=\"(?:\\\\d+\\\\.)\",le=\"(?:[*+-])\";function ue(e){return\"( *)(\"+(1===e?ce:le)+\") +\"}var se=ue(1),fe=ue(2);function de(e){return new RegExp(\"^\"+(1===e?se:fe))}var pe=de(1),he=de(2);function me(e){return new RegExp(\"^\"+(1===e?se:fe)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===e?ce:le)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}var ge=me(1),ye=me(2);function ve(e){var n=1===e?ce:le;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}var ke=ve(1),xe=ve(2);function be(e,n){var r=1===n,t=r?ke:xe,i=r?ge:ye,a=r?pe:he;return{match:function(e,n,r){var i=oe.exec(r);return i&&(n.list||!n.inline&&!n.simple)?t.exec(e=i[1]+e):null},order:1,parse:function(e,n,t){var o=r?+e[2]:void 0,c=e[0].replace(s,\"\\n\").match(i),l=!1;return{items:c.map(function(e,r){var i=a.exec(e)[0].length,o=new RegExp(\"^ {1,\"+i+\"}\",\"gm\"),u=e.replace(o,\"\").replace(a,\"\"),s=r===c.length-1,f=-1!==u.indexOf(\"\\n\\n\")||s&&l;l=f;var d,p=t.inline,h=t.list;t.list=!0,f?(t.inline=!1,d=u.replace(ae,\"\\n\\n\")):(t.inline=!0,d=u.replace(ae,\"\"));var m=n(d,t);return t.inline=p,t.list=h,m}),ordered:r,start:o}},render:function(n,r,t){return e(n.ordered?\"ol\":\"ul\",{key:t.key,start:\"20\"===n.type?n.start:void 0},n.items.map(function(n,i){return e(\"li\",{key:i},r(n,t))}))}}}var Ee=new RegExp(\"^\\\\[((?:\\\\[[^\\\\]]*\\\\]|[^\\\\[\\\\]]|\\\\](?=[^\\\\[]*\\\\]))*)\\\\]\\\\(\\\\s*?(?:\\\\s+['\\\"]([\\\\s\\\\S]*?)['\\\"])?\\\\s*\\\\)\"),we=/^!\\[(.*?)\\]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,Se=[f,m,g,C,O,A,L,N,ge,ke,ye,xe],Ce=[].concat(Se,[/^[^\\n]+(?: \\n|\\n{2,})/,$,z]);function Ae(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 Oe(e){return V.test(e)?\"right\":Z.test(e)?\"center\":q.test(e)?\"left\":null}function $e(e,n,r,t){var i=r.inTable;r.inTable=!0;var a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\\/.*?>(?!<\\/.*?>)|\\\\\\||\\|) *)/).reduce(function(e,i){return\"|\"===i.trim()?e.push(t?{type:\"26\"}:{type:\"27\",text:i}):\"\"!==i&&e.push.apply(e,n(i,r)),e},[]);r.inTable=i;var o=[[]];return a.forEach(function(e,n){\"26\"===e.type?0!==n&&n!==a.length-1&&o.push([]):(\"27\"!==e.type||null!=a[n+1]&&\"26\"!==a[n+1].type||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function Te(e,n,r){r.inline=!0;var t=e[2]?e[2].replace(G,\"\").split(\"|\").map(Oe):[],i=e[3]?function(e,n,r){return e.trim().split(\"\\n\").map(function(e){return $e(e,n,r,!0)})}(e[3],n,r):[],a=$e(e[1],n,r,!!i.length);return r.inline=!1,i.length?{align:t,cells:i,header:a,type:\"25\"}:{children:a,type:\"21\"}}function Le(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function Re(e){return function(n,r){return r.inline?e.exec(n):null}}function ze(e){return function(n,r){return r.inline||r.simple?e.exec(n):null}}function Me(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Ie(e){return function(n){return e.exec(n)}}function Ue(e,n,r){if(n.inline||n.simple)return null;if(r&&!r.endsWith(\"\\n\"))return null;var t=\"\";e.split(\"\\n\").every(function(e){return!Se.some(function(n){return n.test(e)})&&(t+=e+\"\\n\",e.trim())});var i=t.trimEnd();return\"\"==i?null:[t,i]}function je(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Be(e){return e.replace(ie,\"$1\")}function Ne(e,n,r){var t=r.inline||!1,i=r.simple||!1;r.inline=!0,r.simple=!0;var a=e(n,r);return r.inline=t,r.simple=i,a}function He(e,n,r){var t=r.inline||!1,i=r.simple||!1;r.inline=!1,r.simple=!0;var a=e(n,r);return r.inline=t,r.simple=i,a}function De(e,n,r){var t=r.inline||!1;r.inline=!1;var i=e(n,r);return r.inline=t,i}var Pe=function(e,n,r){return{children:Ne(n,e[1],r)}};function _e(){return{}}function Fe(){return null}function We(){return[].slice.call(arguments).filter(Boolean).join(\" \")}function Ge(e,n,r){for(var t=e,i=n.split(\".\");i.length&&void 0!==(t=t[i[0]]);)i.shift();return t||r}function Ze(e,n){var r=Ge(n,e);return r?\"function\"==typeof r||\"object\"==typeof r&&\"render\"in r?r:Ge(n,e+\".component\",e):e}function qe(r,t){var i;void 0===r&&(r=\"\"),void 0===t&&(t={}),t.overrides=t.overrides||{},t.slugify=t.slugify||Ae,t.namedCodesToUnicode=t.namedCodesToUnicode?n({},o,t.namedCodesToUnicode):o;var s=t.createElement||e.createElement;function G(e,r){var i=Ge(t.overrides,e+\".props\",{});return s.apply(void 0,[Ze(e,t.overrides),n({},r,i,{className:We(null==r?void 0:r.className,i.className)||void 0})].concat([].slice.call(arguments,2)))}function Z(n){n=n.replace(w,\"\");var r=!1;t.forceInline?r=!0:t.forceBlock||(r=!1===F.test(n));for(var i=ce(oe(r?n:n.trimEnd().replace(re,\"\")+\"\\n\\n\",{inline:r}));\"string\"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===t.wrapper)return i;var a,o=t.wrapper||(r?\"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 q(n){var r=n.match(l);return r?r.reduce(function(n,r,t){var i=r.indexOf(\"=\");if(-1!==i){var o=function(e){return-1!==e.indexOf(\"-\")&&null===e.match(R)&&(e=e.replace(B,function(e,n){return n.toUpperCase()})),e}(r.slice(0,i)).trim(),c=function(e){var n=e[0];return('\"'===n||\"'\"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(i+1).trim()),l=a[o]||o,u=n[l]=function(e,n){return\"style\"===e?n.split(/;\\s?/).reduce(function(e,n){var r=n.slice(0,n.indexOf(\":\"));return e[r.trim().replace(/(-[a-z])/g,function(e){return e[1].toUpperCase()})]=n.slice(r.length+1).trim(),e},{}):\"href\"===e||\"src\"===e?je(n):(n.match(M)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(o,c);\"string\"==typeof u&&($.test(u)||z.test(u))&&(n[l]=e.cloneElement(Z(u.trim()),{key:t}))}else\"style\"!==r&&(n[a[r]||r]=!0);return n},{}):null}var V=[],X={},ie=((i={})[0]={match:Me(f),order:1,parse:function(e,n,r){return{children:n(e[0].replace(d,\"\"),r)}},render:function(e,n,r){return G(\"blockquote\",{key:r.key},n(e.children,r))}},i[1]={match:Ie(p),order:1,parse:_e,render:function(e,n,r){return G(\"br\",{key:r.key})}},i[2]={match:Me(h),order:1,parse:_e,render:function(e,n,r){return G(\"hr\",{key:r.key})}},i[3]={match:Me(g),order:0,parse:function(e){return{lang:void 0,text:e[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\")}},render:function(e,r,t){return G(\"pre\",{key:t.key},G(\"code\",n({},e.attrs,{className:e.lang?\"lang-\"+e.lang:\"\"}),e.text))}},i[4]={match:Me(m),order:0,parse:function(e){return{attrs:q(e[3]||\"\"),lang:e[2]||void 0,text:e[4],type:\"3\"}}},i[5]={match:ze(y),order:3,parse:function(e){return{text:e[2]}},render:function(e,n,r){return G(\"code\",{key:r.key},e.text)}},i[6]={match:Me(x),order:0,parse:function(e){return V.push({footnote:e[2],identifier:e[1]}),{}},render:Fe},i[7]={match:Re(b),order:1,parse:function(e){return{target:\"#\"+t.slugify(e[1]),text:e[1]}},render:function(e,n,r){return G(\"a\",{key:r.key,href:je(e.target)},G(\"sup\",{key:r.key},e.text))}},i[8]={match:Re(S),order:1,parse:function(e){return{completed:\"x\"===e[1].toLowerCase()}},render:function(e,n,r){return G(\"input\",{checked:e.completed,key:r.key,readOnly:!0,type:\"checkbox\"})}},i[9]={match:Me(t.enforceAtxHeadings?A:C),order:1,parse:function(e,n,r){return{children:Ne(n,e[2],r),id:t.slugify(e[2]),level:e[1].length}},render:function(e,n,r){return G(\"h\"+e.level,{id:e.id,key:r.key},n(e.children,r))}},i[10]={match:Me(O),order:0,parse:function(e,n,r){return{children:Ne(n,e[1],r),level:\"=\"===e[2]?1:2,type:\"9\"}}},i[11]={match:Ie($),order:1,parse:function(e,n,r){var t,i=e[3].match(te),a=new RegExp(\"^\"+i[1],\"gm\"),o=e[3].replace(a,\"\"),l=(t=o,Ce.some(function(e){return e.test(t)})?De:Ne),u=e[1].toLowerCase(),s=-1!==c.indexOf(u),f={attrs:q(e[2]),noInnerParse:s,tag:(s?u:e[1]).trim()};return r.inAnchor=r.inAnchor||\"a\"===u,s?f.text=e[3]:f.children=l(n,o,r),r.inAnchor=!1,f},render:function(e,r,t){return G(e.tag,n({key:t.key},e.attrs),e.text||r(e.children,t))}},i[13]={match:Ie(z),order:1,parse:function(e){return{attrs:q(e[2]||\"\"),tag:e[1].trim()}},render:function(e,r,t){return G(e.tag,n({},e.attrs,{key:t.key}))}},i[12]={match:Ie(L),order:1,parse:function(){return{}},render:Fe},i[14]={match:ze(we),order:1,parse:function(e){return{alt:e[1],target:Be(e[2]),title:e[3]}},render:function(e,n,r){return G(\"img\",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:je(e.target)})}},i[15]={match:Re(Ee),order:3,parse:function(e,n,r){return{children:He(n,e[1],r),target:Be(e[2]),title:e[3]}},render:function(e,n,r){return G(\"a\",{key:r.key,href:je(e.target),title:e.title},n(e.children,r))}},i[16]={match:Re(j),order:0,parse:function(e){return{children:[{text:e[1],type:\"27\"}],target:e[1],type:\"15\"}}},i[17]={match:function(e,n){return n.inAnchor?null:Re(I)(e,n)},order:0,parse:function(e){return{children:[{text:e[1],type:\"27\"}],target:e[1],title:void 0,type:\"15\"}}},i[18]={match:Re(U),order:0,parse:function(e){var n=e[1],r=e[1];return u.test(r)||(r=\"mailto:\"+r),{children:[{text:n.replace(\"mailto:\",\"\"),type:\"27\"}],target:r,type:\"15\"}}},i[20]=be(G,1),i[33]=be(G,2),i[19]={match:Me(v),order:3,parse:_e,render:function(){return\"\\n\"}},i[21]={match:Ue,order:3,parse:Pe,render:function(e,n,r){return G(\"p\",{key:r.key},n(e.children,r))}},i[22]={match:Re(H),order:0,parse:function(e){return X[e[1]]={target:e[2],title:e[4]},{}},render:Fe},i[23]={match:ze(D),order:0,parse:function(e){return{alt:e[1]||void 0,ref:e[2]}},render:function(e,n,r){return X[e.ref]?G(\"img\",{key:r.key,alt:e.alt,src:je(X[e.ref].target),title:X[e.ref].title}):null}},i[24]={match:Re(P),order:0,parse:function(e,n,r){return{children:n(e[1],r),fallbackChildren:n(e[0].replace(_,\"\\\\$1\"),r),ref:e[2]}},render:function(e,n,r){return X[e.ref]?G(\"a\",{key:r.key,href:je(X[e.ref].target),title:X[e.ref].title},n(e.children,r)):G(\"span\",{key:r.key},n(e.fallbackChildren,r))}},i[25]={match:Me(N),order:1,parse:Te,render:function(e,n,r){var t=e;return G(\"table\",{key:r.key},G(\"thead\",null,G(\"tr\",null,t.header.map(function(e,i){return G(\"th\",{key:i,style:Le(t,i)},n(e,r))}))),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:Le(t,i)},n(e,r))}))})))}},i[27]={match:Ie(ne),order:4,parse:function(e){return{text:e[0].replace(T,function(e,n){return t.namedCodesToUnicode[n]?t.namedCodesToUnicode[n]:e})}},render:function(e){return e.text}},i[28]={match:ze(Q),order:2,parse:function(e,n,r){return{children:n(e[2],r)}},render:function(e,n,r){return G(\"strong\",{key:r.key},n(e.children,r))}},i[29]={match:ze(J),order:3,parse:function(e,n,r){return{children:n(e[2],r)}},render:function(e,n,r){return G(\"em\",{key:r.key},n(e.children,r))}},i[30]={match:ze(ee),order:1,parse:function(e){return{text:e[1],type:\"27\"}}},i[31]={match:ze(K),order:3,parse:Pe,render:function(e,n,r){return G(\"mark\",{key:r.key},n(e.children,r))}},i[32]={match:ze(Y),order:3,parse:Pe,render:function(e,n,r){return G(\"del\",{key:r.key},n(e.children,r))}},i);!0===t.disableParsingRawHTML&&(delete ie[11],delete ie[13]);var ae,oe=function(e){var n=Object.keys(e);function r(t,i){for(var a=[],o=\"\";t;)for(var c=0;c=0||(i[r]=e[r]);return i}(n,i);return e.cloneElement(qe(t,a),o)}export{r as RuleType,qe as compiler,Ae as slugify};\n//# sourceMappingURL=index.module.js.map\n","/* @jsx React.createElement */\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport styled, { createGlobalStyle, css, CSSProp } from 'styled-components'\nimport TeX from '@matejmazur/react-katex'\nimport Markdown, { MarkdownToJSX, RuleType } from './'\n\ndeclare global {\n interface Window {\n hljs: {\n highlightElement: (element: HTMLElement) => void\n }\n }\n}\n\ndeclare module 'react' {\n interface Attributes {\n css?: CSSProp\n }\n}\n\nfunction TryItLive() {\n const [markdown, setMarkdown] = React.useState(\n document.getElementById('sample-content')!.textContent!.trim()\n )\n\n const handleInput = React.useCallback(e => setMarkdown(e.target.value), [])\n\n return (\n
\n \n\n
\n \n \"markdown-to-jsx\n \n\n \n

\n markdown-to-jsx is an easy-to-use markdown component\n that takes Github-flavored Markdown (GFM) and makes native JSX\n without dangerous hacks. \n

\n

\n It's lightweight, customizable, and happily supports React-like\n libraries.\n

\n
\n\n \n See the{' '}\n \n project README\n {' '}\n for detailed installation & usage instructions.\n \n
\n\n \n