froala-editor
Version:
The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.
7 lines (6 loc) • 1.82 MB
JavaScript
/*!
* froala_editor v5.3.0 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2026 Froala Labs
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).FroalaEditor=t()}(this,function(){"use strict";function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e){if(Array.isArray(e))return e}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function H(s){return function(){var e=this,o=arguments;return new Promise(function(t,n){var r=s.apply(e,o);function a(e){d(r,t,n,a,i,"next",e)}function i(e){d(r,t,n,a,i,"throw",e)}a(void 0)})}}function _(e,t,n){t=f(t);var r=e,e=m()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(r)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G(r.key),r)}}function w(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(e,t){var n,r,a,i,o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(o)return a=!(r=!0),{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){a=!0,n=e},f:function(){try{r||null==o["return"]||o["return"]()}finally{if(a)throw n}}};if(Array.isArray(e)||(o=q(e))||t)return o&&(e=o),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n["return"]&&(o=n["return"](),Object(o)!==o))return}finally{if(c)throw a}}return s}}function D(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach(function(e){S(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $(){var h,g,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var a,i,o,s,l,c,d,u,f,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return P(t,"_invoke",(a=e,i=n,d=r||[],u=!1,f={p:c=0,n:0,v:h,a:p,f:p.bind(h,4),d:function(e,t){return o=e,s=0,l=h,f.n=t,m}},function(e,t,n){if(1<c)throw TypeError("Generator is already running");for(u&&1===t&&p(t,n),s=t,l=n;(g=s<2?h:l)||!u;){o||(s?s<3?(1<s&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(g=o[e=s?e:"next"]){if(!(g=g.call(o,l)))throw TypeError("iterator result is not an object");if(!g.done)return g;l=g.value,s<2&&(s=0)}else 1===s&&(g=o["return"])&&g.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+e+"' method"),s=1);o=h}else if((g=(u=f.n<0)?l:a.call(i,f))!==m)break}catch(g){o=h,s=1,l=g}finally{c=1}}return{value:g,done:u}}),!0),t;function p(e,t){for(s=e,l=t,g=0;!u&&c&&!n&&g<d.length;g++){var n,r=d[g],a=f.p,i=r[2];3<e?(n=i===t)&&(l=r[(s=r[4])?5:s=3],r[4]=r[5]=h):r[0]<=a&&((n=e<2&&a<r[1])?(s=0,f.v=t,f.n=r[1]):a<i&&(n=e<3||r[0]>t||i<t)&&(r[4]=e,r[5]=t,f.n=i,s=0))}if(n||1<e)return m;throw u=!0,t}}var m={};function v(){}function a(){}function i(){}g=Object.getPrototypeOf;var e=[][t]?g(g([][t]())):(P(g={},t,function(){return this}),g),o=i.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,P(e,n,"GeneratorFunction")),e.prototype=Object.create(o),e}return P(o,"constructor",a.prototype=i),P(i,"constructor",a),P(i,n,a.displayName="GeneratorFunction"),P(o),P(o,n,"Generator"),P(o,t,function(){return this}),P(o,"toString",function(){return"[object Generator]"}),($=function(){return{w:r,m:s}})()}function P(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(P=function(e,t,n,r){function a(t,n){P(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))})(e,t,n,r)}function K(e,t){return(K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t){return n(e)||v(e,t)||q(e,t)||D()}function W(e,t,n){var r=u(f(e.prototype),t,n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}function j(e){return n(e)||t(e)||q(e)||D()}function Te(e){return function(e){if(Array.isArray(e))return I(e)}(e)||t(e)||q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e){e=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(e=n.call(e,t)))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==typeof e?e:e+""}function ct(e){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){var n;if(e)return"string"==typeof e?I(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}if(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(document.documentElement.contains(t))do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a)for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])}return n},writable:!0,configurable:!0}),function(){var i=/^\s*:scope/gi,o=/,\s*:scope/gi,s=document.createElement("div");function e(e,t){var a=e[t];e[t]=function(e){var t,n=!1,r=!1;return e&&!Array.isArray(e)&&(e.match(i)||e.match(o))?(this.parentNode||(s.appendChild(this),r=!0),t=this.parentNode,this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),n=!0),t=a.call(t,e.replace(i,"#".concat(this.id)).replace(o,",#".concat(this.id))),n&&(this.id=""),r&&s.removeChild(this),t):a.call(this,e)}}try{var t=s.querySelectorAll(":scope *");if(!t||Array.isArray(t))throw"error"}catch(Lt){e(Element.prototype,"querySelector"),e(Element.prototype,"querySelectorAll"),e(HTMLElement.prototype,"querySelector"),e(HTMLElement.prototype,"querySelectorAll")}}(),"document"in self){var e;if(!("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))))if("Element"in(e=self)){var Y,Z="classList",X="prototype",e=e.Element[X],J=Object,Q=String[X].trim||function(){return this.replace(/^\s+|\s+$/g,"")},ee=Array[X].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},te=function te(e,t){this.name=e,this.code=DOMException[e],this.message=t},ne=function ne(e,t){if(""===t)throw new te("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new te("INVALID_CHARACTER_ERR","The token must not contain space characters.");return ee.call(e,t)},re=(Y=function Y(e){for(var t=Q.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,a=n.length;r<a;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}})[X]=[],ae=function ae(){return new Y(this)};if(te[X]=Error[X],re.item=function(e){return this[e]||null},re.contains=function(e){return~ne(this,e+"")},re.add=function(){for(var e,t=arguments,n=0,r=t.length,a=!1;~ne(this,e=t[n]+"")||(this.push(e),a=!0),++n<r;);a&&this._updateClassName()},re.remove=function(){var e,t,n=arguments,r=0,a=n.length,i=!1;do{for(t=ne(this,e=n[r]+"");~t;)this.splice(t,1),i=!0,t=ne(this,e)}while(++r<a);i&&this._updateClassName()},re.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&"remove":!1!==t&&"add";return r&&this[r](e),!0===t||!1===t?t:!n},re.replace=function(e,t){e=ne(e+"");~e&&(this.splice(e,1,t),this._updateClassName())},re.toString=function(){return this.join(" ")},J.defineProperty){re={get:ae,enumerable:!0,configurable:!0};try{J.defineProperty(e,Z,re)}catch(Kt){void 0!==Kt.number&&-2146823252!==Kt.number||(re.enumerable=!1,J.defineProperty(e,Z,re))}}else J[X].__defineGetter__&&e.__defineGetter__(Z,ae)}(re=document.createElement("_")).classList.add("c1","c2"),re.classList.contains("c2")||((ie=function ie(e){var ie=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){for(var t=arguments.length,n=0;n<t;n++)ie.call(this,arguments[n])}})("add"),ie("remove")),re.classList.toggle("c3",!1),re.classList.contains("c3")&&(oe=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:oe.call(this,e)}),"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(" "),e=n.indexOf(e+"");~e&&(n=n.slice(e),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))})}var ie,oe,X=-1;if("Microsoft Internet Explorer"===navigator.appName?(Yn=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(Yn)&&(X=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(Yn=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(Yn))&&(X=parseFloat(RegExp.$1)),!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof HTMLElement||X<0)){var se,le,ce=!1;try{var de=document.createElement("div");de.addEventListener("focus",function(e){e.preventDefault(),e.stopPropagation()},!0),de.focus(Object.defineProperty({},"preventScroll",{get:function(){if(navigator&&"undefined"!=typeof navigator.userAgent&&navigator.userAgent&&navigator.userAgent.match(/Edge\/1[7-8]/))return ce=!1;ce=!0}}))}catch(Lt){}HTMLElement.prototype.nativeFocus!==undefined||ce||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,se=function se(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push([t,t.scrollTop,t.scrollLeft]),t=t.parentNode;return n.push([t=r,t.scrollTop,t.scrollLeft]),n},le=function le(e){for(var t=0;t<e.length;t++)e[t][0].scrollTop=e[t][1],e[t][0].scrollLeft=e[t][2]},HTMLElement.prototype.focus=function Qc(e){var t,n;e&&e.preventScroll?(t=se(this),"function"==typeof setTimeout?(n=this,setTimeout(function(){n.nativeFocus(),le(t)},0)):(this.nativeFocus(),le(t))):this.nativeFocus()})}function dt(e,t,n){if("string"!=typeof e)return new dt.Bootstrap(e,t,n);for(var r=document.querySelectorAll(e),a=(t&&t.iframe_document&&(r=t.iframe_document.querySelectorAll(e)),[]),i=0;i<r.length;i++){var o=r[i]["data-froala.editor"];a.push(o||new dt.Bootstrap(r[i],t,n))}return 1==a.length?a[0]:a}dt.RegisterPlugins=function(e){for(var t=0;t<e.length;t++)e[t].call(dt)},Object.assign(dt,{DEFAULTS:{allowStylingOnNonEditable:!1,initOnClick:!1,pluginsEnabled:null,pluginsDisabled:null},MODULES:{},PLUGINS:{},VERSION:"5.3.0",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),dt.MODULES.node=function(o){var n=o.$;function s(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]}function l(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&0<=dt.BLOCK_TAGS.indexOf(e.tagName.toLowerCase())}function c(e){var t={},n=e.attributes;if(n)for(var r=0;r<n.length;r++){var a=n[r];t[a.nodeName]=a.value}return t}function t(e){for(var t="",n=c(e),r=Object.keys(n),a=0;a<r.length;a++){var i=r[a],o=n[i];o.indexOf("'")<0&&0<=o.indexOf('"')?t+=" ".concat(i,"='").concat(o,"'"):(0<=o.indexOf('"')&&0<=o.indexOf("'")&&(o=o.replace(/"/g,""")),t+=" ".concat(i,'="').concat(o,'"'))}return t}function r(e){return e===o.el}return{isBlock:l,isEmpty:function(e,t){if(!e)return!0;if(e.querySelector("table"))return!1;for(var n=s(e),r=(1===n.length&&l(n[0])&&(n=s(n[0])),!1),a=0;a<n.length;a++){var i=n[a];if((!t||!o.node.hasClass(i,"fr-marker"))&&(i.nodeType!==Node.TEXT_NODE||0!==i.textContent.length)){if("BR"!==i.tagName&&0<(i.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(r)return!1;"BR"===i.tagName&&(r=!0)}}return!(e.querySelectorAll(dt.VOID_ELEMENTS.join(",")).length-e.querySelectorAll("br").length||e.querySelector("".concat(o.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<e.querySelectorAll(dt.BLOCK_TAGS.join(",")).length||e.querySelector("".concat(o.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)")))},blockParent:function(e){for(;e&&e.parentNode!==o.el&&(!e.parentNode||!o.node.hasClass(e.parentNode,"fr-inner"));)if(l(e=e.parentNode))return e;return null},deepestParent:function(e,t,n){if(void 0===n&&(n=!0),(t=void 0===t?[]:t).push(o.el),0<=t.indexOf(e.parentNode)||e.parentNode&&o.node.hasClass(e.parentNode,"fr-inner")||e.parentNode&&0<=dt.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)&&n)return null;for(;t.indexOf(e.parentNode)<0&&e.parentNode&&!o.node.hasClass(e.parentNode,"fr-inner")&&(dt.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)<0||!n)&&(!l(e)||l(e.parentNode))&&(!l(e)||!l(e.parentNode)||!n);)e=e.parentNode;return e},rawAttributes:c,attributes:t,clearAttributes:function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--){var r=t[n];e.removeAttribute(r.nodeName)}},openTagString:function(e){return"<".concat(e.tagName.toLowerCase()).concat(t(e),">")},closeTagString:function(e){return"</".concat(e.tagName.toLowerCase(),">")},isFirstSibling:function a(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&o.node.hasClass(n,"fr-marker");)n=n.previousSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&a(n)},isLastSibling:function i(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&o.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&i(n)},isList:function(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:r,contents:s,isVoid:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=dt.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function(e){return e===o.doc.activeElement&&(!o.doc.hasFocus||o.doc.hasFocus())&&Boolean(r(e)||e.type||e.href||~e.tabIndex)},isEditable:function(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0&&!(e.viewportElement&&"svg"===e.viewportElement.tagName)},isDeletable:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function(e,t){return(e=e instanceof n?e.get(0):e)&&e.classList&&e.classList.contains(t)},filter:function(e){return o.browser.msie?e:{acceptNode:e}}}},Object.assign(dt.DEFAULTS,{DOMPurify:window.DOMPurify,htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"],htmlRemoveTags:["script","style"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap"],htmlAllowedStyleProps:[".*"],htmlAllowComments:!0,htmlUntouched:!1,preserveTabSpaces:!1,fullPage:!1}),dt.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},dt.MODULES.clean=function(N){var v,b,C,y,R=N.$;function a(e){if(e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=e.getAttribute("class").indexOf("fr-marker")||["TABLE","TBODY","THEAD","TFOOT","TR","TD","TH"].includes(e.nodeName))return!1;for(var t=N.node.contents(e),n=[],r=0;r<t.length;r++)t[r].nodeType!==Node.ELEMENT_NODE||N.node.isVoid(t[r])?t[r].nodeType===Node.TEXT_NODE&&(t[r].textContent=t[r].textContent.replace(/\u200b/g,"")):t[r].textContent.replace(/\u200b/g,"").length!==t[r].textContent.length&&a(t[r]);if(e.nodeType===Node.ELEMENT_NODE&&!N.node.isVoid(e)&&(e.normalize(),t=N.node.contents(e),n=e.querySelectorAll(".fr-marker"),t.length-n.length==0)){for(r=0;r<t.length;r++)if(t[r].nodeType===Node.ELEMENT_NODE&&(t[r].getAttribute("class")||"").indexOf("fr-marker")<0)return!1;for(r=0;r<n.length;r++)e.parentNode.insertBefore(n[r].cloneNode(!0),e);return e.parentNode.removeChild(e),!1}}var o=[];function _(e){e=e.replace(/;;/gi,";");return";"!==(e=e.replace(/^;/gi,"")).charAt(e.length)&&(e+=";"),e}function s(e){var t,n,r;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n=t.match(C),r=null,"style"===t&&N.opts.htmlAllowedStyleProps.length&&(r=e[t].match(y)),n&&r?e[t]=_(r.join(";")):n&&("style"!==t||r)||delete e[t]);for(var a="",i=Object.keys(e).sort(),o=0;o<i.length;o++)e[t=i[o]].indexOf('"')<0?a+=" ".concat(t,'="').concat(e[t],'"'):a+=" ".concat(t,"='").concat(e[t],"'");return a}function l(e,t){var n=document.implementation.createHTMLDocument("Froala DOC").createElement("DIV"),e=e.replace(/(<col[^>]*>) /g,"$1"),r=(R(n).append(e),"");if(n){for(var a=N.node.contents(n),i=0;i<a.length;i++)t(a[i]);for(a=N.node.contents(n),i=0;i<a.length;i++)r+=function s(e,t){if(e.nodeType===Node.COMMENT_NODE)return"\x3c!--".concat(e.nodeValue,"--\x3e");if(e.nodeType===Node.TEXT_NODE)return t?e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):N.opts.preserveTabSpaces?e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u00A0/g," ").replace(/\t/g," ".repeat(N.opts.tabSpaces)||" ".repeat(4)):e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u00A0/g," ").replace(/\t/g,"");if(e.nodeType!==Node.ELEMENT_NODE)return e.outerHTML;if(e.nodeType===Node.ELEMENT_NODE&&0<=["STYLE","SCRIPT","NOSCRIPT"].indexOf(e.tagName))return e.outerHTML;var n,r;if(e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName)return n=document.createElement("div"),r=e.cloneNode(!0),n.appendChild(r),n.innerHTML;if("IFRAME"===e.tagName)return e.outerHTML.replace(/</g,"<").replace(/>/g,">");var a=e.childNodes;if(0===a.length)return e.outerHTML;for(var i="",o=0;o<a.length;o++)"PRE"===e.tagName&&(t=!0),i+=s(a[o],t);return N.node.openTagString(e)+i+N.node.closeTagString(e)}(a[i])}return r}function c(e,t,n){o=[];var r,a=e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,function(e){return o.push(e),"[FROALA.EDITOR.SCRIPT ".concat(o.length-1,"]")}).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi,function(e){return o.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(o.length-1,"]")}).replace(/<meta((?:[\w\W]*?)) http-equiv="/g,'<meta$1 data-fr-http-equiv="').replace(/<img((?:[\w\W]*?)) src="/g,'<img$1 data-fr-src="'),i=null,i=(N.opts.fullPage&&(a=N.html.extractNode(e,"body")||(0<=e.indexOf("<body")?"":e),n)&&(i=N.html.extractNode(e,"head")||""),a=l(a,t),i=i&&l(i,t),n=a,t=i,a=e,N.opts.fullPage?(i=N.html.extractDoctype(a),e=s(N.html.extractNodeAttrs(a,"html")),t=null===t?N.html.extractNode(a,"head")||"<title></title>":t,r=s(N.html.extractNodeAttrs(a,"head")),a=s(N.html.extractNodeAttrs(a,"body")),"".concat(i,"<html").concat(e,"><head").concat(r,">").concat(t,"</head><body").concat(a,">").concat(n,"</body></html>")):n);return i.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi,function(e,t){return 0<=N.opts.htmlRemoveTags.indexOf("script")?"":o[parseInt(t,10)]}).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi,function(e,t){var n,r;return 0<=N.opts.htmlRemoveTags.indexOf("noscript")?"":(t=o[parseInt(t,10)].replace(/</g,"<").replace(/>/g,">"),(n=R(t))&&n.length&&(r=l(n.html(),w),n.html(r),t=n.get(0).outerHTML),t)}).replace(/<img((?:[\w\W]*?)) data-fr-src="/g,'<img$1 src="')}function E(e){var t=N.doc.createElement("DIV");return t.innerText=e,t.textContent}function w(e){for(var t,n,r=N.node.contents(e),a=0;a<r.length;a++)r[a].nodeType!==Node.TEXT_NODE&&w(r[a]);var i=e;if(!("SPAN"===i.tagName&&0<=(i.getAttribute("class")||"").indexOf("fr-marker")))if("PRE"===i.tagName&&0<=(n=(t=i).innerHTML).indexOf("\n")&&(t.innerHTML=n.replace(/\n/g,"<br>")),i.nodeType===Node.ELEMENT_NODE&&(i.getAttribute("data-fr-src")&&0!==i.getAttribute("data-fr-src").indexOf("blob:")&&i.setAttribute("data-fr-src",N.helpers.sanitizeURL(E(i.getAttribute("data-fr-src")))),i.getAttribute("href")&&i.setAttribute("href",N.helpers.sanitizeURL(E(i.getAttribute("href")))),i.getAttribute("src")&&i.setAttribute("src",N.helpers.sanitizeURL(E(i.getAttribute("src")))),i.getAttribute("srcdoc")&&i.setAttribute("srcdoc",N.clean.html(i.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(i.tagName))&&(i.innerHTML=i.innerHTML.trim()),!N.opts.pasteAllowLocalImages&&i.nodeType===Node.ELEMENT_NODE&&"IMG"===i.tagName&&i.getAttribute("data-fr-src")&&0===i.getAttribute("data-fr-src").indexOf("file://"))i.parentNode.removeChild(i);else if(i.nodeType===Node.ELEMENT_NODE&&dt.HTML5Map[i.tagName]&&""===N.node.attributes(i)&&(t=dt.HTML5Map[i.tagName],n="<".concat(t,">").concat(i.innerHTML,"</").concat(t,">"),i.insertAdjacentHTML("beforebegin",n),(i=i.previousSibling).parentNode.removeChild(i.nextSibling)),N.opts.htmlAllowComments||i.nodeType!==Node.COMMENT_NODE)if(i.tagName&&i.tagName.match(b)){if("STYLE"==i.tagName&&N.helpers.isMac()){for(var o,s=i.innerHTML.trim(),l=[],c=/{([^}]+)}/g,s=s.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|<!--[\s\S]*?-->$/,"");o=c.exec(s);)l.push(o[1]);for(var d=function d(t){var e=s.substring(0,s.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(e)&&i.parentNode.querySelectorAll(e).forEach(function(e){e.removeAttribute("class"),e.setAttribute("style",l[t])}),s=s.substring(s.indexOf("}")+1)},u=0;-1!=s.indexOf("{");u++)d(u)}i.parentNode.removeChild(i)}else if(i.tagName&&!i.tagName.match(v))"svg"===i.tagName?i.parentNode.removeChild(i):N.browser.safari&&"path"===i.tagName&&i.parentNode&&"svg"===i.parentNode.tagName||(i.outerHTML=i.innerHTML);else{var f=i.attributes;if(f)for(var p=f.length-1;0<=p;p--){var h=f[p],g=h.nodeName.match(C),m=null;"style"===h.nodeName&&N.opts.htmlAllowedStyleProps.length&&(h.value=h.value.replace(/\n/g,""),m=h.value.match(y)),g&&m?h.value=_(m.join(";")):g&&("style"!==h.nodeName||m)||i.removeAttribute(h.nodeName)}}else 0!==i.data.indexOf("[FROALA.EDITOR")&&i.parentNode.removeChild(i)}function M(){var e,t=[];do{if(t.length){var n=t[0],r=N.doc.createElement("ul");n.parentNode.insertBefore(r,n);do{var a=n,n=n.nextSibling}while(r.appendChild(a),n&&"LI"===n.tagName)}for(var t=[],i=N.el.querySelectorAll("li"),o=0;o<i.length;o++)e=i[o],N.node.isList(e.parentNode)||t.push(i[o])}while(0<t.length)}function O(){var e;do{for(var t=!1,n=N.el.querySelectorAll("li:empty"),r=0;r<n.length;r++)n[r].parentNode.removeChild(n[r]);var a=N.el.querySelectorAll("ul, ol");for(r=0;r<a.length;r++)(e=a[r]).querySelector("LI")||(t=!0,e.parentNode.removeChild(e))}while(!0===t)}return{_init:function(){N.opts.fullPage&&R.merge(N.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),0<=e.indexOf("<plaintext>")&&(e=e.replace(/<plaintext>/g,"").replace(/<\/plaintext>/g,"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u00A0/g," ").replace(/\t/g,N.opts.preserveTabSpaces?" ".repeat(N.opts.tabSpaces||4):""),o=N.html.defaultTag(),N.opts.enter!=dt.ENTER_BR)&&(e="<".concat(o,">").concat(e,"</").concat(o,">"));for(var a=R.merge([],N.opts.htmlAllowedTags),i=0;i<t.length;i++)0<=a.indexOf(t[i])&&a.splice(a.indexOf(t[i]),1);var o,s=R.merge([],N.opts.htmlAllowedAttrs);for(i=0;i<n.length;i++)0<=s.indexOf(n[i])&&s.splice(s.indexOf(n[i]),1);return s.push("data-fr-.*"),s.push("fr-.*"),v=new RegExp("^".concat(a.join("$|^"),"$"),"gi"),C=new RegExp("^".concat(s.join("$|^"),"$"),"gi"),b=new RegExp("^".concat(N.opts.htmlRemoveTags.join("$|^"),"$"),"gi"),y=N.opts.htmlAllowedStyleProps.length?new RegExp("((^|;|\\s)".concat(N.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"),":.+?(?=(;)|$))"),"gi"):null,e=c(e,w,!0),"undefined"!=typeof N.opts.DOMPurify&&(o={ALLOW_UNKNOWN_PROTOCOLS:!0},1===N.opts.htmlAllowedTags.length&&".*"===N.opts.htmlAllowedTags[0]||(o.ALLOWED_TAGS=N.opts.htmlAllowedTags),1===N.opts.htmlAllowedAttrs.length&&".*"===N.opts.htmlAllowedAttrs[0]||(o.ALLOWED_ATTR=N.opts.htmlAllowedAttrs),e=N.opts.DOMPurify.sanitize(e,o)),e},toHTML5:function(){var e=N.el.querySelectorAll(Object.keys(dt.HTML5Map).join(","));if(e.length){var t=!1;N.el.querySelector(".fr-marker")||(N.selection.save(),t=!0);for(var n=0;n<e.length;n++)""===N.node.attributes(e[n])&&R(e[n]).replaceWith("<".concat(dt.HTML5Map[e[n].tagName],">").concat(e[n].innerHTML,"</").concat(dt.HTML5Map[e[n].tagName],">"));t&&N.selection.restore()}},tables:function(){for(var e=N.el.querySelectorAll("tr"),t=0,n=0;n<e.length;n++){for(var r,a,i=e[n].outerHTML.match(/rowspan="([0-9]+)"/),o=(i&&(t+=Number(i[1])-1),e[n].children),s=!0,l=0;l<o.length;l++)if("TH"!==o[l].tagName){s=!1;break}!1!==s&&0!==o.length&&(1===o.length&&"TH"===o[0].tagName&&t?t--:(r=(i=e[n]).closest("table"))&&((a=r.querySelector("thead"))||(a=N.doc.createElement("THEAD"),r.insertBefore(a,r.firstChild)),a.contains(i)||a.appendChild(i)))}for(var c=N.$el.find("td[width]"),d=0;d<c.length;d++){var u=R(c[d]),f=u.attr("width");f&&(u.css("width",f),u.removeAttr("width"))}},lists:function(){M();for(var e=N.el.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var n=e[t];if(N.node.isList(n.previousSibling)&&N.node.openTagString(n)===N.node.openTagString(n.previousSibling)){for(var r=N.node.contents(n),a=0;a<r.length;a++)n.previousSibling.appendChild(r[a]);n.parentNode.removeChild(n)}}for(var i=N.el.querySelectorAll("ul, ol"),o=0;o<i.length;o++)for(var s=N.node.contents(i[o]),l=null,c=s.length-1;0<=c;c--)(s[c].tagName||!N.opts.htmlUntouched)&&"LI"!==s[c].tagName&&"UL"!=s[c].tagName&&"OL"!=s[c].tagName?"BR"==s[c].tagName?R(s[c]).remove():(l||(l=R(N.doc.createElement("LI"))).insertBefore(s[c]),l.prepend(s[c])):l=null;O();for(var d=N.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"),u=0;u<d.length;u++){var f=d[u],p=f.previousSibling;p&&("LI"===p.tagName?p.appendChild(f):R(f).wrap("<li></li>"))}for(var h=N.el.querySelectorAll("li > ul, li > ol"),g=0;g<h.length;g++){var m=h[g];if(m.nextSibling)for(var v=m.nextSibling;0<v.childNodes.length;)m.append(v.childNodes[0])}for(var b=N.el.querySelectorAll("li > ul, li > ol"),C=0;C<b.length;C++){var y=b[C];if(N.node.isFirstSibling(y)&&"none"!=y.parentNode.style.listStyleType)R(y).before("<br/>");else if(y.previousSibling&&"BR"===y.previousSibling.tagName){for(var _=y.previousSibling.previousSibling;_&&N.node.hasClass(_,"fr-marker");)_=_.previousSibling;_&&"BR"!==_.tagName&&R(y.previousSibling).remove()}}for(var E=N.el.querySelectorAll("li:empty"),w=0;w<E.length;w++)R(E[w]).remove();for(var S=N.el.querySelectorAll("ul, ol"),A=0;A<S.length;A++)for(var T=S[A],k=N.node.contents(T),L=function L(){var e=k[x],t=N.node.contents(e);if(e.nodeType!==Node.ELEMENT_NODE)return 0;var n=e.querySelectorAll("ul, ol");if(0<n.length&&1==t.length&&t[0].nodeType===Node.ELEMENT_NODE){t=n[0],n=k[x-1];if(!n)return 0;var a=R(n).data("tracking")&&N.opts.trackChangesEnabled;Te(t.querySelectorAll("li")).reverse().forEach(function(e){var t,n,r;a&&(t="pending-".concat(N.id,"-").concat(N.track_changes.getPendingChanges().length),n=N.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=e.innerHTML,e.innerHTML='<span data-tracking="true" data-track-id="'.concat(t,'" ').concat(n,">").concat(r,"</span>"),N.track_changes.pushChange(t))}),n.append(t),e.remove()}},x=0;x<k.length;x++)L()},invisibleSpaces:function(e){return e.replace(/\u200b/g,"").length===e.length?e:N.clean.exec(e,a)},exec:c}},dt.XS=0,dt.SM=1,dt.MD=2,dt.LG=3;dt.LinkRegExCommon="[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.","]{1,}"),dt.LinkRegExEnd="((:[0-9]{1,5})|)(((\\/|\\?|#)[a-zA-Z0-9\\u00a1-\\uffff@\\[\\]\\(\\)\\{\\}.,:;!?%&$^=*+~#_\\-`'\"\\\\\\/|]*)|())",dt.LinkRegExTLD="((".concat(dt.LinkRegExCommon,")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev|in|fr|it)))"),dt.LinkRegExHTTP="((ftp|http|https):\\/\\/".concat(dt.LinkRegExCommon,")"),dt.LinkRegExAuth="((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat(dt.LinkRegExCommon,")"),dt.LinkRegExWWW="(www\\.".concat(dt.LinkRegExCommon,"\\.[a-z0-9-]{2,24})"),dt.LinkRegEx="(".concat(dt.LinkRegExTLD,"|").concat(dt.LinkRegExHTTP,"|").concat(dt.LinkRegExWWW,"|").concat(dt.LinkRegExAuth,")").concat(dt.LinkRegExEnd),dt.LinkProtocols=["mailto","tel","sms","notes","data"],dt.MAIL_REGEX=/.+@.+\..+/i,dt.MODULES.helpers=function(i){var a,o=i.$;function e(){var e,t,n={},r=(e=-1,"Microsoft Internet Explorer"===navigator.appName?(r=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(e=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(r=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(r))&&(e=parseFloat(RegExp.$1)),e);return 0<r?n.msie=!0:(e=navigator.userAgent.toLowerCase(),t=(e=/(edge)[ /]([\w.]+)/.exec(e)||/(chrome)[ /]([\w.]+)/.exec(e)||/(webkit)[ /]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[])[1]||"",e[1]&&(n[t]=!0),n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0)),n.msie&&(n.version=r),n}function t(){return(/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n())&&!l()}function n(){return navigator.maxTouchPoints&&2<navigator.maxTouchPoints&&/Macintosh/.test(navigator.userAgent)}function r(){return/(Android)/g.test(navigator.userAgent)&&!l()}function s(){return/(Blackberry)/g.test(navigator.userAgent)}function l(){return/(Windows Phone)/gi.test(navigator.userAgent)}var c=null;function d(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}return{_init:function(){i.browser=e()},isIOS:t,isMac:function(){return c=null===c?0<=navigator.platform.toUpperCase().indexOf("MAC"):c},isIpadOS:n,getIOSVersion:function(){var e;return t()&&(e=navigator.userAgent.match(/OS (\d)?\d_\d(_\d)?/i)||navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/))&&e.length&&Math.abs(e[0].split("_")[0].replace("OS ",""))||NaN},getSafariVersion:function(){var e=navigator.userAgent;if(-1!==e.indexOf("Safari")){e=e.match(/Version\/(\d+\.\d+)/);if(e)return parseInt(e[1])}return null},getImagePopupPosition:function(e){var t=e&&d(e),n=e.offset().left+e.outerWidth()/2,r=0,a=(a=i.$wp&&d(i.$wp))||t;return i.opts.iframe?(r=(r=i.$wp.scrollTop())<e.get(0).getBoundingClientRect().top?e.get(0).getBoundingClientRect().top:r)>e.get(0).getBoundingClientRect().top+e.height()&&(r=e.get(0).getBoundingClientRect().top+e.height()):r=a<=t?t:i.$wp&&t+e.height()<a+i.$wp.height()?t+e.height():a,{top:r,left:n}},isAndroid:r,isBlackberry:s,isWindowsPhone:l,isMobile:function(){return r()||t()||s()},isEmail:function(e){return!/^(https?:|ftps?:|)\/\//i.test(e)&&dt.MAIL_REGEX.test(e)},requestAnimationFrame:function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}},getPX:function(e){return parseInt(e,10)||0},screenSize:function(e){try{var t=0;return(t=(e?i.$box:i.$sc).width())<768?dt.XS:768<=t&&t<992?dt.SM:992<=t&&t<1200?dt.MD:1200<=t?dt.LG:void 0}catch(n){return dt.LG}},isTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch},sanitizeURL:function(e){var t;return i.opts.DOMPurify&&(t={ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|xxx):|[^a-z]|[a-z+.]+(?:[^a-z+.\-:]|$))/i},1===i.opts.htmlAllowedTags.length&&".*"===i.opts.htmlAllowedTags[0]||(t.ALLOWED_TAGS=i.opts.htmlAllowedTags),1===i.opts.htmlAllowedAttrs.length&&".*"===i.opts.htmlAllowedAttrs[0]||(t.ALLOWED_ATTR=i.opts.htmlAllowedAttrs),e=i.opts.DOMPurify.sanitize(e,t)),e=e.replace(/(["'/]|\s+)on\w+=(?:"[^"]*"|'[^']*'|[^>\s]+)/gi,""),e=/^(https?:|ftps?:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||new RegExp("^(".concat(dt.LinkProtocols.join("|"),"):"),"i").test(e)?e:encodeURIComponent(e).replace(/%23/g,"#").replace(/%2F/g,"/").replace(/%25/g,"%").replace(/mailto%3A/gi,"mailto:").replace(/file%3A/gi,"file:").replace(/sms%3A/gi,"sms:").replace(/tel%3A/gi,"tel:").replace(/notes%3A/gi,"notes:").replace(/data%3Aimage/gi,"data:image").replace(/blob%3A/gi,"blob:").replace(/%3A(\d)/gi,":$1").replace(/webkit-fake-url%3A/gi,"webkit-fake-url:").replace(/%3F/g,"?").replace(/%3D/g,"=").replace(/%26/g,"&").replace(/&/g,"&").replace(/%2C/g,",").replace(/%3B/g,";").replace(/%2B/g,"+").replace(/%40/g,"@").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%7B/g,"{").replace(/%7D/g,"}").replace(/%[0-1]+[0-9]+|%[0-1]+[A-F]+/g,"")},isArray:function(e){return e&&!Object.prototype.propertyIsEnumerable.call(e,"length")&&"object"===ct(e)&&"number"==typeof e.length},RGBToHex:function(e){function t(e){return"0".concat(parseInt(e,10).toString(16)).slice(-2)}try{var n;return e&&"transparent"!==e?/^#[0-9A-F]{6}$/i.test(e)||/^#[0-9A-F]{8}$/i.test(e)?e.toUpperCase():(n=e.match(/^rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)$/i))?"#".concat(t(n[1])).concat(t(n[2])).concat(t(n[3])).toUpperCase():(n=e.match(/^rgba\(\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\s*\)$/i))?"#".concat(t(n[1])).concat(t(n[2])).concat(t(n[3])).concat(t(Math.round(255*parseFloat(n[4])))).toUpperCase():void 0:""}catch(r){return null}},HEXtoRGB:function(e){if(e=e.replace(/^#/,""),/^rgba?\(\d+,\s*\d+,\s*\d+(,\s*(0|1|0?\.\d+))?\)$/i.test(e))return e;if(6===(e=3!==e.length&&4!==e.length?e:e.split("").map(function(e){return e+e}).join("")).length)return(r=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?"rgb(".concat(parseInt(r[1],16),", ").concat(parseInt(r[2],16),", ").concat(parseInt(r[3],16),")"):"";if(8===e.length){var t,n,r=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return e=parseInt(r[1],16),t=parseInt(r[2],16),n=parseInt(r[3],16),r=parseInt(r[4],16)/255,"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(r.toFixed(2),")")}return""},isURL:function(e){return!!/^(https?:|ftps?:|)\/\//i.test(e)&&(e=String(e).replace(/</g,"%3C").replace(/>/g,"%3E").replace(/"/g,"%22").replace(/ /g,"%20"),new RegExp("^".concat(dt.LinkRegExHTTP).concat(dt.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function(e){var t,n,r,e=((e=e.css?e:o(e)).css("text-align")||"").replace(/-(.*)-/g,"");return["left","right","justify","center"].indexOf(e)<0&&(a||(t=o('<div dir="'.concat("rtl"===i.opts.direction?"rtl":"auto",'" style="text-align: ').concat(i.$el.css("text-align"),'; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>')),o("body").first().append(t),n=t.find("#s1").get(0).getBoundingClientRect().left,r=t.find("#s2").get(0).getBoundingClientRect().left,t.remove(),a=n<r?"left":"right"),e=a),e},scrollTop:function(){return i.o_win.pageYOffset||(i.o_doc.documentElement&&i.o_doc.documentElement.scrollTop?i.o_doc.documentElement.scrollTop:i.o_doc.body.scrollTop||0)},scrollLeft:function(){return i.o_win.pageXOffset||(i.o_doc.documentElement&&i.o_doc.documentElement.scrollLeft?i.o_doc.documentElement.scrollLeft:i.o_doc.body.scrollLeft||0)},isInViewPort:function(e){return e=e.getBoundingClientRect(),0<=(e={top:Math.round(e.top),bottom:Math.round(e.bottom)}).top&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)||e.top<=0&&e.bottom>=(window.innerHeight||document.documentElement.clientHeight)},isValidHexColor:function(e){return/^#([0-9A-F]{3}|[0-9A-F]{6})$/i.test(e)},isRGBColor:function(e){return/^rgba?\(\d+,\s*\d+,\s*\d+(,\s*\d+\.?\d*)?\)$/i.test(e)},selectionBlocks:function(){var n=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];return((1<arguments.length?arguments[1]:undefined)||i.selection.blocks()).filter(function(e){var t=o(e);return!n.some(function(e){return 0<t.closest(e).length||0<t.parents(e).length})})}}},dt.MODULES.events=function(d){var t,u=d.$,o={};function e(e,t,n){h(e,t,n)}function n(e){if(e.originalEvent&&"insertReplacementText"===e.originalEvent.inputType){e=d.selection.get();if(e&&0!==e.rangeCount){for(var t=e.getRangeAt(0),n=t.startContainer,r=t.startOffset,a=t.endContainer,i=t.endOffset;n;){for(var o=n.textContent,s=r-1;0<=s&&f(o[s]);)s--;if(s<=r-1){r=s+1;break}r=(n=function(e){for(;e;)if((!(e=e.previousSibling)||!u(e).hasClass("fr-marker"))&&e&&e.nodeType===Node.TEXT_NODE&&e.textContent.trim())return e;return null}(n))?n.textContent.length:0}for(;a;){for(var l=a.textContent,c=i;c<l.length&&f(l[c]);)c++;if(a!==n&&"'"===l&&0===i)break;if(i<c||!f(l[c])){i=c;break}a=function(e){for(;e;)if((!(e=e.nextSibling)||!u(e).hasClass("fr-marker"))&&e&&e.nodeType===Node.TEXT_NODE&&e.textContent.trim())return e;return null}(a),i=0}n&&a&&((t=document.createRange()).setStart(n,r),t.setEnd(a,i),e.removeAllRanges(),e.addRange(t))}}}function f(e){return e&&/[\w']/i.test(e)}function r(e){var t;if(void 0===e&&(e=!0),!d.$wp)return!1;if(d.helpers.isIOS()&&d.$win.get(0).focus(),d.core.hasFocus())return!1;if(!d.core.hasFocus()&&e){var e=d.$win.scrollTop();if(d.browser.msie&&d.$box&&d.$box.css("position","fixed"),d.browser.msie&&d.$wp&&d.$wp.css("overflow","visible"),d.browser.msie&&d.$sc&&d.$sc.css("position","fixed"),d.browser.msie||(i(),d.el.focus(),d.events.trigger("focus"),s()),d.browser.msie&&d.$sc&&d.$sc.css("position",""),d.browser.msie&&d.$box&&d.$box.css("position",""),d.browser.msie&&d.$wp&&d.$wp.css("overflow","auto"),e!==d.$win.scrollTop()&&d.$win.scrollTop(e),!d.selection.info(d.el).atStart)return!1}if(!d.core.hasFocus()||0<d.$el.find(".fr-marker").length)return!1;d.selection.info(d.el).atStart&&d.selection.isCollapsed()&&null!==d.html.defaultTag()&&((e=d.markers.insert())&&!d.node.blockParent(e)?(u(e).remove(),(t=d.$el.find(d.html.blockTagsQuery()).get(0))&&(u(t).prepend(dt.MARKERS),d.selection.restore())):e&&u(e).remove())}var a=!1;function s(){t=!0}function i(){t=!1}function l(){return t}function c(e,t,n){var r=e.split(" ");if(1<r.length){for(var a=0;a<r.length;a++)c(r[a],t,n);return!0}void 0===n&&(n=!1),e=(0!==e.indexOf("shared.")?(o[e]=o[e]||[],o):(d.shared._events[e]=d.shared._events[e]||[],d.shared._events))[e],n?e.unshift(t):e.push(t)}var p=[];function h(e,t,n,r,a){"function"==typeof n&&(a=r,r=n,n=!1);var i=a?d.shared.$_events:p,a=a?d.sid:d.id,t="".concat(t.trim().split(" ").join(".ed".concat(a," ")),".ed").concat(a);n?e.on(t,n,r):e.on(t,r),i.push([e,t])}function g(e){for(var t=0;t<e.length;t++)e[t][0].off(e[t][1])}function m(e,t,n){if(!d.edit.isDisabled()||n){var r,a;if(0!==e.indexOf("shared."))r=o[e];else{if(0<d.shared.count)return!1;r=d.shared._events[e]}if(r)for(var i=0;i<r.length;i++)if(!1===(a=r[i].apply(d,t)))return!1;return d.opts.events&&d.opts.events[e]&&!1===(a=d.opts.events[e].apply(d,t))?!1:a}}function v(){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&delete o[e]}function b(){for(var e in d.shared._events)Object.prototype.hasOwnProperty.call(d.shared._events,e)&&delete d.shared._events[e]}function C(e){var e=e.currentTarget,t=d.opts.toolbarButtonsEnabledOnEditorOff;return 0!==t.length&&(t.includes(e.getAttribute("data-cmd"))||e.hasAttribute("data-group-name"))}return{_init:function(){d.shared.$_events=d.shared.$_events||[],d.shared._events={},d.helpers.isMobile()?(d._mousedown="touchstart",d._mouseup="touchend",d._move="touchmove",d._mousemove="touchmove"):(d._mousedown="mousedown",d._mouseup="mouseup",d._move="",d._mousemove="mousemove"),e(d.$el,"click mouseup mousemove mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart",function(e){m(e.type,[e])}),c("mousedown",function(){for(var e=0;e<dt.INSTANCES.length;e++)dt.INSTANCES[e]!==d&&dt.INSTANCES[e].popups&&dt.INSTANCES[e].popups.areVisible()&&dt.INSTANCES[e].$el.find(".fr-marker").remove()}),e(d.$win,d._mousedown,function(e){m("window.mousedown",[e]),s()}),e(d.$win,"touchend"===d._mouseup?"touchend mouseup":"mouseup",function(e){m("window.mouseup",[e])}),e(d.$win,"beforeinput cut copy keydown keyup touchmove touchend",function(e){m("window.".concat(e.type),[e])}),e(d.$doc,"dragend drop",function(e){m("document.".concat(e.type),[e])}),e(d.$el,"beforeinput keydown keypress keyup input",function(e){m(e.type,[e])}),e(d.$el,"focus",function(e){t&&(r(!1),!1===a)&&(m(e.type,[e]),d.helpers.isMobile())&&i()}),e(d.$el,"blur",function(e){t&&!0===a&&(m(e.type,[e]),d.helpers.isMobile()&&d.opts.toolbarContainer&&(d.shared.selected_editor=d.id),s())}),h(d.$el,"mousedown",'[contenteditable="true"]',function(e){e.target.closest(".fr-img-caption")||(i(),d.$el.blur())}),c("focus",function(){a=!0}),c("blur",function(){a=!1}),s(),e(d.$el,"cut copy paste beforepaste",function(e){m(e.type,[e])}),c("destroy",v),c("shared.destroy",b),c("beforeinput",n)},on:c,trigger:m,bindClick:function(t,n,a){var i=!1;h(t,d._mousedown,n,function(e){var t;d.edit.isDisabled()&&!C(e)||(t=u((e=e).currentTarget),!d.edit.isDisabled()&&!d.node.hasClass(t.get(0),"fr-disabled")||C(e)?"mousedown"===e.type&&1!==e.which||(d.helpers.isMobile()||e.preventDefault(),(d.helpers.isAndroid()||d.helpers.isWindowsPhone())&&0===t.parents(".fr-dropdown-menu").length&&(e.preventDefault(),e.stopPropagation()),t.addClass("fr-selected"),d.events.trigger("commands.mousedown",[t])):e.preventDefault())},!0),h(t,"".concat(d._mouseup," ").concat(d._move),n,function(e){var t,n,r;d.edit.isDisabled()&&!C(e)||(d.helpers.isIOS()&&null!==d.selection.get().focusNode&&d.selection.save(),"touchend"===e.type&&(i=!0),t=a,r=u((e=e).currentTarget),!d.edit.isDisabled()&&!d.node.hasClass(r.get(0),"fr-disabled")||C(e)?"mouseup"===e.type&&1!==e.which||d.button.getButtons(".fr-selected",!0).get(0)==r.get(0)&&!d.node.hasClass(r.get(0),"fr-selected")||("touchmove"!==e.type?(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),d.node.hasClass(r.get(0),"fr-selected")?(d.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),r.data("dragging")||r.attr("disabled")?r.removeData("dragging"):((n=r.data("timeout"))&&(clearTimeout(n),r.removeData("timeout")),t.apply(d,[e]))):d.button.getButtons(".fr-selected",!0).removeClass("fr-selected")):r.data("timeout")||r.data("timeout",setTimeout(function(){r.data("dragging",!0)},100))):e.preventDefault())},!0),h(t,"mouseup",n,function(e){d.helpers.isIpadOS()&&(!d.edit.isDisabled()||C(e))&&d.helpers.isMobile()&&"touchend"==d._mouseup&&(e.stopPropagation(),e.preventDefault(),i||a.apply(d,[e]),i=!1)},!0),h(t,"mousedown click mouseup",n,function(e){d.edit.isDisabled()&&!C(e)||e.stopPropagation()},!0),c("window.mouseup",function(e){d.edit.isDisabled()&&!C(e)||(t.find(n).removeClass("fr-selected"),s())}),h(t,"mouseover",n,function(){u(this).hasClass("fr-options")&&u(this).prev(".fr-btn").addClass("fr-btn-hover"),u(this).next(".fr-btn").hasClass("fr-options")&&u(this).next(".fr-btn").addClass("fr-btn-hover")}),h(t,"mouseout",n,function(){u(this).hasClass("fr-options")&&u(this).prev(".fr-btn").removeClass("fr-btn-hover"),u(this).next(".fr-btn").hasClass("fr-options")&&u(this).next(".fr-btn").removeClass("fr-btn-hover")})},disableBlur:i,enableBlur:s,blurActive:l,focus:r,chainTrigger:function(e,t,n){if(!d.edit.isDisabled()||n){var r,a;if(0!==e.indexOf("shared."))r=o[e];else{if(0<d.shared.count)return!1;r=d.shared._events[e]}if(r)for(var i=0;i<r.length;i++)void 0!==(a=r[i].apply(d,[t]))&&(t=a);return t=d.opts.events&&d.opts.events[e]&&void 0!==(a=d.opts.events[e].apply(d,[t]))?a:t}},$on:h,$off:function(){g(p),p=[],0===d.shared.count&&(g(d.shared.$_events),d.shared.$_events=[])}}},Object.assign(dt.DEFAULTS,{indentMargin:20}),dt.COMMANDS={bold:{title:"Bold",toggle:!0,refresh:function(e){var t=this.format.is("strong");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},italic:{title:"Italic",toggle:!0,refresh:function(e){var t=this.format.is("em");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},underline:{title:"Underline",toggle:!0,refresh:function(e){var t=this.format.is("u");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},strikeThrough:{title:"Strikethrough",toggle:!0,refresh:function(e){var t=this.format.is("s");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},subscript:{title:"Subscript",toggle:!0,refresh:function(e){var t=this.format.is("sub");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},superscript:{title:"Superscript",toggle:!0,refresh:function(e){var t=this.format.is("sup");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},outdent:{title:"Decrease Indent"},indent:{title:"Increase Indent"},undo:{title:"Undo",undo:!1,forcedRefresh:!0,disabled:!0},redo:{title:"Redo",undo:!1,forcedRefresh:!0,disabled:!0},insertHR:{title:"Insert Horizontal Line"},clearFormatting:{title:"Clear Formatting"},selectAll:{title:"Select All",undo:!1},moreText:{title:"More Text",undo:!1},moreParagraph:{title:"More Paragraph",undo:!1},moreRich:{title:"More Rich",undo:!1},moreMisc:{title:"More Misc",undo:!1}},dt.RegisterCommand=function(e,t){dt.COMMANDS[e]=t},dt.MODULES.commands=function(s){var l=s.$;function i(e){return e=s.html.defaultTag()?"<".concat(s.html.defaultTag(),">").concat(e,"</").concat(s.html.defaultTag(),">"):e}var o={bold:function(){e(0,"strong")},subscript:function(){s.format.is("sup