Vergleich jscripts/sceditor/jquery.sceditor.xhtml.min.js - 1.8.24 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
/* SCEditor v2.1.3 | (C) 2017, Sam Clarke | sceditor.com/license */

/* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */





!function(o){"use strict";function e(e,t){return typeof t===e}o=o&&o.hasOwnProperty("default")?o.default:o;var ye=e.bind(null,"string"),xe=e.bind(null,"undefined"),we=e.bind(null,"function"),i=e.bind(null,"number");function t(e){return!Object.keys(e).length}function Ce(e,t){for(var n=e===!!e,o=n?2:1,i=n?t:e,r=!!n&&e;o<arguments.length;o++){var a=arguments[o];for(var l in a){var c=a[l];if(!xe(c)){var s=null!==c&&"object"==typeof c&&Object.getPrototypeOf(c)===Object.prototype,u=Array.isArray(c);i[l]=r&&(s||u)?Ce(!0,i[l]||(u?[]:{}),c):c}}}return i}function Ee(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function Se(t,n){if(Array.isArray(t)||"length"in t&&i(t.length))for(var e=0;e<t.length;e++)n(e,t[e]);else Object.keys(t).forEach(function(e){n(e,t[e])})}var r={},ke=1,Te=3;function a(e){return e=parseFloat(e),isFinite(e)?e:0}function De(e,t,n){var o=(n||document).createElement(e);return Se(t||{},function(e,t){"style"===e?o.style.cssText=t:e in o?o[e]=t:o.setAttribute(e,t)}),o}function Ne(e,t){for(var n=e||{};(n=n.parentNode)&&!/(9|11)/.test(n.nodeType);)if(!t||je(n,t))return n}function Me(e,t){return je(e,t)?e:Ne(e,t)}function Re(e){e.parentNode&&e.parentNode.removeChild(e)}function He(e,t){e.appendChild(t)}function Fe(e,t){return e.querySelectorAll(t)}var _e=!0;function ze(n,e,o,i,r){e.split(" ").forEach(function(e){var t;ye(o)?(t=i["_sce-event-"+e+o]||function(e){for(var t=e.target;t&&t!==n;){if(je(t,o))return void i.call(t,e);t=t.parentNode}},i["_sce-event-"+e+o]=t):(t=o,r=i),n.addEventListener(e,t,r||!1)})}function Ae(n,e,o,i,r){e.split(" ").forEach(function(e){var t;ye(o)?t=i["_sce-event-"+e+o]:(t=o,r=i),n.removeEventListener(e,t,r||!1)})}function Oe(e,t,n){if(arguments.length<3)return e.getAttribute(t);null==n?l(e,t):e.setAttribute(t,n)}function l(e,t){e.removeAttribute(t)}function Be(e){Pe(e,"display","none")}function Ie(e){Pe(e,"display","")}function Le(e){Ge(e)?Be(e):Ie(e)}function Pe(n,e,t){if(arguments.length<3){if(ye(e))return 1===n.nodeType?getComputedStyle(n)[e]:null;Se(e,function(e,t){Pe(n,e,t)})}else{var o=(t||0===t)&&!isNaN(t);n.style[e]=o?t+"px":t}}function Ve(e,t,n){var o=arguments.length,i={};if(e.nodeType===ke){if(1===o)return Se(e.attributes,function(e,t){/^data\-/i.test(t.name)&&(i[t.name.substr(5)]=t.value)}),i;if(2===o)return Oe(e,"data-"+t);Oe(e,"data-"+t,String(n))}}function je(e,t){var n=!1;return e&&e.nodeType===ke&&(n=(e.matches||e.msMatchesSelector||e.webkitMatchesSelector).call(e,t)),n}function We(e,t){return t.parentNode.insertBefore(e,t)}function c(e){return e.className.trim().split(/\s+/)}function qe(e,t){return je(e,"."+t)}function Ue(e,t){var n=c(e);n.indexOf(t)<0&&n.push(t),e.className=n.join(" ")}function $e(e,t){var n=c(e);Ee(n,t),e.className=n.join(" ")}function Ye(e,t,n){(n=xe(n)?!qe(e,t):n)?Ue(e,t):$e(e,t)}function Ke(e,t){if(xe(t)){var n=getComputedStyle(e),o=a(n.paddingLeft)+a(n.paddingRight),i=a(n.borderLeftWidth)+a(n.borderRightWidth);return e.offsetWidth-o-i}Pe(e,"width",t)}function Xe(e,t){if(xe(t)){var n=getComputedStyle(e),o=a(n.paddingTop)+a(n.paddingBottom),i=a(n.borderTopWidth)+a(n.borderBottomWidth);return e.offsetHeight-o-i}Pe(e,"height",t)}function Qe(e,t,n){var o;we(window.CustomEvent)?o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}):(o=e.ownerDocument.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function Ge(e){return!!e.getClientRects().length}function Je(e,t,n,o,i){for(e=i?e.lastChild:e.firstChild;e;){var r=i?e.previousSibling:e.nextSibling;if(!n&&!1===t(e)||!o&&!1===Je(e,t,n,o,i)||n&&!1===t(e))return!1;e=r}}function Ze(e,t,n,o){Je(e,t,n,o,!0)}function et(e,t){var n=(t=t||document).createDocumentFragment(),o=De("div",{},t);for(o.innerHTML=e;o.firstChild;)He(n,o.firstChild);return n}function tt(e){return e&&(!je(e,"p,div")||e.className||Oe(e,"style")||!t(Ve(e)))}function nt(e,t){var n=De(t,{},e.ownerDocument);for(Se(e.attributes,function(e,t){try{Oe(n,t.name,t.value)}catch(e){}});e.firstChild;)He(n,e.firstChild);return e.parentNode.replaceChild(n,e),n}var s="|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|";function ot(e){return!!/11?|9/.test(e.nodeType)&&"|iframe|area|base|basefont|br|col|frame|hr|img|input|wbr|isindex|link|meta|param|command|embed|keygen|source|track|object|".indexOf("|"+e.nodeName.toLowerCase()+"|")<0}function it(e,t){var n,o=(e||{}).nodeType||Te;return o!==ke?o===Te:"code"===(n=e.tagName.toLowerCase())?!t:s.indexOf("|"+n+"|")<0}function u(e,t){t.style.cssText=e.style.cssText+t.style.cssText}function rt(e){Je(e,function(e){var t,n=!it(e,!0);if(n&&it(e.parentNode,!0)){var o=function(e){for(;it(e.parentNode,!0);)e=e.parentNode;return e}(e),i=f(o,e),r=e;u(o,r),We(i,o),We(r,o)}if(n&&je(e,"ul,ol")&&je(e.parentNode,"ul,ol")){var a=("li",(t=e.previousElementSibling)?je(t,"li")?t:null:t);a||We(a=De("li"),e),He(a,e)}})}function d(e,t){return e?(t?e.previousSibling:e.nextSibling)||d(e.parentNode,t):null}function at(e){var t,n,o,i,r,a,l,c=Pe(e,"whiteSpace"),s=/line$/i.test(c),u=e.firstChild;if(!/pre(\-wrap)?$/i.test(c))for(;u;){if(a=u.nextSibling,t=u.nodeValue,(n=u.nodeType)===ke&&u.firstChild&&at(u),n===Te){for(o=d(u),i=d(u,!0),l=!1;qe(i,"sceditor-ignore");)i=d(i,!0);if(it(u)&&i){for(r=i;r.lastChild;)for(r=r.lastChild;qe(r,"sceditor-ignore");)r=d(r,!0);l=r.nodeType===Te?/[\t\n\r ]$/.test(r.nodeValue):!it(r)}t=t.replace(/\u200B/g,""),i&&it(i)&&!l||(t=t.replace(s?/^[\t ]+/:/^[\t\n\r ]+/,"")),o&&it(o)||(t=t.replace(s?/[\t ]+$/:/[\t\n\r ]+$/,"")),t.length?u.nodeValue=t.replace(s?/[\t ]+/g:/[\t\n\r ]+/g," "):Re(u)}u=a}}function f(e,t){var n=e.ownerDocument.createRange();return n.setStartBefore(e),n.setEndAfter(t),n.extractContents()}function lt(e){for(var t=0,n=0;e;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:t,top:n}}function p(e,t){var n,o,i=e.style;if(r[t]||(r[t]=t.replace(/^-ms-/,"ms-").replace(/-(\w)/g,function(e,t){return t.toUpperCase()})),o=i[t=r[t]],"textAlign"===t){if(n=i.direction,o=o||Pe(e,t),Pe(e.parentNode,t)===o||"block"!==Pe(e,"display")||je(e,"hr,th"))return"";if(/right/i.test(o)&&"rtl"===n||/left/i.test(o)&&"ltr"===n)return""}return o}var ct={toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:"#000000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|#444444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|#666666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|#888888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|#aaaaaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|#cccccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|#eeeeee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|#ffffff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef",locale:Oe(document.documentElement,"lang")||"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,startInSourceMode:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}},g=/^(https?|s?ftp|mailto|spotify|skype|ssh|teamspeak|tel):|(\/\/)|data:image\/(png|bmp|gif|p?jpe?g);/i;function st(e){return e.replace(/([\-.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function ut(e,t){if(!e)return e;var n={"&":"&amp;","<":"&lt;",">":"&gt;","  ":"&nbsp; ","\r\n":"<br />","\r":"<br />","\n":"<br />"};return!1!==t&&(n['"']="&#34;",n["'"]="&#39;",n["`"]="&#96;"),e.replace(/ {2}|\r\n|[&<>\r\n'"`]/g,function(e){return n[e]||e})}var n,m,h,v=navigator.userAgent,b=function(){for(var e=3,t=document,n=t.createElement("div"),o=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e",o[0];);return t.documentMode&&t.all&&window.atob&&(e=10),4===e&&t.documentMode&&(e=11),4<e?e:void 0}(),dt="-ms-ime-align"in document.documentElement.style,ft=/iPhone|iPod|iPad| wosbrowser\//i.test(v),pt=((h=document.createElement("div")).contentEditable=!0,"contentEditable"in document.documentElement&&"true"===h.contentEditable&&(m=/Opera Mobi|Opera Mini/i.test(v),/Android/i.test(v)&&(m=!0,/Safari/.test(v)&&(m=!(n=/Safari\/(\d+)/.exec(v))||!n[1]||n[1]<534)),/ Silk\//i.test(v)&&(m=!(n=/AppleWebKit\/(\d+)/.exec(v))||!n[1]||n[1]<534),ft&&(m=/OS [0-4](_\d)+ like Mac/i.test(v)),/Firefox/i.test(v)&&(m=!1),/OneBrowser/i.test(v)&&(m=!1),"UCWEB"===navigator.vendor&&(m=!1),b<=9&&(m=!0),!m)),y={html:'<!DOCTYPE html><html{attrs}><head><style>.ie * {min-height: auto !important} .ie table td {height:15px} @supports (-ms-ime-align:auto) { * { min-height: auto !important; } }</style><meta http-equiv="Content-Type" content="text/html;charset={charset}" /><link rel="stylesheet" type="text/css" href="{style}" /></head><body contenteditable="true" {spellcheck}><p></p></body></html>',toolbarButton:'<a class="sceditor-button sceditor-button-{name}" data-sceditor-command="{name}" unselectable="on"><div unselectable="on">{dispName}</div></a>',emoticon:'<img src="{url}" data-sceditor-emoticon="{key}" alt="{key}" title="{tooltip}" />',fontOpt:'<a class="sceditor-font-option" href="#" data-font="{font}"><font face="{font}">{font}</font></a>',sizeOpt:'<a class="sceditor-fontsize-option" data-size="{size}" href="#"><font size="{size}">{size}</font></a>',pastetext:'<div><label for="txt">{label}</label> <textarea cols="20" rows="7" id="txt"></textarea></div><div><input type="button" class="button" value="{insert}" /></div>',table:'<div><label for="rows">{rows}</label><input type="text" id="rows" value="2" /></div><div><label for="cols">{cols}</label><input type="text" id="cols" value="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',image:'<div><label for="link">{url}</label> <input type="text" id="image" dir="ltr" placeholder="https://" /></div><div><label for="width">{width}</label> <input type="text" id="width" size="2" dir="ltr" /></div><div><label for="height">{height}</label> <input type="text" id="height" size="2" dir="ltr" /></div><div><input type="button" class="button" value="{insert}" /></div>',email:'<div><label for="email">{label}</label> <input type="text" id="email" dir="ltr" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{insert}" /></div>',link:'<div><label for="link">{url}</label> <input type="text" id="link" dir="ltr" placeholder="https://" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{ins}" /></div>',youtubeMenu:'<div><label for="link">{label}</label> <input type="text" id="link" dir="ltr" placeholder="https://" /></div><div><input type="button" class="button" value="{insert}" /></div>',youtube:'<iframe width="560" height="315" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/{id}?wmode=opaque&start={time}" data-youtube-id="{id}"></iframe>'};function gt(e,t,n){var o=y[e];return Object.keys(t).forEach(function(e){o=o.replace(new RegExp(st("{"+e+"}"),"g"),t[e])}),n&&(o=et(o)),o}var x=b&&b<11;function w(e){if("mozHidden"in document)for(var t,n=e.getBody();n;){if((t=n).firstChild)t=t.firstChild;else{for(;t&&!t.nextSibling;)t=t.parentNode;t&&(t=t.nextSibling)}3===n.nodeType&&/[\n\r\t]+/.test(n.nodeValue)&&(/^pre/.test(Pe(n.parentNode,"whiteSpace"))||Re(n)),n=t}}var mt={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{state:function(e){if(e&&3===e.nodeType&&(e=e.parentNode),e){var t="ltr"===Pe(e,"direction"),n=Pe(e,"textAlign");return"left"===n||n===(t?"start":"end")}},exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{state:function(e){if(e&&3===e.nodeType&&(e=e.parentNode),e){var t="ltr"===Pe(e,"direction"),n=Pe(e,"textAlign");return"right"===n||n===(t?"end":"start")}},exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(t,e,n){var o=De("div");ze(o,"click","a",function(e){n(Ve(this,"font")),t.closeDropDown(!0),e.preventDefault()}),t.opts.fonts.split(",").forEach(function(e){He(o,gt("fontOpt",{font:e},!0))}),t.createDropDown(e,"font-picker",o)},exec:function(e){var t=this;mt.font._dropDown(t,e,function(e){t.execCommand("fontname",e)})},tooltip:"Font Name"},size:{_dropDown:function(t,e,n){var o=De("div");ze(o,"click","a",function(e){n(Ve(this,"size")),t.closeDropDown(!0),e.preventDefault()});for(var i=1;i<=7;i++)He(o,gt("sizeOpt",{size:i},!0));t.createDropDown(e,"fontsize-picker",o)},exec:function(e){var t=this;mt.size._dropDown(t,e,function(e){t.execCommand("fontsize",e)})},tooltip:"Font Size"},color:{_dropDown:function(t,e,n){var o=De("div"),i="",r=mt.color;r._htmlCache||(t.opts.colors.split("|").forEach(function(e){i+='<div class="sceditor-color-column">',e.split(",").forEach(function(e){i+='<a href="#" class="sceditor-color-option" style="background-color: '+e+'" data-color="'+e+'"></a>'}),i+="</div>"}),r._htmlCache=i),He(o,et(r._htmlCache)),ze(o,"click","a",function(e){n(Ve(this,"color")),t.closeDropDown(!0),e.preventDefault()}),t.createDropDown(e,"color-picker",o)},exec:function(e){var t=this;mt.color._dropDown(t,e,function(e){t.execCommand("forecolor",e)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(e){var t,n=De("div"),o=this;He(n,gt("pastetext",{label:o._("Paste your text inside the following box:"),insert:o._("Insert")},!0)),ze(n,"click",".button",function(e){(t=Fe(n,"#txt")[0].value)&&o.wysiwygEditorInsertText(t),o.closeDropDown(!0),e.preventDefault()}),o.createDropDown(e,"pastetext",n)},tooltip:"Paste Text"},bulletlist:{exec:function(){w(this),this.execCommand("insertunorderedlist")},tooltip:"Bullet list"},orderedlist:{exec:function(){w(this),this.execCommand("insertorderedlist")},tooltip:"Numbered list"},indent:{state:function(e,t){var n,o,i;return je(t,"li")?0:je(t,"ul,ol,menu")&&(o=(n=this.getRangeHelper().selectedRange()).startContainer.parentNode,i=n.endContainer.parentNode,o!==o.parentNode.firstElementChild||je(i,"li")&&i!==i.parentNode.lastElementChild)?0:-1},exec:function(){var e=this.getRangeHelper().getFirstBlockParent();this.focus(),Me(e,"ul,ol,menu")&&this.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(e,t){return Me(t,"ul,ol,menu")?0:-1},exec:function(){Me(this.getRangeHelper().getFirstBlockParent(),"ul,ol,menu")&&this.execCommand("outdent")},tooltip:"Remove one indent"},table:{exec:function(e){var i=this,r=De("div");He(r,gt("table",{rows:i._("Rows:"),cols:i._("Cols:"),insert:i._("Insert")},!0)),ze(r,"click",".button",function(e){var t=Number(Fe(r,"#rows")[0].value),n=Number(Fe(r,"#cols")[0].value),o="<table>";0<t&&0<n&&(o+=Array(t+1).join("<tr>"+Array(n+1).join("<td>"+(x?"":"<br />")+"</td>")+"</tr>"),o+="</table>",i.wysiwygEditorInsertHtml(o),i.closeDropDown(!0),e.preventDefault())}),i.createDropDown(e,"inserttable",r)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{exec:function(){this.wysiwygEditorInsertHtml("<code>",(x?"":"<br />")+"</code>")},tooltip:"Code"},image:{_dropDown:function(t,e,n,o){var i=De("div");He(i,gt("image",{url:t._("URL:"),width:t._("Width (optional):"),height:t._("Height (optional):"),insert:t._("Insert")},!0));var r=Fe(i,"#image")[0];r.value=n,ze(i,"click",".button",function(e){r.value&&o(r.value,Fe(i,"#width")[0].value,Fe(i,"#height")[0].value),t.closeDropDown(!0),e.preventDefault()}),t.createDropDown(e,"insertimage",i)},exec:function(e){var i=this;mt.image._dropDown(i,e,"",function(e,t,n){var o="";t&&(o+=' width="'+parseInt(t)+'"'),n&&(o+=' height="'+parseInt(n)+'"'),o+=' src="'+ut(e)+'"',i.wysiwygEditorInsertHtml("<img"+o+" />")})},tooltip:"Insert an image"},email:{_dropDown:function(n,e,o){var i=De("div");He(i,gt("email",{label:n._("E-mail:"),desc:n._("Description (optional):"),insert:n._("Insert")},!0)),ze(i,"click",".button",function(e){var t=Fe(i,"#email")[0].value;t&&o(t,Fe(i,"#des")[0].value),n.closeDropDown(!0),e.preventDefault()}),n.createDropDown(e,"insertemail",i)},exec:function(e){var n=this;mt.email._dropDown(n,e,function(e,t){n.focus(),!n.getRangeHelper().selectedHtml()||t?n.wysiwygEditorInsertHtml('<a href="mailto:'+ut(e)+'">'+ut(t||e)+"</a>"):n.execCommand("createlink","mailto:"+e)})},tooltip:"Insert an email"},link:{_dropDown:function(t,e,n){var o=De("div");He(o,gt("link",{url:t._("URL:"),desc:t._("Description (optional):"),ins:t._("Insert")},!0));var i=Fe(o,"#link")[0];function r(e){i.value&&n(i.value,Fe(o,"#des")[0].value),t.closeDropDown(!0),e.preventDefault()}ze(o,"click",".button",r),ze(o,"keypress",function(e){13===e.which&&i.value&&r(e)},_e),t.createDropDown(e,"insertlink",o)},exec:function(e){var n=this;mt.link._dropDown(n,e,function(e,t){n.focus(),t||!n.getRangeHelper().selectedHtml()?(t=t||e,n.wysiwygEditorInsertHtml('<a href="'+ut(e)+'">'+ut(t)+"</a>")):n.execCommand("createlink",e)})},tooltip:"Insert a link"},unlink:{state:function(){return Me(this.currentNode(),"a")?0:-1},exec:function(){var e=Me(this.currentNode(),"a");if(e){for(;e.firstChild;)We(e.firstChild,e);Re(e)}},tooltip:"Unlink"},quote:{exec:function(e,t,n){var o="<blockquote>",i="</blockquote>";t?(o=o+(n=n?"<cite>"+ut(n)+"</cite>":"")+t+i,i=null):""===this.getRangeHelper().selectedHtml()&&(i=(x?"":"<br />")+i),this.wysiwygEditorInsertHtml(o,i)},tooltip:"Insert a Quote"},emoticon:{exec:function(f){var p=this,g=function(e){var t,n,o=p.opts,i=o.emoticonsRoot||"",r=o.emoticonsCompat,a=p.getRangeHelper(),l=r&&" "!==a.getOuterText(!0,1)?" ":"",c=r&&" "!==a.getOuterText(!1,1)?" ":"",s=De("div"),u=De("div"),d=Ce({},o.emoticons.dropdown,e?o.emoticons.more:{});return He(s,u),n=Math.sqrt(Object.keys(d).length),ze(s,"click","img",function(e){p.insert(l+Oe(this,"alt")+c,null,!1).closeDropDown(!0),e.preventDefault()}),Se(d,function(e,t){He(u,De("img",{src:i+(t.url||t),alt:e,title:t.tooltip||e})),u.children.length>=n&&(u=De("div"),He(s,u))}),!e&&o.emoticons.more&&(He(t=De("a",{className:"sceditor-more"}),document.createTextNode(p._("More"))),ze(t,"click",function(e){p.createDropDown(f,"more-emoticons",g(!0)),e.preventDefault()}),He(s,t)),s};p.createDropDown(f,"emoticons",g(!1))},txtExec:function(e){mt.emoticon.exec.call(this,e)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(r,e,a){var l=De("div");He(l,gt("youtubeMenu",{label:r._("Video URL:"),insert:r._("Insert")},!0)),ze(l,"click",".button",function(e){var t=Fe(l,"#link")[0].value,n=t.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),o=t.match(/[&|?](?:star)?t=((\d+[hms]?){1,3})/),i=0;o&&Se(o[1].split(/[hms]/),function(e,t){""!==t&&(i=60*i+Number(t))}),n&&/^[a-zA-Z0-9_\-]{11}$/.test(n[1])&&a(n[1],i),r.closeDropDown(!0),e.preventDefault()}),r.createDropDown(e,"insertlink",l)},exec:function(e){var n=this;mt.youtube._dropDown(n,e,function(e,t){n.wysiwygEditorInsertHtml(gt("youtube",{id:e,time:t}))})},tooltip:"Insert a YouTube video"},date:{_date:function(e){var t=new Date,n=t.getYear(),o=t.getMonth()+1,i=t.getDate();return n<2e3&&(n=1900+n),o<10&&(o="0"+o),i<10&&(i="0"+i),e.opts.dateFormat.replace(/year/i,n).replace(/month/i,o).replace(/day/i,i)},exec:function(){this.insertText(mt.date._date(this))},txtExec:function(){this.insertText(mt.date._date(this))},tooltip:"Insert current date"},time:{_time:function(){var e=new Date,t=e.getHours(),n=e.getMinutes(),o=e.getSeconds();return t<10&&(t="0"+t),n<10&&(n="0"+n),o<10&&(o="0"+o),t+":"+n+":"+o},exec:function(){this.insertText(mt.time._time())},txtExec:function(){this.insertText(mt.time._time())},tooltip:"Insert current time"},ltr:{state:function(e,t){return t&&"ltr"===t.style.direction},exec:function(){var e=this.getRangeHelper(),t=e.getFirstBlockParent();this.focus(),(t&&!je(t,"body")||(this.execCommand("formatBlock","p"),(t=e.getFirstBlockParent())&&!je(t,"body")))&&Pe(t,"direction","ltr"===Pe(t,"direction")?"":"ltr")},tooltip:"Left-to-Right"},rtl:{state:function(e,t){return t&&"rtl"===t.style.direction},exec:function(){var e=this.getRangeHelper(),t=e.getFirstBlockParent();this.focus(),(t&&!je(t,"body")||(this.execCommand("formatBlock","p"),(t=e.getFirstBlockParent())&&!je(t,"body")))&&Pe(t,"direction","rtl"===Pe(t,"direction")?"":"rtl")},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"Ctrl+Shift+M"},source:{state:function(){return this.sourceMode()},exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"Ctrl+Shift+S"},ignore:{}},C={};function ht(r){var i=this,a=[],l=function(e){return"signal"+e.charAt(0).toUpperCase()+e.slice(1)},e=function(e,t){e=[].slice.call(e);var n,o,i=l(e.shift());for(n=0;n<a.length;n++)if(i in a[n]&&(o=a[n][i].apply(r,e),t))return o};i.call=function(){e(arguments,!1)},i.callOnlyFirst=function(){return e(arguments,!0)},i.hasHandler=function(e){var t=a.length;for(e=l(e);t--;)if(e in a[t])return!0;return!1},i.exists=function(e){return e in C&&"function"==typeof(e=C[e])&&"object"==typeof e.prototype},i.isRegistered=function(e){if(i.exists(e))for(var t=a.length;t--;)if(a[t]instanceof C[e])return!0;return!1},i.register=function(e){return!(!i.exists(e)||i.isRegistered(e)||(e=new C[e],a.push(e),"init"in e&&e.init.call(r),0))},i.deregister=function(e){var t,n=a.length,o=!1;if(!i.isRegistered(e))return o;for(;n--;)a[n]instanceof C[e]&&(o=!0,"destroy"in(t=a.splice(n,1)[0])&&t.destroy.call(r));return o},i.destroy=function(){for(var e=a.length;e--;)"destroy"in a[e]&&a[e].destroy.call(r);a=[],r=null}}ht.plugins=C;var E=b&&b<11,S=function(e,t,n){var o,i,r,a,l,c="",s=e.startContainer,u=e.startOffset;for(s&&3!==s.nodeType&&(s=s.childNodes[u],u=0),r=a=u;n>c.length&&s&&3===s.nodeType;)o=s.nodeValue,i=n-c.length,l&&(a=o.length,r=0),l=s,t?(u=r=Math.max(a-i,0),c=o.substr(r,a-r)+c,s=l.previousSibling):(u=r+(a=Math.min(i,o.length)),c+=o.substr(r,a),s=l.nextSibling);return{node:l||s,offset:u,text:c}};function vt(r,e){var a,l,c=e||r.contentDocument||r.document,s="sceditor-start-marker",u="sceditor-end-marker",b=this;b.insertHTML=function(e,t){var n,o;if(!b.selectedRange())return!1;for(t&&(e+=b.selectedHtml()+t),o=De("p",{},c),n=c.createDocumentFragment(),o.innerHTML=e;o.firstChild;)He(n,o.firstChild);b.insertNode(n)},l=function(e,t,n){var o,i=c.createDocumentFragment();if("string"==typeof e?(t&&(e+=b.selectedHtml()+t),i=et(e)):(He(i,e),t&&(He(i,b.selectedRange().extractContents()),He(i,t))),o=i.lastChild){for(;!it(o.lastChild,!0);)o=o.lastChild;if(ot(o)?o.lastChild||He(o,document.createTextNode("​")):o=i,b.removeMarkers(),He(o,a(s)),He(o,a(u)),n){var r=De("div");return He(r,i),r.innerHTML}return i}},b.insertNode=function(e,t){var n=l(e,t),o=b.selectedRange(),i=o.commonAncestorContainer;if(!n)return!1;o.deleteContents(),i&&3!==i.nodeType&&!ot(i)?We(n,i):o.insertNode(n),b.restoreRange()},b.cloneSelected=function(){var e=b.selectedRange();if(e)return e.cloneRange()},b.selectedRange=function(){var e,t,n=r.getSelection();if(n){if(n.rangeCount<=0){for(t=c.body;t.firstChild;)t=t.firstChild;(e=c.createRange()).setStartBefore(t),n.addRange(e)}return 0<n.rangeCount&&(e=n.getRangeAt(0)),e}},b.hasSelection=function(){var e=r.getSelection();return e&&0<e.rangeCount},b.selectedHtml=function(){var e,t=b.selectedRange();return t?(He(e=De("p",{},c),t.cloneContents()),e.innerHTML):""},b.parentNode=function(){var e=b.selectedRange();if(e)return e.commonAncestorContainer},b.getFirstBlockParent=function(e){var t=function(e){return it(e,!0)&&(e=e?e.parentNode:null)?t(e):e};return t(e||b.parentNode())},b.insertNodeAt=function(e,t){var n=b.selectedRange(),o=b.cloneSelected();if(!o)return!1;o.collapse(e),o.insertNode(t),b.selectRange(n)},a=function(e){b.removeMarker(e);var t=De("span",{id:e,className:"sceditor-selection sceditor-ignore",style:"display:none;line-height:0"},c);return t.innerHTML=" ",t},b.insertMarkers=function(){var e=b.selectedRange(),t=a(s);b.removeMarkers(),b.insertNodeAt(!0,t),e&&e.collapsed?t.parentNode.insertBefore(a(u),t.nextSibling):b.insertNodeAt(!1,a(u))},b.getMarker=function(e){return c.getElementById(e)},b.removeMarker=function(e){var t=b.getMarker(e);t&&Re(t)},b.removeMarkers=function(){b.removeMarker(s),b.removeMarker(u)},b.saveRange=function(){b.insertMarkers()},b.selectRange=function(e){var t,n=r.getSelection(),o=e.endContainer;if(!E&&e.collapsed&&o&&!it(o,!0)){for(t=o.lastChild;t&&je(t,".sceditor-ignore");)t=t.previousSibling;if(je(t,"br")){var i=c.createRange();i.setEndAfter(t),i.collapse(!1),b.compare(e,i)&&(e.setStartBefore(t),e.collapse(!0))}}n&&(b.clear(),n.addRange(e))},b.restoreRange=function(){var e,t=b.selectedRange(),n=b.getMarker(s),o=b.getMarker(u);if(!n||!o||!t)return!1;e=n.nextSibling===o,(t=c.createRange()).setStartBefore(n),t.setEndAfter(o),e&&t.collapse(!0),b.selectRange(t),b.removeMarkers()},b.selectOuterText=function(e,t){var n,o,i=b.cloneSelected();if(!i)return!1;i.collapse(!1),n=S(i,!0,e),o=S(i,!1,t),i.setStart(n.node,n.offset),i.setEnd(o.node,o.offset),b.selectRange(i)},b.getOuterText=function(e,t){var n=b.cloneSelected();return n?(n.collapse(!e),S(n,e,t).text):""},b.replaceKeyword=function(e,t,n,o,i,r){n||e.sort(function(e,t){return e[0].length-t[0].length});var a,l,c,s,u,d,f,p,g="(^|[\\s    ])",m=e.length,h=i?1:0,v=o||e[m-1][0].length;for(i&&v++,r=r||"",u=(a=b.getOuterText(!0,v)).length,a+=r,t&&(a+=b.getOuterText(!1,v));m--;)if(p=(f=e[m][0]).length,s=Math.max(0,u-p-h),c=-1,i?(l=a.substr(s).match(new RegExp(g+st(f)+g)))&&(c=l.index+s+l[1].length):c=a.indexOf(f,s),-1<c&&c<=u&&u<=c+p+h)return d=u-c,b.selectOuterText(d,p-d-(/^\S/.test(r)?1:0)),b.insertHTML(e[m][1]),!0;return!1},b.compare=function(e,t){return t||(t=b.selectedRange()),e&&t?0===e.compareBoundaryPoints(Range.END_TO_END,t)&&0===e.compareBoundaryPoints(Range.START_TO_START,t):!e&&!t},b.clear=function(){var e=r.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}}var bt=window,yt=document,xt=b,wt=xt&&xt<11,Ct=/^image\/(p?jpe?g|gif|png|bmp)$/i;function Et(l,e){var a,w,u,c,r,g,d,s,f,p,m,h,t,v,i,b,y,x,C,n,o,E,S,k,T,D,N,M,R,H,F,_,z,A,O,B,I,L,P,V,j,W,q,U,$,Y,K,X,Q,G,J,Z,ee,te,ne,oe,ie,re,ae,le,ce,se,ue,de=this,fe={},pe=[],ge=[],me={},he={},ve={};de.commands=Ce(!0,{},e.commands||mt);var be=de.opts=Ce(!0,{},ct,e);de.opts.emoticons=e.emoticons||ct.emoticons,N=function(){l._sceditor=de,be.locale&&"en"!==be.locale&&z(),We(w=De("div",{className:"sceditor-container"}),l),Pe(w,"z-index",be.zIndex),xt&&Ue(w,"ie ie"+xt),n=l.required,l.required=!1;var e=Et.formats[be.format];"init"in(a=e?new e:{})&&a.init.call(de),_(),L(),A(),F(),O(),B(),pt||de.toggleSourceMode(),G();var t=function(){Ae(bt,"load",t),be.autofocus&&ne(),ue(),Z(),i.call("ready"),"onReady"in a&&a.onReady.call(de)};ze(bt,"load",t),"complete"===yt.readyState&&t()},_=function(){var e=be.plugins;e=e?e.toString().split(","):[],i=new ht(de),e.forEach(function(e){i.register(e.trim())})},z=function(){var e;(t=Et.locale[be.locale])||(e=be.locale.split("-"),t=Et.locale[e[0]]),t&&t.dateFormat&&(be.dateFormat=t.dateFormat)},F=function(){s=De("textarea"),c=De("iframe",{frameborder:0,allowfullscreen:!0}),be.startInSourceMode?(Ue(w,"sourceMode"),Be(c)):(Ue(w,"wysiwygMode"),Be(s)),be.spellcheck||Oe(w,"spellcheck","false"),"https:"===bt.location.protocol&&Oe(c,"src","javascript:false"),He(w,c),He(w,s),de.dimensions(be.width||Ke(l),be.height||Xe(l));var e=xt?"ie ie"+xt:"";e+=ft?" ios":"",(d=c.contentDocument).open(),d.write(gt("html",{attrs:' class="'+e+'"',spellcheck:be.spellcheck?"":'spellcheck="false"',charset:be.charset,style:be.style})),d.close(),g=d.body,r=c.contentWindow,de.readOnly(!!be.readOnly),(ft||dt||xt)&&(Xe(g,"100%"),xt||ze(g,"touchend",de.focus));var t=Oe(l,"tabindex");Oe(s,"tabindex",t),Oe(c,"tabindex",t),v=new vt(r),Be(l),de.val(l.value);var n=be.placeholder||Oe(l,"placeholder");n&&(s.placeholder=n,Oe(g,"placeholder",n))},O=function(){be.autoUpdate&&(ze(g,"blur",se),ze(s,"blur",se)),null===be.rtl&&(be.rtl="rtl"===Pe(s,"direction")),de.rtl(!!be.rtl),be.autoExpand&&(ze(g,"load",ue,_e),ze(g,"input keyup",ue)),be.resizeEnabled&&I(),Oe(w,"id",be.id),de.emoticons(be.emoticonsEnabled)},B=function(){var e=l.form,t="compositionstart compositionend",n="keydown keyup keypress focus blur contextmenu",o="onselectionchange"in d?"selectionchange":"keyup focus blur contextmenu mouseup touchend click";ze(yt,"click",X),e&&(ze(e,"reset",U),ze(e,"submit",de.updateOriginal,_e)),ze(g,"keypress",q),ze(g,"keydown",j),ze(g,"keydown",W),ze(g,"keyup",Z),ze(g,"blur",le),ze(g,"keyup",ce),ze(g,"paste",P),ze(g,t,Y),ze(g,o,ee),ze(g,n,K),be.emoticonsCompat&&bt.getSelection&&ze(g,"keyup",ie),ze(g,"blur",function(){de.val()||Ue(g,"placeholder")}),ze(g,"focus",function(){$e(g,"placeholder")}),ze(s,"blur",le),ze(s,"keyup",ce),ze(s,"keydown",j),ze(s,t,Y),ze(s,n,K),ze(d,"mousedown",$),ze(d,o,ee),ze(d,"beforedeactivate keyup mouseup",H),ze(d,"keyup",Z),ze(d,"focus",function(){p=null}),ze(w,"selectionchanged",te),ze(w,"selectionchanged",G),ze(w,"selectionchanged valuechanged nodechanged pasteraw paste",K)},A=function(){var r,a=de.commands,l=(be.toolbarExclude||"").split(","),e=be.toolbar.split("|");u=De("div",{className:"sceditor-toolbar",unselectable:"on"}),be.icons in Et.icons&&(D=new Et.icons[be.icons]),Se(e,function(e,t){r=De("div",{className:"sceditor-group"}),Se(t.split(","),function(e,t){var n,o,i=a[t];!i||-1<l.indexOf(t)||(o=i.shortcut,n=gt("toolbarButton",{name:t,dispName:de._(i.name||i.tooltip||t)},!0).firstChild,D&&D.create&&D.create(t)&&(We(D.create(t),n.firstChild),Ue(n,"has-icon")),n._sceTxtMode=!!i.txtExec,n._sceWysiwygMode=!!i.exec,Ye(n,"disabled",!i.exec),ze(n,"click",function(e){qe(n,"disabled")||R(n,i),G(),e.preventDefault()}),ze(n,"mousedown",function(e){de.closeDropDown(),e.preventDefault()}),i.tooltip&&Oe(n,"title",de._(i.tooltip)+(o?" ("+o+")":"")),o&&de.addShortcut(o,t),i.state?ge.push({name:t,state:i.state}):ye(i.exec)&&ge.push({name:t,state:i.exec}),He(r,n),he[t]=n)}),r.firstChild&&He(u,r)}),He(be.toolbarContainer||w,u)},I=function(){var o,i,r,a,t,n,e=De("div",{className:"sceditor-grip"}),l=De("div",{className:"sceditor-resize-cover"}),c="touchmove mousemove",s="touchcancel touchend mouseup",u=0,d=0,f=0,p=0,g=0,m=0,h=Ke(w),v=Xe(w),b=!1,y=de.rtl();if(o=be.resizeMinHeight||v/1.5,i=be.resizeMaxHeight||2.5*v,r=be.resizeMinWidth||h/1.25,a=be.resizeMaxWidth||1.25*h,t=function(e){"touchmove"===e.type?(e=bt.event,f=e.changedTouches[0].pageX,p=e.changedTouches[0].pageY):(f=e.pageX,p=e.pageY);var t=m+(p-d),n=y?g-(f-u):g+(f-u);0<a&&a<n&&(n=a),0<r&&n<r&&(n=r),be.resizeWidth||(n=!1),0<i&&i<t&&(t=i),0<o&&t<o&&(t=o),be.resizeHeight||(t=!1),(n||t)&&de.dimensions(n,t),e.preventDefault()},n=function(e){b&&(b=!1,Be(l),$e(w,"resizing"),Ae(yt,c,t),Ae(yt,s,n),e.preventDefault())},D&&D.create){var x=D.create("grip");x&&(He(e,x),Ue(e,"has-icon"))}He(w,e),He(w,l),Be(l),ze(e,"touchstart mousedown",function(e){"touchstart"===e.type?(e=bt.event,u=e.touches[0].pageX,d=e.touches[0].pageY):(u=e.pageX,d=e.pageY),g=Ke(w),m=Xe(w),b=!0,Ue(w,"resizing"),Ie(l),ze(yt,c,t),ze(yt,s,n),e.preventDefault()})},L=function(){var e=be.emoticons,n=be.emoticonsRoot||"";e&&(ve=Ce({},e.more,e.dropdown,e.hidden)),Se(ve,function(e,t){ve[e]=gt("emoticon",{key:e,url:n+(t.url||t),tooltip:t.tooltip||e}),be.emoticonsEnabled&&pe.push(De("img",{src:n+(t.url||t)}))})},ne=function(){var e,t,n=g.firstChild,o=!!be.autofocusEnd;if(Ge(w)){if(de.sourceMode())return t=o?s.value.length:0,void s.setSelectionRange(t,t);if(at(g),o)for((n=g.lastChild)||(n=De("p",{},d),He(g,n));n.lastChild;)n=n.lastChild,!wt&&je(n,"br")&&n.previousSibling&&(n=n.previousSibling);e=d.createRange(),ot(n)?e.selectNodeContents(n):(e.setStartBefore(n),o&&e.setStartAfter(n)),e.collapse(!o),v.selectRange(e),x=e,o&&(g.scrollTop=g.scrollHeight),de.focus()}},de.readOnly=function(e){return"boolean"!=typeof e?!s.readonly:(g.contentEditable=!e,s.readonly=!e,Q(e),de)},de.rtl=function(e){var t=e?"rtl":"ltr";return"boolean"!=typeof e?"rtl"===Oe(s,"dir"):(Oe(g,"dir",t),Oe(s,"dir",t),$e(w,"rtl"),$e(w,"ltr"),Ue(w,t),D&&D.rtl&&D.rtl(e),de)},Q=function(n){var o=de.inSourceMode()?"_sceTxtMode":"_sceWysiwygMode";Se(he,function(e,t){Ye(t,"disabled",n||!t[o])})},de.width=function(e,t){return e||0===e?(de.dimensions(e,null,t),de):Ke(w)},de.dimensions=function(e,t,n){return t=!(!t&&0!==t)&&t,!1===(e=!(!e&&0!==e)&&e)&&!1===t?{width:de.width(),height:de.height()}:(!1!==e&&(!1!==n&&(be.width=e),Ke(w,e)),!1!==t&&(!1!==n&&(be.height=t),Xe(w,t)),de)},de.height=function(e,t){return e||0===e?(de.dimensions(null,e,t),de):Xe(w)},de.maximize=function(e){var t="sceditor-maximize";return xe(e)?qe(w,t):((e=!!e)&&(k=bt.pageYOffset),Ye(yt.documentElement,t,e),Ye(yt.body,t,e),Ye(w,t,e),de.width(e?"100%":be.width,!1),de.height(e?"100%":be.height,!1),e||bt.scrollTo(0,k),ue(),de)},ue=function(){be.autoExpand&&!S&&(S=setTimeout(de.expandToContent,200))},de.expandToContent=function(e){if(!de.maximize()){if(clearTimeout(S),S=!1,!E){var t=be.resizeMinHeight||be.height||Xe(l);E={min:t,max:be.resizeMaxHeight||2*t}}var n=yt.createRange();n.selectNodeContents(g);var o=n.getBoundingClientRect(),i=d.documentElement.clientHeight-1,r=o.bottom-o.top,a=de.height()+1+(r-i);e||-1===E.max||(a=Math.min(a,E.max)),de.height(Math.ceil(Math.max(a,E.min)))}},de.destroy=function(){if(i){i.destroy(),i=p=v=null,f&&Re(f),Ae(yt,"click",X);var e=l.form;e&&(Ae(e,"reset",U),Ae(e,"submit",de.updateOriginal)),Re(s),Re(u),Re(w),delete l._sceditor,Ie(l),l.required=n}},de.createDropDown=function(e,t,n,o){var i,r="sceditor-"+t;de.closeDropDown(!0),f&&qe(f,r)||(!1!==o&&Se(Fe(n,":not(input):not(textarea)"),function(e,t){t.nodeType===ke&&Oe(t,"unselectable","on")}),i=Ce({top:e.offsetTop,left:e.offsetLeft,marginTop:e.clientHeight},be.dropDownCss),Pe(f=De("div",{className:"sceditor-dropdown "+r}),i),He(f,n),He(w,f),ze(f,"click focusin",function(e){e.stopPropagation()}),setTimeout(function(){if(f){var e=Fe(f,"input,textarea")[0];e&&e.focus()}}))},X=function(e){3!==e.which&&f&&!e.defaultPrevented&&(se(),de.closeDropDown())},P=function(e){var t,n,o=xt||dt,i=g,r=e.clipboardData;if(r&&!o){var a={},l=r.types,c=r.items;e.preventDefault();for(var s=0;s<l.length;s++){if(bt.FileReader&&c&&Ct.test(c[s].type))return t=r.items[s].getAsFile(),n=void 0,(n=new FileReader).onload=function(e){V({html:'<img src="'+e.target.result+'" />'})},void n.readAsDataURL(t);a[l[s]]=r.getData(l[s])}a.text=a["text/plain"],a.html=a["text/html"],V(a)}else if(!T){var u=i.scrollTop;for(v.saveRange(),T=yt.createDocumentFragment();i.firstChild;)He(T,i.firstChild);setTimeout(function(){var e=i.innerHTML;i.innerHTML="",He(i,T),i.scrollTop=u,T=!1,v.restoreRange(),V({html:e})},0)}},V=function(e){var t=De("div",{},d);i.call("pasteRaw",e),Qe(w,"pasteraw",e),e.html?(t.innerHTML=e.html,rt(t)):t.innerHTML=ut(e.text||"");var n={val:t.innerHTML};"fragmentToSource"in a&&(n.val=a.fragmentToSource(n.val,d,b)),i.call("paste",n),Qe(w,"paste",n),"fragmentToHtml"in a&&(n.val=a.fragmentToHtml(n.val,b)),i.call("pasteHtml",n),de.wysiwygEditorInsertHtml(n.val,null,!0)},de.closeDropDown=function(e){f&&(Re(f),f=null),!0===e&&de.focus()},de.wysiwygEditorInsertHtml=function(e,t,n){var o,i,r,a=Xe(c);de.focus(),!n&&Me(y,"code")||(v.insertHTML(e,t),v.saveRange(),M(),Ie(o=Fe(g,"#sceditor-end-marker")[0]),i=g.scrollTop,r=lt(o).top+1.5*o.offsetHeight-a,Be(o),(i<r||r+a<i)&&(g.scrollTop=r),ae(!1),v.restoreRange(),Z())},de.wysiwygEditorInsertText=function(e,t){de.wysiwygEditorInsertHtml(ut(e),ut(t))},de.insertText=function(e,t){return de.inSourceMode()?de.sourceEditorInsertText(e,t):de.wysiwygEditorInsertText(e,t),de},de.sourceEditorInsertText=function(e,t){var n,o,i=s.selectionStart,r=s.selectionEnd;n=s.scrollTop,s.focus(),o=s.value,t&&(e+=o.substring(i,r)+t),s.value=o.substring(0,i)+e+o.substring(r,o.length),s.selectionStart=i+e.length-(t?t.length:0),s.selectionEnd=s.selectionStart,s.scrollTop=n,s.focus(),ae()},de.getRangeHelper=function(){return v},de.sourceEditorCaret=function(e){return s.focus(),e?(s.selectionStart=e.start,s.selectionEnd=e.end,this):{start:s.selectionStart,end:s.selectionEnd}},de.val=function(e,t){return ye(e)?(de.inSourceMode()?de.setSourceEditorValue(e):(!1!==t&&"toHtml"in a&&(e=a.toHtml(e)),de.setWysiwygEditorValue(e)),de):de.inSourceMode()?de.getSourceEditorValue(!1):de.getWysiwygEditorValue(t)},de.insert=function(e,t,n,o,i){if(de.inSourceMode())return de.sourceEditorInsertText(e,t),de;if(t){var r=v.selectedHtml();!1!==n&&"fragmentToSource"in a&&(r=a.fragmentToSource(r,d,b)),e+=r+t}return!1!==n&&"fragmentToHtml"in a&&(e=a.fragmentToHtml(e,b)),!1!==n&&!0===i&&(e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")),de.wysiwygEditorInsertHtml(e),de},de.getWysiwygEditorValue=function(e){for(var t,n=De("div",{},d),o=g.childNodes,i=0;i<o.length;i++)He(n,o[i].cloneNode(!0));return He(g,n),rt(n),Re(n),t=n.innerHTML,!1!==e&&a.hasOwnProperty("toSource")&&(t=a.toSource(t,d)),t},de.getBody=function(){return g},de.getContentAreaContainer=function(){return c},de.getSourceEditorValue=function(e){var t=s.value;return!1!==e&&"toHtml"in a&&(t=a.toHtml(t)),t},de.setWysiwygEditorValue=function(e){e||(e="<p>"+(xt?"":"<br />")+"</p>"),g.innerHTML=e,M(),Z(),ae(),ue()},de.setSourceEditorValue=function(e){s.value=e,ae()},de.updateOriginal=function(){l.value=de.val()},M=function(){var e,s,u,d,t,f,p;be.emoticonsEnabled&&(e=g,s=ve,u=be.emoticonsCompat,d=e.ownerDocument,t="(^|\\s| | | | |$)",f=[],p={},Ne(e,"code")||(Se(s,function(e){p[e]=new RegExp(t+st(e)+t),f.push(e)}),f.sort(function(e,t){return t.length-e.length}),function e(t){for(t=t.firstChild;t;){if(t.nodeType!==ke||je(t,"code")||e(t),t.nodeType===Te)for(var n=0;n<f.length;n++){var o=t.nodeValue,i=f[n],r=u?o.search(p[i]):o.indexOf(i);if(-1<r){var a=o.indexOf(i,r),l=et(s[i],d),c=o.substr(a+i.length);l.appendChild(d.createTextNode(c)),t.nodeValue=o.substr(0,a),t.parentNode.insertBefore(l,t.nextSibling)}}t=t.nextSibling}}(e)))},de.inSourceMode=function(){return qe(w,"sourceMode")},de.sourceMode=function(e){var t=de.inSourceMode();return"boolean"!=typeof e?t:((t&&!e||!t&&e)&&de.toggleSourceMode(),de)},de.toggleSourceMode=function(){var e=de.inSourceMode();!pt&&e||(e||(v.saveRange(),v.clear()),de.blur(),e?de.setWysiwygEditorValue(de.getSourceEditorValue()):de.setSourceEditorValue(de.getWysiwygEditorValue()),p=null,Le(s),Le(c),Ye(w,"wysiwygMode",e),Ye(w,"sourceMode",!e),Q(),G())},J=function(){return s.focus(),s.value.substring(s.selectionStart,s.selectionEnd)},R=function(e,t){de.inSourceMode()?t.txtExec&&(Array.isArray(t.txtExec)?de.sourceEditorInsertText.apply(de,t.txtExec):t.txtExec.call(de,e,J())):t.exec&&(we(t.exec)?t.exec.call(de,e):de.execCommand(t.exec,t.hasOwnProperty("execParam")?t.execParam:null))},H=function(){xt&&(p=v.selectedRange())},de.execCommand=function(e,t){var n=!1,o=de.commands[e];if(de.focus(),!Me(v.parentNode(),"code")){try{n=d.execCommand(e,!1,t)}catch(e){}!n&&o&&o.errorMessage&&alert(de._(o.errorMessage)),G()}},ee=function(){function e(){if(r.getSelection()&&r.getSelection().rangeCount<=0)x=null;else if(v&&!v.compare(x)){if((x=v.cloneSelected())&&x.collapsed){var e=x.startContainer,t=x.startOffset;for(t&&e.nodeType!==Te&&(e=e.childNodes[t]);e&&e.parentNode!==g;)e=e.parentNode;e&&it(e,!0)&&(v.saveRange(),n=d,Je(g,function(e){it(e,!0)?(o||We(o=De("p",{},n),e),e.nodeType===Te&&""===e.nodeValue||He(o,e)):o=null},!1,!0),v.restoreRange())}Qe(w,"selectionchanged")}var n,o;C=!1}C||(C=!0,"onselectionchange"in d?e():setTimeout(e,100))},te=function(){var e,t=v.parentNode();b!==t&&(e=b,b=t,y=v.getFirstBlockParent(t),Qe(w,"nodechanged",{oldNode:e,newNode:b}))},de.currentNode=function(){return b},de.currentBlockNode=function(){return y},G=function(){var e,t,n="active",o=d,i=de.sourceMode();if(de.readOnly())Se(Fe(u,n),function(e,t){$e(t,n)});else{i||(t=v.parentNode(),e=v.getFirstBlockParent(t));for(var r=0;r<ge.length;r++){var a=0,l=he[ge[r].name],c=ge[r].state,s=i&&!l._sceTxtMode||!i&&!l._sceWysiwygMode;if(ye(c)){if(!i)try{-1<(a=o.queryCommandEnabled(c)?0:-1)&&(a=o.queryCommandState(c)?1:0)}catch(e){}}else s||(a=c.call(de,t,e));Ye(l,"disabled",s||a<0),Ye(l,n,0<a)}D&&D.update&&D.update(i,t,e)}},q=function(e){if(!e.defaultPrevented&&(de.closeDropDown(),13===e.which)&&!je(y,"li,ul,ol")&&tt(y)){p=null;var t=De("br",{},d);if(v.insertNode(t),!wt){var n=t.parentNode,o=n.lastChild;o&&o.nodeType===Te&&""===o.nodeValue&&(Re(o),o=n.lastChild),!it(n,!0)&&o===t&&it(t.previousSibling)&&v.insertHTML("<br>")}e.preventDefault()}},Z=function(){Ze(g,function(e){if(e.nodeType===ke&&!/inline/.test(Pe(e,"display"))&&!je(e,".sceditor-nlf")&&tt(e)){var t=De("p",{},d);return t.className="sceditor-nlf",t.innerHTML=wt?"":"<br />",He(g,t),!1}if(3===e.nodeType&&!/^\s*$/.test(e.nodeValue)||je(e,"br"))return!1})},U=function(){de.val(l.value)},$=function(){de.closeDropDown(),p=null},de._=function(){var n=arguments;return t&&t[n[0]]&&(n[0]=t[n[0]]),n[0].replace(/\{(\d+)\}/g,function(e,t){return void 0!==n[t-0+1]?n[t-0+1]:"{"+t+"}"})},K=function(t){i&&i.call(t.type+"Event",t,de);var e=(t.target===s?"scesrc":"scewys")+t.type;fe[e]&&fe[e].forEach(function(e){e.call(de,t)})},de.bind=function(e,t,n,o){for(var i=(e=e.split(" ")).length;i--;)if(we(t)){var r="scewys"+e[i],a="scesrc"+e[i];n||(fe[r]=fe[r]||[],fe[r].push(t)),o||(fe[a]=fe[a]||[],fe[a].push(t)),"valuechanged"===e[i]&&(ae.hasHandler=!0)}return de},de.unbind=function(e,t,n,o){for(var i=(e=e.split(" ")).length;i--;)we(t)&&(n||Ee(fe["scewys"+e[i]]||[],t),o||Ee(fe["scesrc"+e[i]]||[],t));return de},de.blur=function(e,t,n){return we(e)?de.bind("blur",e,t,n):de.sourceMode()?s.blur():g.blur(),de},de.focus=function(e,t,n){if(we(e))de.bind("focus",e,t,n);else if(de.inSourceMode())s.focus();else{if(Fe(d,":focus").length)return;var o,i=v.selectedRange();x||ne(),!wt&&i&&1===i.endOffset&&i.collapsed&&(o=i.endContainer)&&1===o.childNodes.length&&je(o.firstChild,"br")&&(i.setStartBefore(o.firstChild),i.collapse(!0),v.selectRange(i)),r.focus(),g.focus(),p&&(v.selectRange(p),p=null)}return G(),de},de.keyDown=function(e,t,n){return de.bind("keydown",e,t,n)},de.keyPress=function(e,t,n){return de.bind("keypress",e,t,n)},de.keyUp=function(e,t,n){return de.bind("keyup",e,t,n)},de.nodeChanged=function(e){return de.bind("nodechanged",e,!1,!0)},de.selectionChanged=function(e){return de.bind("selectionchanged",e,!1,!0)},de.valueChanged=function(e,t,n){return de.bind("valuechanged",e,t,n)},oe=function(e){var n=0,o=de.emoticonsCache,t=String.fromCharCode(e.which);Me(y,"code")||(o||(o=[],Se(ve,function(e,t){o[n++]=[e,t]}),o.sort(function(e,t){return e[0].length-t[0].length}),de.emoticonsCache=o,de.longestEmoticonCode=o[o.length-1][0].length),v.replaceKeyword(de.emoticonsCache,!0,!0,de.longestEmoticonCode,be.emoticonsCompat,t)&&(be.emoticonsCompat&&/^\s$/.test(t)||e.preventDefault()))},ie=function(){!function(e,t){var n=/[^\s\xA0\u2002\u2003\u2009\u00a0]+/,o=e&&Fe(e,"img[data-sceditor-emoticon]");if(e&&o.length)for(var i=0;i<o.length;i++){var r=o[i],a=r.parentNode,l=r.previousSibling,c=r.nextSibling;if(l&&n.test(l.nodeValue.slice(-1))||c&&n.test((c.nodeValue||"")[0])){var s=t.cloneSelected(),u=-1,d=s.startContainer,f=l.nodeValue;null===f&&(f=l.innerText||""),f+=Ve(r,"sceditor-emoticon"),d===c&&(u=f.length+s.startOffset),d===e&&e.childNodes[s.startOffset]===c&&(u=f.length),d===l&&(u=s.startOffset),c&&c.nodeType===Te||(c=a.insertBefore(a.ownerDocument.createTextNode(""),c)),c.insertData(0,f),Re(l),Re(r),-1<u&&(s.setStart(c,u),s.collapse(!0),t.selectRange(s))}}}(y,v)},de.emoticons=function(e){return e||!1===e?((be.emoticonsEnabled=e)?(ze(g,"keypress",oe),de.sourceMode()||(v.saveRange(),M(),ae(!1),v.restoreRange())):(Se(Fe(g,"img[data-sceditor-emoticon]"),function(e,t){var n=Ve(t,"sceditor-emoticon"),o=d.createTextNode(n);t.parentNode.replaceChild(o,t)}),Ae(g,"keypress",oe),ae()),de):be.emoticonsEnabled},de.css=function(e){return o||(o=De("style",{id:"inline"},d),He(d.head,o)),ye(e)?(o.styleSheet?o.styleSheet.cssText=e:o.innerHTML=e,de):o.styleSheet?o.styleSheet.cssText:o.innerHTML},j=function(e){var t=[],n={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},o={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},i=e.which,r={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[i]||String.fromCharCode(i).toLowerCase();(e.ctrlKey||e.metaKey)&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&(t.push("shift"),o[i]?r=o[i]:n[r]&&(r=n[r])),r&&(i<16||18<i)&&t.push(r),t=t.join("+"),me[t]&&!1===me[t].call(de)&&(e.stopPropagation(),e.preventDefault())},de.addShortcut=function(e,t){return e=e.toLowerCase(),ye(t)?me[e]=function(){return R(he[t],de.commands[t]),!1}:me[e]=t,de},de.removeShortcut=function(e){return delete me[e.toLowerCase()],de},W=function(e){var t,n,o;if(!be.disableBlockRemove&&8===e.which&&(n=v.selectedRange())&&(t=n.startContainer,0===n.startOffset&&(o=re())&&!je(o,"body"))){for(;t!==o;){for(;t.previousSibling;)if((t=t.previousSibling).nodeType!==Te||t.nodeValue)return;if(!(t=t.parentNode))return}de.clearBlockFormatting(o),e.preventDefault()}},re=function(){for(var e=y;!tt(e)||it(e,!0);)if(!(e=e.parentNode)||je(e,"body"))return;return e},de.clearBlockFormatting=function(e){return!(e=e||re())||je(e,"body")||(v.saveRange(),e.className="",p=null,Oe(e,"style",""),je(e,"p,div,td")||nt(e,"p"),v.restoreRange()),de},ae=function(e){if(i&&(i.hasHandler("valuechangedEvent")||ae.hasHandler)){var t,n=de.sourceMode(),o=!n&&v.hasSelection();e=(m=!1)!==e&&!d.getElementById("sceditor-start-marker"),h&&(clearTimeout(h),h=!1),o&&e&&v.saveRange(),(t=n?s.value:g.innerHTML)!==ae.lastVal&&(ae.lastVal=t,Qe(w,"valuechanged",{rawValue:n?de.val():t})),o&&e&&v.removeMarkers()}},le=function(){h&&ae()},ce=function(e){var t=e.which,n=ce.lastChar,o=13===n||32===n,i=8===n||46===n;ce.lastChar=t,m||(13===t||32===t?o?ce.triggerNext=!0:ae():8===t||46===t?i?ce.triggerNext=!0:ae():ce.triggerNext&&(ae(),ce.triggerNext=!1),clearTimeout(h),h=setTimeout(function(){m||ae()},1500))},Y=function(e){(m=/start/i.test(e.type))||ae()},se=function(){de.updateOriginal()},N()}Et.locale={},Et.formats={},Et.icons={},Et.command={get:function(e){return mt[e]||null},set:function(e,t){return!(!e||!t)&&((t=Ce(mt[e]||{},t)).remove=function(){Et.command.remove(e)},mt[e]=t,this)},remove:function(e){return mt[e]&&delete mt[e],this}},window.sceditor={command:Et.command,commands:mt,defaultOptions:ct,ie:b,ios:ft,isWysiwygSupported:pt,regexEscape:st,escapeEntities:ut,escapeUriScheme:function(e){var t,n=window.location;return e&&/^[^\/]*:/i.test(e)&&!g.test(e)?((t=n.pathname.split("/")).pop(),n.protocol+"//"+n.host+t.join("/")+"/"+e):e},dom:{css:Pe,attr:Oe,removeAttr:l,is:je,closest:Me,width:Ke,height:Xe,traverse:Je,rTraverse:Ze,parseHTML:et,hasStyling:tt,convertElement:nt,blockLevelList:s,canHaveChildren:ot,isInline:it,copyCSS:u,fixNesting:rt,findCommonAncestor:function(e,t){for(;e=e.parentNode;)if((n=e)!==(o=t)&&n.contains&&n.contains(o))return e;var n,o},getSibling:d,removeWhiteSpace:at,extractContents:f,getOffset:lt,getStyle:p,hasStyle:function(e,t,n){var o=p(e,t);return!!o&&(!n||o===n||Array.isArray(n)&&-1<n.indexOf(o))}},locale:Et.locale,icons:Et.icons,utils:{each:Se,isEmptyObject:t,extend:Ce},plugins:ht.plugins,formats:Et.formats,create:function(e,t){t=t||{},Ne(e,".sceditor-container")||(t.runWithoutWysiwygSupport||pt)&&new Et(e,t)},instance:function(e){return e._sceditor}},o.sceditor=window.sceditor,o.fn.sceditor=function(e){var t,n=[];return this.each(function(){t=this._sceditor,"state"===e?n.push(!!t):"instance"===e?n.push(t):t||o.sceditor.create(this,e)}),n.length?1===n.length?n[0]:n:this}}(jQuery),function(w){"use strict";var e=w.ie,C=e&&e<11,E=w.dom,t=w.utils,S=E.css,n=E.attr,k=E.is,T=E.removeAttr,o=E.convertElement,r=t.extend,a=t.each,D=t.isEmptyObject,l=w.command.get,c={bold:{txtExec:["<strong>","</strong>"]},italic:{txtExec:["<em>","</em>"]},underline:{txtExec:['<span style="text-decoration:underline;">',"</span>"]},strike:{txtExec:['<span style="text-decoration:line-through;">',"</span>"]},subscript:{txtExec:["<sub>","</sub>"]},superscript:{txtExec:["<sup>","</sup>"]},left:{txtExec:['<div style="text-align:left;">',"</div>"]},center:{txtExec:['<div style="text-align:center;">',"</div>"]},right:{txtExec:['<div style="text-align:right;">',"</div>"]},justify:{txtExec:['<div style="text-align:justify;">',"</div>"]},font:{txtExec:function(e){var t=this;l("font")._dropDown(t,e,function(e){t.insertText('<span style="font-family:'+e+';">',"</span>")})}},size:{txtExec:function(e){var t=this;l("size")._dropDown(t,e,function(e){t.insertText('<span style="font-size:'+e+';">',"</span>")})}},color:{txtExec:function(e){var t=this;l("color")._dropDown(t,e,function(e){t.insertText('<span style="color:'+e+';">',"</span>")})}},bulletlist:{txtExec:["<ul><li>","</li></ul>"]},orderedlist:{txtExec:["<ol><li>","</li></ol>"]},table:{txtExec:["<table><tr><td>","</td></tr></table>"]},horizontalrule:{txtExec:["<hr />"]},code:{txtExec:["<code>","</code>"]},image:{txtExec:function(e,t){var i=this;l("image")._dropDown(i,e,t,function(e,t,n){var o="";t&&(o+=' width="'+t+'"'),n&&(o+=' height="'+n+'"'),i.insertText("<img"+o+' src="'+e+'" />')})}},email:{txtExec:function(e,n){var o=this;l("email")._dropDown(o,e,function(e,t){o.insertText('<a href="mailto:'+e+'">'+(t||n||e)+"</a>")})}},link:{txtExec:function(e,n){var o=this;l("link")._dropDown(o,e,function(e,t){o.insertText('<a href="'+e+'">'+(t||n||e)+"</a>")})}},quote:{txtExec:["<blockquote>","</blockquote>"]},youtube:{txtExec:function(e){var n=this;l("youtube")._dropDown(n,e,function(e,t){n.insertText('<iframe width="560" height="315" src="https://www.youtube.com/embed/{id}?wmode=opaque&start='+t+'" data-youtube-id="'+e+'" frameborder="0" allowfullscreen></iframe>')})}},rtl:{txtExec:['<div stlye="direction:rtl;">',"</div>"]},ltr:{txtExec:['<div stlye="direction:ltr;">',"</div>"]}};function N(){var i=this,n={},b={};function e(e,t,n){var o,i,m,r,a,l,c,s,u,d,f,p,g,h,v=n.createElement("div");return v.innerHTML=t,S(v,"visibility","hidden"),n.body.appendChild(v),i=v,E.traverse(i,function(e){var t=e.nodeName.toLowerCase();y("*",e),y(t,e)},!0),m=v,E.traverse(m,function(e){var t,n=e.nodeName.toLowerCase(),o=e.parentNode,i=e.nodeType,r=!E.isInline(e),a=e.previousSibling,l=e.nextSibling,c=o===m,s=!a&&!l,u="iframe"!==n&&function e(t,n){var o,i=t.childNodes,r=t.nodeName.toLowerCase(),a=t.nodeValue,l=i.length,c=N.allowedEmptyTags||[];if(n&&"br"===r)return!0;if(k(t,".sceditor-ignore"))return!0;if(-1<c.indexOf(r)||"td"===r||!E.canHaveChildren(t))return!1;if(a&&/\S|\u00A0/.test(a))return!1;for(;l--;)if(!e(i[l],n&&!t.previousSibling&&!t.nextSibling))return!1;return!t.getBoundingClientRect||!t.className&&!t.hasAttributes("style")||(!(o=t.getBoundingClientRect()).width||!o.height)}(e,c&&s&&"br"!==n),d=e.ownerDocument,f=N.allowedTags,p=e.firstChild,g=N.disallowedTags;if(3!==i&&(4===i?n="!cdata":"!"!==n&&8!==i||(n="!comment"),1===i&&k(e,".sceditor-nlf")&&(!p||!C&&1===e.childNodes.length&&/br/i.test(p.nodeName)?u=!0:(e.classList.remove("sceditor-nlf"),e.className||T(e,"class"))),u?t=!0:f&&f.length?t=f.indexOf(n)<0:g&&g.length&&(t=-1<g.indexOf(n)),t)){if(!u){for(r&&a&&E.isInline(a)&&o.insertBefore(d.createTextNode(" "),e);e.firstChild;)o.insertBefore(e.firstChild,l);r&&l&&E.isInline(l)&&o.insertBefore(d.createTextNode(" "),l)}o.removeChild(e)}},!0),r=v,p=(f=N.allowedAttribs)&&!D(f),h=(g=N.disallowedAttribs)&&!D(g),b={},E.traverse(r,function(e){if(e.attributes&&(a=e.nodeName.toLowerCase(),s=e.attributes.length))for(b[a]||(b[a]=p?x(f["*"],f[a]):x(g["*"],g[a]));s--;)l=e.attributes[s],c=l.name,u=b[a][c],d=!1,p?d=null!==u&&(!Array.isArray(u)||u.indexOf(l.value)<0):h&&(d=null===u||Array.isArray(u)&&-1<u.indexOf(l.value)),d&&e.removeAttribute(c)}),e||function(e){var t;E.removeWhiteSpace(e);var n,o=e.firstChild;for(;o;)n=o.nextSibling,E.isInline(o)&&!k(o,".sceditor-ignore")?(t||(t=e.ownerDocument.createElement("p"),o.parentNode.insertBefore(t,o)),t.appendChild(o)):t=null,o=n}(v),o=(new w.XHTMLSerializer).serialize(v,!0),n.body.removeChild(v),o}function y(e,o){n[e]&&n[e].forEach(function(n){n.tags[e]?a(n.tags[e],function(e,t){o.getAttributeNode&&(!(e=o.getAttributeNode(e))||t&&t.indexOf(e.value)<0||n.conv.call(i,o))}):n.conv&&n.conv.call(i,o)})}function x(e,t){var n={};return e&&r(n,e),t&&a(t,function(e,t){Array.isArray(t)?n[e]=(n[e]||[]).concat(t):n[e]||(n[e]=null)}),n}i.init=function(){D(N.converters||{})||a(N.converters,function(e,t){a(t.tags,function(e){n[e]||(n[e]=[]),n[e].push(t)})}),this.commands=r(!0,{},c,this.commands)},i.toSource=e.bind(null,!1),i.fragmentToSource=e.bind(null,!0)}w.XHTMLSerializer=function(){var o={indentStr:"\t"},i=[],d=0;function f(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"," ":"&nbsp;"};return e?e.replace(/[&<>"\xa0]/g,function(e){return t[e]||e}):""}function p(e,t){switch(e.nodeType){case 1:"!"===e.nodeName.toLowerCase()?n(e):function(e,t){var n,o,i,r=e.nodeName.toLowerCase(),a="iframe"===r,l=e.attributes.length,c=e.firstChild,s=t||/pre(?:\-wrap)?$/i.test(S(e,"whiteSpace")),u=!e.firstChild&&!E.canHaveChildren(e)&&!a;if(k(e,".sceditor-ignore"))return;g("<"+r,!t&&m(e));for(;l--;)o=e.attributes[l],i=o.value,g(" "+o.name.toLowerCase()+'="'+f(i)+'"',!1);g(u?" />":">",!1),a||(n=c);for(;n;)d++,p(n,s),n=n.nextSibling,d--;u||g("</"+r+">",!s&&!a&&m(e)&&c&&m(c))}(e,t);break;case 3:!function(e,t){var n=e.nodeValue;t||(n=n.replace(/[\r\n]/," ").replace(/[^\S|\u00A0]+/g," "));n&&g(f(n),!t&&m(e))}(e,t);break;case 4:g("<![CDATA["+f(e.nodeValue)+"]]>");break;case 8:n(e);break;case 9:case 11:!function(e){var t=e.firstChild;for(;t;)p(t),t=t.nextSibling}(e)}}function n(e){g("\x3c!-- "+f(e.nodeValue)+" --\x3e")}function g(e,t){var n=d;if(!1!==t)for(i.length&&i.push("\n");n--;)i.push(o.indentStr);i.push(e)}function m(e){var t=e.previousSibling;return 1!==e.nodeType&&t?!E.isInline(t):!t&&!E.isInline(e.parentNode)||!E.isInline(e)}this.serialize=function(e,t){if(i=[],t)for(e=e.firstChild;e;)p(e),e=e.nextSibling;else p(e);return i.join("")}},N.converters=[{tags:{"*":{width:null}},conv:function(e){S(e,"width",n(e,"width")),T(e,"width")}},{tags:{"*":{height:null}},conv:function(e){S(e,"height",n(e,"height")),T(e,"height")}},{tags:{li:{value:null}},conv:function(e){T(e,"value")}},{tags:{"*":{text:null}},conv:function(e){S(e,"color",n(e,"text")),T(e,"text")}},{tags:{"*":{color:null}},conv:function(e){S(e,"color",n(e,"color")),T(e,"color")}},{tags:{"*":{face:null}},conv:function(e){S(e,"fontFamily",n(e,"face")),T(e,"face")}},{tags:{"*":{align:null}},conv:function(e){S(e,"textAlign",n(e,"align")),T(e,"align")}},{tags:{"*":{border:null}},conv:function(e){S(e,"borderWidth",n(e,"border")),T(e,"border")}},{tags:{applet:{name:null},img:{name:null},layer:{name:null},map:{name:null},object:{name:null},param:{name:null}},conv:function(e){n(e,"id")||n(e,"id",n(e,"name")),T(e,"name")}},{tags:{"*":{vspace:null}},conv:function(e){S(e,"marginTop",n(e,"vspace")-0),S(e,"marginBottom",n(e,"vspace")-0),T(e,"vspace")}},{tags:{"*":{hspace:null}},conv:function(e){S(e,"marginLeft",n(e,"hspace")-0),S(e,"marginRight",n(e,"hspace")-0),T(e,"hspace")}},{tags:{hr:{noshade:null}},conv:function(e){S(e,"borderStyle","solid"),T(e,"noshade")}},{tags:{"*":{nowrap:null}},conv:function(e){S(e,"whiteSpace","nowrap"),T(e,"nowrap")}},{tags:{big:null},conv:function(e){S(o(e,"span"),"fontSize","larger")}},{tags:{small:null},conv:function(e){S(o(e,"span"),"fontSize","smaller")}},{tags:{b:null},conv:function(e){o(e,"strong")}},{tags:{u:null},conv:function(e){S(o(e,"span"),"textDecoration","underline")}},{tags:{s:null,strike:null},conv:function(e){S(o(e,"span"),"textDecoration","line-through")}},{tags:{dir:null},conv:function(e){o(e,"ul")}},{tags:{center:null},conv:function(e){S(o(e,"div"),"textAlign","center")}},{tags:{font:{size:null}},conv:function(e){S(e,"fontSize",S(e,"fontSize")),T(e,"size")}},{tags:{font:null},conv:function(e){o(e,"span")}},{tags:{"*":{type:["_moz"]}},conv:function(e){T(e,"type")}},{tags:{"*":{_moz_dirty:null}},conv:function(e){T(e,"_moz_dirty")}},{tags:{"*":{_moz_editor_bogus_node:null}},conv:function(e){e.parentNode.removeChild(e)}}],N.allowedAttribs={},N.disallowedAttribs={},N.allowedTags=[],N.disallowedTags=[],N.allowedEmptyTags=[],w.formats.xhtml=N}(sceditor);

!function(){"use strict";var o=(A=jQuery)&&"object"==typeof A&&"default"in A?A:{default:A};function e(e,t){return typeof t===e}var ye=e.bind(null,"string"),be=e.bind(null,"undefined"),xe=e.bind(null,"function"),r=e.bind(null,"number");function t(e){return!Object.keys(e).length}function we(e,t){var n=e===!!e,o=n?2:1,r=n?t:e,i=n&&e;function a(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}for(;o<arguments.length;o++){var l,s=arguments[o];for(l in s){var c,u,d=r[l],f=s[l];be(f)||"__proto__"!==l&&"constructor"!==l&&(u=a(f),c=Array.isArray(f),i&&(u||c)?(u=a(d)===u&&Array.isArray(d)===c,r[l]=we(!0,u?d:c?[]:{},f)):r[l]=f)}}return r}function Te(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function Ce(t,n){if(Array.isArray(t)||"length"in t&&r(t.length))for(var e=0;e<t.length;e++)n(e,t[e]);else Object.keys(t).forEach(function(e){n(e,t[e])})}var i={},Se=1,ke=3,l=8;function a(e){return e=parseFloat(e),isFinite(e)?e:0}function Ee(e,t,n){var o=(n||document).createElement(e);return Ce(t||{},function(e,t){"style"===e?o.style.cssText=t:e in o?o[e]=t:o.setAttribute(e,t)}),o}function De(e,t){for(var n=e||{};(n=n.parentNode)&&!/(9|11)/.test(n.nodeType);)if(!t||Ue(n,t))return n}function Ne(e,t){return Ue(e,t)?e:De(e,t)}function Ae(e){e.parentNode&&e.parentNode.removeChild(e)}function Me(e,t){e.appendChild(t)}function Re(e,t){return e.querySelectorAll(t)}var _e=!0;function Oe(n,e,o,r,i){e.split(" ").forEach(function(e){var t;ye(o)?(t=r["_sce-event-"+e+o]||function(e){for(var t=e.target;t&&t!==n;){if(Ue(t,o))return void r.call(t,e);t=t.parentNode}},r["_sce-event-"+e+o]=t):(t=o,i=r),n.addEventListener(e,t,i||!1)})}function Fe(n,e,o,r,i){e.split(" ").forEach(function(e){var t;ye(o)?t=r["_sce-event-"+e+o]:(t=o,i=r),n.removeEventListener(e,t,i||!1)})}function ze(e,t,n){if(arguments.length<3)return e.getAttribute(t);null==n?He(e,t):e.setAttribute(t,n)}function He(e,t){e.removeAttribute(t)}function Le(e){Pe(e,"display","none")}function Ie(e){Pe(e,"display","")}function Be(e){(Ze(e)?Le:Ie)(e)}function Pe(n,e,t){if(arguments.length<3){if(ye(e))return 1===n.nodeType?getComputedStyle(n)[e]:null;Ce(e,function(e,t){Pe(n,e,t)})}else{var o=(t||0===t)&&!isNaN(t);n.style[e]=o?t+"px":t}}function je(e,t,n){var o=arguments.length,r={};if(e.nodeType===Se)return 1===o?(Ce(e.attributes,function(e,t){/^data\-/i.test(t.name)&&(r[t.name.substr(5)]=t.value)}),r):2===o?ze(e,"data-"+t):void ze(e,"data-"+t,String(n))}function Ue(e,t){var n=!1;return e&&e.nodeType===Se?(e.matches||e.msMatchesSelector||e.webkitMatchesSelector).call(e,t):n}function We(e,t){return t.parentNode.insertBefore(e,t)}function s(e){return e.className.trim().split(/\s+/)}function Ve(e,t){return Ue(e,"."+t)}function qe(e,t){var n=s(e);n.indexOf(t)<0&&n.push(t),e.className=n.join(" ")}function Ge(e,t){var n=s(e);Te(n,t),e.className=n.join(" ")}function $e(e,t,n){((n=be(n)?!Ve(e,t):n)?qe:Ge)(e,t)}function Ye(e,t){if(be(t)){var n=a((o=getComputedStyle(e)).paddingLeft)+a(o.paddingRight),o=a(o.borderLeftWidth)+a(o.borderRightWidth);return e.offsetWidth-n-o}Pe(e,"width",t)}function Ke(e,t){if(be(t)){var n=a((o=getComputedStyle(e)).paddingTop)+a(o.paddingBottom),o=a(o.borderTopWidth)+a(o.borderBottomWidth);return e.offsetHeight-n-o}Pe(e,"height",t)}function Xe(e,t,n){var o;xe(window.CustomEvent)?o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}):(o=e.ownerDocument.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function Ze(e){return e.getClientRects().length}function Qe(e,t,n,o,r){for(e=r?e.lastChild:e.firstChild;e;){var i=r?e.previousSibling:e.nextSibling;if(!n&&!1===t(e)||!o&&!1===Qe(e,t,n,o,r)||n&&!1===t(e))return!1;e=i}}function Je(e,t,n,o){Qe(e,t,n,o,!0)}function et(e,t){var n=(t=t||document).createDocumentFragment(),o=Ee("div",{},t);for(o.innerHTML=e;o.firstChild;)Me(n,o.firstChild);return n}function tt(e){return e&&(!Ue(e,"p,div")||e.className||ze(e,"style")||!t(je(e)))}function nt(e,t){var n=Ee(t,{},e.ownerDocument);for(Ce(e.attributes,function(e,t){try{ze(n,t.name,t.value)}catch(e){}});e.firstChild;)Me(n,e.firstChild);return e.parentNode.replaceChild(n,e),n}var c="|body|hr|p|div|h1|h2|h3|h4|h5|h6|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|blockquote|center|details|section|article|aside|nav|main|header|hgroup|footer|fieldset|dl|dt|dd|figure|figcaption|";function ot(e){return!!/11?|9/.test(e.nodeType)&&"|iframe|area|base|basefont|br|col|frame|hr|img|input|wbr|isindex|link|meta|param|command|embed|keygen|source|track|object|".indexOf("|"+e.nodeName.toLowerCase()+"|")<0}function rt(e,t){var n=(e||{}).nodeType||ke;return n!==Se?n===ke:"code"===(e=e.tagName.toLowerCase())?!t:c.indexOf("|"+e+"|")<0}function d(e){return e.lastChild&&d(e.lastChild)&&Ae(e.lastChild),3===e.nodeType?!e.nodeValue:ot(e)&&!e.childNodes.length}function it(e){Qe(e,function(e){var t=!rt(e,!0)&&e.nodeType!==l,n=e.parentNode;if(t&&(rt(n,!0)||"P"===n.tagName)){for(var o=e;rt(o.parentNode,!0)||"P"===o.parentNode.tagName;)o=o.parentNode;for(var r=f(o,e),i=e;n&&rt(n,!0);){if(n.nodeType===Se){for(var a=n.cloneNode();i.firstChild;)Me(a,i.firstChild);Me(i,a)}n=n.parentNode}We(i,o),d(r)||We(r,i),d(o)&&Ae(o)}t&&Ue(e,"ul,ol")&&Ue(e.parentNode,"ul,ol")&&(r="li",t=(t=e).previousElementSibling,(t=r&&t&&!Ue(t,r)?null:t)||We(t=Ee("li"),e),Me(t,e))})}function u(e,t){return e?(t?e.previousSibling:e.nextSibling)||u(e.parentNode,t):null}function at(e){var t,n,o,r,i,a,l=Pe(e,"whiteSpace"),s=/line$/i.test(l),c=e.firstChild;if(!/pre(\-wrap)?$/i.test(l))for(;c;){if(i=c.nextSibling,t=c.nodeValue,(a=c.nodeType)===Se&&c.firstChild&&at(c),a===ke){for(n=u(c),o=u(c,!0),a=!1;Ve(o,"sceditor-ignore");)o=u(o,!0);if(rt(c)&&o){for(r=o;r.lastChild;)for(r=r.lastChild;Ve(r,"sceditor-ignore");)r=u(r,!0);a=r.nodeType===ke?/[\t\n\r ]$/.test(r.nodeValue):!rt(r)}t=t.replace(/\u200B/g,""),o&&rt(o)&&!a||(t=t.replace(s?/^[\t ]+/:/^[\t\n\r ]+/,"")),(t=n&&rt(n)?t:t.replace(s?/[\t ]+$/:/[\t\n\r ]+$/,"")).length?c.nodeValue=t.replace(s?/[\t ]+/g:/[\t\n\r ]+/g," "):Ae(c)}c=i}}function f(e,t){var n=e.ownerDocument.createRange();return n.setStartBefore(e),n.setEndAfter(t),n.extractContents()}function lt(e){for(var t=0,n=0;e;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:t,top:n}}function p(e,t){var n=e.style;return i[t]||(i[t]=t.replace(/^-ms-/,"ms-").replace(/-(\w)/g,function(e,t){return t.toUpperCase()})),n=n[t=i[t]],"textAlign"===t&&(n=n||Pe(e,t),Pe(e.parentNode,t)===n||"block"!==Pe(e,"display")||Ue(e,"hr,th"))?"":n}function st(e,t){var n=e.attributes.length;if(n===t.attributes.length){for(;n--;){var o=e.attributes[n];if("style"===o.name?!function(e,t){var n=e.style.length;if(n===t.style.length){for(;n--;){var o=e.style[n];if(e.style[o]!==t.style[o])return}return 1}}(e,t):o.value!==ze(t,o.name))return}return 1}}function ct(e){for(;e.firstChild;)We(e.firstChild,e);Ae(e)}var ut={toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:"#000000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|#444444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|#666666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|#888888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|#aaaaaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|#cccccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|#eeeeee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|#ffffff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef",locale:ze(document.documentElement,"lang")||"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,startInSourceMode:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,allowedIframeUrls:[],parserOptions:{},dropDownCss:{}},m=/^(https?|s?ftp|mailto|spotify|skype|ssh|teamspeak|tel):|(\/\/)|data:image\/(png|bmp|gif|p?jpe?g);/i;function dt(e){return e.replace(/([\-.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function ft(e,t){if(!e)return e;var n={"&":"&amp;","<":"&lt;",">":"&gt;","  ":"&nbsp; ","\r\n":"<br />","\r":"<br />","\n":"<br />"};return!1!==t&&(n['"']="&#34;",n["'"]="&#39;",n["`"]="&#96;"),e.replace(/ {2}|\r\n|[&<>\r\n'"`]/g,function(e){return n[e]||e})}var g={html:'<!DOCTYPE html><html{attrs}><head><meta http-equiv="Content-Type" content="text/html;charset={charset}" /><link rel="stylesheet" type="text/css" href="{style}" /></head><body contenteditable="true" {spellcheck}><p></p></body></html>',toolbarButton:'<a class="sceditor-button sceditor-button-{name}" data-sceditor-command="{name}" unselectable="on"><div unselectable="on">{dispName}</div></a>',emoticon:'<img src="{url}" data-sceditor-emoticon="{key}" alt="{key}" title="{tooltip}" />',fontOpt:'<a class="sceditor-font-option" href="#" data-font="{font}"><font face="{font}">{font}</font></a>',sizeOpt:'<a class="sceditor-fontsize-option" data-size="{size}" href="#"><font size="{size}">{size}</font></a>',pastetext:'<div><label for="txt">{label}</label> <textarea cols="20" rows="7" id="txt"></textarea></div><div><input type="button" class="button" value="{insert}" /></div>',table:'<div><label for="rows">{rows}</label><input type="text" id="rows" value="2" /></div><div><label for="cols">{cols}</label><input type="text" id="cols" value="2" /></div><div><input type="button" class="button" value="{insert}" /></div>',image:'<div><label for="image">{url}</label> <input type="text" id="image" dir="ltr" placeholder="https://" /></div><div><label for="width">{width}</label> <input type="text" id="width" size="2" dir="ltr" /></div><div><label for="height">{height}</label> <input type="text" id="height" size="2" dir="ltr" /></div><div><input type="button" class="button" value="{insert}" /></div>',email:'<div><label for="email">{label}</label> <input type="text" id="email" dir="ltr" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{insert}" /></div>',link:'<div><label for="link">{url}</label> <input type="text" id="link" dir="ltr" placeholder="https://" /></div><div><label for="des">{desc}</label> <input type="text" id="des" /></div><div><input type="button" class="button" value="{ins}" /></div>',youtubeMenu:'<div><label for="link">{label}</label> <input type="text" id="link" dir="ltr" placeholder="https://" /></div><div><input type="button" class="button" value="{insert}" /></div>',youtube:'<iframe width="560" height="315" frameborder="0" allowfullscreen src="https://www.youtube-nocookie.com/embed/{id}?wmode=opaque&start={time}" data-youtube-id="{id}"></iframe>'};function pt(e,t,n){var o=g[e];return Object.keys(t).forEach(function(e){o=o.replace(new RegExp(dt("{"+e+"}"),"g"),t[e])}),o=n?et(o):o}function n(e){if("mozHidden"in document)for(var t,n=e.getBody();n;){if((t=n).firstChild)t=t.firstChild;else{for(;t&&!t.nextSibling;)t=t.parentNode;t=t&&t.nextSibling}3===n.nodeType&&/[\n\r\t]+/.test(n.nodeValue)&&(/^pre/.test(Pe(n.parentNode,"whiteSpace"))||Ae(n)),n=t}}var mt={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{state:function(e){if(e=e&&3===e.nodeType?e.parentNode:e){var t="ltr"===Pe(e,"direction"),e=Pe(e,"textAlign");return/left/.test(e)||e===(t?"start":"end")}},exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{state:function(e){if(e=e&&3===e.nodeType?e.parentNode:e){var t="ltr"===Pe(e,"direction"),e=Pe(e,"textAlign");return/right/.test(e)||e===(t?"end":"start")}},exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(t,e,n){var o=Ee("div");Oe(o,"click","a",function(e){n(je(this,"font")),t.closeDropDown(!0),e.preventDefault()}),t.opts.fonts.split(",").forEach(function(e){Me(o,pt("fontOpt",{font:e},!0))}),t.createDropDown(e,"font-picker",o)},exec:function(e){var t=this;mt.font._dropDown(t,e,function(e){t.execCommand("fontname",e)})},tooltip:"Font Name"},size:{_dropDown:function(t,e,n){var o=Ee("div");Oe(o,"click","a",function(e){n(je(this,"size")),t.closeDropDown(!0),e.preventDefault()});for(var r=1;r<=7;r++)Me(o,pt("sizeOpt",{size:r},!0));t.createDropDown(e,"fontsize-picker",o)},exec:function(e){var t=this;mt.size._dropDown(t,e,function(e){t.execCommand("fontsize",e)})},tooltip:"Font Size"},color:{_dropDown:function(t,e,n){var o=Ee("div"),r="",i=mt.color;i._htmlCache||(t.opts.colors.split("|").forEach(function(e){r+='<div class="sceditor-color-column">',e.split(",").forEach(function(e){r+='<a href="#" class="sceditor-color-option" style="background-color: '+e+'" data-color="'+e+'"></a>'}),r+="</div>"}),i._htmlCache=r),Me(o,et(i._htmlCache)),Oe(o,"click","a",function(e){n(je(this,"color")),t.closeDropDown(!0),e.preventDefault()}),t.createDropDown(e,"color-picker",o)},exec:function(e){var t=this;mt.color._dropDown(t,e,function(e){t.execCommand("forecolor",e)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(e){var t,n=Ee("div"),o=this;Me(n,pt("pastetext",{label:o._("Paste your text inside the following box:"),insert:o._("Insert")},!0)),Oe(n,"click",".button",function(e){(t=Re(n,"#txt")[0].value)&&o.wysiwygEditorInsertText(t),o.closeDropDown(!0),e.preventDefault()}),o.createDropDown(e,"pastetext",n)},tooltip:"Paste Text"},bulletlist:{exec:function(){n(this),this.execCommand("insertunorderedlist")},tooltip:"Bullet list"},orderedlist:{exec:function(){n(this),this.execCommand("insertorderedlist")},tooltip:"Numbered list"},indent:{state:function(e,t){var n;return Ue(t,"li")||Ue(t,"ul,ol,menu")&&(t=(n=this.getRangeHelper().selectedRange()).startContainer.parentNode,n=n.endContainer.parentNode,t!==t.parentNode.firstElementChild||Ue(n,"li")&&n!==n.parentNode.lastElementChild)?0:-1},exec:function(){var e=this.getRangeHelper().getFirstBlockParent();this.focus(),Ne(e,"ul,ol,menu")&&this.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(e,t){return Ne(t,"ul,ol,menu")?0:-1},exec:function(){Ne(this.getRangeHelper().getFirstBlockParent(),"ul,ol,menu")&&this.execCommand("outdent")},tooltip:"Remove one indent"},table:{exec:function(e){var r=this,i=Ee("div");Me(i,pt("table",{rows:r._("Rows:"),cols:r._("Cols:"),insert:r._("Insert")},!0)),Oe(i,"click",".button",function(e){var t=Number(Re(i,"#rows")[0].value),n=Number(Re(i,"#cols")[0].value),o="<table>";0<t&&0<n&&(o+=Array(t+1).join("<tr>"+Array(n+1).join("<td><br /></td>")+"</tr>"),o+="</table>",r.wysiwygEditorInsertHtml(o),r.closeDropDown(!0),e.preventDefault())}),r.createDropDown(e,"inserttable",i)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{exec:function(){this.wysiwygEditorInsertHtml("<code>","<br /></code>")},tooltip:"Code"},image:{_dropDown:function(t,e,n,o){var r=Ee("div");Me(r,pt("image",{url:t._("URL:"),width:t._("Width (optional):"),height:t._("Height (optional):"),insert:t._("Insert")},!0));var i=Re(r,"#image")[0];i.value=n,Oe(r,"click",".button",function(e){i.value&&o(i.value,Re(r,"#width")[0].value,Re(r,"#height")[0].value),t.closeDropDown(!0),e.preventDefault()}),t.createDropDown(e,"insertimage",r)},exec:function(e){var r=this;mt.image._dropDown(r,e,"",function(e,t,n){var o="";t&&(o+=' width="'+parseInt(t,10)+'"'),n&&(o+=' height="'+parseInt(n,10)+'"'),o+=' src="'+ft(e)+'"',r.wysiwygEditorInsertHtml("<img"+o+" />")})},tooltip:"Insert an image"},email:{_dropDown:function(n,e,o){var r=Ee("div");Me(r,pt("email",{label:n._("E-mail:"),desc:n._("Description (optional):"),insert:n._("Insert")},!0)),Oe(r,"click",".button",function(e){var t=Re(r,"#email")[0].value;t&&o(t,Re(r,"#des")[0].value),n.closeDropDown(!0),e.preventDefault()}),n.createDropDown(e,"insertemail",r)},exec:function(e){var n=this;mt.email._dropDown(n,e,function(e,t){!n.getRangeHelper().selectedHtml()||t?n.wysiwygEditorInsertHtml('<a href="mailto:'+ft(e)+'">'+ft(t||e)+"</a>"):n.execCommand("createlink","mailto:"+e)})},tooltip:"Insert an email"},link:{_dropDown:function(t,e,n){var o=Ee("div");Me(o,pt("link",{url:t._("URL:"),desc:t._("Description (optional):"),ins:t._("Insert")},!0));var r=Re(o,"#link")[0];function i(e){r.value&&n(r.value,Re(o,"#des")[0].value),t.closeDropDown(!0),e.preventDefault()}Oe(o,"click",".button",i),Oe(o,"keypress",function(e){13===e.which&&r.value&&i(e)},_e),t.createDropDown(e,"insertlink",o)},exec:function(e){var n=this;mt.link._dropDown(n,e,function(e,t){t||!n.getRangeHelper().selectedHtml()?n.wysiwygEditorInsertHtml('<a href="'+ft(e)+'">'+ft(t||e)+"</a>"):n.execCommand("createlink",e)})},tooltip:"Insert a link"},unlink:{state:function(){return Ne(this.currentNode(),"a")?0:-1},exec:function(){var e=Ne(this.currentNode(),"a");if(e){for(;e.firstChild;)We(e.firstChild,e);Ae(e)}},tooltip:"Unlink"},quote:{exec:function(e,t,n){var o="<blockquote>",r="</blockquote>";t?(o=o+(n=n?"<cite>"+ft(n)+"</cite>":"")+t+r,r=null):""===this.getRangeHelper().selectedHtml()&&(r="<br />"+r),this.wysiwygEditorInsertHtml(o,r)},tooltip:"Insert a Quote"},emoticon:{exec:function(u){var d=this,f=function(e){var n,t=d.opts,o=t.emoticonsRoot||"",r=t.emoticonsCompat,i=d.getRangeHelper(),a=r&&" "!==i.getOuterText(!0,1)?" ":"",l=r&&" "!==i.getOuterText(!1,1)?" ":"",s=Ee("div"),c=Ee("div"),i=we({},t.emoticons.dropdown,e?t.emoticons.more:{});return Me(s,c),n=Math.sqrt(Object.keys(i).length),Oe(s,"click","img",function(e){d.insert(a+ze(this,"alt")+l,null,!1).closeDropDown(!0),e.preventDefault()}),Ce(i,function(e,t){Me(c,Ee("img",{src:o+(t.url||t),alt:e,title:t.tooltip||e})),c.children.length>=n&&(c=Ee("div"),Me(s,c))}),!e&&t.emoticons.more&&(Me(t=Ee("a",{className:"sceditor-more"}),document.createTextNode(d._("More"))),Oe(t,"click",function(e){d.createDropDown(u,"more-emoticons",f(!0)),e.preventDefault()}),Me(s,t)),s};d.createDropDown(u,"emoticons",f(!1))},txtExec:function(e){mt.emoticon.exec.call(this,e)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(r,e,i){var a=Ee("div");Me(a,pt("youtubeMenu",{label:r._("Video URL:"),insert:r._("Insert")},!0)),Oe(a,"click",".button",function(e){var t=(n=Re(a,"#link")[0].value).match(/(?:v=|v\/|embed\/|youtu.be\/)?([a-zA-Z0-9_-]{11})/),n=n.match(/[&|?](?:star)?t=((\d+[hms]?){1,3})/),o=0;n&&Ce(n[1].split(/[hms]/),function(e,t){""!==t&&(o=60*o+Number(t))}),t&&/^[a-zA-Z0-9_\-]{11}$/.test(t[1])&&i(t[1],o),r.closeDropDown(!0),e.preventDefault()}),r.createDropDown(e,"insertlink",a)},exec:function(e){var n=this;mt.youtube._dropDown(n,e,function(e,t){n.wysiwygEditorInsertHtml(pt("youtube",{id:e,time:t}))})},tooltip:"Insert a YouTube video"},date:{_date:function(e){var t=new Date,n=t.getYear(),o=t.getMonth()+1;return n<2e3&&(n=1900+n),o<10&&(o="0"+o),(t=t.getDate())<10&&(t="0"+t),e.opts.dateFormat.replace(/year/i,n).replace(/month/i,o).replace(/day/i,t)},exec:function(){this.insertText(mt.date._date(this))},txtExec:function(){this.insertText(mt.date._date(this))},tooltip:"Insert current date"},time:{_time:function(){var e=new Date,t=e.getHours(),n=e.getMinutes();return(t=t<10?"0"+t:t)+":"+(n=n<10?"0"+n:n)+":"+((e=e.getSeconds())<10?"0"+e:e)},exec:function(){this.insertText(mt.time._time())},txtExec:function(){this.insertText(mt.time._time())},tooltip:"Insert current time"},ltr:{state:function(e,t){return t&&"ltr"===t.style.direction},exec:function(){var e=this.getRangeHelper(),t=e.getFirstBlockParent();this.focus(),(t&&!Ue(t,"body")||(this.execCommand("formatBlock","p"),(t=e.getFirstBlockParent())&&!Ue(t,"body")))&&(e="ltr"===Pe(t,"direction")?"":"ltr",Pe(t,"direction",e))},tooltip:"Left-to-Right"},rtl:{state:function(e,t){return t&&"rtl"===t.style.direction},exec:function(){var e=this.getRangeHelper(),t=e.getFirstBlockParent();this.focus(),(t&&!Ue(t,"body")||(this.execCommand("formatBlock","p"),(t=e.getFirstBlockParent())&&!Ue(t,"body")))&&(e="rtl"===Pe(t,"direction")?"":"rtl",Pe(t,"direction",e))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize()),this.focus()},txtExec:function(){this.maximize(!this.maximize()),this.focus()},tooltip:"Maximize",shortcut:"Ctrl+Shift+M"},source:{state:function(){return this.sourceMode()},exec:function(){this.toggleSourceMode(),this.focus()},txtExec:function(){this.toggleSourceMode(),this.focus()},tooltip:"View source",shortcut:"Ctrl+Shift+S"},ignore:{}},h={};function gt(i){function a(e){return"signal"+e.charAt(0).toUpperCase()+e.slice(1)}function e(e,t){for(var n,o=a((e=[].slice.call(e)).shift()),r=0;r<l.length;r++)if(o in l[r]&&(n=l[r][o].apply(i,e),t))return n}var r=this,l=[];r.call=function(){e(arguments,!1)},r.callOnlyFirst=function(){return e(arguments,!0)},r.hasHandler=function(e){var t=l.length;for(e=a(e);t--;)if(e in l[t])return!0;return!1},r.exists=function(e){return e in h&&"function"==typeof(e=h[e])&&"object"==typeof e.prototype},r.isRegistered=function(e){if(r.exists(e))for(var t=l.length;t--;)if(l[t]instanceof h[e])return!0;return!1},r.register=function(e){return!(!r.exists(e)||r.isRegistered(e)||(e=new h[e],l.push(e),"init"in e&&e.init.call(i),0))},r.deregister=function(e){var t,n=l.length,o=!1;if(!r.isRegistered(e))return o;for(;n--;)l[n]instanceof h[e]&&(o=!0,"destroy"in(t=l.splice(n,1)[0])&&t.destroy.call(i));return o},r.destroy=function(){for(var e=l.length;e--;)"destroy"in l[e]&&l[e].destroy.call(i);l=[],i=null}}gt.plugins=h;var v=function(e,t,n){var o,r,i,a,l,s="",c=e.startContainer,u=e.startOffset;for(c&&3!==c.nodeType&&(c=c.childNodes[u],u=0),i=a=u;n>s.length&&c&&3===c.nodeType;)o=c.nodeValue,r=n-s.length,l&&(a=o.length,i=0),l=c,c=t?(u=i=Math.max(a-r,0),s=o.substr(i,a-i)+s,l.previousSibling):(u=i+(a=Math.min(r,o.length)),s+=o.substr(i,a),l.nextSibling);return{node:l||c,offset:u,text:s}};function ht(r,e,i){var a,l,s=e||r.contentDocument||r.document,c="sceditor-start-marker",u="sceditor-end-marker",h=this;h.insertHTML=function(e,t){var n,o;if(!h.selectedRange())return!1;for(t&&(e+=h.selectedHtml()+t),o=Ee("p",{},s),n=s.createDocumentFragment(),o.innerHTML=i(e);o.firstChild;)Me(n,o.firstChild);h.insertNode(n)},l=function(e,t,n){var o,r=s.createDocumentFragment();if("string"==typeof e?(t&&(e+=h.selectedHtml()+t),r=et(e)):(Me(r,e),t&&(Me(r,h.selectedRange().extractContents()),Me(r,t))),o=r.lastChild){for(;!rt(o.lastChild,!0);)o=o.lastChild;return(ot(o)?o.lastChild||Me(o,document.createTextNode("​")):o=r,h.removeMarkers(),Me(o,a(c)),Me(o,a(u)),n)?(Me(n=Ee("div"),r),n.innerHTML):r}},h.insertNode=function(e,t){var n,o,r=l(e,t),t=(e=h.selectedRange()).commonAncestorContainer,i=[];if(!r)return!1;function a(e){e&&d(e)&&i.indexOf(e)<0&&Ae(e)}e.startContainer!==e.endContainer&&(Ce(t.childNodes,function(e,t){d(t)&&i.push(t)}),n=r.firstChild,o=r.lastChild),e.deleteContents(),t&&3!==t.nodeType&&!ot(t)?We(r,t):(e.insertNode(r),a(n&&n.previousSibling),a(o&&o.nextSibling)),h.restoreRange()},h.cloneSelected=function(){var e=h.selectedRange();if(e)return e.cloneRange()},h.selectedRange=function(){var e,t,n=r.getSelection();if(n){if(n.rangeCount<=0){for(t=s.body;t.firstChild;)t=t.firstChild;(e=s.createRange()).setStartBefore(t),n.addRange(e)}return 0<n.rangeCount?n.getRangeAt(0):e}},h.hasSelection=function(){var e=r.getSelection();return e&&0<e.rangeCount},h.selectedHtml=function(){var e,t=h.selectedRange();return t?(Me(e=Ee("p",{},s),t.cloneContents()),e.innerHTML):""},h.parentNode=function(){var e=h.selectedRange();if(e)return e.commonAncestorContainer},h.getFirstBlockParent=function(e){var t=function(e){return rt(e,!0)?(e=e?e.parentNode:null)&&t(e):e};return t(e||h.parentNode())},h.insertNodeAt=function(e,t){var n=h.selectedRange(),o=h.cloneSelected();if(!o)return!1;o.collapse(e),o.insertNode(t),h.selectRange(n)},a=function(e){return h.removeMarker(e),(e=Ee("span",{id:e,className:"sceditor-selection sceditor-ignore",style:"display:none;line-height:0"},s)).innerHTML=" ",e},h.insertMarkers=function(){var e=h.selectedRange(),t=a(c);h.removeMarkers(),h.insertNodeAt(!0,t),e&&e.collapsed?t.parentNode.insertBefore(a(u),t.nextSibling):h.insertNodeAt(!1,a(u))},h.getMarker=function(e){return s.getElementById(e)},h.removeMarker=function(e){(e=h.getMarker(e))&&Ae(e)},h.removeMarkers=function(){h.removeMarker(c),h.removeMarker(u)},h.saveRange=function(){h.insertMarkers()},h.selectRange=function(e){var t,n=r.getSelection(),o=e.endContainer;if(e.collapsed&&o&&!rt(o,!0)){for(t=o.lastChild;t&&Ue(t,".sceditor-ignore");)t=t.previousSibling;Ue(t,"br")&&((o=s.createRange()).setEndAfter(t),o.collapse(!1),h.compare(e,o)&&(e.setStartBefore(t),e.collapse(!0)))}n&&(h.clear(),n.addRange(e))},h.restoreRange=function(){var e,t=h.selectedRange(),n=h.getMarker(c),o=h.getMarker(u);if(!n||!o||!t)return!1;e=n.nextSibling===o,(t=s.createRange()).setStartBefore(n),t.setEndAfter(o),e&&t.collapse(!0),h.selectRange(t),h.removeMarkers()},h.selectOuterText=function(e,t){var n=h.cloneSelected();if(!n)return!1;n.collapse(!1),e=v(n,!0,e),t=v(n,!1,t),n.setStart(e.node,e.offset),n.setEnd(t.node,t.offset),h.selectRange(n)},h.getOuterText=function(e,t){var n=h.cloneSelected();return n?(n.collapse(!e),v(n,e,t).text):""},h.replaceKeyword=function(e,t,n,o,r,i){n||e.sort(function(e,t){return e[0].length-t[0].length});var a,l,s,c,u,d,f,p="(^|[\\s    ])",m=e.length,g=r?1:0,o=o||e[m-1][0].length;for(r&&o++,i=i||"",c=(a=h.getOuterText(!0,o)).length,a+=i,t&&(a+=h.getOuterText(!1,o));m--;)if(f=(d=e[m][0]).length,s=Math.max(0,c-f-g),u=-1,r?(l=a.substr(s).match(new RegExp(p+dt(d)+p)))&&(u=l.index+s+l[1].length):u=a.indexOf(d,s),-1<u&&u<=c&&c<=u+f+g)return u=c-u,h.selectOuterText(u,f-u-(/^\S/.test(i)?1:0)),h.insertHTML(e[m][1]),!0;return!1},h.compare=function(e,t){return t=t||h.selectedRange(),e&&t?0===e.compareBoundaryPoints(Range.END_TO_END,t)&&0===e.compareBoundaryPoints(Range.START_TO_START,t):!e&&!t},h.clear=function(){var e=r.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}}var y,b,x,w=navigator.userAgent,vt=/iPhone|iPod|iPad| wosbrowser\//i.test(w),yt=(b=!!window.document.documentMode,D="-ms-ime-align"in document.documentElement.style,(A=document.createElement("div")).contentEditable=!0,"contentEditable"in document.documentElement&&"true"===A.contentEditable&&(A=/Opera Mobi|Opera Mini/i.test(w),/Android/i.test(w)&&(A=!0,/Safari/.test(w)&&(A=!(y=/Safari\/(\d+)/.exec(w))||!y[1]||y[1]<534)),/ Silk\//i.test(w)&&(A=!(y=/AppleWebKit\/(\d+)/.exec(w))||!y[1]||y[1]<534),vt&&(A=/OS [0-4](_\d)+ like Mac/i.test(w)),/Firefox/i.test(w)&&(A=!1),/OneBrowser/i.test(w)&&(A=!1),"UCWEB"===navigator.vendor&&(A=!1),!(A=!(!b&&!D)||A))),T=Object.hasOwnProperty,C=Object.setPrototypeOf,S=Object.isFrozen,k=Object.getPrototypeOf,E=Object.getOwnPropertyDescriptor,bt=Object.freeze,D=Object.seal,N=Object.create,A="undefined"!=typeof Reflect&&Reflect,M=(M=A.apply)||function(e,t,n){return e.apply(t,n)},bt=bt||function(e){return e},D=D||function(e){return e},R=(R=A.construct)||function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))},xt=_(Array.prototype.forEach),wt=_(Array.prototype.pop),Tt=_(Array.prototype.push),Ct=_(String.prototype.toLowerCase),St=_(String.prototype.match),kt=_(String.prototype.replace),Et=_(String.prototype.indexOf),Dt=_(String.prototype.trim),Nt=_(RegExp.prototype.test),At=(x=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return R(x,t)});function _(r){return function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return M(r,e,n)}}function Mt(e,t){C&&C(e,null);for(var n=t.length;n--;){var o,r=t[n];"string"!=typeof r||(o=Ct(r))!==r&&(S(t)||(t[n]=o),r=o),e[r]=!0}return e}function Rt(e){var t=N(null),n=void 0;for(n in e)M(T,e,[n])&&(t[n]=e[n]);return t}function _t(e,t){for(;null!==e;){var n=E(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=k(e)}return null}var Ot=bt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ft=bt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zt=bt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ht=bt(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Lt=bt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),It=bt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Bt=bt(["#text"]),Pt=bt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),jt=bt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ut=bt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Wt=bt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vt=D(/\{\{[\s\S]*|[\s\S]*\}\}/gm),qt=D(/<%[\s\S]*|[\s\S]*%>/gm),Gt=D(/^data-[\-\w.\u00B7-\uFFFF]/),$t=D(/^aria-[\-\w]+$/),Yt=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kt=D(/^(?:\w+script|data):/i),Xt=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zt="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};function Qt(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Jt=function t(e){function c(e){return t(e)}var l=0<arguments.length&&void 0!==e?e:"undefined"==typeof window?null:window;if(c.version="2.2.6",c.removed=[],!l||!l.document||9!==l.document.nodeType)return c.isSupported=!1,c;var s=l.document,i=l.document,u=l.DocumentFragment,n=l.HTMLTemplateElement,d=l.Node,a=l.Element,o=l.NodeFilter,r=l.NamedNodeMap,f=void 0===r?l.NamedNodeMap||l.MozNamedAttrMap:r,p=l.Text,m=l.Comment,g=l.DOMParser,e=l.trustedTypes,h=_t(r=a.prototype,"cloneNode"),v=_t(r,"nextSibling"),y=_t(r,"childNodes"),b=_t(r,"parentNode");"function"!=typeof n||(n=i.createElement("template")).content&&n.content.ownerDocument&&(i=n.content.ownerDocument);var x=function(e,t){if("object"!==(void 0===e?"undefined":Zt(e))||"function"!=typeof e.createPolicy)return null;var n=null,o="data-tt-policy-suffix",r="dompurify"+((n=t.currentScript&&t.currentScript.hasAttribute(o)?t.currentScript.getAttribute(o):n)?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(e,s),w=x&&ee?x.createHTML(""):"",T=i.implementation,C=i.createNodeIterator,S=i.getElementsByTagName,k=i.createDocumentFragment,E=s.importNode,D={};try{D=Rt(i).documentMode?i.documentMode:{}}catch(e){}var N={};function A(e){ce&&ce===e||(e=Rt(e=e&&"object"===(void 0===e?"undefined":Zt(e))?e:{}),I="ALLOWED_TAGS"in e?Mt({},e.ALLOWED_TAGS):B,P="ALLOWED_ATTR"in e?Mt({},e.ALLOWED_ATTR):j,le="ADD_URI_SAFE_ATTR"in e?Mt(Rt(se),e.ADD_URI_SAFE_ATTR):se,ie="ADD_DATA_URI_TAGS"in e?Mt(Rt(ae),e.ADD_DATA_URI_TAGS):ae,U="FORBID_TAGS"in e?Mt({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?Mt({},e.FORBID_ATTR):{},M="USE_PROFILES"in e&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=e.SAFE_FOR_TEMPLATES||!1,Y=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=!1!==e.RETURN_DOM_IMPORT,ee=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||L,$&&(q=!1),Q&&(Z=!0),M&&(I=Mt({},[].concat(Qt(Bt))),P=[],!0===M.html&&(Mt(I,Ot),Mt(P,Pt)),!0===M.svg&&(Mt(I,Ft),Mt(P,jt),Mt(P,Wt)),!0===M.svgFilters&&(Mt(I,zt),Mt(P,jt),Mt(P,Wt)),!0===M.mathMl&&(Mt(I,Lt),Mt(P,Ut),Mt(P,Wt))),e.ADD_TAGS&&Mt(I=I===B?Rt(I):I,e.ADD_TAGS),e.ADD_ATTR&&Mt(P=P===j?Rt(P):P,e.ADD_ATTR),e.ADD_URI_SAFE_ATTR&&Mt(le,e.ADD_URI_SAFE_ATTR),ne&&(I["#text"]=!0),Y&&Mt(I,["html","head","body"]),I.table&&(Mt(I,["tbody"]),delete U.tbody),bt&&bt(e),ce=e)}c.isSupported=T&&void 0!==T.createHTMLDocument&&9!==D;var M,R=Vt,_=qt,O=Gt,F=$t,z=Kt,H=Xt,L=Yt,I=null,B=Mt({},[].concat(Qt(Ot),Qt(Ft),Qt(zt),Qt(Lt),Qt(Bt))),P=null,j=Mt({},[].concat(Qt(Pt),Qt(jt),Qt(Ut),Qt(Wt))),U=null,W=null,V=!0,q=!0,G=!1,$=!1,Y=!1,K=!1,X=!1,Z=!1,Q=!1,J=!0,ee=!1,te=!0,ne=!0,oe=!1,re=Mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ie=null,ae=Mt({},["audio","video","img","source","image","track"]),le=null,se=Mt({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ce=null,ue=i.createElement("form"),de=Mt({},["mi","mo","mn","ms","mtext"]),fe=Mt({},["foreignobject","desc","title","annotation-xml"]),pe=Mt({},Ft);Mt(pe,zt),Mt(pe,Ht);var me=Mt({},Lt);function ge(t){Tt(c.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=w}catch(e){t.remove()}}}function he(e,t){try{Tt(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Tt(c.removed,{attribute:null,from:t})}t.removeAttribute(e)}function ve(e){var t=void 0,n=void 0;X?e="<remove></remove>"+e:n=(o=St(e,/^[\r\n\t ]+/))&&o[0];var o,r=x?x.createHTML(e):e;try{t=(new g).parseFromString(r,"text/html")}catch(e){}return t&&t.documentElement||((o=(t=T.createHTMLDocument("")).body).parentNode.removeChild(o.parentNode.firstElementChild),o.outerHTML=r),e&&n&&t.body.insertBefore(i.createTextNode(n),t.body.childNodes[0]||null),S.call(t,Y?"html":"body")[0]}function ye(e){return C.call(e.ownerDocument||e,e,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT,function(){return o.FILTER_ACCEPT},!1)}function be(e){return"object"===(void 0===d?"undefined":Zt(d))?e instanceof d:e&&"object"===(void 0===e?"undefined":Zt(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function xe(e,t,n){N[e]&&xt(N[e],function(e){e.call(c,t,n,ce)})}function we(e){var t;if(xe("beforeSanitizeElements",e,null),!((n=e)instanceof p||n instanceof m||"string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof f&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore))return ge(e),1;if(St(e.nodeName,/[\u0080-\uFFFF]/))return ge(e),1;var n=Ct(e.nodeName);if(xe("uponSanitizeElement",e,{tagName:n,allowedTags:I}),!be(e.firstElementChild)&&(!be(e.content)||!be(e.content.firstElementChild))&&Nt(/<[/\w]/g,e.innerHTML)&&Nt(/<[/\w]/g,e.textContent))return ge(e),1;if(I[n]&&!U[n])return e instanceof a&&!function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:Ee,tagName:"template"});var n=Ct(e.tagName),o=Ct(t.tagName);return e.namespaceURI===ke?t.namespaceURI===Ee?"svg"===n:t.namespaceURI===Se?"svg"===n&&("annotation-xml"===o||de[o]):Boolean(pe[n]):e.namespaceURI===Se?t.namespaceURI===Ee?"math"===n:t.namespaceURI===ke?"math"===n&&fe[o]:Boolean(me[n]):e.namespaceURI===Ee&&(t.namespaceURI!==ke||fe[o])&&(t.namespaceURI!==Se||de[o])&&(o=Mt({},["title","style","font","a","script"]),!me[n]&&(o[n]||!pe[n]))}(e)||("noscript"===n||"noembed"===n)&&Nt(/<\/no(script|embed)/i,e.innerHTML)?(ge(e),1):($&&3===e.nodeType&&(t=e.textContent,t=kt(t,R," "),t=kt(t,_," "),e.textContent!==t&&(Tt(c.removed,{element:e.cloneNode()}),e.textContent=t)),xe("afterSanitizeElements",e,null),0);if(ne&&!re[n])for(var o=b(e),r=y(e),i=r.length-1;0<=i;--i)o.insertBefore(h(r[i],!0),v(e));return ge(e),1}function Te(e,t,n){if(te&&("id"===t||"name"===t)&&(n in i||n in ue))return!1;if(!(q&&Nt(O,t)||V&&Nt(F,t))){if(!P[t]||W[t])return!1;if(!le[t]&&!Nt(L,kt(n,H,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Et(n,"data:")||!ie[e])&&(!G||Nt(z,kt(n,H,"")))&&n)return!1}return!0}function Ce(e){var t,n=void 0,o=void 0;xe("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){for(var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:P},o=r.length;o--;){var a=(t=r[o]).name,l=t.namespaceURI,n=Dt(t.value),s=Ct(a);if(i.attrName=s,i.attrValue=n,i.keepAttr=!0,i.forceKeepAttr=void 0,xe("uponSanitizeAttribute",e,i),n=i.attrValue,!i.forceKeepAttr&&(he(a,e),i.keepAttr))if(Nt(/\/>/i,n))he(a,e);else if($&&(n=kt(n,R," "),n=kt(n,_," ")),Te(e.nodeName.toLowerCase(),s,n))try{l?e.setAttributeNS(l,a,n):e.setAttribute(a,n),wt(c.removed)}catch(e){}}xe("afterSanitizeAttributes",e,null)}}Mt(me,It);var Se="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";return c.sanitize=function(e,t){var n,o=void 0,r=void 0,i=void 0;if("string"!=typeof(e=e||"\x3c!--\x3e")&&!be(e)){if("function"!=typeof e.toString)throw At("toString is not a function");if("string"!=typeof(e=e.toString()))throw At("dirty is not a string, aborting")}if(!c.isSupported){if("object"===Zt(l.toStaticHTML)||"function"==typeof l.toStaticHTML){if("string"==typeof e)return l.toStaticHTML(e);if(be(e))return l.toStaticHTML(e.outerHTML)}return e}if(K||A(t),c.removed=[],!(oe="string"==typeof e?!1:oe))if(e instanceof d)1===(t=(o=ve("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?o=t:o.appendChild(t);else{if(!Z&&!$&&!Y&&-1===e.indexOf("<"))return x&&ee?x.createHTML(e):e;if(!(o=ve(e)))return Z?null:w}o&&X&&ge(o.firstChild);for(var a=ye(oe?e:o);n=a.nextNode();)3===n.nodeType&&n===r||we(n)||(n.content instanceof u&&function e(t){var n,o=ye(t);for(xe("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)xe("uponSanitizeShadowNode",n,null),we(n)||(n.content instanceof u&&e(n.content),Ce(n));xe("afterSanitizeShadowDOM",t,null)}(n.content),Ce(n),r=n);if(r=null,oe)return e;if(Z){if(Q)for(i=k.call(o.ownerDocument);o.firstChild;)i.appendChild(o.firstChild);else i=o;return J?E.call(s,i,!0):i}return e=Y?o.outerHTML:o.innerHTML,$&&(e=kt(e,R," "),e=kt(e,_," ")),x&&ee?x.createHTML(e):e},c.setConfig=function(e){A(e),K=!0},c.clearConfig=function(){ce=null,K=!1},c.isValidAttribute=function(e,t,n){return ce||A({}),Te(e=Ct(e),t=Ct(t),n)},c.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],Tt(N[e],t))},c.removeHook=function(e){N[e]&&wt(N[e])},c.removeHooks=function(e){N[e]&&(N[e]=[])},c.removeAllHooks=function(){N={}},c}(),en=window,tn=document,nn=/^image\/(p?jpe?g|gif|png|bmp)$/i;function on(r,e){var a,x,u,i,l,f,d,s,o,c,p,t,m,g,h,v,y,b,n,w,T,C,S,k,E,D,N,A,M,R,_,O,F,z,H,L,I,B,P,j,U,W,V,q,G,$,Y,K,X,Z,Q,J,ee,te,ne,oe,re,ie,ae,le,se=this,ce={},ue=[],de=[],fe={},pe={},me={};se.commands=we(!0,{},e.commands||mt);var ge=se.opts=we(!0,{},ut,e);se.opts.emoticons=e.emoticons||ut.emoticons,Array.isArray(ge.allowedIframeUrls)||(ge.allowedIframeUrls=[]),ge.allowedIframeUrls.push("https://www.youtube-nocookie.com/embed/");var he=Jt();function ve(e){return he.sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allowfullscreen","frameborder","target"]})}he.addHook("uponSanitizeElement",function(e,t){var n=ge.allowedIframeUrls;if("iframe"===t.tagName){for(var o=ze(e,"src")||"",r=0;r<n.length;r++){var i=n[r];if(ye(i)&&o.substr(0,i.length)===i)return;if(i.test&&i.test(o))return}Ae(e)}}),he.addHook("afterSanitizeAttributes",function(e){"target"in e&&ze(e,"data-sce-target",ze(e,"target")),He(e,"target")}),e=function(){r._sceditor=se,ge.locale&&"en"!==ge.locale&&M(),We(x=Ee("div",{className:"sceditor-container"}),r),Pe(x,"z-index",ge.zIndex),n=r.required,r.required=!1;var e=on.formats[ge.format];a=e?new e:{},g=new gt(se),(ge.plugins||"").split(",").forEach(function(e){g.register(e.trim())}),"init"in a&&a.init.call(se),z(),R(),A(),_(),O(),yt||se.toggleSourceMode(),Y();var t=function(){Fe(en,"load",t),ge.autofocus&&J(!!ge.autofocusEnd),le(),X(),g.call("ready"),"onReady"in a&&a.onReady.call(se)};Oe(en,"load",t),"complete"===tn.readyState&&t()},M=function(){var e;(t=on.locale[ge.locale])||(e=ge.locale.split("-"),t=on.locale[e[0]]),t&&t.dateFormat&&(ge.dateFormat=t.dateFormat)},A=function(){s=Ee("textarea"),i=Ee("iframe",{frameborder:0,allowfullscreen:!0}),ge.startInSourceMode?(qe(x,"sourceMode"),Le(i)):(qe(x,"wysiwygMode"),Le(s)),ge.spellcheck||ze(x,"spellcheck","false"),"https:"===en.location.protocol&&ze(i,"src","about:blank"),Me(x,i),Me(x,s),se.dimensions(ge.width||Ye(r),ge.height||Ke(r));var e=vt?" ios":"";(d=i.contentDocument).open(),d.write(pt("html",{attrs:' class="'+e+'"',spellcheck:ge.spellcheck?"":'spellcheck="false"',charset:ge.charset,style:ge.style})),d.close(),f=d.body,l=i.contentWindow,se.readOnly(!!ge.readOnly),vt&&(Ke(f,"100%"),Oe(f,"touchend",se.focus)),e=ze(r,"tabindex"),ze(s,"tabindex",e),ze(i,"tabindex",e),m=new ht(l,null,ve),Le(r),se.val(r.value),(e=ge.placeholder||ze(r,"placeholder"))&&(s.placeholder=e,ze(f,"placeholder",e))},_=function(){ge.autoUpdate&&(Oe(f,"blur",ae),Oe(s,"blur",ae)),null===ge.rtl&&(ge.rtl="rtl"===Pe(s,"direction")),se.rtl(!!ge.rtl),ge.autoExpand&&(Oe(f,"load",le,_e),Oe(f,"input keyup",le)),ge.resizeEnabled&&F(),ze(x,"id",ge.id),se.emoticons(ge.emoticonsEnabled)},O=function(){var e=r.form,t="compositionstart compositionend",n="keydown keyup keypress focus blur contextmenu input",o="onselectionchange"in d?"selectionchange":"keyup focus blur contextmenu mouseup touchend click";Oe(tn,"click",G),e&&(Oe(e,"reset",U),Oe(e,"submit",se.updateOriginal,_e)),Oe(window,"pagehide",se.updateOriginal),Oe(window,"pageshow",U),Oe(f,"keypress",j),Oe(f,"keydown",B),Oe(f,"keydown",P),Oe(f,"keyup",X),Oe(f,"blur",re),Oe(f,"keyup",ie),Oe(f,"paste",H),Oe(f,"cut copy",L),Oe(f,t,V),Oe(f,o,Z),Oe(f,n,q),ge.emoticonsCompat&&en.getSelection&&Oe(f,"keyup",te),Oe(f,"blur",function(){se.val()||qe(f,"placeholder")}),Oe(f,"focus",function(){Ge(f,"placeholder")}),Oe(s,"blur",re),Oe(s,"keyup",ie),Oe(s,"keydown",B),Oe(s,t,V),Oe(s,n,q),Oe(d,"mousedown",W),Oe(d,o,Z),Oe(d,"keyup",X),Oe(x,"selectionchanged",Q),Oe(x,"selectionchanged",Y),Oe(x,"selectionchanged valuechanged nodechanged pasteraw paste",q)},R=function(){var i,a=se.commands,l=(ge.toolbarExclude||"").split(","),e=ge.toolbar.split("|");u=Ee("div",{className:"sceditor-toolbar",unselectable:"on"}),ge.icons in on.icons&&(E=new on.icons[ge.icons]),Ce(e,function(e,t){i=Ee("div",{className:"sceditor-group"}),Ce(t.split(","),function(e,t){var n,o,r=a[t];!r||-1<l.indexOf(t)||(n=r.shortcut,o=pt("toolbarButton",{name:t,dispName:se._(r.name||r.tooltip||t)},!0).firstChild,E&&E.create&&E.create(t)&&(We(E.create(t),o.firstChild),qe(o,"has-icon")),o._sceTxtMode=!!r.txtExec,o._sceWysiwygMode=!!r.exec,$e(o,"disabled",!r.exec),Oe(o,"click",function(e){Ve(o,"disabled")||N(o,r),Y(),e.preventDefault()}),Oe(o,"mousedown",function(e){se.closeDropDown(),e.preventDefault()}),r.tooltip&&ze(o,"title",se._(r.tooltip)+(n?" ("+n+")":"")),n&&se.addShortcut(n,t),r.state?de.push({name:t,state:r.state}):ye(r.exec)&&de.push({name:t,state:r.exec}),Me(i,o),pe[t]=o)}),i.firstChild&&Me(u,i)}),Me(ge.toolbarContainer||x,u)},F=function(){function t(e){o="touchmove"===e.type?(e=en.event,s=e.changedTouches[0].pageX,e.changedTouches[0].pageY):(s=e.pageX,e.pageY);var t=u+(o-l),n=m?c-(s-a):c+(s-a);0<y&&y<n&&(n=y),0<v&&n<v&&(n=v),ge.resizeWidth||(n=!1),0<h&&h<t&&(t=h),0<g&&t<g&&(t=g),ge.resizeHeight||(t=!1),(n||t)&&se.dimensions(n,t),e.preventDefault()}var o,e=Ee("div",{className:"sceditor-grip"}),n=Ee("div",{className:"sceditor-resize-cover"}),r="touchmove mousemove",i="touchcancel touchend mouseup",a=0,l=0,s=0,c=0,u=0,d=Ye(x),f=Ke(x),p=!1,m=se.rtl(),g=ge.resizeMinHeight||f/1.5,h=ge.resizeMaxHeight||2.5*f,v=ge.resizeMinWidth||d/1.25,y=ge.resizeMaxWidth||1.25*d,b=function(e){p&&(p=!1,Le(n),Ge(x,"resizing"),Fe(tn,r,t),Fe(tn,i,b),e.preventDefault())};E&&E.create&&(d=E.create("grip"))&&(Me(e,d),qe(e,"has-icon")),Me(x,e),Me(x,n),Le(n),Oe(e,"touchstart mousedown",function(e){l="touchstart"===e.type?(e=en.event,a=e.touches[0].pageX,e.touches[0].pageY):(a=e.pageX,e.pageY),c=Ye(x),u=Ke(x),p=!0,qe(x,"resizing"),Ie(n),Oe(tn,r,t),Oe(tn,i,b),e.preventDefault()})},z=function(){var e=ge.emoticons,n=ge.emoticonsRoot||"";Ce(me=e?we({},e.more,e.dropdown,e.hidden):me,function(e,t){me[e]=pt("emoticon",{key:e,url:n+(t.url||t),tooltip:t.tooltip||e}),ge.emoticonsEnabled&&ue.push(Ee("img",{src:n+(t.url||t)}))})},J=function(e){var t,n=f.firstChild;if(Ze(x)){if(se.sourceMode())return t=e?s.value.length:0,void s.setSelectionRange(t,t);if(at(f),e)for((n=f.lastChild)||(n=Ee("p",{},d),Me(f,n));n.lastChild;)Ue(n=n.lastChild,"br")&&n.previousSibling&&(n=n.previousSibling);t=d.createRange(),ot(n)?t.selectNodeContents(n):(t.setStartBefore(n),e&&t.setStartAfter(n)),t.collapse(!e),m.selectRange(t),y=t,e&&(f.scrollTop=f.scrollHeight),se.focus()}},se.readOnly=function(e){return"boolean"!=typeof e?!s.readonly:(f.contentEditable=!e,s.readonly=!e,$(e),se)},se.rtl=function(e){var t=e?"rtl":"ltr";return"boolean"!=typeof e?"rtl"===ze(s,"dir"):(ze(f,"dir",t),ze(s,"dir",t),Ge(x,"rtl"),Ge(x,"ltr"),qe(x,t),E&&E.rtl&&E.rtl(e),se)},$=function(n){var o=se.inSourceMode()?"_sceTxtMode":"_sceWysiwygMode";Ce(pe,function(e,t){$e(t,"disabled",n||!t[o])})},se.width=function(e,t){return e||0===e?(se.dimensions(e,null,t),se):Ye(x)},se.dimensions=function(e,t,n){return t=!(!t&&0!==t)&&t,!1===(e=!(!e&&0!==e)&&e)&&!1===t?{width:se.width(),height:se.height()}:(!1!==e&&(!1!==n&&(ge.width=e),Ye(x,e)),!1!==t&&(!1!==n&&(ge.height=t),Ke(x,t)),se)},se.height=function(e,t){return e||0===e?(se.dimensions(null,e,t),se):Ke(x)},se.maximize=function(e){var t="sceditor-maximize";return be(e)?Ve(x,t):((e=!!e)&&(S=en.pageYOffset),$e(tn.documentElement,t,e),$e(tn.body,t,e),$e(x,t,e),se.width(e?"100%":ge.width,!1),se.height(e?"100%":ge.height,!1),e||en.scrollTo(0,S),le(),se)},le=function(){ge.autoExpand&&!C&&(C=setTimeout(se.expandToContent,200))},se.expandToContent=function(e){var t,n;se.maximize()||(clearTimeout(C),C=!1,T||(t=ge.resizeMinHeight||ge.height||Ke(r),T={min:t,max:ge.resizeMaxHeight||2*t}),(n=tn.createRange()).selectNodeContents(f),t=n.getBoundingClientRect(),n=d.documentElement.clientHeight-1,t=t.bottom-t.top,n=se.height()+1+(t-n),e||-1===T.max||(n=Math.min(n,T.max)),se.height(Math.ceil(Math.max(n,T.min))))},se.destroy=function(){var e;g&&(g.destroy(),g=m=null,o&&Ae(o),Fe(tn,"click",G),(e=r.form)&&(Fe(e,"reset",U),Fe(e,"submit",se.updateOriginal,_e)),Fe(window,"pagehide",se.updateOriginal),Fe(window,"pageshow",U),Ae(s),Ae(u),Ae(x),delete r._sceditor,Ie(r),r.required=n)},se.createDropDown=function(e,t,n){t="sceditor-"+t,se.closeDropDown(),o&&Ve(o,t)||(e=we({top:e.offsetTop,left:e.offsetLeft,marginTop:e.clientHeight},ge.dropDownCss),Pe(o=Ee("div",{className:"sceditor-dropdown "+t}),e),Me(o,n),Me(x,o),Oe(o,"click focusin",function(e){e.stopPropagation()}),!o||(n=Re(o,"input,textarea")[0])&&n.focus())},G=function(e){3!==e.which&&o&&!e.defaultPrevented&&(ae(),se.closeDropDown())},L=function(e){var t=m.selectedRange();if(t){for(var n,o,r=Ee("div",{},d),i=t.commonAncestorContainer;i&&rt(i,!0);)i.nodeType===Se&&(o=i.cloneNode(),r.firstChild&&Me(o,r.firstChild),Me(r,o),n=n||o),i=i.parentNode;Me(n||r,t.cloneContents()),at(r),e.clipboardData.setData("text/html",r.innerHTML),Ce(Re(r,"p"),function(e,t){nt(t,"div")}),Ce(Re(r,"br"),function(e,t){t.nextSibling&&rt(t.nextSibling,!0)||Ae(t)}),Me(f,r),e.clipboardData.setData("text/plain",r.innerText),Ae(r),"cut"===e.type&&t.deleteContents(),e.preventDefault()}},H=function(e){var t,n,o=f,r=e.clipboardData;if(r){var i={},a=r.types,l=r.items;e.preventDefault();for(var s=0;s<a.length;s++){if(a.indexOf("text/html")<0&&en.FileReader&&l&&nn.test(l[s].type))return t=r.items[s].getAsFile(),n=void 0,(n=new FileReader).onload=function(e){I({html:'<img src="'+e.target.result+'" />'})},void n.readAsDataURL(t);i[a[s]]=r.getData(a[s])}i.text=i["text/plain"],i.html=ve(i["text/html"]),I(i)}else if(!k){var c=o.scrollTop;for(m.saveRange(),k=tn.createDocumentFragment();o.firstChild;)Me(k,o.firstChild);setTimeout(function(){var e=o.innerHTML;o.innerHTML="",Me(o,k),o.scrollTop=c,k=!1,m.restoreRange(),I({html:ve(e)})},0)}},I=function(e){var t=Ee("div",{},d);g.call("pasteRaw",e),Xe(x,"pasteraw",e),e.html?(t.innerHTML=ve(e.html),it(t)):t.innerHTML=ft(e.text||""),e={val:t.innerHTML},"fragmentToSource"in a&&(e.val=a.fragmentToSource(e.val,d,h)),g.call("paste",e),Xe(x,"paste",e),"fragmentToHtml"in a&&(e.val=a.fragmentToHtml(e.val,h)),g.call("pasteHtml",e),t=m.getFirstBlockParent(),se.wysiwygEditorInsertHtml(e.val,null,!0),function e(t){if(t.nodeType===Se){for(var n=t.parentNode,o=t.tagName,r=t.childNodes.length;r--;)e(t.childNodes[r]);if(rt(t)){for(r=t.style.length;r--;){var i=t.style[r];Pe(n,i)===Pe(t,i)&&t.style.removeProperty(i)}if(!t.style.length)if(He(t,"style"),"FONT"===o&&(Pe(t,"fontFamily").toLowerCase()===Pe(n,"fontFamily").toLowerCase()&&He(t,"face"),Pe(t,"color")===Pe(n,"color")&&He(t,"color"),Pe(t,"fontSize")===Pe(n,"fontSize")&&He(t,"size")),!t.attributes.length&&/SPAN|FONT/.test(o))ct(t);else if(/B|STRONG|EM|SPAN|FONT/.test(o))for(var a=/B|STRONG/.test(o),l="EM"===o;n&&rt(n)&&(!a||/bold|700/i.test(Pe(n,"fontWeight")))&&(!l||"italic"===Pe(n,"fontStyle"));){if((n.tagName===o||a&&/B|STRONG/.test(n.tagName))&&st(n,t)){ct(t);break}n=n.parentNode}var s=t.nextSibling;s&&s.tagName===o&&st(s,t)&&(Me(t,s),ct(s))}}}(t)},se.closeDropDown=function(e){o&&(Ae(o),o=null),!0===e&&se.focus()},se.wysiwygEditorInsertHtml=function(e,t,n){var o=Ke(i);se.focus(),!n&&Ne(v,"code")||(m.insertHTML(e,t),m.saveRange(),D(),it(f),Ie(n=Re(f,"#sceditor-end-marker")[0]),e=f.scrollTop,t=lt(n).top+1.5*n.offsetHeight-o,Le(n),(e<t||t+o<e)&&(f.scrollTop=t),oe(!1),m.restoreRange(),X())},se.wysiwygEditorInsertText=function(e,t){se.wysiwygEditorInsertHtml(ft(e),ft(t))},se.insertText=function(e,t){return se.inSourceMode()?se.sourceEditorInsertText(e,t):se.wysiwygEditorInsertText(e,t),se},se.sourceEditorInsertText=function(e,t){var n,o=s.selectionStart,r=s.selectionEnd,i=s.scrollTop;s.focus(),n=s.value,t&&(e+=n.substring(o,r)+t),s.value=n.substring(0,o)+e+n.substring(r,n.length),s.selectionStart=o+e.length-(t?t.length:0),s.selectionEnd=s.selectionStart,s.scrollTop=i,s.focus(),oe()},se.getRangeHelper=function(){return m},se.sourceEditorCaret=function(e){return s.focus(),e?(s.selectionStart=e.start,s.selectionEnd=e.end,this):{start:s.selectionStart,end:s.selectionEnd}},se.val=function(e,t){return ye(e)?(se.inSourceMode()?se.setSourceEditorValue(e):(!1!==t&&"toHtml"in a&&(e=a.toHtml(e)),se.setWysiwygEditorValue(e)),se):se.inSourceMode()?se.getSourceEditorValue(!1):se.getWysiwygEditorValue(t)},se.insert=function(e,t,n,o,r){return se.inSourceMode()?se.sourceEditorInsertText(e,t):(t&&(i=m.selectedHtml(),e+=(i=!1!==n&&"fragmentToSource"in a?a.fragmentToSource(i,d,h):i)+t),!1!==n&&"fragmentToHtml"in a&&(e=a.fragmentToHtml(e,h)),!1!==n&&!0===r&&(e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")),se.wysiwygEditorInsertHtml(e)),se;var i},se.getWysiwygEditorValue=function(e){for(var t,n=Ee("div",{},d),o=f.childNodes,r=0;r<o.length;r++)Me(n,o[r].cloneNode(!0));return Me(f,n),it(n),Ae(n),t=n.innerHTML,!1!==e&&a.hasOwnProperty("toSource")?a.toSource(t,d):t},se.getBody=function(){return f},se.getContentAreaContainer=function(){return i},se.getSourceEditorValue=function(e){var t=s.value;return!1!==e&&"toHtml"in a?a.toHtml(t):t},se.setWysiwygEditorValue=function(e){e=e||"<p><br /></p>",f.innerHTML=ve(e),D(),X(),oe(),le()},se.setSourceEditorValue=function(e){s.value=e,oe()},se.updateOriginal=function(){r.value=se.val()},D=function(){var e,l,s,c,t,u,d;ge.emoticonsEnabled&&(e=f,l=me,s=ge.emoticonsCompat,c=e.ownerDocument,t="(^|\\s| | | | |$)",u=[],d={},De(e,"code")||(Ce(l,function(e){d[e]=new RegExp(t+dt(e)+t),u.push(e)}),u.sort(function(e,t){return t.length-e.length}),function e(t){for(t=t.firstChild;t;){if(t.nodeType!==Se||Ue(t,"code")||e(t),t.nodeType===ke)for(var n=0;n<u.length;n++){var o,r=t.nodeValue,i=u[n],a=s?r.search(d[i]):r.indexOf(i);-1<a&&(o=r.indexOf(i,a),a=et(l[i],c),i=r.substr(o+i.length),a.appendChild(c.createTextNode(i)),t.nodeValue=r.substr(0,o),t.parentNode.insertBefore(a,t.nextSibling))}t=t.nextSibling}}(e)))},se.inSourceMode=function(){return Ve(x,"sourceMode")},se.sourceMode=function(e){var t=se.inSourceMode();return"boolean"!=typeof e?t:((t&&!e||!t&&e)&&se.toggleSourceMode(),se)},se.toggleSourceMode=function(){var e=se.inSourceMode();!yt&&e||(e||(m.saveRange(),m.clear()),y=null,se.blur(),e?se.setWysiwygEditorValue(se.getSourceEditorValue()):se.setSourceEditorValue(se.getWysiwygEditorValue()),Be(s),Be(i),$e(x,"wysiwygMode",e),$e(x,"sourceMode",!e),$(),Y())},K=function(){return s.focus(),s.value.substring(s.selectionStart,s.selectionEnd)},N=function(e,t){se.inSourceMode()?t.txtExec&&(Array.isArray(t.txtExec)?se.sourceEditorInsertText.apply(se,t.txtExec):t.txtExec.call(se,e,K())):t.exec&&(xe(t.exec)?t.exec.call(se,e):se.execCommand(t.exec,t.hasOwnProperty("execParam")?t.execParam:null))},se.execCommand=function(e,t){var n=!1,o=se.commands[e];if(se.focus(),!Ne(m.parentNode(),"code")){try{n=d.execCommand(e,!1,t)}catch(e){}!n&&o&&o.errorMessage&&alert(se._(o.errorMessage)),Y()}},Z=function(){function e(){if(l.getSelection()&&l.getSelection().rangeCount<=0)y=null;else if(m&&!m.compare(y)){if((y=m.cloneSelected())&&y.collapsed){var e=y.startContainer,t=y.startOffset;for(t&&e.nodeType!==ke&&(e=e.childNodes[t]);e&&e.parentNode!==f;)e=e.parentNode;e&&rt(e,!0)&&(m.saveRange(),n=d,Qe(f,function(e){rt(e,!0)?(o||e.nodeType===ke?/\S/.test(e.nodeValue):!Ue(e,".sceditor-ignore"))&&(o||We(o=Ee("p",{},n),e),Me(o,e)):o=null},!1,!0),m.restoreRange())}Xe(x,"selectionchanged")}var n,o;b=!1}b||(b=!0,"onselectionchange"in d?e():setTimeout(e,100))},Q=function(){var e,t=m.parentNode();h!==t&&(e=h,h=t,v=m.getFirstBlockParent(t),Xe(x,"nodechanged",{oldNode:e,newNode:h}))},se.currentNode=function(){return h},se.currentBlockNode=function(){return v},Y=function(){var e,t,n="active",o=d,r=se.sourceMode();if(se.readOnly())Ce(Re(u,n),function(e,t){Ge(t,n)});else{r||(t=m.parentNode(),e=m.getFirstBlockParent(t));for(var i=0;i<de.length;i++){var a=0,l=pe[de[i].name],s=de[i].state,c=r&&!l._sceTxtMode||!r&&!l._sceWysiwygMode;if(ye(s)){if(!r)try{-1<(a=o.queryCommandEnabled(s)?0:-1)&&(a=o.queryCommandState(s)?1:0)}catch(e){}}else c||(a=s.call(se,t,e));$e(l,"disabled",c||a<0),$e(l,n,0<a)}E&&E.update&&E.update(r,t,e)}},j=function(e){var t,n,o;e.defaultPrevented||(se.closeDropDown(),13!==e.which||!Ue(v,"li,ul,ol")&&tt(v)&&(t=Ee("br",{},d),m.insertNode(t),(o=(n=t.parentNode).lastChild)&&o.nodeType===ke&&""===o.nodeValue&&(Ae(o),o=n.lastChild),!rt(n,!0)&&o===t&&rt(t.previousSibling)&&m.insertHTML("<br>"),e.preventDefault()))},X=function(){Je(f,function(e){if(e.nodeType===Se&&!/inline/.test(Pe(e,"display"))&&!Ue(e,".sceditor-nlf")&&tt(e)){var t=Ee("p",{},d);return t.className="sceditor-nlf",t.innerHTML="<br />",Me(f,t),!1}if(3===e.nodeType&&!/^\s*$/.test(e.nodeValue)||Ue(e,"br"))return!1})},U=function(){se.val(r.value)},W=function(){se.closeDropDown()},se._=function(){var n=arguments;return t&&t[n[0]]&&(n[0]=t[n[0]]),n[0].replace(/\{(\d+)\}/g,function(e,t){return void 0!==n[+t+1]?n[+t+1]:"{"+t+"}"})},q=function(t){g&&g.call(t.type+"Event",t,se);var e=(t.target===s?"scesrc":"scewys")+t.type;ce[e]&&ce[e].forEach(function(e){e.call(se,t)})},se.bind=function(e,t,n,o){for(var r,i,a=(e=e.split(" ")).length;a--;)xe(t)&&(r="scewys"+e[a],i="scesrc"+e[a],n||(ce[r]=ce[r]||[],ce[r].push(t)),o||(ce[i]=ce[i]||[],ce[i].push(t)),"valuechanged"===e[a]&&(oe.hasHandler=!0));return se},se.unbind=function(e,t,n,o){for(var r=(e=e.split(" ")).length;r--;)xe(t)&&(n||Te(ce["scewys"+e[r]]||[],t),o||Te(ce["scesrc"+e[r]]||[],t));return se},se.blur=function(e,t,n){return xe(e)?se.bind("blur",e,t,n):(se.sourceMode()?s:f).blur(),se},se.focus=function(e,t,n){if(xe(e))se.bind("focus",e,t,n);else if(se.inSourceMode())s.focus();else{if(Re(d,":focus").length)return;var o,n=m.selectedRange();y||J(!0),n&&1===n.endOffset&&n.collapsed&&(o=n.endContainer)&&1===o.childNodes.length&&Ue(o.firstChild,"br")&&(n.setStartBefore(o.firstChild),n.collapse(!0),m.selectRange(n)),l.focus(),f.focus()}return Y(),se},se.keyDown=function(e,t,n){return se.bind("keydown",e,t,n)},se.keyPress=function(e,t,n){return se.bind("keypress",e,t,n)},se.keyUp=function(e,t,n){return se.bind("keyup",e,t,n)},se.nodeChanged=function(e){return se.bind("nodechanged",e,!1,!0)},se.selectionChanged=function(e){return se.bind("selectionchanged",e,!1,!0)},se.valueChanged=function(e,t,n){return se.bind("valuechanged",e,t,n)},ee=function(e){var n=0,o=se.emoticonsCache,t=String.fromCharCode(e.which);Ne(v,"code")||(o||(o=[],Ce(me,function(e,t){o[n++]=[e,t]}),o.sort(function(e,t){return e[0].length-t[0].length}),se.emoticonsCache=o,se.longestEmoticonCode=o[o.length-1][0].length),m.replaceKeyword(se.emoticonsCache,!0,!0,se.longestEmoticonCode,ge.emoticonsCompat,t)&&(ge.emoticonsCompat&&/^\s$/.test(t)||e.preventDefault()))},te=function(){!function(e,t){var n=/[^\s\xA0\u2002\u2003\u2009]+/,o=e&&Re(e,"img[data-sceditor-emoticon]");if(e&&o.length)for(var r=0;r<o.length;r++){var i,a,l,s,c=o[r],u=c.parentNode,d=c.previousSibling,f=c.nextSibling;(d&&n.test(d.nodeValue.slice(-1))||f&&n.test((f.nodeValue||"")[0]))&&(a=-1,l=(i=t.cloneSelected()).startContainer,s=d.nodeValue||"",s+=je(c,"sceditor-emoticon"),l===f&&(a=s.length+i.startOffset),l===e&&e.childNodes[i.startOffset]===f&&(a=s.length),l===d&&(a=i.startOffset),(f=f&&f.nodeType===ke?f:u.insertBefore(u.ownerDocument.createTextNode(""),f)).insertData(0,s),Ae(d),Ae(c),-1<a&&(i.setStart(f,a),i.collapse(!0),t.selectRange(i)))}}(v,m)},se.emoticons=function(e){return e||!1===e?((ge.emoticonsEnabled=e)?(Oe(f,"keypress",ee),se.sourceMode()||(m.saveRange(),D(),oe(!1),m.restoreRange())):(Ce(Re(f,"img[data-sceditor-emoticon]"),function(e,t){var n=je(t,"sceditor-emoticon"),n=d.createTextNode(n);t.parentNode.replaceChild(n,t)}),Fe(f,"keypress",ee),oe()),se):ge.emoticonsEnabled},se.css=function(e){return w||(w=Ee("style",{id:"inline"},d),Me(d.head,w)),ye(e)?(w.styleSheet?w.styleSheet.cssText=e:w.innerHTML=e,se):w.styleSheet?w.styleSheet.cssText:w.innerHTML},B=function(e){var t=[],n={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|","[":"{","]":"}"},o={109:"-",110:"del",111:"/",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},r=e.which,i={8:"backspace",9:"tab",13:"enter",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",91:"win",92:"win",93:"select",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[r]||String.fromCharCode(r).toLowerCase();(e.ctrlKey||e.metaKey)&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&(t.push("shift"),o[r]?i=o[r]:n[i]&&(i=n[i])),i&&(r<16||18<r)&&t.push(i),t=t.join("+"),fe[t]&&!1===fe[t].call(se)&&(e.stopPropagation(),e.preventDefault())},se.addShortcut=function(e,t){return e=e.toLowerCase(),ye(t)?fe[e]=function(){return N(pe[t],se.commands[t]),!1}:fe[e]=t,se},se.removeShortcut=function(e){return delete fe[e.toLowerCase()],se},P=function(e){var t,n,o;if(!ge.disableBlockRemove&&8===e.which&&(n=m.selectedRange())&&(t=n.startContainer,0===n.startOffset&&(o=ne())&&!Ue(o,"body"))){for(;t!==o;){for(;t.previousSibling;)if((t=t.previousSibling).nodeType!==ke||t.nodeValue)return;if(!(t=t.parentNode))return}se.clearBlockFormatting(o),e.preventDefault()}},ne=function(){for(var e=v;!tt(e)||rt(e,!0);)if(!(e=e.parentNode)||Ue(e,"body"))return;return e},se.clearBlockFormatting=function(e){return!(e=e||ne())||Ue(e,"body")||(m.saveRange(),e.className="",ze(e,"style",""),Ue(e,"p,div,td")||nt(e,"p"),m.restoreRange()),se},oe=function(e){var t,n,o;g&&(g.hasHandler("valuechangedEvent")||oe.hasHandler)&&(o=!(n=se.sourceMode())&&m.hasSelection(),e=(c=!1)!==e&&!d.getElementById("sceditor-start-marker"),p&&(clearTimeout(p),p=!1),o&&e&&m.saveRange(),(t=n?s.value:f.innerHTML)!==oe.lastVal&&(oe.lastVal=t,Xe(x,"valuechanged",{rawValue:n?se.val():t})),o&&e&&m.removeMarkers())},re=function(){p&&oe()},ie=function(e){var t=e.which,e=13===(n=ie.lastChar)||32===n,n=8===n||46===n;ie.lastChar=t,c||(13===t||32===t?e?ie.triggerNext=!0:oe():8===t||46===t?n?ie.triggerNext=!0:oe():ie.triggerNext&&(oe(),ie.triggerNext=!1),clearTimeout(p),p=setTimeout(function(){c||oe()},1500))},V=function(e){(c=/start/i.test(e.type))||oe()},ae=function(){se.updateOriginal()},e()}on.locale={},on.formats={},on.icons={},on.command={get:function(e){return mt[e]||null},set:function(e,t){return!(!e||!t)&&((t=we(mt[e]||{},t)).remove=function(){on.command.remove(e)},mt[e]=t,this)},remove:function(e){return mt[e]&&delete mt[e],this}},window.sceditor={command:on.command,commands:mt,defaultOptions:ut,ios:vt,isWysiwygSupported:yt,regexEscape:dt,escapeEntities:ft,escapeUriScheme:function(e){var t,n=window.location;return e&&/^[^\/]*:/i.test(e)&&!m.test(e)?((t=n.pathname.split("/")).pop(),n.protocol+"//"+n.host+t.join("/")+"/"+e):e},dom:{css:Pe,attr:ze,removeAttr:He,is:Ue,closest:Ne,width:Ye,height:Ke,traverse:Qe,rTraverse:Je,parseHTML:et,hasStyling:tt,convertElement:nt,blockLevelList:c,canHaveChildren:ot,isInline:rt,copyCSS:function(e,t){t.style&&e.style&&(t.style.cssText=e.style.cssText+t.style.cssText)},fixNesting:it,findCommonAncestor:function(e,t){for(;e=e.parentNode;)if(e!==t&&e.contains&&e.contains(t))return e},getSibling:u,removeWhiteSpace:at,extractContents:f,getOffset:lt,getStyle:p,hasStyle:function(e,t,n){return!!(t=p(e,t))&&(!n||t===n||Array.isArray(n)&&-1<n.indexOf(t))}},locale:on.locale,icons:on.icons,utils:{each:Ce,isEmptyObject:t,extend:we},plugins:gt.plugins,formats:on.formats,create:function(e,t){t=t||{},De(e,".sceditor-container")||(t.runWithoutWysiwygSupport||yt)&&new on(e,t)},instance:function(e){return e._sceditor}},o.default.sceditor=window.sceditor,o.default.fn.sceditor=function(e){var t,n=[];return this.each(function(){t=this._sceditor,"state"===e?n.push(!!t):"instance"===e?n.push(t):t||o.default.sceditor.create(this,e)}),n.length?1===n.length?n[0]:n:this}}(),function(y){"use strict";var b=y.dom,e=y.utils,x=b.css,o=b.attr,w=b.is,T=b.removeAttr,n=b.convertElement,i=e.extend,a=e.each,C=e.isEmptyObject,l=y.command.get,t={bold:{txtExec:["<strong>","</strong>"]},italic:{txtExec:["<em>","</em>"]},underline:{txtExec:['<span style="text-decoration:underline;">',"</span>"]},strike:{txtExec:['<span style="text-decoration:line-through;">',"</span>"]},subscript:{txtExec:["<sub>","</sub>"]},superscript:{txtExec:["<sup>","</sup>"]},left:{txtExec:['<div style="text-align:left;">',"</div>"]},center:{txtExec:['<div style="text-align:center;">',"</div>"]},right:{txtExec:['<div style="text-align:right;">',"</div>"]},justify:{txtExec:['<div style="text-align:justify;">',"</div>"]},font:{txtExec:function(e){var t=this;l("font")._dropDown(t,e,function(e){t.insertText('<span style="font-family:'+e+';">',"</span>")})}},size:{txtExec:function(e){var t=this;l("size")._dropDown(t,e,function(e){t.insertText('<span style="font-size:'+e+';">',"</span>")})}},color:{txtExec:function(e){var t=this;l("color")._dropDown(t,e,function(e){t.insertText('<span style="color:'+e+';">',"</span>")})}},bulletlist:{txtExec:["<ul><li>","</li></ul>"]},orderedlist:{txtExec:["<ol><li>","</li></ol>"]},table:{txtExec:["<table><tr><td>","</td></tr></table>"]},horizontalrule:{txtExec:["<hr />"]},code:{txtExec:["<code>","</code>"]},image:{txtExec:function(e,t){var r=this;l("image")._dropDown(r,e,t,function(e,t,n){var o="";t&&(o+=' width="'+t+'"'),n&&(o+=' height="'+n+'"'),r.insertText("<img"+o+' src="'+e+'" />')})}},email:{txtExec:function(e,n){var o=this;l("email")._dropDown(o,e,function(e,t){o.insertText('<a href="mailto:'+e+'">'+(t||n||e)+"</a>")})}},link:{txtExec:function(e,n){var o=this;l("link")._dropDown(o,e,function(e,t){o.insertText('<a href="'+e+'">'+(t||n||e)+"</a>")})}},quote:{txtExec:["<blockquote>","</blockquote>"]},youtube:{txtExec:function(e){var n=this;l("youtube")._dropDown(n,e,function(e,t){n.insertText('<iframe width="560" height="315" src="https://www.youtube.com/embed/{id}?wmode=opaque&start='+t+'" data-youtube-id="'+e+'" frameborder="0" allowfullscreen></iframe>')})}},rtl:{txtExec:['<div stlye="direction:rtl;">',"</div>"]},ltr:{txtExec:['<div stlye="direction:ltr;">',"</div>"]}};function S(){var r=this,n={},g={};function e(e,t,n){var p,o,r,i,a,l,s,c,u,d,f,m=n.createElement("div");return m.innerHTML=t,x(m,"visibility","hidden"),n.body.appendChild(m),t=m,b.traverse(t,function(e){var t=e.nodeName.toLowerCase();h("*",e),h(t,e)},!0),p=m,b.traverse(p,function(e){var t,n=e.nodeName.toLowerCase(),o=e.parentNode,r=e.nodeType,i=!b.isInline(e),a=e.previousSibling,l=e.nextSibling,s="iframe"!==n&&function e(t,n){var o=t.childNodes,r=t.nodeName.toLowerCase(),i=t.nodeValue,a=o.length,l=S.allowedEmptyTags||[];if(n&&"br"===r)return!0;if(w(t,".sceditor-ignore"))return!0;if(-1<l.indexOf(r)||"td"===r||!b.canHaveChildren(t))return!1;if(i&&/\S|\u00A0/.test(i))return!1;for(;a--;)if(!e(o[a],n&&!t.previousSibling&&!t.nextSibling))return!1;if(t.getBoundingClientRect&&(t.className||t.hasAttributes("style")))return!(i=t.getBoundingClientRect()).width||!i.height;return!0}(e,o===p&&(!a&&!l)&&"br"!==n),c=e.ownerDocument,u=S.allowedTags,d=e.firstChild,f=S.disallowedTags;if(3!==r&&(4===r?n="!cdata":"!"!==n&&8!==r||(n="!comment"),1===r&&w(e,".sceditor-nlf")&&(!d||1===e.childNodes.length&&/br/i.test(d.nodeName)?s=!0:(e.classList.remove("sceditor-nlf"),e.className||T(e,"class"))),s?t=!0:u&&u.length?t=u.indexOf(n)<0:f&&f.length&&(t=-1<f.indexOf(n)),t)){if(!s){for(i&&a&&b.isInline(a)&&o.insertBefore(c.createTextNode(" "),e);e.firstChild;)o.insertBefore(e.firstChild,l);i&&l&&b.isInline(l)&&o.insertBefore(c.createTextNode(" "),l)}o.removeChild(e)}},!0),t=m,u=(c=S.allowedAttribs)&&!C(c),f=(d=S.disallowedAttribs)&&!C(d),g={},b.traverse(t,function(e){if(e.attributes&&(o=e.nodeName.toLowerCase(),a=e.attributes.length))for(g[o]||(g[o]=u?v(c["*"],c[o]):v(d["*"],d[o]));a--;)r=e.attributes[a],i=r.name,l=g[o][i],s=!1,u?s=null!==l&&(!Array.isArray(l)||l.indexOf(r.value)<0):f&&(s=null===l||Array.isArray(l)&&-1<l.indexOf(r.value)),s&&e.removeAttribute(i)}),e||function(e){var t;b.removeWhiteSpace(e);for(var n,o=e.firstChild;o;)n=o.nextSibling,b.isInline(o)&&!w(o,".sceditor-ignore")?(t||(t=e.ownerDocument.createElement("p"),o.parentNode.insertBefore(t,o)),t.appendChild(o)):t=null,o=n}(m),e=(new y.XHTMLSerializer).serialize(m,!0),n.body.removeChild(m),e}function h(e,o){n[e]&&n[e].forEach(function(n){n.tags[e]?a(n.tags[e],function(e,t){o.getAttributeNode&&(!(e=o.getAttributeNode(e))||t&&t.indexOf(e.value)<0||n.conv.call(r,o))}):n.conv&&n.conv.call(r,o)})}function v(e,t){var n={};return e&&(n=i({},n,e)),t&&a(t,function(e,t){Array.isArray(t)?n[e]=(n[e]||[]).concat(t):n[e]||(n[e]=null)}),n}r.init=function(){C(S.converters||{})||a(S.converters,function(e,t){a(t.tags,function(e){n[e]||(n[e]=[]),n[e].push(t)})}),this.commands=i(!0,{},t,this.commands)},r.toSource=e.bind(null,!1),r.fragmentToSource=e.bind(null,!0)}y.XHTMLSerializer=function(){var o={indentStr:"\t"},r=[],d=0;function f(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"," ":"&nbsp;"};return e?e.replace(/[&<>"\xa0]/g,function(e){return t[e]||e}):""}function p(t,e){switch(t.nodeType){case 1:!function(e,t){var n,o,r,i=e.nodeName.toLowerCase(),a="iframe"===i,l=e.attributes.length,s=e.firstChild,c=t||/pre(?:\-wrap)?$/i.test(x(e,"whiteSpace")),u=!e.firstChild&&!b.canHaveChildren(e)&&!a;if(!w(e,".sceditor-ignore")){for(m("<"+i,!t&&g(e));l--;)o=e.attributes[l],r=o.value,m(" "+o.name.toLowerCase()+'="'+f(r)+'"',!1);for(m(u?" />":">",!1),a||(n=s);n;)d++,p(n,c),n=n.nextSibling,d--;u||m("</"+i+">",!c&&!a&&g(e)&&s&&g(s))}}(t,e);break;case 3:o=e,r=(n=t).nodeValue,!void((r=!o?r.replace(/[^\S\u00A0]+/g," "):r)&&m(f(r),!o&&g(n)));break;case 4:m("<![CDATA["+f(t.nodeValue)+"]]>");break;case 8:m("\x3c!-- "+f(t.nodeValue)+" --\x3e");break;case 9:case 11:!function(){for(var e=t.firstChild;e;)p(e),e=e.nextSibling}()}var n,o,r}function m(e,t){var n=d;if(!1!==t)for(r.length&&r.push("\n");n--;)r.push(o.indentStr);r.push(e)}function g(e){var t=e.previousSibling;return 1!==e.nodeType&&t?!b.isInline(t):!t&&!b.isInline(e.parentNode)||!b.isInline(e)}this.serialize=function(e,t){if(r=[],t)for(e=e.firstChild;e;)p(e),e=e.nextSibling;else p(e);return r.join("")}},S.converters=[{tags:{"*":{width:null}},conv:function(e){x(e,"width",o(e,"width")),T(e,"width")}},{tags:{"*":{height:null}},conv:function(e){x(e,"height",o(e,"height")),T(e,"height")}},{tags:{li:{value:null}},conv:function(e){T(e,"value")}},{tags:{"*":{text:null}},conv:function(e){x(e,"color",o(e,"text")),T(e,"text")}},{tags:{"*":{color:null}},conv:function(e){x(e,"color",o(e,"color")),T(e,"color")}},{tags:{"*":{face:null}},conv:function(e){x(e,"fontFamily",o(e,"face")),T(e,"face")}},{tags:{"*":{align:null}},conv:function(e){x(e,"textAlign",o(e,"align")),T(e,"align")}},{tags:{"*":{border:null}},conv:function(e){x(e,"borderWidth",o(e,"border")),T(e,"border")}},{tags:{applet:{name:null},img:{name:null},layer:{name:null},map:{name:null},object:{name:null},param:{name:null}},conv:function(e){o(e,"id")||o(e,"id",o(e,"name")),T(e,"name")}},{tags:{"*":{vspace:null}},conv:function(e){x(e,"marginTop",+o(e,"vspace")),x(e,"marginBottom",+o(e,"vspace")),T(e,"vspace")}},{tags:{"*":{hspace:null}},conv:function(e){x(e,"marginLeft",+o(e,"hspace")),x(e,"marginRight",+o(e,"hspace")),T(e,"hspace")}},{tags:{hr:{noshade:null}},conv:function(e){x(e,"borderStyle","solid"),T(e,"noshade")}},{tags:{"*":{nowrap:null}},conv:function(e){x(e,"whiteSpace","nowrap"),T(e,"nowrap")}},{tags:{big:null},conv:function(e){x(n(e,"span"),"fontSize","larger")}},{tags:{small:null},conv:function(e){x(n(e,"span"),"fontSize","smaller")}},{tags:{b:null},conv:function(e){n(e,"strong")}},{tags:{u:null},conv:function(e){x(n(e,"span"),"textDecoration","underline")}},{tags:{s:null,strike:null},conv:function(e){x(n(e,"span"),"textDecoration","line-through")}},{tags:{dir:null},conv:function(e){n(e,"ul")}},{tags:{center:null},conv:function(e){x(n(e,"div"),"textAlign","center")}},{tags:{font:{size:null}},conv:function(e){x(e,"fontSize",x(e,"fontSize")),T(e,"size")}},{tags:{font:null},conv:function(e){n(e,"span")}},{tags:{"*":{type:["_moz"]}},conv:function(e){T(e,"type")}},{tags:{"*":{_moz_dirty:null}},conv:function(e){T(e,"_moz_dirty")}},{tags:{"*":{_moz_editor_bogus_node:null}},conv:function(e){e.parentNode.removeChild(e)}},{tags:{"*":{"data-sce-target":null}},conv:function(e){var t=o(e,"rel")||"",n=o(e,"data-sce-target");"_blank"===n&&w(e,"a")&&(/(^|\s)noopener(\s|$)/.test(t)||o(e,"rel","noopener"+(t?" "+t:"")),o(e,"target",n)),T(e,"data-sce-target")}},{tags:{code:null},conv:function(e){for(var t=e.getElementsByTagName("div");e=t[0];)e.style.display="block",n(e,"span")}}],S.allowedAttribs={},S.disallowedAttribs={},S.allowedTags=[],S.disallowedTags=[],S.allowedEmptyTags=[],y.formats.xhtml=S}(sceditor);