(function(){functiona(a){"use strict";if(!f.hasOwnProperty(a))throwError("Extension named "+a+" is not registered!");returnf[a]}functionb(a,b){"use strict";if("object"!=typeofb)throwError("A Showdown Extension must be an object, "+typeofb+" given");if(!d.helper.isString(b.type))throwError('When registering a showdown extension, "type" must be a string, '+typeofb.type+" given");b.type=b.type.toLowerCase(),f[a]=b}functionc(a,b){"use strict";varc=b.charCodeAt(0);return"~E"+c+"E"}vard={},e={},f={},g={omitExtraWLInCodeBlocks:!1,prefixHeaderId:!1};d.helper={},d.extensions={},d.setOption=function(a,b){"use strict";returng[a]=b,this},d.getOption=function(a){"use strict";returng[a]},d.getOptions=function(){"use strict";returng},d.subParser=function(a,b){"use strict";if(d.helper.isString(a)){if("undefined"==typeofb){if(e.hasOwnProperty(a))returne[a];throwError("SubParser named "+a+" not registered!")}e[a]=b}},d.extension=function(c,e){"use strict";if(!d.helper.isString(c))throwError("Extension 'name' must be a string");returnc=d.helper.stdExtName(c),d.helper.isUndefined(e)?a():b()},d.Converter=function(a){"use strict";functionb(a){if(!a)returna;varb={gHtmlBlocks:[],gUrls:{},gTitles:{},gListLevel:0,hashLinkCounts:{},langExtensions:k,outputModifiers:l};a=a.replace(/~/g,"~T"),a=a.replace(/\$/g,"~D"),a=a.replace(/\r\n/g,"\n"),a=a.replace(/\r/g,"\n"),a="\n\n"+a+"\n\n",a=e.detab(a,j,b),a=e.stripBlankLines(a,j,b),a=e.languageExtensions(a,j,b);for(varc=0;c<m.length;++c){varf=m[c];a=e[f](a,j,b)}returna=a.replace(/~D/g,"$$"),a=a.replace(/~T/g,"~"),d.helper.forEach(b.outputModifiers,function(b){a=d.subParser("runExtension")(b,a)}),a=e.outputModifiers(a,j,b)}functionc(a,b){j[a]=b}functionh(a){returnj[a]}functioni(){returnj}a=a||{};varj={},k=[],l=[],m=["githubCodeBlocks","hashHTMLBlocks","stripLinkDefinitions","blockGamut","unescapeSpecialChars"];for(varning)g.hasOwnProperty(n)&&(j[n]=g[n]);if("object"==typeofa)for(varoina)a.hasOwnProperty(o)&&(j[o]=a[o]);varp=this;returnp.makeHtml=b,j.extensions&&d.helper.forEach(j.extensions,function(a){varb=a;if("string"==typeofa){varc=d.helper.stdExtName(a);!d.helper.isUndefined(d.extensions[c])&&d.extensions[c]?a=d.extensions[c]:d.helper.isUndefined(f[c])||(a=f[c])}if("function"!=typeofa){vare="An extension could not be loaded. It was either not found or is not a valid extension.";throw"string"==typeofb&&(e='Extension "'+b+'" could not be loaded. It was either not found or is not a valid extension.'),e}d.helper.forEach(a(p),function(a){a.type?"language"===a.type||"lang"===a.type?k.push(a):("output"===a.type||"html"===a.type)&&l.push(a):l.push(a)})}),{makeHtml:b,setOption:c,getOption:h,getOptions:i}},d.hasOwnProperty("helper")||(d.helper={}),d.helper.isString=function(a){"use strict";return"string"==typeofa||ainstanceofString},d.helper.forEach=function(a,b){"use strict";if("function"==typeofa.forEach)a.forEach(b);elsefor(varc=0;c<a.length;c++)b(a[c],c,a)},d.helper.isArray=function(a){"use strict";returna.constructor===Array},d.helper.isUndefined=function(a){"use strict";return"undefined"==typeofa},d.helper.stdExtName=function(a){"use strict";returna.replace(/[_-]||\s/g,"").toLowerCase()},d.helper.escapeCharactersCallback=c,d.helper.escapeCharacters=function(a,b,d){"use strict";vare="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";d&&(e="\\\\"+e);varf=newRegExp(e,"g");returna=a.replace(f,c)},d.subParser("anchors",function(a,b,c){"use strict";vare=function(a,b,e,f,g,h,i,j){d.helper.isUndefined(j)&&(j=""),a=b;vark=e,l=f.toLowerCase(),m=g,n=j;if(!m)if(l||(l=k.toLowerCase().replace(/ ?\n/g," ")),m="#"+l,d.helper.isUndefined(c.gUrls[l])){if(!(a.search(/\(\s*\)$/m)>-1))returna;m=""}elsem=c.gUrls[l],d.helper.isUndefined(c.gTitles[l])||(n=c.gTitles[l]);m=d.helper.escapeCharacters(m,"*_",!1);varo='<a href="'+m+'"';return""!==n&&null!==n&&(n=n.replace(/"/g,"""),n=d.helper.escapeCharacters(n,"*_",!1),o+=' title="'+n+'"'),o+=">"+k+"</a>"};returna=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,e),a=a.replace(/(\[((?:\[[^\]]*\