/*!
* froala_editor v4.1.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2023 Froala Labs
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],r):r(e.FroalaEditor)}(this,function(e){"use strict";function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e){var r={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
[^\r]+?<\/pre>)/gm,function(e,r){var a=r;return a=(a=a.replace(/^ {2}/gm,"\xa80")).replace(/\xa80/g,"")}),y.subParser("hashBlock")("","gim"),e=s.converter._dispatch("hashPreCodeTags.after",e,o,s)}),y.subParser("headers",function(e,l,c){e=c.converter._dispatch("headers.before",e,l,c);var u=isNaN(parseInt(l.headerLevelStart))?1:parseInt(l.headerLevelStart),r=l.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=l.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(r,function(e,r){var a=y.subParser("spanGamut")(r,l,c),t=l.noHeaderId?"":' id="'+d(r)+'"',n="\n"+e+"\n",r,a)}),e=a.converter._dispatch("blockQuotes.after",e,r,a)}),y.subParser("codeBlocks",function(e,s,i){e=i.converter._dispatch("codeBlocks.before",e,s,i);return e=(e=(e+="\xa80").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=\xa80))/g,function(e,r,a){var t=r,n=a,o="\n";return t=y.subParser("outdent")(t,s,i),t=y.subParser("encodeCode")(t,s,i),t=(t=(t=y.subParser("detab")(t,s,i)).replace(/^\n+/g,"")).replace(/\n+$/g,""),s.omitExtraWLInCodeBlocks&&(o=""),t="",y.subParser("hashBlock")(t,s,i)+n})).replace(/\xa80/,""),e=i.converter._dispatch("codeBlocks.after",e,s,i)}),y.subParser("codeSpans",function(e,o,s){return void 0===(e=s.converter._dispatch("codeSpans.before",e,o,s))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,r,a,t){var n=t;return n=(n=n.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),n=r+""+t+o+"
"+(n=y.subParser("encodeCode")(n,o,s))+"
",n=y.subParser("hashHTMLSpans")(n,o,s)}),e=s.converter._dispatch("codeSpans.after",e,o,s)}),y.subParser("completeHTMLDocument",function(e,r,a){if(!r.completeHTMLDocument)return e;e=a.converter._dispatch("completeHTMLDocument.before",e,r,a);var t="html",n="\n",o="",s='\n',i="",l="";for(var c in"undefined"!=typeof a.metadata.parsed.doctype&&(n="\n","html"!==(t=a.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==t||(s='')),a.metadata.parsed)if(a.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":o=""+a.metadata.parsed.title+" \n";break;case"charset":s="html"===t||"html5"===t?'\n':'\n';break;case"language":case"lang":i=' lang="'+a.metadata.parsed[c]+'"',l+='\n';break;default:l+='\n'}return e=n+"\n\n"+o+s+l+"\n\n"+e.trim()+"\n\n",e=a.converter._dispatch("completeHTMLDocument.after",e,r,a)}),y.subParser("detab",function(e,r,a){return e=(e=(e=(e=(e=(e=a.converter._dispatch("detab.before",e,r,a)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"\xa8A\xa8B")).replace(/\xa8B(.+?)\xa8A/g,function(e,r){for(var a=r,t=4-a.length%4,n=0;n/g,">"),e=a.converter._dispatch("encodeAmpsAndAngles.after",e,r,a)}),y.subParser("encodeBackslashEscapes",function(e,r,a){return e=(e=(e=a.converter._dispatch("encodeBackslashEscapes.before",e,r,a)).replace(/\\(\\)/g,y.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeBackslashEscapes.after",e,r,a)}),y.subParser("encodeCode",function(e,r,a){return e=(e=a.converter._dispatch("encodeCode.before",e,r,a)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeCode.after",e,r,a)}),y.subParser("escapeSpecialCharsWithinTagAttributes",function(e,r,a){return e=(e=(e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,r,a)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)}),e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,r,a)}),y.subParser("githubCodeBlocks",function(e,o,s){return o.ghCodeBlocks?(e=s.converter._dispatch("githubCodeBlocks.before",e,o,s),e=(e=(e+="\xa80").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,r,a,t){var n=o.omitExtraWLInCodeBlocks?"":"\n";return t=y.subParser("encodeCode")(t,o,s),t=" ",t=y.subParser("hashBlock")(t,o,s),"\n\n\xa8G"+(s.ghCodeBlocks.push({text:e,codeblock:t})-1)+"G\n\n"})).replace(/\xa80/,""),s.converter._dispatch("githubCodeBlocks.after",e,o,s)):e}),y.subParser("hashBlock",function(e,r,a){return e=(e=a.converter._dispatch("hashBlock.before",e,r,a)).replace(/(^\n+|\n+$)/g,""),e="\n\n\xa8K"+(a.gHtmlBlocks.push(e)-1)+"K\n\n",e=a.converter._dispatch("hashBlock.after",e,r,a)}),y.subParser("hashCodeTags",function(e,o,s){e=s.converter._dispatch("hashCodeTags.before",e,o,s);var i=function i(e,r,a,t){var n=a+y.subParser("encodeCode")(r,o,s)+t;return"\xa8C"+(s.gHtmlSpans.push(n)-1)+"C"};return e=y.helper.replaceRecursiveRegExp(e,i,""+(t=(t=(t=y.subParser("detab")(t,o,s)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+n+"
]*>","
","gim"),e=s.converter._dispatch("hashCodeTags.after",e,o,s)}),y.subParser("hashElement",function(e,r,t){return function(e,r){var a=r;return a=(a=(a=a.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),a="\n\n\xa8K"+(t.gHtmlBlocks.push(a)-1)+"K\n\n"}}),y.subParser("hashHTMLBlocks",function(e,r,o){e=o.converter._dispatch("hashHTMLBlocks.before",e,r,o);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],s=function s(e,r,a,t){var n=e;return-1!==a.search(/\bmarkdown\b/)&&(n=a+o.converter.makeHtml(r)+t),"\n\n\xa8K"+(o.gHtmlBlocks.push(n)-1)+"K\n\n"};r.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,r){return"<"+r+">"}));for(var t=0;t]*>)","im"),l="<"+a[t]+"\\b[^>]*>",c=""+a[t]+">";-1!==(n=y.helper.regexIndexOf(e,i));){var u=y.helper.splitAtIndex(e,n),d=y.helper.replaceRecursiveRegExp(u[1],s,l,c,"im");if(d===u[1])break;e=u[0].concat(d)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,r,o)),e=(e=y.helper.replaceRecursiveRegExp(e,function(e){return"\n\n\xa8K"+(o.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,r,o)),e=o.converter._dispatch("hashHTMLBlocks.after",e,r,o)}),y.subParser("hashHTMLSpans",function(e,r,a){function t(e){return"\xa8C"+(a.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=a.converter._dispatch("hashHTMLSpans.before",e,r,a)).replace(/<[^>]+?\/>/gi,function(e){return t(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return t(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return t(e)})).replace(/<[^>]+?>/gi,function(e){return t(e)}),e=a.converter._dispatch("hashHTMLSpans.after",e,r,a)}),y.subParser("unhashHTMLSpans",function(e,r,a){e=a.converter._dispatch("unhashHTMLSpans.before",e,r,a);for(var t=0;t ]*>\\s* ]*>","^ {0,3}
\\s*
]*>/.test(c)&&(u=!0)}n[s]=c}return e=(e=(e=n.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),a.converter._dispatch("paragraphs.after",e,r,a)}),y.subParser("runExtension",function(e,r,a,t){if(e.filter)r=e.filter(r,t.converter,a);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,"g")),r=r.replace(n,e.replace)}return r}),y.subParser("spanGamut",function(e,r,a){return e=a.converter._dispatch("spanGamut.before",e,r,a),e=y.subParser("codeSpans")(e,r,a),e=y.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,a),e=y.subParser("encodeBackslashEscapes")(e,r,a),e=y.subParser("images")(e,r,a),e=y.subParser("anchors")(e,r,a),e=y.subParser("autoLinks")(e,r,a),e=y.subParser("simplifiedAutoLinks")(e,r,a),e=y.subParser("emoji")(e,r,a),e=y.subParser("underline")(e,r,a),e=y.subParser("italicsAndBold")(e,r,a),e=y.subParser("strikethrough")(e,r,a),e=y.subParser("ellipsis")(e,r,a),e=y.subParser("hashHTMLSpans")(e,r,a),e=y.subParser("encodeAmpsAndAngles")(e,r,a),r.simpleLineBreaks?/\n\n\xa8K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=a.converter._dispatch("spanGamut.after",e,r,a)}),y.subParser("strikethrough",function(e,t,n){return t.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,t,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,r){return function a(e){return t.simplifiedAutoLink&&(e=y.subParser("simplifiedAutoLinks")(e,t,n)),""+e+""}(r)}),e=n.converter._dispatch("strikethrough.after",e,t,n)),e}),y.subParser("stripLinkDefinitions",function(e,i,l){var c=function c(e,r,a,t,n,o,s){return r=r.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?l.gUrls[r]=a.replace(/\s/g,""):l.gUrls[r]=y.subParser("encodeAmpsAndAngles")(a,i,l),o?o+s:(s&&(l.gTitles[r]=s.replace(/"|'/g,""")),i.parseImgDimensions&&t&&n&&(l.gDimensions[r]={width:t,height:n}),"")};return e=(e=(e=(e+="\xa80").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=\xa80)|(?=\n\[))/gm,c)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=\xa80))/gm,c)).replace(/\xa80/,"")}),y.subParser("tables",function(e,_,b){if(!_.tables)return e;function r(e){var r,a=e.split("\n");for(r=0;r"+(n=y.subParser("spanGamut")(n,_,b))+"\n"));for(r=0;r"+y.subParser("spanGamut")(i,_,b)+"\n"));h.push(f)}return function m(e,r){for(var a="\n\n\n",t=e.length,n=0;n\n \n\n",n=0;n\n";for(var o=0;o\n"}return a+=" \n
\n"}(d,h)}return e=(e=(e=(e=b.converter._dispatch("tables.before",e,_,b)).replace(/\\(\|)/g,y.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|\xa80)/gm,r)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|\xa80)/gm,r),e=b.converter._dispatch("tables.after",e,_,b)}),y.subParser("underline",function(e,r,a){return r.underline?(e=a.converter._dispatch("underline.before",e,r,a),e=(e=r.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return""+r+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return""+r+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/(_)/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("underline.after",e,r,a)):e}),y.subParser("unescapeSpecialChars",function(e,r,a){return e=(e=a.converter._dispatch("unescapeSpecialChars.before",e,r,a)).replace(/\xa8E(\d+)E/g,function(e,r){var a=parseInt(r);return String.fromCharCode(a)}),e=a.converter._dispatch("unescapeSpecialChars.after",e,r,a)}),y.subParser("makeMarkdown.blockquote",function(e,r){var a="";if(e.hasChildNodes())for(var t=e.childNodes,n=t.length,o=0;o ")}),y.subParser("makeMarkdown.codeBlock",function(e,r){var a=e.getAttribute("language"),t=e.getAttribute("precodenum");return"```"+a+"\n"+r.preList[t]+"\n```"}),y.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),y.subParser("makeMarkdown.emphasis",function(e,r){var a="";if(e.hasChildNodes()){a+="*";for(var t=e.childNodes,n=t.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(r+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"),r}),y.subParser("makeMarkdown.links",function(e,r){var a="";if(e.hasChildNodes()&&e.hasAttribute("href")){var t=e.childNodes,n=t.length;a="[";for(var o=0;o",e.hasAttribute("title")&&(a+=' "'+e.getAttribute("title")+'"'),a+=")"}return a}),y.subParser("makeMarkdown.list",function(e,r,a){var t="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,o=n.length,s=e.getAttribute("start")||1,i=0;i"+r.preList[a]+""}),y.subParser("makeMarkdown.strikethrough",function(e,r){var a="";if(e.hasChildNodes()){a+="~~";for(var t=e.childNodes,n=t.length,o=0;otr>th"),i=e.querySelectorAll("tbody>tr");for(a=0;a/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),e.PLUGINS.markdown=function(s){var i,l,a,t,n,c=s.$,o=!1,u="",d="",p="",h="",f=[],g=[],m="",_=null,b=null;function w(e){e=function h(e){var r=e,a=e.match(/(\[\^(.+?)\])[^:]/g),t=e.match(/(\[\^(.+?)\]:)/g);if(a&&t){a.forEach(function(e,r,a){a[r]=a[r].substring(0,a[r].length-1)}),a=a.filter(function(e,r){return a.indexOf(e)===r}),t=t.filter(function(e,r){return t.indexOf(e)===r});for(var n=1,o=0;o'),-1').concat(n,""))).indexOf(a[o])?1:0,l=0;i&&(l++,r=r.replace(t[o].substring(0,t[o].length-1),'').concat(n,":").concat(l,"")),i=-1\u21a9');for(var p=l;0!=l;)d+='\u21a9'),l--;d+="
')+d,n++}}}1!=n&&(r+="")}return e=r}(e=function i(e){for(var r=/^[A-Za-z0-9]/g,a=/^:[ ]{1}(.+?)+/g,t=e.split("\n"),n=t,o=t.length-1,s=1;s