9999999999a:3:{s:8:"renderer";O:49:"Renderer_e8c810c6a5ee9aba49190a595b358298ef44a13f":2:{s:19:"enableQuickRenderer";b:1;s:9:" * params";a:4:{s:14:"DISCUSSION_URL";s:34:"https://www.forum.x67.ro/public/d/";s:7:"L_WROTE";s:0:"";s:11:"PROFILE_URL";s:34:"https://www.forum.x67.ro/public/u/";s:7:"TAG_URL";s:34:"https://www.forum.x67.ro/public/t/";}}s:2:"js";s:81457:"(function(){const HINT={};HINT.EMOTICONS_NOT_AFTER=0;HINT.LITEDOWN_DECODE_HTML_ENTITIES=0;HINT.PREG_HAS_PASSTHROUGH=!1;HINT.RULE_AUTO_CLOSE=1;HINT.RULE_AUTO_REOPEN=1;HINT.RULE_BREAK_PARAGRAPH=1;HINT.RULE_CREATE_PARAGRAPHS=1;HINT.RULE_DISABLE_AUTO_BR=1;HINT.RULE_ENABLE_AUTO_BR=1;HINT.RULE_IGNORE_TAGS=1;HINT.RULE_IGNORE_TEXT=1;HINT.RULE_IGNORE_WHITESPACE=1;HINT.RULE_IS_TRANSPARENT=1;HINT.RULE_PREVENT_BR=1;HINT.RULE_SUSPEND_AUTO_BR=1;HINT.RULE_TRIM_FIRST_LINE=1;HINT.attributeDefaultValue=0;HINT.closeAncestor=0;HINT.closeParent=1;HINT.createChild=1;HINT.fosterParent=1;HINT.hash=1;HINT.ignoreAttrs=1;HINT.namespaces=0;HINT.onRender=1;HINT.onUpdate=1;HINT.regexp=1;HINT.regexpLimit=1;HINT.requireAncestor=0;const o553403F9=[0];const o91473346=[32607];const o8DE1CD10=[32587];const oA385316A=[16705];const o92D189FB=[27981];const oB565876D={flags:2};const o939F1698={flags:514};const oA80287CC={flags:3089};const o02D8DBB5={filterChain:[],required:!0};const o1BC3EAF4={filterChain:[],required:!1};const oD4869BFF={"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1};const oF3C6FA42={closeParent:oD4869BFF,flags:3349};const oDF43256F=[function(attrValue,attrName){return NumericFilter.filterUint(attrValue)}];const o118B31AC=function(tag,tagConfig){return filterAttributes(tag,tagConfig,registeredVars,logger)};const o1B4F5B52=[o118B31AC];const o56E79363=[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[-0-9A-Za-z_]+$/)}];const o6377B813=function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[- +,.0-9A-Za-z_]+$/)};const o91968DBF=[o6377B813];const o6CB0A318={filterChain:oDF43256F,required:!0};const o75AB9259={filterChain:oDF43256F,required:!1};const o7476611B=[function(attrValue,attrName){return UrlFilter.filter(attrValue,registeredVars.urlConfig,logger)}];const oE2346708={filterChain:o56E79363,required:!0};const oABCFC4A3={filterChain:o91968DBF,required:!0};const oB2D4F5E2={filterChain:o91968DBF,required:!1};const oF307D35C={filterChain:o7476611B,required:!0};const o1AF69066={closeParent:oD4869BFF,flags:268,fosterParent:oD4869BFF};const o5DB432B1={allowed:o8DE1CD10,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000};const o8988A276={allowed:o8DE1CD10,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:0},tagLimit:5000};const o1262D8F4={allowed:o8DE1CD10,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:260,fosterParent:oD4869BFF},tagLimit:5000};const xsl=("<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"><xsl:output method=\"html\" encoding=\"utf-8\" indent=\"no\"\/><xsl:decimal-format decimal-separator=\".\"\/><$w$jDISCUSSION_URL\">https:\/\/www.forum.x67.ro\/public\/d\/<\/$w><$w$jL_WROTE\"\/><$w$jPROFILE_URL\">https:\/\/www.forum.x67.ro\/public\/u\/<\/$w><$w$jTAG_URL\">https:\/\/www.forum.x67.ro\/public\/t\/<\/$w>$aB|DEL|EM|H1|H2|H3|H4|H5|H6|I|LI|S|STRONG|SUB|SUP|U|p\"><xsl:element$j{translate(name(),'BDEGHILMNOPRSTU','bdeghilmnoprstu')}\">$d<\/xsl:element>$c$aC\"><code>$d<\/code>$c$aCENTER\"><div$ptext-align:center\">$d<\/div>$c$aCODE\"><pre data-s9e-livepreview-hash=\"\" data-s9e-livepreview-onupdate=\"if(window['hljsLoader'])window['hljsLoader']['highlightBlocks'](this)\"><code><$s$f@lang\"><$h$j$t>language-$b@lang\"\/><\/$h><\/$s>$d<\/code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github\" data-s9e-livepreview-onrender=\"if(window['hljsLoader'])this.parentNode.removeChild(this)\" integrity=\"sha384-E9ssooeJ4kPel3JD7st0BgS50OLWFEdg4ZOp8lYPy52ctQazOIV37TCvzV8l4cYG\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/s9e\/hljs-loader@1.0.34\/loader.min.js\"\/><script>\n                    if(window.hljsLoader &amp;&amp; !document.currentScript.parentNode.hasAttribute('data-s9e-livepreview-onupdate')) {\n                        window.hljsLoader.highlightBlocks(document.currentScript.parentNode);\n                    }\n                <\/script><\/pre>$c$aCOLOR\"><$u$pcolor:{@color}\">$d<\/$u>$c$aE\"><$k><$g$f.=':)'\">\ud83d\ude42<\/$g><$g$f.=':D'\">\ud83d\ude03<\/$g><$g$f.=':P'\">\ud83d\ude1b<\/$g><$g$f.=':('\">\ud83d\ude41<\/$g><$g$f.=':|'\">\ud83d\ude10<\/$g><$g$f.=';)'\">\ud83d\ude09<\/$g><$g$f.=&quot;:'(&quot;\">\ud83d\ude22<\/$g><$g$f.=':O'\">\ud83d\ude2e<\/$g><$g$f.='&gt;:('\">\ud83d\ude21<\/$g><$i>$b.\"\/><\/$i><\/$k>$c$aEMAIL\"><a$xmailto:{@email}\">$d<\/a>$c$aESC\">$d$c$aGROUPMENTION\"><$u><$k><$g$f$y!=1\"><$k><$g$fstring(@color)!=''\"><$h$j$t>GroupMention GroupMention--colored<\/$h><$h$jstyle\">--color:$b@color\"\/>;<\/$h><\/$g><$i><$h$j$t>GroupMention<\/$h><\/$i><\/$k><\/$g><$i><$h$j$t>GroupMention GroupMention--deleted<\/$h><\/$i><\/$k><$u$eGroupMention-name\">@$b@groupname\"\/><\/$u><$"+"s$fstring(@icon)!=''\"><i$eicon {@icon}\"\/><\/$s><\/$u>$c$aHR\"><hr\/>$c$aIMG\"><img src=\"{@src}\" title=\"{@title}\" alt=\"{@alt}\">$mheight|@width\"\/><\/img>$c$aISPOILER\"><$u$espoiler\"$n$t onclick=\"removeAttribute('class')\">$d<\/$u>$c$aLIST\"><$k><$g$fnot(@type)\"><ul>$d<\/ul><\/$g><$g$fstarts-with(@type,'decimal')or starts-with(@type,'lower')or starts-with(@type,'upper')\"><ol$p$v>$mstart\"\/>$d<\/ol><\/$g><$i><ul$p$v>$d<\/ul><\/$i><\/$k>$c$aPOSTMENTION\"><$k><$g$f$y!=1\"><a$x{$DISCUSSION_URL}{@discussionid}\/{@number}\"$ePostMention\"$o{@id}\">$b$q\"\/><\/a><\/$g><$i><$u$ePostMention PostMention--deleted\"$o{@id}\">$b$q\"\/><\/$u><\/$i><\/$k>$c$aQUOTE\"><blockquote><$s$fnot(@author)\"><$h$j$t>uncited<\/$h><\/$s><div><$s$f@author\"><cite>$b@author\"\/><xsl:text> <\/xsl:text>$b$L_WROTE\"\/><\/cite><\/$s>$d<\/div><\/blockquote>$c$aSIZE\"><$u$pfont-size:{@size}px\">$d<\/$u>$c$aSPOILER\"><details$espoiler\"$nopen\">$d<\/details>$c$aTAGMENTION\"><$k><$g$f$y!=1\"><a$x{$TAG_URL}{@slug}\"$o{@id}\"><$h$j$t>TagMention<$s$f@color!=''\"> TagMention--colored<\/$s><\/$h><$h$jstyle\"><$s$f@color!=''\">--color:$b@color\"\/><\/$s><\/$h><$u$eTagMention-text\"><$s$f@icon!=''\"><i$eicon {@icon}\"\/><\/$s>$b@tagname\"\/><\/$u><\/a><\/$g><$i><$u$eTagMention TagMention--deleted\"$o{@id}\"><$u$eTagMention-text\">$b@tagname\"\/><\/$u><\/$u><\/$i><\/$k>$c$aUPL-FILE\"><div$eButtonGroup\"$r{@uuid}\"><div$eButton hasIcon Button--icon Button--primary\"><i$efas fa-download\"\/><\/div><div$eButton\">$b@content\"\/><\/div><div$eButton\">$b@size\"\/><\/div><\/div>$c$aUPL-IMAGE\"><div$efof-download row\"$r{@uuid}\"><div$ecard\"><div$ewrapper\"$pbackground:url({@url}) center \/ cover no-repeat\"><div$eheader\"><ul$emenu-content\"><li><div$efar fa-hdd\"><$u>$b@size\"\/><\/$u><\/div><\/li><\/ul><\/div><div$edata\"><div$econtent\"><h4$etitle\">$b@content\"\/><\/h4><div$eButton Button--primary Button-icon Button--block\"><i$efas fa-download\"\/><\/div><\/div><\/div><\/div><\/div><\/div>$c$aUPL-IMAGE-PREVIEW\"><img$eFoFUpload--Upl-Image-Preview\" src=\"{@url}\" title=\"{@title}\" alt=\"{@alt}\"$o{@uuid}\" loading=\"lazy\"\/>$c$aUPL-TEXT-PREVIEW\"><figure$eFo"+"fUpload-TextPreview\" data-loading=\"false\" data-expanded=\"false\" data-hassnippet=\"{@has_snippet}\"><figcaption$eFofUpload-TextPreviewTitle\"><i$ltrue\"$eicon far fa-file\"\/><xsl:text> <\/xsl:text>$b@content\"\/><\/figcaption><div$eFofUpload-TextPreviewSnippet\"><pre><code data-preview-text=\"&lt;preview will appear here after posting&gt;\" data-nosnippet-text=\"&lt;no preview snippet available&gt;\">$b@snippet\"\/><\/code><\/pre><\/div><div$eFofUpload-TextPreviewFull\"\/><button type=\"button\"$eButton hasIcon FofUpload-TextPreviewToggle\"><i$ltrue\"$eicon fas fa-chevron-down Button-icon FofUpload-TextPreviewExpandIcon\"\/><$u$eButton-label FofUpload-TextPreviewExpand\">\n            Expand preview        <\/$u><i$ltrue\"$eicon fas fa-chevron-up Button-icon FofUpload-TextPreviewCollapseIcon\"\/><$u$eButton-label FofUpload-TextPreviewCollapse\">\n            Collapse preview        <\/$u><div data-size=\"small\"$eFofUpload-TextPreviewToggleLoading LoadingIndicator-container LoadingIndicator-container--inline LoadingIndicator-container--small\"><div$ltrue\"$eLoadingIndicator\"\/><\/div><\/button><div$eFofUpload-TextPreviewError\"><p><i$ltrue\"$eicon fas fa-exclamation-circle\"\/>\n            Error previewing file. It may have been deleted, or the provided file ID is invalid.\n        <\/p><\/div><script>\n        {\n            const figure = document.currentScript.parentElement;\n\n            const previewEl = figure.querySelector('.FofUpload-TextPreviewFull');\n            const snippetEl = figure.querySelector('.FofUpload-TextPreviewSnippet');\n            const loadingEl = figure.querySelector('.FofUpload-TextPreviewLoading');\n            const toggleBtn = figure.querySelector('.FofUpload-TextPreviewToggle');\n\n            const snippetText = '';\n\n            const testUrl = new URL(location.origin);\n            const url = new URL('$b@url\"\/>');\n\n            if (testUrl.origin !== url.origin) {\n              \/\/ Prevent cross-origin requests\n              handleError(new Error('Attempted to fetch a cross-origin file in t"+"ext preview.'));\n            }\n\n            function createCodeHtml(text) {\n                const codeEl = document.createElement('code');\n                codeEl.innerText = text;\n\n                return `&lt;pre&gt;${codeEl.outerHTML}&lt;\/pre&gt;`;\n            }\n\n            function handleError(e) {\n                figure.setAttribute('data-error', 'true');\n\n                console.group('[FoF Upload] Failed to preview text file.');\n                console.error('Failed to load text file: ' + url);\n                console.log(e);\n                console.groupEnd();\n            }\n\n            let fileContent = null;\n\n            \/\/ Only allow toggling preview if showing a snippet\n            if ($b@has_snippet\"\/> &amp;&amp; testUrl.origin === url.origin) {\n                toggleBtn.addEventListener('click', () =&gt; {\n                    if (fileContent !== null) {\n                        const expanded = figure.getAttribute('data-expanded') === 'true';\n                        figure.setAttribute('data-expanded', !expanded);\n                        return;\n                    }\n\n                    figure.setAttribute('data-loading', 'true');\n\n                    fetch(url)\n                        .then(response =&gt; {\n                            if (!response.ok) {\n                                figure.setAttribute('data-loading', 'false');\n                                throw response;\n                            }\n\n                            return response.text();\n                        })\n                        .then(text =&gt; {\n                            fileContent = text;\n                            previewEl.innerHTML = createCodeHtml(text);\n\n                            figure.setAttribute('data-loading', 'false');\n                            const expanded = figure.getAttribute('data-expanded') === 'true';\n                            figure.setAttribute('data-expanded', !expanded);\n                        })\n                        .catch(handleEr"+"ror);\n                });\n            }\n        }\n    <\/script><\/figure>$c$aURL\"><a$x{@url}\">$mrel|@target|@title\"\/>$d<\/a>$c$aUSERMENTION\"><$k><$g$f$y!=1\"><a$x{$PROFILE_URL}{@slug}\"$eUserMention\">@$b$q\"\/><\/a><\/$g><$i><$u$eUserMention UserMention--deleted\">@$b$q\"\/><\/$u><\/$i><\/$k>$c$abr\"><br\/>$c$ae|i|s\"\/><\/xsl:stylesheet>").replace(/\$[a-y]/g,function(k){return{"$a":"<xsl:template match=\"","$b":"<xsl:value-of select=\"","$c":"<\/xsl:template>","$d":"<xsl:apply-templates\/>","$e":" class=\"","$f":" test=\"","$g":"xsl:when","$h":"xsl:attribute","$i":"xsl:otherwise","$j":" name=\"","$k":"xsl:choose","$l":" aria-hidden=\"","$m":"<xsl:copy-of select=\"@","$n":" data-s9e-livepreview-ignore-attrs=\"","$o":" data-id=\"","$p":" style=\"","$q":"@displayname","$r":" data-fof-upload-download-uuid=\"","$s":"xsl:if","$t":"class\"","$u":"span","$v":"list-style-type:{@type}\"","$w":"xsl:param","$x":" href=\"","$y":"@deleted"}[k]});let functionCache={"1788024165":function(){if(window.hljsLoader)this.parentNode.removeChild(this);},"1983388049":function(){if(window.hljsLoader)window.hljsLoader.highlightBlocks(this);}};const EmailFilter={filter:function(attrValue){return/^[-\w.+]+@[-\w.]+$/.test(attrValue)?attrValue:!1}};const FalseFilter={filter:function(attrValue){return!1}};const HashmapFilter={filter:function(attrValue,map,strict){if(attrValue in map){return map[attrValue]}
return(strict)?!1:attrValue}};const MapFilter={filter:function(attrValue,map){let i=-1,cnt=map.length;while(++i<cnt){if(map[i][0].test(attrValue)){return map[i][1]}}
return attrValue}};const NetworkFilter={filterIp:function(attrValue){if(/^[\d.]+$/.test(attrValue)){return NetworkFilter.filterIpv4(attrValue)}
if(/^[\da-f:]+$/i.test(attrValue)){return NetworkFilter.filterIpv6(attrValue)}
return!1},filterIpport:function(attrValue){let m,ip;if(m=/^\[([\da-f:]+)(\]:[1-9]\d*)$/i.exec(attrValue)){ip=NetworkFilter.filterIpv6(m[1]);if(ip===!1){return!1}
return'['+ip+m[2]}
if(m=/^([\d.]+)(:[1-9]\d*)$/.exec(attrValue)){ip=NetworkFilter.filterIpv4(m[1]);if(ip===!1){return!1}
return ip+m[2]}
return!1},filterIpv4:function(attrValue){if(!/^\d+\.\d+\.\d+\.\d+$/.test(attrValue)){return!1}
let i=4,p=attrValue.split('.');while(--i>=0){if(p[i][0]==='0'||p[i]>255){return!1}}
return attrValue},filterIpv6:function(attrValue){return/^([\da-f]{0,4}:){2,7}(?:[\da-f]{0,4}|\d+\.\d+\.\d+\.\d+)$/.test(attrValue)?attrValue:!1}};const NumericFilter={filterFloat:function(attrValue){return/^(?:0|-?[1-9]\d*)(?:\.\d+)?(?:e[1-9]\d*)?$/i.test(attrValue)?attrValue:!1},filterInt:function(attrValue){return/^(?:0|-?[1-9]\d*)$/.test(attrValue)?attrValue:!1},filterRange:function(attrValue,min,max,logger){if(!/^(?:0|-?[1-9]\d*)$/.test(attrValue)){return!1}
attrValue=parseInt(attrValue,10);if(attrValue<min){if(logger){logger.warn('Value outside of range, adjusted up to min value',{'attrValue':attrValue,'min':min,'max':max})}
return min}
if(attrValue>max){if(logger){logger.warn('Value outside of range, adjusted down to max value',{'attrValue':attrValue,'min':min,'max':max})}
return max}
return attrValue},filterUint:function(attrValue){return/^(?:0|[1-9]\d*)$/.test(attrValue)?attrValue:!1}};const RegexpFilter={filter:function(attrValue,regexp){return regexp.test(attrValue)?attrValue:!1}};const TimestampFilter={filter:function(attrValue){let m=/^(?=\d)(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(attrValue);if(m){return 3600*(m[1]||0)+60*(m[2]||0)+(+m[3]||0)}
return NumericFilter.filterUint(attrValue)}};const UrlFilter={filter:function(attrValue,urlConfig,logger){let p=UrlFilter.parseUrl(attrValue.replace(/^\s+/,'').replace(/\s+$/,''));let error=UrlFilter.validateUrl(urlConfig,p);if(error){if(logger){p.attrValue=attrValue;logger.err(error,p)}
return!1}
return UrlFilter.rebuildUrl(urlConfig,p)},parseUrl:function(url){let regexp=/^(?:([a-z][-+.\w]*):)?(?:\/\/(?:([^:\/?#]*)(?::([^\/?#]*)?)?@)?(?:(\[[a-f\d:]+\]|[^:\/?#]+)(?::(\d*))?)?(?![^\/?#]))?([^?#]*)(\?[^#]*)?(#.*)?$/i;let m=regexp.exec(url),parts={},tokens=['scheme','user','pass','host','port','path','query','fragment'];tokens.forEach(function(name,i){parts[name]=(m[i+1]>'')?m[i+1]:''});parts.scheme=parts.scheme.toLowerCase();parts.host=parts.host.replace(/[\u3002\uff0e\uff61]/g,'.').replace(/\.+$/g,'');if(/[^\x00-\x7F]/.test(parts.host)&&typeof punycode!=='undefined'){parts.host=punycode.toASCII(parts.host)}
return parts},rebuildUrl:function(urlConfig,p){let url='';if(p.scheme!==''){url+=p.scheme+':'}
if(p.host!==''){url+='//';if(p.user!==''){url+=rawurlencode(decodeURIComponent(p.user));if(p.pass!==''){url+=':'+rawurlencode(decodeURIComponent(p.pass))}
url+='@'}
url+=p.host;if(p.port!==''){url+=':'+p.port}}else if(p.scheme==='file'){url+='//'}
let path=p.path+p.query+p.fragment;path=path.replace(/%.?[a-f]/g,function(str){return str.toUpperCase()},path);url+=UrlFilter.sanitizeUrl(path);if(!p.scheme){url=url.replace(/^([^\/]*):/,'$1%3A')}
return url},sanitizeUrl:function(url){return url.replace(/[^\u0020-\u007E]+/g,encodeURIComponent).replace(/%(?![0-9A-Fa-f]{2})|[^!#-&*-;=?-Z_a-z~]/g,function(m){return'%'+m[0].charCodeAt(0).toString(16).toUpperCase()})},validateUrl:function(urlConfig,p){if(p.scheme!==''&&!urlConfig.allowedSchemes.test(p.scheme)){return'URL scheme is not allowed'}
if(p.host!==''){let regexp=/^(?!-)[-a-z0-9]{0,62}[a-z0-9](?:\.(?!-)[-a-z0-9]{0,62}[a-z0-9])*$/i;if(!regexp.test(p.host)){if(!NetworkFilter.filterIpv4(p.host)&&!NetworkFilter.filterIpv6(p.host.replace(/^\[(.*)\]$/,'$1',p.host))){return'URL host is invalid'}}
if((urlConfig.disallowedHosts&&urlConfig.disallowedHosts.test(p.host))||(urlConfig.restrictedHosts&&!urlConfig.restrictedHosts.test(p.host))){return'URL host is not allowed'}}else if(/^(?:(?:f|ht)tps?)$/.test(p.scheme)){return'Missing host'}}};function html_entity_decode(str){let b=document.createElement('b');html_entity_decode=function(str){b.innerHTML=str.replace(/</g,'&lt;');return b.textContent};return html_entity_decode(str)}
function htmlspecialchars_compat(str){return str.replace(/[<>&"]/g,(c)=>{const t={'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'};return t[c]})}
function htmlspecialchars_noquotes(str){return str.replace(/[<>&]/g,(c)=>{const t={'<':'&lt;','>':'&gt;','&':'&amp;'};return t[c]})}
function rawurlencode(str){return encodeURIComponent(str).replace(/[!'()*]/g,(c)=>{return'%'+c.charCodeAt(0).toString(16).toUpperCase()})}
function returnFalse(){return!1}
function returnTrue(){return!0}
function executeAttributePreprocessors(tag,tagConfig){if(typeof tagConfig.attributePreprocessors==='undefined'){return}
tagConfig.attributePreprocessors.forEach((ap)=>{let attrName=ap[0],regexp=ap[1],map=ap[2];if(tag.hasAttribute(attrName)){executeAttributePreprocessor(tag,attrName,regexp,map)}})}
function filterAttributes(tag,tagConfig,registeredVars,logger){let attributes={},attrName;for(attrName in tagConfig.attributes){let attrConfig=tagConfig.attributes[attrName],attrValue=!1;if(tag.hasAttribute(attrName)){attrValue=executeAttributeFilterChain(attrConfig.filterChain,attrName,tag.getAttribute(attrName))}
if(attrValue!==!1){attributes[attrName]=attrValue}else if(HINT.attributeDefaultValue&&typeof attrConfig.defaultValue!=='undefined'){attributes[attrName]=attrConfig.defaultValue}else if(attrConfig.required){tag.invalidate()}}
tag.setAttributes(attributes)}
function filterTag(tag){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];logger.setTag(tag);for(let i=0;i<tagConfig.filterChain.length;++i){if(tag.isInvalid()){break}
tagConfig.filterChain[i](tag,tagConfig)}
logger.unsetTag()}
function executeAttributeFilterChain(filterChain,attrName,attrValue){logger.setAttribute(attrName);for(let i=0;i<filterChain.length;++i){attrValue=filterChain[i](attrValue,attrName);if(attrValue===!1){break}}
logger.unsetAttribute();return attrValue}
function executeAttributePreprocessor(tag,attrName,regexp,map){let attrValue=tag.getAttribute(attrName),captures=getNamedCaptures(attrValue,regexp,map),k;for(k in captures){if(k===attrName||!tag.hasAttribute(k)){tag.setAttribute(k,captures[k])}}}
function getNamedCaptures(attrValue,regexp,map){let m=regexp.exec(attrValue);if(!m){return[]}
let values={};map.forEach((k,i)=>{if(typeof m[i]==='string'&&m[i]!==''){values[k]=m[i]}});return values}
function Logger(){}Logger.prototype={add:function(type,msg,context){},clear:function(){},setAttribute:function(attrName){},setTag:function(tag){},unsetAttribute:function(){},unsetTag:function(){},debug:function(msg,context){},err:function(msg,context){},info:function(msg,context){},warn:function(msg,context){}};function Tag(type,name,pos,len,priority){this.type=+type;this.name=name;this.pos=+pos;this.len=+len;this.sortPriority=+priority||0;this.attributes={};this.cascade=[];if(isNaN(type+pos+len)){this.invalidate()}}
Tag.START_TAG=1;Tag.END_TAG=2;Tag.SELF_CLOSING_TAG=3;Tag.prototype.attributes;Tag.prototype.cascade;Tag.prototype.endTag;Tag.prototype.invalid=!1;Tag.prototype.len;Tag.prototype.name;Tag.prototype.pos;Tag.prototype.sortPriority;Tag.prototype.startTag;Tag.prototype.type;Tag.prototype.addFlags=function(flags){this.flags|=flags};Tag.prototype.cascadeInvalidationTo=function(tag){this.cascade.push(tag);if(this.invalid){tag.invalidate()}};Tag.prototype.invalidate=function(){if(!this.invalid){this.invalid=!0;this.cascade.forEach(function(tag){tag.invalidate()})}};Tag.prototype.pairWith=function(tag){if(this.canBePaired(this,tag)){this.endTag=tag;tag.startTag=this;this.cascadeInvalidationTo(tag)}else if(this.canBePaired(tag,this)){this.startTag=tag;tag.endTag=this}};Tag.prototype.canBePaired=function(startTag,endTag){return startTag.name===endTag.name&&startTag.type===Tag.START_TAG&&endTag.type===Tag.END_TAG&&startTag.pos<=startTag.pos};Tag.prototype.removeFlags=function(flags){this.flags&=~flags};Tag.prototype.setFlags=function(flags){this.flags=flags};Tag.prototype.getAttributes=function(){let attributes={};for(let attrName in this.attributes){attributes[attrName]=this.attributes[attrName]}
return attributes};Tag.prototype.getEndTag=function(){return this.endTag};Tag.prototype.getFlags=function(){return this.flags};Tag.prototype.getLen=function(){return this.len};Tag.prototype.getName=function(){return this.name};Tag.prototype.getPos=function(){return this.pos};Tag.prototype.getSortPriority=function(){return this.sortPriority};Tag.prototype.getStartTag=function(){return this.startTag};Tag.prototype.getType=function(){return this.type};Tag.prototype.canClose=function(startTag){if(this.invalid||!this.canBePaired(startTag,this)||(this.startTag&&this.startTag!==startTag)||(startTag.endTag&&startTag.endTag!==this)){return!1}
return!0};Tag.prototype.isBrTag=function(){return(this.name==='br')};Tag.prototype.isEndTag=function(){return!!(this.type&Tag.END_TAG)};Tag.prototype.isIgnoreTag=function(){return(this.name==='i')};Tag.prototype.isInvalid=function(){return this.invalid};Tag.prototype.isParagraphBreak=function(){return(this.name==='pb')};Tag.prototype.isSelfClosingTag=function(){return(this.type===Tag.SELF_CLOSING_TAG)};Tag.prototype.isSystemTag=function(){return('br i pb v'.indexOf(this.name)>-1)};Tag.prototype.isStartTag=function(){return!!(this.type&Tag.START_TAG)};Tag.prototype.isVerbatim=function(){return(this.name==='v')};Tag.prototype.getAttribute=function(attrName){return this.attributes[attrName]};Tag.prototype.hasAttribute=function(attrName){return(attrName in this.attributes)};Tag.prototype.removeAttribute=function(attrName){delete this.attributes[attrName]};Tag.prototype.setAttribute=function(attrName,attrValue){this.attributes[attrName]=attrValue};Tag.prototype.setAttributes=function(attributes){this.attributes={};for(let attrName in attributes){this.attributes[attrName]=attributes[attrName]}};const RULE_AUTO_CLOSE=1<<0;const RULE_AUTO_REOPEN=1<<1;const RULE_BREAK_PARAGRAPH=1<<2;const RULE_CREATE_PARAGRAPHS=1<<3;const RULE_DISABLE_AUTO_BR=1<<4;const RULE_ENABLE_AUTO_BR=1<<5;const RULE_IGNORE_TAGS=1<<6;const RULE_IGNORE_TEXT=1<<7;const RULE_IGNORE_WHITESPACE=1<<8;const RULE_IS_TRANSPARENT=1<<9;const RULE_PREVENT_BR=1<<10;const RULE_SUSPEND_AUTO_BR=1<<11;const RULE_TRIM_FIRST_LINE=1<<12;const RULES_AUTO_LINEBREAKS=RULE_DISABLE_AUTO_BR|RULE_ENABLE_AUTO_BR|RULE_SUSPEND_AUTO_BR;const RULES_INHERITANCE=RULE_ENABLE_AUTO_BR;const WHITESPACE=" \n\t";let cntOpen;let cntTotal;let context;let currentFixingCost;let currentTag;let isRich;let logger=new Logger;let maxFixingCost=10000;let namespaces;let openTags;let output;const plugins={"Autoemail":{parser:function(text,matches){const config={attrName:"email",tagName:"EMAIL"};let tagName=config.tagName,attrName=config.attrName;matches.forEach((m)=>{let startTag=addStartTag(tagName,m[0][1],0);startTag.setAttribute(attrName,m[0][0]);let endTag=addEndTag(tagName,m[0][1]+m[0][0].length,0);startTag.pairWith(endTag)})},quickMatch:"@",regexp:/\b[-a-z0-9_+.]+@[-a-z0-9.]*[a-z0-9]/ig,regexpLimit:50000},"Autolink":{parser:function(text,matches){const config={attrName:"url",tagName:"URL"};matches.forEach((m)=>{linkifyUrl(m[0][1],trimUrl(m[0][0]))});function linkifyUrl(tagPos,url){let endPos=tagPos+url.length,endTag=addEndTag(config.tagName,endPos,0);if(url[3]==='.'){url='http://'+url}
let startTag=addStartTag(config.tagName,tagPos,0,1);startTag.setAttribute(config.attrName,url);startTag.pairWith(endTag);let contentTag=addVerbatim(tagPos,endPos-tagPos,1000);startTag.cascadeInvalidationTo(contentTag)}
function trimUrl(url){return url.replace(/(?:(?![-=+)\/_])[\s!-.:-@[-`{-~])+$/,'')}},quickMatch:":",regexp:/\bhttps?:(?:[^\s()\[\]\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65]|\([^\s()]*\)|\[\w*\])+/ig,regexpLimit:50000},"BBCodes":{parser:function(text,matches){const config={bbcodes:{"*":{tagName:"LI"},"B":[],"CENTER":[],"CODE":{defaultAttribute:"lang"},"COLOR":[],"DEL":[],"EMAIL":{contentAttributes:["email"]},"I":[],"IMG":{contentAttributes:["src"],defaultAttribute:"src"},"LIST":{defaultAttribute:"type"},"QUOTE":{defaultAttribute:"author"},"S":[],"SIZE":[],"U":[],"UPL-FILE":{contentAttributes:["content"],defaultAttribute:"uuid"},"UPL-IMAGE":{contentAttributes:["content"],defaultAttribute:"uuid"},"UPL-IMAGE-PREVIEW":{defaultAttribute:"uuid"},"UPL-TEXT-PREVIEW":{contentAttributes:["content"],defaultAttribute:"uuid"},"URL":{contentAttributes:["url"]}}};let attributes;let bbcodeConfig;let bbcodeName;let bbcodeSuffix;let pos;let startPos;let textLen=text.length;let uppercaseText='';matches.forEach((m)=>{bbcodeName=m[1][0].toUpperCase();if(!(bbcodeName in config.bbcodes)){return}
bbcodeConfig=config.bbcodes[bbcodeName];startPos=m[0][1];pos=startPos+m[0][0].length;try
{parseBBCode()}catch(e){}});function addBBCodeEndTag(){return addEndTag(getTagName(),startPos,pos-startPos)}
function addBBCodeSelfClosingTag(){let tag=addSelfClosingTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag}
function addBBCodeStartTag(){let prio=(bbcodeSuffix!=='')?-10:0,tag=addStartTag(getTagName(),startPos,pos-startPos,prio);tag.setAttributes(attributes);return tag}
function captureEndTag(){if(!uppercaseText){uppercaseText=text.toUpperCase()}
let match='[/'+bbcodeName+bbcodeSuffix+']',endTagPos=uppercaseText.indexOf(match,pos);if(endTagPos<0){return null}
return addEndTag(getTagName(),endTagPos,match.length)}
function getTagName(){return bbcodeConfig.tagName||bbcodeName}
function parseAttributes(){let firstPos=pos,attrName;attributes={};while(pos<textLen){let c=text[pos];if(" \n\t".indexOf(c)>-1){++pos;continue}
if('/]'.indexOf(c)>-1){return}
let spn=/^[-\w]*/.exec(text.substring(pos,pos+100))[0].length;if(spn){attrName=text.substring(pos,pos+spn).toLowerCase();pos+=spn;if(pos>=textLen){throw ''}
if(text[pos]!=='='){continue}}else if(c==='='&&pos===firstPos){attrName=bbcodeConfig.defaultAttribute||bbcodeName.toLowerCase()}else{throw ''}
if(++pos>=textLen){throw ''}
attributes[attrName]=parseAttributeValue()}}
function parseAttributeValue(){if(text[pos]==='"'||text[pos]==="'"){return parseQuotedAttributeValue()}
let match=/(?:[^\s\]]|[ \t](?!\s*(?:[-\w]+=|\/?\])))*/.exec(text.substring(pos)),attrValue=match[0];pos+=attrValue.length;return attrValue}
function parseBBCode(){parseBBCodeSuffix();if(text[startPos+1]==='/'){if(text[pos]===']'&&bbcodeSuffix===''){++pos;addBBCodeEndTag()}
return}
parseAttributes();if(bbcodeConfig.predefinedAttributes){for(let attrName in bbcodeConfig.predefinedAttributes){if(!(attrName in attributes)){attributes[attrName]=bbcodeConfig.predefinedAttributes[attrName]}}}
if(text[pos]===']'){++pos}else{if(text.substring(pos,pos+2)==='/]'){pos+=2;addBBCodeSelfClosingTag()}
return}
let contentAttributes=[];if(bbcodeConfig.contentAttributes){bbcodeConfig.contentAttributes.forEach((attrName)=>{if(!(attrName in attributes)){contentAttributes.push(attrName)}})}
let requireEndTag=(bbcodeSuffix||bbcodeConfig.forceLookahead),endTag=(requireEndTag||contentAttributes.length)?captureEndTag():null;if(endTag){contentAttributes.forEach((attrName)=>{attributes[attrName]=text.substring(pos,endTag.getPos())})}else if(requireEndTag){return}
let tag=addBBCodeStartTag();if(endTag){tag.pairWith(endTag)}}
function parseBBCodeSuffix(){bbcodeSuffix='';if(text[pos]===':'){bbcodeSuffix=/^:\d*/.exec(text.substring(pos))[0];pos+=bbcodeSuffix.length}}
function parseQuotedAttributeValue(){let quote=text[pos],valuePos=pos+1,n;do{pos=text.indexOf(quote,pos+1);if(pos<0){throw ''}
n=1;while(text[pos-n]==='\\'){++n}}
while(n%2===0);let attrValue=text.substring(valuePos,pos);if(attrValue.indexOf('\\')>-1){attrValue=attrValue.replace(/\\([\\'"])/g,'$1')}
++pos;return attrValue}},quickMatch:"[",regexp:/\[\/?(\*|[-\w]+)(?=[\]\s=:\/])/g,regexpLimit:50000},"Emoticons":{parser:function(text,matches){const config={tagName:"E"};matches.forEach((m)=>{if(HINT.EMOTICONS_NOT_AFTER&&config.notAfter&&m[0][1]&&config.notAfter.test(text[m[0][1]-1])){return}
addSelfClosingTag(config.tagName,m[0][1],m[0][0].length)})},regexp:/(?::(?:[()DOP|]|'\()|;\)|>:\()/g,regexpLimit:50000},"Escaper":{parser:function(text,matches){const config={tagName:"ESC"};matches.forEach((m)=>{addTagPair(config.tagName,m[0][1],1,m[0][1]+m[0][0].length,0)})},quickMatch:"\\",regexp:/\\[-!#()*+.:<>@[\\\]^_`{|}~]/g,regexpLimit:50000},"Litedown":{parser:function(text,matches){const config={decodeHtmlEntities:!1};let decodeHtmlEntities=config.decodeHtmlEntities;let hasEscapedChars=!1;let hasReferences=!1;let linkReferences={};if(text.indexOf('\\')>=0){hasEscapedChars=!0;text=text.replace(/\\[!"'()*<>[\\\]^_`~]/g,function(str){return{'\\!':"\x1B0",'\\"':"\x1B1","\\'":"\x1B2",'\\(':"\x1B3",'\\)':"\x1B4",'\\*':"\x1B5",'\\<':"\x1B6",'\\>':"\x1B7",'\\[':"\x1B8",'\\\\':"\x1B9",'\\]':"\x1BA",'\\^':"\x1BB",'\\_':"\x1BC",'\\`':"\x1BD",'\\~':"\x1BE"}[str]})}
text+="\n\n\x17";function decode(str){if(HINT.LITEDOWN_DECODE_HTML_ENTITIES&&decodeHtmlEntities&&str.indexOf('&')>-1){str=html_entity_decode(str)}
str=str.replace(/\x1A/g,'');if(hasEscapedChars){str=str.replace(/\x1B./g,function(seq){return{"\x1B0":'!',"\x1B1":'"',"\x1B2":"'","\x1B3":'(',"\x1B4":')',"\x1B5":'*',"\x1B6":'<',"\x1B7":'>',"\x1B8":'[',"\x1B9":'\\',"\x1BA":']',"\x1BB":'^',"\x1BC":'_',"\x1BD":'`',"\x1BE":'~'}[seq]})}
return str}
function isAfterWhitespace(pos){return(pos>0&&isWhitespace(text.charAt(pos-1)))}
function isAlnum(chr){return(' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.indexOf(chr)>0)}
function isBeforeWhitespace(pos){return isWhitespace(text[pos+1])}
function isSurroundedByAlnum(pos,len){return(pos>0&&isAlnum(text[pos-1])&&isAlnum(text[pos+len]))}
function isWhitespace(chr){return(" \n\t".indexOf(chr)>-1)}
function markBoundary(pos){text=text.substring(0,pos)+"\x17"+text.substring(pos+1)}
function overwrite(pos,len){if(len>0){text=text.substring(0,pos)+new Array(1+len).join("\x1A")+text.substring(pos+len)}}
function parseInlineMarkup(str,regexp,tagName){if(text.indexOf(str)===-1){return}
let m;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length,endPos=matchPos+matchLen-2;addTagPair(tagName,matchPos,2,endPos,2);overwrite(matchPos,2);overwrite(endPos,2)}}
function parseAbstractScript(tagName,syntaxChar,shortRegexp,longRegexp){let pos=text.indexOf(syntaxChar);if(pos===-1){return}
parseShortForm(pos);parseLongForm(pos);function parseLongForm(pos){pos=text.indexOf(syntaxChar+'(',pos);if(pos===-1){return}
let m,regexp=longRegexp,hasMatched=!1;regexp.lastIndex=pos;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length;addTagPair(tagName,matchPos,2,matchPos+matchLen-1,1);overwrite(matchPos,matchLen);hasMatched=!0}
if(hasMatched){parseLongForm(pos)}}
function parseShortForm(pos){let m,regexp=shortRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length,startPos=matchPos,endLen=(match.charAt(matchLen-1)===syntaxChar)?1:0,endPos=matchPos+matchLen-endLen;addTagPair(tagName,startPos,1,endPos,endLen)}}}
function setLinkAttributes(tag,linkInfo,attrName){let url=linkInfo.replace(/^\s*/,'').replace(/\s*$/,''),title='',pos=url.indexOf(' ');if(pos!==-1){title=url.substring(pos).replace(/^\s*\S/,'').replace(/\S\s*$/,'');url=url.substring(0,pos)}
if(/^<.+>$/.test(url)){url=url.replace(/^<(.+)>$/,'$1').replace(/\\>/g,'>')}
tag.setAttribute(attrName,decode(url));if(title>''){tag.setAttribute('title',decode(title))}}(function(){let setextLines={};function parse(){matchSetextLines();let blocks=[],blocksCnt=0,codeFence,codeIndent=4,codeTag,lineIsEmpty=!0,lists=[],listsCnt=0,newContext=!1,textBoundary=0,breakParagraph,continuation,ignoreLen,indentStr,indentLen,lfPos,listIndex,maxIndent,minIndent,blockDepth,tagPos,tagLen;let matches=[],m,regexp=/^(?:(?=[-*+\d \t>`~#_])((?: {0,3}>(?:(?!!)|!(?![^\n>]*?!<)) ?)+)?([ \t]+)?(\* *\* *\*[* ]*$|- *- *-[- ]*$|_ *_ *_[_ ]*$)?((?:[-*+]|\d+\.)[ \t]+(?=\S))?[ \t]*(#{1,6}[ \t]+|```+[^`\n]*$|~~~+[^~\n]*$)?)?/gm;while(m=regexp.exec(text)){matches.push(m);if(m.index===regexp.lastIndex){++regexp.lastIndex}}
matches.forEach((m)=>{let blockMarks=[],matchPos=m.index,matchLen=m[0].length,startPos,startLen,endPos,endLen;ignoreLen=0;blockDepth=0;continuation=!lineIsEmpty;lfPos=text.indexOf("\n",matchPos);lineIsEmpty=(lfPos===matchPos+matchLen&&!m[3]&&!m[4]&&!m[5]);if(!matchLen){++regexp.lastIndex}
breakParagraph=(lineIsEmpty&&continuation);if(m[1]){blockMarks=getBlockMarks(m[1]);blockDepth=blockMarks.length;ignoreLen=m[1].length;if(codeTag&&codeTag.hasAttribute('blockDepth')){blockDepth=Math.min(blockDepth,codeTag.getAttribute('blockDepth'));ignoreLen=computeBlockIgnoreLen(m[1],blockDepth)}
overwrite(matchPos,ignoreLen)}
if(blockDepth<blocksCnt&&!continuation){newContext=!0;do{let startTag=blocks.pop();addEndTag(startTag.getName(),textBoundary,0).pairWith(startTag)}
while(blockDepth<--blocksCnt);}
if(blockDepth>blocksCnt&&!lineIsEmpty){newContext=!0;do{let tagName=(blockMarks[blocksCnt]==='>!')?'SPOILER':'QUOTE';blocks.push(addStartTag(tagName,matchPos,0,-999))}
while(blockDepth>++blocksCnt);}
let indentWidth=0,indentPos=0;if(m[2]&&!codeFence){indentStr=m[2];indentLen=indentStr.length;do{if(indentStr[indentPos]===' '){++indentWidth}else{indentWidth=(indentWidth+4)&~3}}
while(++indentPos<indentLen&&indentWidth<codeIndent);}
if(codeTag&&!codeFence&&indentWidth<codeIndent&&!lineIsEmpty){newContext=!0}
if(newContext){newContext=!1;if(codeTag){if(textBoundary>codeTag.getPos()){overwrite(codeTag.getPos(),textBoundary-codeTag.getPos());codeTag.pairWith(addEndTag('CODE',textBoundary,0,-1))}else{codeTag.invalidate()}
codeTag=null;codeFence=null}
lists.forEach((list)=>{closeList(list,textBoundary)});lists=[];listsCnt=0;if(matchPos){markBoundary(matchPos-1)}}
if(indentWidth>=codeIndent){if(codeTag||!continuation){ignoreLen=(m[1]||'').length+indentPos;if(!codeTag){codeTag=addStartTag('CODE',matchPos+ignoreLen,0,-999)}
m={}}}else if(!codeTag){let hasListItem=!!m[4];if(!indentWidth&&!continuation&&!hasListItem){listIndex=-1}else if(continuation&&!hasListItem){listIndex=listsCnt-1}else if(!listsCnt){listIndex=(hasListItem)?0:-1}else{listIndex=0;while(listIndex<listsCnt&&indentWidth>lists[listIndex].maxIndent){++listIndex}}
while(listIndex<listsCnt-1){closeList(lists.pop(),textBoundary);--listsCnt}
if(listIndex===listsCnt&&!hasListItem){--listIndex}
if(hasListItem&&listIndex>=0){breakParagraph=!0;tagPos=matchPos+ignoreLen+indentPos;tagLen=m[4].length;let itemTag=addStartTag('LI',tagPos,tagLen);overwrite(tagPos,tagLen);if(listIndex<listsCnt){addEndTag('LI',textBoundary,0).pairWith(lists[listIndex].itemTag);lists[listIndex].itemTag=itemTag;lists[listIndex].itemTags.push(itemTag)}else{++listsCnt;if(listIndex){minIndent=lists[listIndex-1].maxIndent+1;maxIndent=Math.max(minIndent,listIndex*4)}else{minIndent=0;maxIndent=indentWidth}
let listTag=addStartTag('LIST',tagPos,0);if(m[4].indexOf('.')>-1){listTag.setAttribute('type','decimal');let start=+m[4];if(start!==1){listTag.setAttribute('start',start)}}
lists.push({listTag:listTag,itemTag:itemTag,itemTags:[itemTag],minIndent:minIndent,maxIndent:maxIndent,tight:!0})}}
if(listsCnt&&!continuation&&!lineIsEmpty){if(lists[0].itemTags.length>1||!hasListItem){lists.forEach((list)=>{list.tight=!1})}}
codeIndent=(listsCnt+1)*4}
if(m[5]){if(m[5][0]==='#'){startLen=m[5].length;startPos=matchPos+matchLen-startLen;endLen=getAtxHeaderEndTagLen(matchPos+matchLen,lfPos);endPos=lfPos-endLen;addTagPair('H'+/#{1,6}/.exec(m[5])[0].length,startPos,startLen,endPos,endLen);markBoundary(startPos);markBoundary(lfPos);if(continuation){breakParagraph=!0}}else if(m[5][0]==='`'||m[5][0]==='~'){tagPos=matchPos+ignoreLen;tagLen=lfPos-tagPos;if(codeTag&&m[5]===codeFence){codeTag.pairWith(addEndTag('CODE',tagPos,tagLen,-1));addIgnoreTag(textBoundary,tagPos-textBoundary);overwrite(codeTag.getPos(),tagPos+tagLen-codeTag.getPos());codeTag=null;codeFence=null}else if(!codeTag){codeTag=addStartTag('CODE',tagPos,tagLen);codeFence=m[5].replace(/[^`~]+/,'');codeTag.setAttribute('blockDepth',blockDepth);addIgnoreTag(tagPos+tagLen,1);let lang=m[5].replace(/^[`~\s]*/,'').replace(/\s+$/,'');if(lang!==''){codeTag.setAttribute('lang',lang)}}}}else if(m[3]&&!listsCnt&&text[matchPos+matchLen]!=="\x17"){addSelfClosingTag('HR',matchPos+ignoreLen,matchLen-ignoreLen);breakParagraph=!0;markBoundary(lfPos)}else if(setextLines[lfPos]&&setextLines[lfPos].blockDepth===blockDepth&&!lineIsEmpty&&!listsCnt&&!codeTag){addTagPair(setextLines[lfPos].tagName,matchPos+ignoreLen,0,setextLines[lfPos].endPos,setextLines[lfPos].endLen);markBoundary(setextLines[lfPos].endPos+setextLines[lfPos].endLen)}
if(breakParagraph){addParagraphBreak(textBoundary);markBoundary(textBoundary)}
if(!lineIsEmpty){textBoundary=lfPos}
if(ignoreLen){addIgnoreTag(matchPos,ignoreLen,1000)}})}
function closeList(list,textBoundary){addEndTag('LIST',textBoundary,0).pairWith(list.listTag);addEndTag('LI',textBoundary,0).pairWith(list.itemTag);if(list.tight){list.itemTags.forEach((itemTag)=>{itemTag.removeFlags(RULE_CREATE_PARAGRAPHS)})}}
function computeBlockIgnoreLen(str,maxBlockDepth){let remaining=str;while(--maxBlockDepth>=0){remaining=remaining.replace(/^ *>!? ?/,'')}
return str.length-remaining.length}
function getAtxHeaderEndTagLen(startPos,endPos){let content=text.substring(startPos,endPos),m=/[ \t]*#*[ \t]*$/.exec(content);return m[0].length}
function getBlockMarks(str){let blockMarks=[],regexp=/>!?/g,m;while(m=regexp.exec(str)){blockMarks.push(m[0])}
return blockMarks}
function matchSetextLines(){if(text.indexOf('-')===-1&&text.indexOf('=')===-1){return}
let m,regexp=/^(?=[-=>])(?:>!? ?)*(?=[-=])(?:-+|=+) *$/gm;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index;let endPos=matchPos-1;while(endPos>0&&text[endPos-1]===' '){--endPos}
setextLines[matchPos-1]={endLen:matchPos+match.length-endPos,endPos:endPos,blockDepth:match.length-match.replace(/>/g,'').length,tagName:(match[0]==='=')?'H1':'H2'}}}
parse()})();(function(){function parse(){if(text.indexOf(']:')<0){return}
let m,regexp=/^\x1A* {0,3}\[([^\x17\]]+)\]: *([^[\s\x17]+ *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))?) *(?=$|\x17)\n?/gm;while(m=regexp.exec(text)){addIgnoreTag(m.index,m[0].length);let id=m[1].toLowerCase();if(!linkReferences[id]){hasReferences=!0;linkReferences[id]=m[2]}}}
parse()})();(function(){function parse(){let markers=getInlineCodeMarkers(),i=-1,cnt=markers.length;while(++i<(cnt-1)){let pos=markers[i].next,j=i;if(text[markers[i].pos]!=='`'){++markers[i].pos;--markers[i].len}
while(++j<cnt&&markers[j].pos===pos){if(markers[j].len===markers[i].len){addInlineCodeTags(markers[i],markers[j]);i=j;break}
pos=markers[j].next}}}
function addInlineCodeTags(left,right){let startPos=left.pos,startLen=left.len+left.trimAfter,endPos=right.pos-right.trimBefore,endLen=right.len+right.trimBefore;addTagPair('C',startPos,startLen,endPos,endLen);overwrite(startPos,endPos+endLen-startPos)}
function getInlineCodeMarkers(){let pos=text.indexOf('`');if(pos<0){return[]}
let regexp=/(`+)(\s*)[^\x17`]*/g,trimNext=0,markers=[],_text=text.replace(/\x1BD/g,'\\`'),m;regexp.lastIndex=pos;while(m=regexp.exec(_text)){markers.push({pos:m.index,len:m[1].length,trimBefore:trimNext,trimAfter:m[2].length,next:m.index+m[0].length});trimNext=m[0].length-m[0].replace(/\s+$/,'').length}
return markers}
parse()})();(function(){function parse(){let pos=text.indexOf('![');if(pos===-1){return}
if(text.indexOf('](',pos)>0){parseInlineImages()}
if(hasReferences){parseReferenceImages()}}
function addImageTag(startPos,endPos,endLen,linkInfo,alt){let tag=addTagPair('IMG',startPos,2,endPos,endLen);setLinkAttributes(tag,linkInfo,'src');tag.setAttribute('alt',decode(alt));overwrite(startPos,endPos+endLen-startPos)}
function parseInlineImages(){let m,regexp=/!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen,alt=m[0].substring(2,m[0].length-endLen);addImageTag(startPos,endPos,endLen,linkInfo,alt)}}
function parseReferenceImages(){let m,regexp=/!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;while(m=regexp.exec(text)){let startPos=m.index,endPos=startPos+2+m[1].length,endLen=1,alt=m[1],id=alt;if(m[2]>''&&linkReferences[m[2]]){endLen=m[0].length-alt.length-2;id=m[2]}else if(!linkReferences[id]){continue}
addImageTag(startPos,endPos,endLen,linkReferences[id],alt)}}
parse()})();(function(){function parse(){parseInlineMarkup('>!',/>![^\x17]+?!</g,'ISPOILER');parseInlineMarkup('||',/\|\|[^\x17]+?\|\|/g,'ISPOILER')}
parse()})();(function(){function parse(){if(text.indexOf('](')!==-1){parseInlineLinks()}
if(text.indexOf('<')!==-1){parseAutomaticLinks()}
if(hasReferences){parseReferenceLinks()}}
function addLinkTag(startPos,endPos,endLen,linkInfo){let priority=(endLen===1)?1:-1;let tag=addTagPair('URL',startPos,1,endPos,endLen,priority);setLinkAttributes(tag,linkInfo,'url');overwrite(startPos,1);overwrite(endPos,endLen)}
function getLabels(){let labels={},m,regexp=/\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\]/g;while(m=regexp.exec(text)){labels[m.index]=m[1].toLowerCase()}
return labels}
function parseAutomaticLinks(){let m,regexp=/<[-+.\w]+([:@])[^\x17\s>]+?(?:>|\x1B7)/g;while(m=regexp.exec(text)){let content=decode(m[0].replace(/\x1B/g,"\\\x1B")).replace(/^<(.+)>$/,'$1'),startPos=m.index,endPos=startPos+m[0].length-1,tagName=(m[1]===':')?'URL':'EMAIL',attrName=tagName.toLowerCase();addTagPair(tagName,startPos,1,endPos,1).setAttribute(attrName,content)}}
function parseInlineLinks(){let m,regexp=/\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:\([^\x17\s()]*\)|[^\x17\s)])*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen;addLinkTag(startPos,endPos,endLen,linkInfo)}}
function parseReferenceLinks(){let labels=getLabels(),startPos;for(startPos in labels){let id=labels[startPos],labelPos=+startPos+2+id.length,endPos=labelPos-1,endLen=1;if(text[labelPos]===' '){++labelPos}
if(labels[labelPos]>''&&linkReferences[labels[labelPos]]){id=labels[labelPos];endLen=labelPos+2+id.length-endPos}
if(linkReferences[id]){addLinkTag(+startPos,endPos,endLen,linkReferences[id])}}}
parse()})();(function(){function parse(){parseInlineMarkup('~~',/~~[^\x17]+?~~(?!~)/g,'DEL')}
parse()})();(function(){function parse(){parseAbstractScript('SUB','~',/~[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+~?/g,/~\([^\x17()]+\)/g)}
parse()})();(function(){function parse(){parseAbstractScript('SUP','^',/\^[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+\^?/g,/\^\([^\x17()]+\)/g)}
parse()})();(function(){let closeEm;let closeStrong;let emPos;let emEndPos;let remaining;let strongPos;let strongEndPos;function parse(){parseEmphasisByCharacter('*',/\*+/g);parseEmphasisByCharacter('_',/_+/g)}
function adjustEndingPositions(){if(closeEm&&closeStrong){if(emPos<strongPos){emEndPos+=2}else{++strongEndPos}}}
function adjustStartingPositions(){if(emPos>=0&&emPos===strongPos){if(closeEm){emPos+=2}else{++strongPos}}}
function closeSpans(){if(closeEm){--remaining;addTagPair('EM',emPos,1,emEndPos,1);emPos=-1}
if(closeStrong){remaining-=2;addTagPair('STRONG',strongPos,2,strongEndPos,2);strongPos=-1}}
function getEmphasisByBlock(regexp,pos){let block=[],blocks=[],breakPos=text.indexOf("\x17",pos),m;regexp.lastIndex=pos;while(m=regexp.exec(text)){let matchPos=m.index,matchLen=m[0].length;if(matchPos>breakPos){blocks.push(block);block=[];breakPos=text.indexOf("\x17",matchPos)}
if(!ignoreEmphasis(matchPos,matchLen)){block.push([matchPos,matchLen])}}
blocks.push(block);return blocks}
function ignoreEmphasis(pos,len){return(text.charAt(pos)==='_'&&len===1&&isSurroundedByAlnum(pos,len))}
function openSpans(pos){if(remaining&1){emPos=pos-remaining}
if(remaining&2){strongPos=pos-remaining}}
function parseEmphasisByCharacter(character,regexp){let pos=text.indexOf(character);if(pos===-1){return}
getEmphasisByBlock(regexp,pos).forEach(processEmphasisBlock)}
function processEmphasisBlock(block){emPos=-1,strongPos=-1;block.forEach((pair)=>{processEmphasisMatch(pair[0],pair[1])})}
function processEmphasisMatch(matchPos,matchLen){let canOpen=!isBeforeWhitespace(matchPos+matchLen-1),canClose=!isAfterWhitespace(matchPos),closeLen=(canClose)?Math.min(matchLen,3):0;closeEm=!!(closeLen&1)&&emPos>=0;closeStrong=!!(closeLen&2)&&strongPos>=0;emEndPos=matchPos;strongEndPos=matchPos;remaining=matchLen;adjustStartingPositions();adjustEndingPositions();closeSpans();remaining=(canOpen)?Math.min(remaining,3):0;openSpans(matchPos+matchLen)}
parse()})();(function(){function parse(){let pos=text.indexOf("  \n");while(pos>0){addBrTag(pos+2).cascadeInvalidationTo(addVerbatim(pos+2,1));pos=text.indexOf("  \n",pos+3)}}
parse()})()}},"Preg":{parser:function(text,matches){const config={generics:[["USERMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#([0-9]+)\b/g,0,["","displayname","","id"]],["USERMENTION",/\B@([a-z0-9_-]+)(?!#)/ig,0,["","username"]],["POSTMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#p([0-9]+)\b/g,0,["","displayname","","id"]],["GROUPMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["|”]#g([0-9]+)\b/g,0,["","groupname","","id"]],["TAGMENTION",/(?:[^“"]|^)\B#([-_A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\p{M}]+)\b/ig,0,["","slug"]]]};config.generics.forEach((entry)=>{let tagName=entry[0],regexp=entry[1],passthroughIdx=entry[2],map=entry[3],m;regexp.lastIndex=0;while(m=regexp.exec(text)){let startTagPos=m.index,matchLen=m[0].length,tag;if(HINT.PREG_HAS_PASSTHROUGH&&passthroughIdx&&m[passthroughIdx]!==''){let contentPos=text.indexOf(m[passthroughIdx],startTagPos),contentLen=m[passthroughIdx].length,startTagLen=contentPos-startTagPos,endTagPos=contentPos+contentLen,endTagLen=matchLen-(startTagLen+contentLen);tag=addTagPair(tagName,startTagPos,startTagLen,endTagPos,endTagLen,-100)}else{tag=addSelfClosingTag(tagName,startTagPos,matchLen,-100)}
map.forEach((attrName,i)=>{if(attrName&&typeof m[i]!=='undefined'){tag.setAttribute(attrName,m[i])}})}})}}};let pos;const registeredVars={"urlConfig":{allowedSchemes:/^https?$/i}};const rootContext={allowed:o91473346,flags:40};const tagsConfig={"B":o5DB432B1,"C":{allowed:o553403F9,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:66},tagLimit:5000},"CENTER":{allowed:o91473346,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"CODE":{allowed:o553403F9,attributes:{"lang":{filterChain:o56E79363,required:!1}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:4436,fosterParent:oD4869BFF},tagLimit:5000},"COLOR":{allowed:o8DE1CD10,attributes:{"color":{filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^(?:#(?:(?:[0-9a-f]{3}){1,2}|(?:[0-9a-f]{4}){1,2})|rgb\(\d{1,3}, *\d{1,3}, *\d{1,3}\)|rgba\(\d{1,3}, *\d{1,3}, *\d{1,3}, *\d*(?:\.\d+)?\)|[a-z]+)$/i)}],required:!0}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"DEL":{allowed:o91473346,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:512},tagLimit:5000},"E":{allowed:oA385316A,attributes:{},bitNumber:6,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"EM":o5DB432B1,"EMAIL":{allowed:o92D189FB,attributes:{"email":{filterChain:[function(attrValue,attrName){return EmailFilter.filter(attrValue)}],required:!0}},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"ESC":{allowed:o553403F9,attributes:{},bitNumber:0,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:1616},tagLimit:5000},"GROUPMENTION":{allowed:oA385316A,attributes:{"groupname":o02D8DBB5,"id":o6CB0A318},bitNumber:3,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterGroupMentions(tag)})(tag,registeredVars.actor,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterGroupMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"H1":o1262D8F4,"H2":o1262D8F4,"H3":o1262D8F4,"H4":o1262D8F4,"H5":o1262D8F4,"H6":o1262D8F4,"HR":{allowed:oA385316A,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"I":o5DB432B1,"IMG":{allowed:oA385316A,attributes:{"alt":o1BC3EAF4,"height":o75AB9259,"src":oF307D35C,"title":o1BC3EAF4,"width":o75AB9259},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ISPOILER":o8988A276,"LI":{allowed:o91473346,attributes:{},bitNumber:5,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"LI":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1},flags:264,fosterParent:oD4869BFF},tagLimit:5000},"LIST":{allowed:[32545],attributes:{"start":o75AB9259,"type":{filterChain:[function(attrValue,attrName){return HashmapFilter.filter(attrValue,{"A":"upper-alpha","I":"upper-roman","a":"lower-alpha","i":"lower-roman","1":"decimal"},!1)},o6377B813],required:!1}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,createChild:["LI"],flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"POSTMENTION":{allowed:oA385316A,attributes:{"discussionid":o6CB0A318,"displayname":o02D8DBB5,"id":o6CB0A318,"number":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterPostMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterPostMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"QUOTE":{allowed:o91473346,attributes:{"author":o1BC3EAF4},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"S":o5DB432B1,"SIZE":{allowed:o8DE1CD10,attributes:{"size":{filterChain:[function(attrValue,attrName){return NumericFilter.filterRange(attrValue,8,36,logger)}],required:!0}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"SPOILER":{allowed:o91473346,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"STRONG":o5DB432B1,"SUB":o8988A276,"SUP":o8988A276,"TAGMENTION":{allowed:oA385316A,attributes:{"id":o6CB0A318,"slug":o02D8DBB5,"tagname":o02D8DBB5},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterTagMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterTagMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"U":o5DB432B1,"UPL-FILE":{allowed:oA385316A,attributes:{"content":oABCFC4A3,"size":oABCFC4A3,"uuid":oE2346708},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"UPL-IMAGE":{allowed:oA385316A,attributes:{"content":oABCFC4A3,"size":oABCFC4A3,"url":oF307D35C,"uuid":oE2346708},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"UPL-IMAGE-PREVIEW":{allowed:oA385316A,attributes:{"alt":o1BC3EAF4,"url":{filterChain:o7476611B,required:!1},"uuid":oE2346708},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"UPL-TEXT-PREVIEW":{allowed:oA385316A,attributes:{"content":oABCFC4A3,"has_snippet":oB2D4F5E2,"snippet":oB2D4F5E2,"url":oF307D35C,"uuid":oE2346708},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"URL":{allowed:o92D189FB,attributes:{"title":o1BC3EAF4,"url":oF307D35C},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"USERMENTION":{allowed:oA385316A,attributes:{"displayname":o02D8DBB5,"id":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterUserMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterUserMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000}};let tagStack;let tagStackIsSorted;let text;let textLen;let uid=0;let wsPos;function disableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!0}}
function enableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!1}}
function getLogger(){return logger}
function parse(_text){reset(_text);let _uid=uid;executePluginParsers();processTags();finalizeOutput();if(uid!==_uid){throw 'The parser has been reset during execution'}
if(currentFixingCost>maxFixingCost){logger.warn('Fixing cost limit exceeded')}
return output}
function reset(_text){_text=_text.replace(/\r\n?/g,"\n");_text=_text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,'');logger.clear();cntOpen={};cntTotal={};currentFixingCost=0;currentTag=null;isRich=!1;namespaces={};openTags=[];output='';pos=0;tagStack=[];tagStackIsSorted=!1;text=_text;textLen=text.length;wsPos=0;context=rootContext;context.inParagraph=!1;++uid}
function setTagLimit(tagName,tagLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).tagLimit=tagLimit}}
function setNestingLimit(tagName,nestingLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).nestingLimit=nestingLimit}}
function copyTagConfig(tagName){let tagConfig={},k;for(k in tagsConfig[tagName]){tagConfig[k]=tagsConfig[tagName][k]}
return tagsConfig[tagName]=tagConfig}
function encodeUnicodeSupplementaryCharacters(){output=output.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,encodeUnicodeSupplementaryCharactersCallback)}
function encodeUnicodeSupplementaryCharactersCallback(pair){let cp=(pair.charCodeAt(0)<<10)+pair.charCodeAt(1)-56613888;return'&#'+cp+';'}
function finalizeOutput(){let tmp;outputText(textLen,0,!0);do{tmp=output;output=output.replace(/<([^ />]+)[^>]*><\/\1>/g,'')}
while(output!==tmp);output=output.replace(/<\/i><i>/g,'');output=output.replace(/[\x00-\x08\x0B-\x1F\uFFFE\uFFFF]/g,'');encodeUnicodeSupplementaryCharacters();let tagName=(isRich)?'r':'t';tmp='<'+tagName;if(HINT.namespaces){for(let prefix in namespaces){tmp+=' xmlns:'+prefix+'="urn:s9e:TextFormatter:'+prefix+'"'}}
output=tmp+'>'+output+'</'+tagName+'>'}
function outputTag(tag){isRich=!0;let tagName=tag.getName(),tagPos=tag.getPos(),tagLen=tag.getLen(),tagFlags=tag.getFlags(),skipBefore=0,skipAfter=0;if(HINT.RULE_IGNORE_WHITESPACE&&(tagFlags&RULE_IGNORE_WHITESPACE)){skipBefore=1;skipAfter=(tag.isEndTag())?2:1}
let closeParagraph=!!(!tag.isStartTag()||(HINT.RULE_BREAK_PARAGRAPH&&(tagFlags&RULE_BREAK_PARAGRAPH)));outputText(tagPos,skipBefore,closeParagraph);let tagText=(tagLen)?htmlspecialchars_noquotes(text.substring(tagPos,tagPos+tagLen)):'';if(tag.isStartTag()){if(!HINT.RULE_BREAK_PARAGRAPH||!(tagFlags&RULE_BREAK_PARAGRAPH)){outputParagraphStart(tagPos)}
if(HINT.namespaces){let colonPos=tagName.indexOf(':');if(colonPos>0){namespaces[tagName.substring(0,colonPos)]=0}}
output+='<'+tagName;let attributes=tag.getAttributes(),attributeNames=[];for(let attrName in attributes){attributeNames.push(attrName)}
attributeNames.sort((a,b)=>(a>b)?1:-1);attributeNames.forEach((attrName)=>{output+=' '+attrName+'="'+htmlspecialchars_compat(attributes[attrName].toString()).replace(/\n/g,'&#10;')+'"'});if(tag.isSelfClosingTag()){if(tagLen){output+='>'+tagText+'</'+tagName+'>'}else{output+='/>'}}else if(tagLen){output+='><s>'+tagText+'</s>'}else{output+='>'}}else{if(tagLen){output+='<e>'+tagText+'</e>'}
output+='</'+tagName+'>'}
pos=tagPos+tagLen;wsPos=pos;while(skipAfter&&wsPos<textLen&&text[wsPos]==="\n"){--skipAfter;++wsPos}}
function outputText(catchupPos,maxLines,closeParagraph){if(closeParagraph){if(!(context.flags&RULE_CREATE_PARAGRAPHS)){closeParagraph=!1}else{maxLines=-1}}
if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}
if(wsPos>pos){let skipPos=Math.min(catchupPos,wsPos);output+=text.substring(pos,skipPos);pos=skipPos;if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}}
let catchupText;if(HINT.RULE_IGNORE_TEXT&&context.flags&RULE_IGNORE_TEXT){catchupText=text.substring(pos,catchupPos);if(!/^[ \n\t]*$/.test(catchupText)){catchupText='<i>'+htmlspecialchars_noquotes(catchupText)+'</i>'}
output+=catchupText;pos=catchupPos;if(closeParagraph){outputParagraphEnd()}
return}
let ignorePos=catchupPos,ignoreLen=0;while(maxLines&&--ignorePos>=pos){let c=text[ignorePos];if(c!==' '&&c!=="\n"&&c!=="\t"){break}
if(c==="\n"){--maxLines}
++ignoreLen}
catchupPos-=ignoreLen;if(HINT.RULE_CREATE_PARAGRAPHS&&context.flags&RULE_CREATE_PARAGRAPHS){if(!context.inParagraph){outputWhitespace(catchupPos);if(catchupPos>pos){outputParagraphStart(catchupPos)}}
let pbPos=text.indexOf("\n\n",pos);while(pbPos>-1&&pbPos<catchupPos){outputText(pbPos,0,!0);outputParagraphStart(catchupPos);pbPos=text.indexOf("\n\n",pos)}}
if(catchupPos>pos){catchupText=htmlspecialchars_noquotes(text.substring(pos,catchupPos));if(HINT.RULE_ENABLE_AUTO_BR&&(context.flags&RULES_AUTO_LINEBREAKS)===RULE_ENABLE_AUTO_BR){catchupText=catchupText.replace(/\n/g,"<br/>\n")}
output+=catchupText}
if(closeParagraph){outputParagraphEnd()}
if(ignoreLen){output+=text.substring(catchupPos,catchupPos+ignoreLen)}
pos=catchupPos+ignoreLen}
function outputBrTag(tag){outputText(tag.getPos(),0,!1);output+='<br/>'}
function outputIgnoreTag(tag){let tagPos=tag.getPos(),tagLen=tag.getLen();let ignoreText=text.substring(tagPos,tagPos+tagLen);outputText(tagPos,0,!1);output+='<i>'+htmlspecialchars_noquotes(ignoreText)+'</i>';isRich=!0;pos=tagPos+tagLen}
function outputParagraphStart(maxPos){if(!HINT.RULE_CREATE_PARAGRAPHS){return}
if(context.inParagraph||!(context.flags&RULE_CREATE_PARAGRAPHS)){return}
outputWhitespace(maxPos);if(pos<textLen){output+='<p>';context.inParagraph=!0}}
function outputParagraphEnd(){if(!context.inParagraph){return}
output+='</p>';context.inParagraph=!1}
function outputVerbatim(tag){let flags=context.flags;context.flags=tag.getFlags();outputText(currentTag.getPos()+currentTag.getLen(),0,!1);context.flags=flags}
function outputWhitespace(maxPos){while(pos<maxPos&&" \n\t".indexOf(text[pos])>-1){output+=text[pos];++pos}}
function disablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!0}}
function enablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!1}}
function executePluginParser(pluginName){let pluginConfig=plugins[pluginName];if(pluginConfig.quickMatch&&text.indexOf(pluginConfig.quickMatch)<0){return}
let matches=[];if(HINT.regexp&&HINT.regexpLimit&&typeof pluginConfig.regexp!=='undefined'&&typeof pluginConfig.regexpLimit!=='undefined'){matches=getMatches(pluginConfig.regexp,pluginConfig.regexpLimit);if(!matches.length){return}}
getPluginParser(pluginName)(text,matches)}
function executePluginParsers(){for(let pluginName in plugins){if(!plugins[pluginName].isDisabled){executePluginParser(pluginName)}}}
function getMatches(regexp,limit){regexp.lastIndex=0;let matches=[],cnt=0,m;while(++cnt<=limit&&(m=regexp.exec(text))){let pos=m.index,match=[[m[0],pos]],i=0;while(++i<m.length){let str=m[i];if(str===undefined){match.push(['',-1])}else{match.push([str,text.indexOf(str,pos)]);pos+=str.length}}
matches.push(match)}
return matches}
function getPluginParser(pluginName){return plugins[pluginName].parser}
function registerParser(pluginName,parser,regexp,limit){if(!plugins[pluginName]){plugins[pluginName]={}}
if(regexp){plugins[pluginName].regexp=regexp;plugins[pluginName].limit=limit||Infinity}
plugins[pluginName].parser=parser}
function closeAncestor(tag){if(!HINT.closeAncestor){return!1}
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeAncestor){let i=openTags.length;while(--i>=0){let ancestor=openTags[i],ancestorName=ancestor.getName();if(tagConfig.rules.closeAncestor[ancestorName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(ancestor,tag.getPos(),tag.getSortPriority()-1);return!0}}}}
return!1}
function closeParent(tag){if(!HINT.closeParent){return!1}
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeParent){let parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.closeParent[parentName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);return!0}}}
return!1}
function createChild(tag){if(!HINT.createChild){return}
let tagConfig=tagsConfig[tag.getName()];if(tagConfig.rules.createChild){let priority=-1000,_text=text.substring(pos),tagPos=pos+_text.length-_text.replace(/^[ \n\r\t]+/,'').length;tagConfig.rules.createChild.forEach((tagName)=>{addStartTag(tagName,tagPos,0,++priority)})}}
function fosterParent(tag){if(!HINT.fosterParent){return!1}
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.fosterParent){let parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.fosterParent[parentName]){if(parentName!==tagName&&currentFixingCost<maxFixingCost){addFosterTag(tag,parent)}
tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);currentFixingCost+=4;return!0}}}
return!1}
function requireAncestor(tag){if(!HINT.requireAncestor){return!1}
let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.requireAncestor){let i=tagConfig.rules.requireAncestor.length;while(--i>=0){let ancestorName=tagConfig.rules.requireAncestor[i];if(cntOpen[ancestorName]){return!1}}
logger.err('Tag requires an ancestor',{'requireAncestor':tagConfig.rules.requireAncestor.join(', '),'tag':tag});return!0}
return!1}
function addFosterTag(tag,fosterTag){let coords=getMagicStartCoords(tag.getPos()+tag.getLen()),childPos=coords[0],childPrio=coords[1];let childTag=addCopyTag(fosterTag,childPos,0,childPrio);tag.cascadeInvalidationTo(childTag)}
function addMagicEndTag(startTag,tagPos,prio){let tagName=startTag.getName();if(HINT.RULE_IGNORE_WHITESPACE&&((currentTag.getFlags()|startTag.getFlags())&RULE_IGNORE_WHITESPACE)){tagPos=getMagicEndPos(tagPos)}
let endTag=addEndTag(tagName,tagPos,0,prio||0);endTag.pairWith(startTag);return endTag}
function getMagicEndPos(tagPos){while(tagPos>pos&&WHITESPACE.indexOf(text[tagPos-1])>-1){--tagPos}
return tagPos}
function getMagicStartCoords(tagPos){let nextPos,nextPrio,nextTag,prio;if(!tagStack.length){nextPos=textLen+1;nextPrio=0}else{nextTag=tagStack[tagStack.length-1];nextPos=nextTag.getPos();nextPrio=nextTag.getSortPriority()}
while(tagPos<nextPos&&WHITESPACE.indexOf(text[tagPos])>-1){++tagPos}
prio=(tagPos===nextPos)?nextPrio-1:0;return[tagPos,prio]}
function isFollowedByClosingTag(tag){return(!tagStack.length)?!1:tagStack[tagStack.length-1].canClose(tag)}
function processTags(){if(!tagStack.length){return}
for(let tagName in tagsConfig){cntOpen[tagName]=0;cntTotal[tagName]=0}
do{while(tagStack.length){if(!tagStackIsSorted){sortTags()}
currentTag=tagStack.pop();processCurrentTag()}
openTags.forEach((startTag)=>{addMagicEndTag(startTag,textLen)})}
while(tagStack.length);}
function processCurrentTag(){if((context.flags&RULE_IGNORE_TAGS)&&!currentTag.canClose(openTags[openTags.length-1])&&!currentTag.isSystemTag()){currentTag.invalidate()}
let tagPos=currentTag.getPos(),tagLen=currentTag.getLen();if(pos>tagPos&&!currentTag.isInvalid()){let startTag=currentTag.getStartTag();if(startTag&&openTags.indexOf(startTag)>=0){addEndTag(startTag.getName(),pos,Math.max(0,tagPos+tagLen-pos)).pairWith(startTag);return}
if(currentTag.isIgnoreTag()){let ignoreLen=tagPos+tagLen-pos;if(ignoreLen>0){addIgnoreTag(pos,ignoreLen);return}}
currentTag.invalidate()}
if(currentTag.isInvalid()){return}
if(currentTag.isIgnoreTag()){outputIgnoreTag(currentTag)}else if(currentTag.isBrTag()){if(!HINT.RULE_PREVENT_BR||!(context.flags&RULE_PREVENT_BR)){outputBrTag(currentTag)}}else if(currentTag.isParagraphBreak()){outputText(currentTag.getPos(),0,!0)}else if(currentTag.isVerbatim()){outputVerbatim(currentTag)}else if(currentTag.isStartTag()){processStartTag(currentTag)}else{processEndTag(currentTag)}}
function processStartTag(tag){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(cntTotal[tagName]>=tagConfig.tagLimit){logger.err('Tag limit exceeded',{'tag':tag,'tagName':tagName,'tagLimit':tagConfig.tagLimit});tag.invalidate();return}
filterTag(tag);if(tag.isInvalid()){return}
if(currentFixingCost<maxFixingCost){if(fosterParent(tag)||closeParent(tag)||closeAncestor(tag)){return}}
if(cntOpen[tagName]>=tagConfig.nestingLimit){logger.err('Nesting limit exceeded',{'tag':tag,'tagName':tagName,'nestingLimit':tagConfig.nestingLimit});tag.invalidate();return}
if(!tagIsAllowed(tagName)){let msg='Tag is not allowed in this context',context={'tag':tag,'tagName':tagName};if(tag.getLen()>0){logger.warn(msg,context)}else{logger.debug(msg,context)}
tag.invalidate();return}
if(requireAncestor(tag)){tag.invalidate();return}
if(HINT.RULE_AUTO_CLOSE&&tag.getFlags()&RULE_AUTO_CLOSE&&!tag.isSelfClosingTag()&&!tag.getEndTag()&&!isFollowedByClosingTag(tag)){let newTag=new Tag(Tag.SELF_CLOSING_TAG,tagName,tag.getPos(),tag.getLen());newTag.setAttributes(tag.getAttributes());newTag.setFlags(tag.getFlags());tag=newTag}
if(HINT.RULE_TRIM_FIRST_LINE&&tag.getFlags()&RULE_TRIM_FIRST_LINE&&text[tag.getPos()+tag.getLen()]==="\n"){addIgnoreTag(tag.getPos()+tag.getLen(),1)}
outputTag(tag);pushContext(tag);createChild(tag)}
function processEndTag(tag){let tagName=tag.getName();if(!cntOpen[tagName]){return}
let closeTags=[];let i=openTags.length;while(--i>=0){let openTag=openTags[i];if(tag.canClose(openTag)){break}
closeTags.push(openTag);++currentFixingCost}
if(i<0){logger.debug('Skipping end tag with no start tag',{'tag':tag});return}
let flags=tag.getFlags();closeTags.forEach((openTag)=>{flags|=openTag.getFlags()});let ignoreWhitespace=(HINT.RULE_IGNORE_WHITESPACE&&(flags&RULE_IGNORE_WHITESPACE));let keepReopening=HINT.RULE_AUTO_REOPEN&&(currentFixingCost<maxFixingCost),reopenTags=[];closeTags.forEach((openTag)=>{let openTagName=openTag.getName();if(keepReopening){if(openTag.getFlags()&RULE_AUTO_REOPEN){reopenTags.push(openTag)}else{keepReopening=!1}}
let tagPos=tag.getPos();if(ignoreWhitespace){tagPos=getMagicEndPos(tagPos)}
let endTag=new Tag(Tag.END_TAG,openTagName,tagPos,0);endTag.setFlags(openTag.getFlags());outputTag(endTag);popContext()});outputTag(tag);popContext();if(closeTags.length&&currentFixingCost<maxFixingCost){let ignorePos=pos;i=tagStack.length;while(--i>=0&&++currentFixingCost<maxFixingCost){let upcomingTag=tagStack[i];if(upcomingTag.getPos()>ignorePos||upcomingTag.isStartTag()){break}
let j=closeTags.length;while(--j>=0&&++currentFixingCost<maxFixingCost){if(upcomingTag.canClose(closeTags[j])){closeTags.splice(j,1);if(reopenTags[j]){reopenTags.splice(j,1)}
ignorePos=Math.max(ignorePos,upcomingTag.getPos()+upcomingTag.getLen());break}}}
if(ignorePos>pos){outputIgnoreTag(new Tag(Tag.SELF_CLOSING_TAG,'i',pos,ignorePos-pos))}}
reopenTags.forEach((startTag)=>{let newTag=addCopyTag(startTag,pos,0);let endTag=startTag.getEndTag();if(endTag){newTag.pairWith(endTag)}})}
function popContext(){let tag=openTags.pop();--cntOpen[tag.getName()];context=context.parentContext}
function pushContext(tag){let tagName=tag.getName(),tagFlags=tag.getFlags(),tagConfig=tagsConfig[tagName];++cntTotal[tagName];if(tag.isSelfClosingTag()){return}
let allowed=[];context.allowed.forEach((v,k)=>{if(!HINT.RULE_IS_TRANSPARENT||!(tagFlags&RULE_IS_TRANSPARENT)){v=(v&0xFF00)|(v>>8)}
allowed.push(tagConfig.allowed[k]&v)});let flags=tagFlags|(context.flags&RULES_INHERITANCE);if(flags&RULE_DISABLE_AUTO_BR){flags&=~RULE_ENABLE_AUTO_BR}
++cntOpen[tagName];openTags.push(tag);context={parentContext:context};context.allowed=allowed;context.flags=flags}
function tagIsAllowed(tagName){let n=tagsConfig[tagName].bitNumber;return!!(context.allowed[n>>3]&(1<<(n&7)))}
function addStartTag(name,pos,len,prio){return addTag(Tag.START_TAG,name,pos,len,prio||0)}
function addEndTag(name,pos,len,prio){return addTag(Tag.END_TAG,name,pos,len,prio||0)}
function addSelfClosingTag(name,pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,name,pos,len,prio||0)}
function addBrTag(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'br',pos,0,prio||0)}
function addIgnoreTag(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'i',pos,Math.min(len,textLen-pos),prio||0)}
function addParagraphBreak(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'pb',pos,0,prio||0)}
function addCopyTag(tag,pos,len,prio){let copy=addTag(tag.getType(),tag.getName(),pos,len,tag.getSortPriority());copy.setAttributes(tag.getAttributes());return copy}
function addTag(type,name,pos,len,prio){let tag=new Tag(type,name,pos,len,prio||0);if(tagsConfig[name]){tag.setFlags(tagsConfig[name].rules.flags)}
if((!tagsConfig[name]&&!tag.isSystemTag())||isInvalidTextSpan(pos,len)){tag.invalidate()}else if(tagsConfig[name]&&tagsConfig[name].isDisabled){logger.warn('Tag is disabled',{'tag':tag,'tagName':name});tag.invalidate()}else{insertTag(tag)}
return tag}
function isInvalidTextSpan(pos,len){return(len<0||pos<0||pos+len>textLen||/[\uDC00-\uDFFF]/.test(text.substring(pos,pos+1)+text.substring(pos+len,pos+len+1)))}
function insertTag(tag){if(!tagStackIsSorted){tagStack.push(tag)}else{let i=tagStack.length,key=getSortKey(tag);while(i>0&&key>getSortKey(tagStack[i-1])){tagStack[i]=tagStack[i-1];--i}
tagStack[i]=tag}}
function addTagPair(name,startPos,startLen,endPos,endLen,prio){let endTag=addEndTag(name,endPos,endLen,-prio||0),startTag=addStartTag(name,startPos,startLen,prio||0);startTag.pairWith(endTag);return startTag}
function addVerbatim(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'v',pos,len,prio||0)}
function sortTags(){let arr={},keys=[],i=tagStack.length;while(--i>=0){let tag=tagStack[i],key=getSortKey(tag,i);keys.push(key);arr[key]=tag}
keys.sort();i=keys.length;tagStack=[];while(--i>=0){tagStack.push(arr[keys[i]])}
tagStackIsSorted=!0}
function getSortKey(tag,tagIndex){let prioFlag=(tag.getSortPriority()>=0),prio=tag.getSortPriority();if(!prioFlag){prio+=(1<<30)}
let lenFlag=(tag.getLen()>0),lenOrder;if(lenFlag){lenOrder=textLen-tag.getLen()}else{let order={};order[Tag.END_TAG]=0;order[Tag.SELF_CLOSING_TAG]=1;order[Tag.START_TAG]=2;lenOrder=order[tag.getType()]}
return hex32(tag.getPos())+(+prioFlag)+hex32(prio)+(+lenFlag)+hex32(lenOrder)+hex32(tagIndex||0)}
function hex32(number){let hex=number.toString(16);return"        ".substring(hex.length)+hex}
let xslt={init:function(xsl){xslt.proc=new XSLTProcessor;xslt.proc.importStylesheet(xslt.loadXML(xsl))},loadXML:function(xml){const dom=(new DOMParser).parseFromString(xml,'text/xml');if(!dom){throw 'Cannot parse '+xml}
return dom},setParameter:function(paramName,paramValue){xslt.proc.setParameter(null,paramName,paramValue)},transformToFragment:function(xml,targetDoc){return xslt.proc.transformToFragment(xslt.loadXML(xml),targetDoc)}};xslt.init(xsl);function preview(text,target){let targetDoc=target.ownerDocument;if(!targetDoc){throw 'Target does not have a ownerDocument'}
let resultFragment=xslt.transformToFragment(parse(text).replace(/<[eis]>[^<]*<\/[eis]>/g,''),targetDoc),lastUpdated=target;if(typeof window!=='undefined'&&'chrome' in window){resultFragment.querySelectorAll('script').forEach(function(oldScript){let newScript=document.createElement('script');for(let attribute of oldScript.attributes){newScript.setAttribute(attribute.name,attribute.value)}
newScript.textContent=oldScript.textContent;oldScript.parentNode.replaceChild(newScript,oldScript)})}
if(HINT.hash){computeHashes(resultFragment)}
if(HINT.onRender){executeEvents(resultFragment,'render')}
function computeHashes(fragment){let nodes=fragment.querySelectorAll('[data-s9e-livepreview-hash]'),i=nodes.length;while(--i>=0){nodes[i].setAttribute('data-s9e-livepreview-hash',hash(nodes[i].outerHTML))}}
function executeEvent(node,eventName){let code=node.getAttribute('data-s9e-livepreview-on'+eventName),codeHash=hash(code);if(!functionCache[codeHash]){functionCache[codeHash]=new Function(code)}
functionCache[codeHash].call(node)}
function executeEvents(root,eventName){if(root instanceof Element&&root.hasAttribute('data-s9e-livepreview-on'+eventName)){executeEvent(root,eventName)}
let nodes=root.querySelectorAll('[data-s9e-livepreview-on'+eventName+']'),i=nodes.length;while(--i>=0){executeEvent(nodes[i],eventName)}}
function refreshElementContent(oldParent,newParent){let oldNodes=oldParent.childNodes,newNodes=newParent.childNodes,oldCnt=oldNodes.length,newCnt=newNodes.length,oldNode,newNode,left=0,right=0;while(left<oldCnt&&left<newCnt){oldNode=oldNodes[left];newNode=newNodes[left];if(!refreshNode(oldNode,newNode)){break}
++left}
let maxRight=Math.min(oldCnt-left,newCnt-left);while(right<maxRight){oldNode=oldNodes[oldCnt-(right+1)];newNode=newNodes[newCnt-(right+1)];if(!refreshNode(oldNode,newNode)){break}
++right}
let i=oldCnt-right;while(--i>=left){oldParent.removeChild(oldNodes[i]);lastUpdated=oldParent}
let rightBoundary=newCnt-right;if(left>=rightBoundary){return}
let newNodesFragment=targetDoc.createDocumentFragment();i=left;do{newNode=newNodes[i];if(HINT.onUpdate&&newNode instanceof Element){executeEvents(newNode,'update')}
lastUpdated=newNodesFragment.appendChild(newNode)}
while(i<--rightBoundary);if(!right){oldParent.appendChild(newNodesFragment)}else{oldParent.insertBefore(newNodesFragment,oldParent.childNodes[left])}}
function refreshNode(oldNode,newNode){if(oldNode.nodeName!==newNode.nodeName||oldNode.nodeType!==newNode.nodeType){return!1}
if(oldNode instanceof HTMLElement&&newNode instanceof HTMLElement){if(!oldNode.isEqualNode(newNode)&&!elementHashesMatch(oldNode,newNode)){if(HINT.onUpdate&&newNode.hasAttribute('data-s9e-livepreview-onupdate')){executeEvent(newNode,'update')}
syncElementAttributes(oldNode,newNode);refreshElementContent(oldNode,newNode)}}else if(oldNode.nodeType===3||oldNode.nodeType===8){if(oldNode.nodeValue!==newNode.nodeValue){oldNode.nodeValue=newNode.nodeValue;lastUpdated=oldNode}}
return!0}
function elementHashesMatch(oldEl,newEl){if(!HINT.hash){return!1}
const attrName='data-s9e-livepreview-hash';return oldEl.hasAttribute(attrName)&&newEl.hasAttribute(attrName)&&oldEl.getAttribute(attrName)===newEl.getAttribute(attrName)}
function hash(text){let pos=text.length,s1=0,s2=0;while(--pos>=0){s1=(s1+text.charCodeAt(pos))%0xFFFF;s2=(s1+s2)%0xFFFF}
return(s2<<16)|s1}
function syncElementAttributes(oldEl,newEl){let oldAttributes=oldEl.attributes,newAttributes=newEl.attributes,oldCnt=oldAttributes.length,newCnt=newAttributes.length,i=oldCnt,ignoreAttrs=' '+oldEl.getAttribute('data-s9e-livepreview-ignore-attrs')+' ';while(--i>=0){let oldAttr=oldAttributes[i],namespaceURI=oldAttr.namespaceURI,attrName=oldAttr.name;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
if(!newEl.hasAttributeNS(namespaceURI,attrName)){oldEl.removeAttributeNS(namespaceURI,attrName);lastUpdated=oldEl}}
i=newCnt;while(--i>=0){let newAttr=newAttributes[i],namespaceURI=newAttr.namespaceURI,attrName=newAttr.name,attrValue=newAttr.value;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
if(attrValue!==oldEl.getAttributeNS(namespaceURI,attrName)){oldEl.setAttributeNS(namespaceURI,attrName,attrValue);lastUpdated=oldEl}}}
refreshElementContent(target,resultFragment);return lastUpdated}
function setParameter(paramName,paramValue){xslt.setParameter(paramName,paramValue)}if(!window.s9e)window.s9e={};window.s9e.TextFormatter={'preview':preview}})();";s:6:"parser";O:24:"s9e\TextFormatter\Parser":4:{s:16:" * pluginsConfig";a:7:{s:9:"Autoemail";a:5:{s:10:"quickMatch";s:1:"@";s:11:"regexpLimit";i:50000;s:8:"attrName";s:5:"email";s:6:"regexp";s:39:"/\b[-a-z0-9_+.]+@[-a-z0-9.]*[a-z0-9]/Si";s:7:"tagName";s:5:"EMAIL";}s:8:"Autolink";a:5:{s:8:"attrName";s:3:"url";s:6:"regexp";s:120:"#\bhttps?:(?>[^\s()\[\]\x{FF01}-\x{FF0F}\x{FF1A}-\x{FF20}\x{FF3B}-\x{FF40}\x{FF5B}-\x{FF65}]|\([^\s()]*\)|\[\w*\])++#Siu";s:7:"tagName";s:3:"URL";s:10:"quickMatch";s:1:":";s:11:"regexpLimit";i:50000;}s:7:"BBCodes";a:4:{s:7:"bbcodes";a:19:{s:1:"*";a:1:{s:7:"tagName";s:2:"LI";}s:1:"B";a:0:{}s:6:"CENTER";R:28;s:4:"CODE";a:1:{s:16:"defaultAttribute";s:4:"lang";}s:5:"COLOR";R:28;s:3:"DEL";R:28;s:5:"EMAIL";a:1:{s:17:"contentAttributes";a:1:{i:0;s:5:"email";}}s:1:"I";R:28;s:3:"IMG";a:2:{s:17:"contentAttributes";a:1:{i:0;s:3:"src";}s:16:"defaultAttribute";s:3:"src";}s:4:"LIST";a:1:{s:16:"defaultAttribute";s:4:"type";}s:5:"QUOTE";a:1:{s:16:"defaultAttribute";s:6:"author";}s:1:"S";R:28;s:4:"SIZE";R:28;s:1:"U";R:28;s:8:"UPL-FILE";a:2:{s:17:"contentAttributes";a:1:{i:0;s:7:"content";}s:16:"defaultAttribute";s:4:"uuid";}s:9:"UPL-IMAGE";R:42;s:17:"UPL-IMAGE-PREVIEW";a:1:{s:16:"defaultAttribute";s:4:"uuid";}s:16:"UPL-TEXT-PREVIEW";R:42;s:3:"URL";a:1:{s:17:"contentAttributes";a:1:{i:0;s:3:"url";}}}s:10:"quickMatch";s:1:"[";s:6:"regexp";s:30:"#\[/?(\*|[-\w]+)(?=[\]\s=:/])#";s:11:"regexpLimit";i:50000;}s:9:"Emoticons";a:3:{s:6:"regexp";s:33:"/(?>:(?>[()DOP|]|'\()|;\)|>:\()/S";s:7:"tagName";s:1:"E";s:11:"regexpLimit";i:50000;}s:7:"Escaper";a:4:{s:10:"quickMatch";s:1:"\";s:11:"regexpLimit";i:50000;s:6:"regexp";s:30:"/\\[-!#()*+.:<>@[\\\]^_`{|}~]/";s:7:"tagName";s:3:"ESC";}s:8:"Litedown";a:1:{s:18:"decodeHtmlEntities";b:0;}s:4:"Preg";a:1:{s:8:"generics";a:5:{i:0;a:4:{i:0;s:11:"USERMENTION";i:1;s:75:"/\B@["“](?<displayname>((?!"#[a-z]{0,3}[0-9]+).)+)["”]#(?<id>[0-9]+)\b/";i:2;i:0;i:3;a:4:{i:0;s:0:"";i:1;s:11:"displayname";i:2;s:0:"";i:3;s:2:"id";}}i:1;a:4:{i:0;s:11:"USERMENTION";i:1;s:35:"/\B@(?<username>[a-z0-9_-]+)(?!#)/i";i:2;i:0;i:3;a:2:{i:0;s:0:"";i:1;s:8:"username";}}i:2;a:4:{i:0;s:11:"POSTMENTION";i:1;s:76:"/\B@["“](?<displayname>((?!"#[a-z]{0,3}[0-9]+).)+)["”]#p(?<id>[0-9]+)\b/";i:2;i:0;i:3;R:71;}i:3;a:4:{i:0;s:12:"GROUPMENTION";i:1;s:75:"/\B@["“](?<groupname>((?!"#[a-z]{0,3}[0-9]+).)+)["|”]#g(?<id>[0-9]+)\b/";i:2;i:0;i:3;a:4:{i:0;s:0:"";i:1;s:9:"groupname";i:2;s:0:"";i:3;s:2:"id";}}i:4;a:4:{i:0;s:10:"TAGMENTION";i:1;s:51:"/(?:[^“"]|^)\B#(?<slug>[-_\p{L}\p{N}\p{M}]+)\b/ui";i:2;i:0;i:3;a:2:{i:0;s:0:"";i:1;s:4:"slug";}}}}}s:14:"registeredVars";a:1:{s:9:"urlConfig";a:1:{s:14:"allowedSchemes";s:12:"/^https?$/Di";}}s:14:" * rootContext";a:2:{s:7:"allowed";a:1:{i:0;i:32607;}s:5:"flags";i:40;}s:13:" * tagsConfig";a:39:{s:1:"B";a:7:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:59:"s9e\TextFormatter\Parser\FilterProcessing::filterAttributes";s:6:"params";a:4:{s:3:"tag";N;s:9:"tagConfig";N;s:14:"registeredVars";N;s:6:"logger";N;}}}s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:2;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:3;s:7:"allowed";a:1:{i:0;i:32587;}}s:1:"C";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:66;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:3;s:7:"allowed";a:1:{i:0;i:0;}}s:6:"CENTER";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:3:{s:11:"closeParent";a:11:{s:5:"EMAIL";i:1;s:3:"URL";i:1;s:1:"C";i:1;s:2:"EM";i:1;s:6:"STRONG";i:1;s:1:"B";i:1;s:1:"I";i:1;s:1:"U";i:1;s:1:"S";i:1;s:5:"COLOR";i:1;s:4:"SIZE";i:1;}s:12:"fosterParent";R:138;s:5:"flags";i:268;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:2;s:7:"allowed";R:107;}s:4:"CODE";a:7:{s:10:"attributes";a:1:{s:4:"lang";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:62:"s9e\TextFormatter\Parser\AttributeFilters\RegexpFilter::filter";s:6:"params";a:2:{s:9:"attrValue";N;i:0;s:19:"/^[-0-9A-Za-z_]+$/D";}}}s:8:"required";b:0;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:3:{s:11:"closeParent";R:138;s:12:"fosterParent";R:138;s:5:"flags";i:4436;}s:8:"tagLimit";i:5000;s:9:"bitNumber";i:2;s:7:"allowed";R:133;}s:5:"COLOR";a:7:{s:10:"attributes";a:1:{s:5:"color";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:62:"s9e\TextFormatter\Parser\AttributeFilters\RegexpFilter::filter";s:6:"params";a:2:{s:9:"attrValue";N;i:0;s:150:"/^(?:#(?:(?:[0-9a-f]{3}){1,2}|(?:[0-9a-f]{4}){1,2})|rgb\(\d{1,3}, *\d{1,3}, *\d{1,3}\)|rgba\(\d{1,3}, *\d{1,3}, *\d{1,3}, *\d*(?:\.\d+)?\)|[a-z]+)$/Di";}}}s:8:"required";b:1;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:121;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:3;s:7:"allowed";R:125;}s:3:"DEL";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:512;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:3;s:7:"allowed";R:107;}s:1:"E";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:3089;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:6;s:7:"allowed";a:1:{i:0;i:16705;}}s:2:"EM";R:111;s:5:"EMAIL";a:7:{s:10:"attributes";a:1:{s:5:"email";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:61:"s9e\TextFormatter\Parser\AttributeFilters\EmailFilter::filter";s:6:"params";a:1:{s:9:"attrValue";N;}}}s:8:"required";b:1;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:514;}s:8:"tagLimit";i:5000;s:9:"bitNumber";i:1;s:7:"allowed";a:1:{i:0;i:27981;}}s:3:"ESC";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:1616;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:0;s:7:"allowed";R:133;}s:12:"GROUPMENTION";a:7:{s:10:"attributes";a:2:{s:9:"groupname";a:2:{s:8:"required";b:1;s:11:"filterChain";R:28;}s:2:"id";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:67:"s9e\TextFormatter\Parser\AttributeFilters\NumericFilter::filterUint";s:6:"params";R:201;}}s:8:"required";b:1;}}s:11:"filterChain";a:3:{i:0;a:2:{s:8:"callback";s:45:"Flarum\Mentions\ConfigureMentions::addGroupId";s:6:"params";a:3:{s:3:"tag";N;s:5:"actor";N;s:8:"mentions";N;}}i:1;R:113;i:2;a:2:{s:8:"callback";s:46:"Flarum\Mentions\ConfigureMentions::dummyFilter";s:6:"params";a:1:{s:3:"tag";N;}}}s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:3;s:7:"allowed";R:193;}s:2:"H1";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:3:{s:11:"closeParent";R:138;s:12:"fosterParent";R:138;s:5:"flags";i:260;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:2;s:7:"allowed";R:125;}s:2:"H2";R:240;s:2:"H3";R:240;s:2:"H4";R:240;s:2:"H5";R:240;s:2:"H6";R:240;s:2:"HR";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:2:{s:11:"closeParent";R:138;s:5:"flags";i:3349;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:2;s:7:"allowed";R:193;}s:1:"I";R:111;s:3:"IMG";a:7:{s:10:"attributes";a:5:{s:3:"alt";a:2:{s:8:"required";b:0;s:11:"filterChain";R:28;}s:6:"height";a:2:{s:11:"filterChain";R:222;s:8:"required";b:0;}s:3:"src";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:59:"s9e\TextFormatter\Parser\AttributeFilters\UrlFilter::filter";s:6:"params";a:3:{s:9:"attrValue";N;s:9:"urlConfig";N;s:6:"logger";N;}}}s:8:"required";b:1;}s:5:"title";R:254;s:5:"width";R:256;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:3;s:7:"allowed";R:193;}s:8:"ISPOILER";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:1:{s:5:"flags";i:0;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:3;s:7:"allowed";R:125;}s:2:"LI";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:3:{s:11:"closeParent";a:12:{s:5:"EMAIL";i:1;s:3:"URL";i:1;s:1:"C";i:1;s:2:"EM";i:1;s:6:"STRONG";i:1;s:1:"B";i:1;s:1:"I";i:1;s:1:"U";i:1;s:1:"S";i:1;s:5:"COLOR";i:1;s:4:"SIZE";i:1;s:2:"LI";i:1;}s:12:"fosterParent";R:138;s:5:"flags";i:264;}s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:5;s:7:"allowed";R:107;}s:4:"LIST";a:7:{s:10:"attributes";a:2:{s:5:"start";R:256;s:4:"type";a:2:{s:11:"filterChain";a:2:{i:0;a:2:{s:8:"callback";s:63:"s9e\TextFormatter\Parser\AttributeFilters\HashmapFilter::filter";s:6:"params";a:3:{s:9:"attrValue";N;i:0;a:5:{s:1:"A";s:11:"upper-alpha";s:1:"I";s:11:"upper-roman";s:1:"a";s:11:"lower-alpha";s:1:"i";s:11:"lower-roman";i:1;s:7:"decimal";}i:1;b:0;}}i:1;a:2:{s:8:"callback";s:62:"s9e\TextFormatter\Parser\AttributeFilters\RegexpFilter::filter";s:6:"params";a:2:{s:9:"attrValue";N;i:0;s:23:"/^[- +,.0-9A-Za-z_]+$/D";}}}s:8:"required";b:0;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";a:4:{s:11:"createChild";a:1:{i:0;s:2:"LI";}s:11:"closeParent";R:138;s:12:"fosterParent";R:138;s:5:"flags";i:3460;}s:8:"tagLimit";i:5000;s:9:"bitNumber";i:2;s:7:"allowed";a:1:{i:0;i:32545;}}s:11:"POSTMENTION";a:7:{s:10:"attributes";a:4:{s:12:"discussionid";R:221;s:11:"displayname";R:219;s:2:"id";R:221;s:6:"number";R:221;}s:11:"filterChain";a:3:{i:0;a:2:{s:8:"callback";s:44:"Flarum\Mentions\ConfigureMentions::addPostId";s:6:"params";a:2:{s:3:"tag";N;s:8:"mentions";N;}}i:1;R:113;i:2;R:233;}s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:1;s:7:"allowed";R:193;}s:5:"QUOTE";a:7:{s:10:"attributes";a:1:{s:6:"author";R:254;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:137;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:2;s:7:"allowed";R:107;}s:1:"S";R:111;s:4:"SIZE";a:7:{s:10:"attributes";a:1:{s:4:"size";a:2:{s:11:"filterChain";a:1:{i:0;a:2:{s:8:"callback";s:68:"s9e\TextFormatter\Parser\AttributeFilters\NumericFilter::filterRange";s:6:"params";a:4:{s:9:"attrValue";N;i:0;i:8;i:1;i:36;s:6:"logger";N;}}}s:8:"required";b:1;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:121;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:3;s:7:"allowed";R:125;}s:7:"SPOILER";a:7:{s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:137;s:8:"tagLimit";i:5000;s:10:"attributes";R:28;s:9:"bitNumber";i:4;s:7:"allowed";R:107;}s:6:"STRONG";R:111;s:3:"SUB";R:270;s:3:"SUP";R:270;s:10:"TAGMENTION";a:7:{s:10:"attributes";a:3:{s:2:"id";R:221;s:4:"slug";R:219;s:7:"tagname";R:219;}s:11:"filterChain";a:3:{i:0;a:2:{s:8:"callback";s:43:"Flarum\Mentions\ConfigureMentions::addTagId";s:6:"params";R:330;}i:1;R:113;i:2;R:233;}s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:1;s:7:"allowed";R:193;}s:1:"U";R:111;s:8:"UPL-FILE";a:7:{s:10:"attributes";a:3:{s:7:"content";a:2:{s:11:"filterChain";a:1:{i:0;R:310;}s:8:"required";b:1;}s:4:"size";R:370;s:4:"uuid";a:2:{s:11:"filterChain";R:156;s:8:"required";b:1;}}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:248;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:2;s:7:"allowed";R:193;}s:9:"UPL-IMAGE";a:7:{s:10:"attributes";a:4:{s:7:"content";R:370;s:4:"size";R:370;s:3:"url";R:258;s:4:"uuid";R:373;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:248;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:2;s:7:"allowed";R:193;}s:17:"UPL-IMAGE-PREVIEW";a:7:{s:10:"attributes";a:3:{s:3:"alt";R:254;s:3:"url";a:2:{s:11:"filterChain";R:259;s:8:"required";b:0;}s:4:"uuid";R:373;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:3;s:7:"allowed";R:193;}s:16:"UPL-TEXT-PREVIEW";a:7:{s:10:"attributes";a:5:{s:7:"content";R:370;s:11:"has_snippet";a:2:{s:11:"filterChain";R:371;s:8:"required";b:0;}s:7:"snippet";R:392;s:3:"url";R:258;s:4:"uuid";R:373;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:248;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:4;s:7:"allowed";R:193;}s:3:"URL";a:7:{s:10:"attributes";a:2:{s:5:"title";R:254;s:3:"url";R:258;}s:11:"filterChain";R:112;s:12:"nestingLimit";i:10;s:5:"rules";R:205;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:1;s:7:"allowed";R:209;}s:11:"USERMENTION";a:7:{s:10:"attributes";a:2:{s:11:"displayname";R:219;s:2:"id";R:221;}s:11:"filterChain";a:3:{i:0;a:2:{s:8:"callback";s:44:"Flarum\Mentions\ConfigureMentions::addUserId";s:6:"params";R:330;}i:1;R:113;i:2;R:233;}s:12:"nestingLimit";i:10;s:5:"rules";R:189;s:8:"tagLimit";i:5000;s:9:"bitNumber";i:1;s:7:"allowed";R:193;}}}}