UNPKG

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.19 MB
/*! * froala_editor v4.5.2 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2025 Froala Labs */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FroalaEditor=t()}(this,function(){"use strict";function a(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 w(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function He(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n["return"]||n["return"]()}finally{if(s)throw o}}}}function M(){M=function(){return i};var d,i={},e=Object.prototype,f=e.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},o=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(d){a=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),i=new x(r||[]);return s(o,"_invoke",{value:function c(o,i,s){var l=u;return function(e,t){if(l===g)throw Error("Generator is already running");if(l===m){if("throw"===e)throw t;return{value:d,done:!0}}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=_(n,s);if(r){if(r===v)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===u)throw l=m,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=g;var a=p(o,i,s);if("normal"===a.type){if(l=s.done?m:h,a.arg===v)continue;return{value:a.arg,done:s.done}}"throw"===a.type&&(l=m,s.method="throw",s.arg=a.arg)}}}(e,n,i)}),o}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}i.wrap=l;var u="suspendedStart",h="suspendedYield",g="executing",m="completed",v={};function b(){}function c(){}function C(){}var E={};a(E,o,function(){return this});var y=Object.getPrototypeOf,w=y&&y(y(R([])));w&&w!==e&&f.call(w,o)&&(E=w);var T=C.prototype=b.prototype=Object.create(E);function L(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function A(l,c){var t;s(this,"_invoke",{value:function(n,r){function e(){return new c(function(e,t){!function s(e,t,n,r){var a=p(l[e],l,t);if("throw"!==a.type){var o=a.arg,i=o.value;return i&&"object"==typeof i&&f.call(i,"__await")?c.resolve(i.__await).then(function(e){s("next",e,n,r)},function(e){s("throw",e,n,r)}):c.resolve(i).then(function(e){o.value=e,n(o)},function(e){return s("throw",e,n,r)})}r(a.arg)}(n,r,e,t)})}return t=t?t.then(e,e):e()}})}function _(e,t){var n=t.method,r=e.iterator[n];if(r===d)return t.delegate=null,"throw"===n&&e.iterator["return"]&&(t.method="return",t.arg=d,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=p(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,v;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function R(e){if(e||""===e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function a(){for(;++n<e.length;)if(f.call(e,n))return a.value=e[n],a.done=!1,a;return a.value=d,a.done=!0,a};return r.next=r}}throw new TypeError(typeof e+" is not iterable")}return s(T,"constructor",{value:c.prototype=C,configurable:!0}),s(C,"constructor",{value:c,configurable:!0}),c.displayName=a(C,r,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===c||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,a(e,r,"GeneratorFunction")),e.prototype=Object.create(T),e},i.awrap=function(e){return{__await:e}},L(A.prototype),a(A.prototype,n,function(){return this}),i.AsyncIterator=A,i.async=function(e,t,n,r,a){void 0===a&&(a=Promise);var o=new A(l(e,t,n,r),a);return i.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},L(T),a(T,r,"Generator"),a(T,o,function(){return this}),a(T,"toString",function(){return"[object Generator]"}),i.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function a(){for(;n.length;){var e=n.pop();if(e in t)return a.value=e,a.done=!1,a}return a.done=!0,a}},i.values=R,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(e,t){return o.type="throw",o.arg=n,r.next=e,t&&(r.method="next",r.arg=d),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var a=this.tryEntries[t],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=f.call(a,"catchLoc"),s=f.call(a,"finallyLoc");if(i&&s){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&f.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},"catch":function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;k(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=d),v}},i}function y(e,t){return function n(e){if(Array.isArray(e))return e}(e)||function d(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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"]&&(i=n["return"](),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||l(e,t)||function r(){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 Se(e){return function t(e){if(Array.isArray(e))return a(e)}(e)||function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function r(){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 St(e){return(St="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 l(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}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))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&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 o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},writable:!0,configurable:!0}),function(){var i=/^\s*:scope/gi,s=/,\s*:scope/gi,l=document.createElement("div");function e(e,t){var o=e[t];e[t]=function(e){var t,n=!1,r=!1;if(!e||Array.isArray(e)||!e.match(i)&&!e.match(s))return o.call(this,e);this.parentNode||(l.appendChild(this),r=!0);var a=this.parentNode;return this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),n=!0),t=o.call(a,e.replace(i,"#".concat(this.id)).replace(s,",#".concat(this.id))),n&&(this.id=""),r&&l.removeChild(this),t}}try{var t=l.querySelectorAll(":scope *");if(!t||Array.isArray(t))throw"error"}catch(n){e(Element.prototype,"querySelector"),e(Element.prototype,"querySelectorAll"),e(HTMLElement.prototype,"querySelector"),e(HTMLElement.prototype,"querySelectorAll")}}(),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){if("Element"in e){var t="classList",n="prototype",r=e.Element[n],a=Object,o=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function s(e,t){this.name=e,this.code=DOMException[e],this.message=t},l=function l(e,t){if(""===t)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return i.call(e,t)},c=function c(e){for(var t=o.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())}},d=c[n]=[],f=function f(){return new c(this)};if(s[n]=Error[n],d.item=function(e){return this[e]||null},d.contains=function(e){return~l(this,e+"")},d.add=function(){for(var e,t=arguments,n=0,r=t.length,a=!1;e=t[n]+"",~l(this,e)||(this.push(e),a=!0),++n<r;);a&&this._updateClassName()},d.remove=function(){var e,t,n=arguments,r=0,a=n.length,o=!1;do{for(e=n[r]+"",t=l(this,e);~t;)this.splice(t,1),o=!0,t=l(this,e)}while(++r<a);o&&this._updateClassName()},d.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},d.replace=function(e,t){var n=l(e+"");~n&&(this.splice(n,1,t),this._updateClassName())},d.toString=function(){return this.join(" ")},a.defineProperty){var p={get:f,enumerable:!0,configurable:!0};try{a.defineProperty(r,t,p)}catch(u){void 0!==u.number&&-2146823252!==u.number||(p.enumerable=!1,a.defineProperty(r,t,p))}}else a[n].__defineGetter__&&r.__defineGetter__(t,f)}}(self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function dh(e){var dh=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var t,n=arguments.length;for(t=0;t<n;t++)e=arguments[t],dh.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(" "),r=n.indexOf(e+"");~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}()),function(){var e,t=-1;if("Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof HTMLElement||t<0)){var n=!1;try{var r=document.createElement("div");r.addEventListener("focus",function(e){e.preventDefault(),e.stopPropagation()},!0),r.focus(Object.defineProperty({},"preventScroll",{get:function(){if(navigator&&"undefined"!=typeof navigator.userAgent&&navigator.userAgent&&navigator.userAgent.match(/Edge\/1[7-8]/))return n=!1;n=!0}}))}catch(s){}if(HTMLElement.prototype.nativeFocus===undefined&&!n){HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus;var a=function a(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 t=r,n.push([t,t.scrollTop,t.scrollLeft]),n},o=function o(e){for(var t=0;t<e.length;t++)e[t][0].scrollTop=e[t][1],e[t][0].scrollLeft=e[t][2];e=[]},i=function i(e){if(e&&e.preventScroll){var t=a(this);if("function"==typeof setTimeout){var n=this;setTimeout(function(){n.nativeFocus(),o(t)},0)}else this.nativeFocus(),o(t)}else this.nativeFocus()};HTMLElement.prototype.focus=i}}}();function kt(e,t,n){if("string"!=typeof e)return new kt.Bootstrap(e,t,n);var r=document.querySelectorAll(e);t&&t.iframe_document&&(r=t.iframe_document.querySelectorAll(e));for(var a=[],o=0;o<r.length;o++){var i=r[o]["data-froala.editor"];i?a.push(i):a.push(new kt.Bootstrap(r[o],t,n))}return 1==a.length?a[0]:a}kt.RegisterPlugins=function(e){for(var t=0;t<e.length;t++)e[t].call(kt)},Object.assign(kt,{DEFAULTS:{allowStylingOnNonEditable:!1,initOnClick:!1,pluginsEnabled:null,pluginsDisabled:null},MODULES:{},PLUGINS:{},VERSION:"4.5.2",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),kt.MODULES.node=function(i){var n=i.$;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<=kt.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 o=r[a],i=n[o];i.indexOf("'")<0&&0<=i.indexOf('"')?t+=" ".concat(o,"='").concat(i,"'"):(0<=i.indexOf('"')&&0<=i.indexOf("'")&&(i=i.replace(/"/g,"&quot;")),t+=" ".concat(o,'="').concat(i,'"'))}return t}function r(e){return e===i.el}return{isBlock:l,isEmpty:function d(e,t){if(!e)return!0;if(e.querySelector("table"))return!1;var n=s(e);1===n.length&&l(n[0])&&(n=s(n[0]));for(var r=!1,a=0;a<n.length;a++){var o=n[a];if(!(t&&i.node.hasClass(o,"fr-marker")||o.nodeType===Node.TEXT_NODE&&0===o.textContent.length)){if("BR"!==o.tagName&&0<(o.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(r)return!1;"BR"===o.tagName&&(r=!0)}}return!(e.querySelectorAll(kt.VOID_ELEMENTS.join(",")).length-e.querySelectorAll("br").length||e.querySelector("".concat(i.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<e.querySelectorAll(kt.BLOCK_TAGS.join(",")).length||e.querySelector("".concat(i.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)")))},blockParent:function a(e){for(;e&&e.parentNode!==i.el&&(!e.parentNode||!i.node.hasClass(e.parentNode,"fr-inner"));)if(l(e=e.parentNode))return e;return null},deepestParent:function o(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=!0),t.push(i.el),0<=t.indexOf(e.parentNode)||e.parentNode&&i.node.hasClass(e.parentNode,"fr-inner")||e.parentNode&&0<=kt.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)&&n)return null;for(;t.indexOf(e.parentNode)<0&&e.parentNode&&!i.node.hasClass(e.parentNode,"fr-inner")&&(kt.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 f(e){for(var t=e.attributes,n=t.length-1;0<=n;n--){var r=t[n];e.removeAttribute(r.nodeName)}},openTagString:function p(e){return"<".concat(e.tagName.toLowerCase()).concat(t(e),">")},closeTagString:function u(e){return"</".concat(e.tagName.toLowerCase(),">")},isFirstSibling:function h(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&i.node.hasClass(n,"fr-marker");)n=n.previousSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&h(n)},isLastSibling:function g(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&i.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&g(n)},isList:function m(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function v(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:r,contents:s,isVoid:function b(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=kt.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function C(e){return e===i.doc.activeElement&&(!i.doc.hasFocus||i.doc.hasFocus())&&Boolean(r(e)||e.type||e.href||~e.tabIndex)},isEditable:function E(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function y(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function w(e,t){return e instanceof n&&(e=e.get(0)),e&&e.classList&&e.classList.contains(t)},filter:function T(e){return i.browser.msie?e:{acceptNode:e}}}},Object.assign(kt.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}),kt.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},kt.MODULES.clean=function(m){var v,b,C,E,f=m.$;function a(e){if(e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=e.getAttribute("class").indexOf("fr-marker"))return!1;var t,n=m.node.contents(e),r=[];for(t=0;t<n.length;t++)n[t].nodeType!==Node.ELEMENT_NODE||m.node.isVoid(n[t])?n[t].nodeType===Node.TEXT_NODE&&(n[t].textContent=n[t].textContent.replace(/\u200b/g,"")):n[t].textContent.replace(/\u200b/g,"").length!==n[t].textContent.length&&a(n[t]);if(e.nodeType===Node.ELEMENT_NODE&&!m.node.isVoid(e)&&(e.normalize(),n=m.node.contents(e),r=e.querySelectorAll(".fr-marker"),n.length-r.length==0)){for(t=0;t<n.length;t++)if(n[t].nodeType===Node.ELEMENT_NODE&&(n[t].getAttribute("class")||"").indexOf("fr-marker")<0)return!1;for(t=0;t<r.length;t++)e.parentNode.insertBefore(r[t].cloneNode(!0),e);return e.parentNode.removeChild(e),!1}}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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):m.opts.preserveTabSpaces?e.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;").replace(/\t/g," ".repeat(m.opts.tabSpaces)||" ".repeat(4)):e.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;").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;if(e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName){var n=document.createElement("div"),r=e.cloneNode(!0);return n.appendChild(r),n.innerHTML}if("IFRAME"===e.tagName)return e.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">");var a=e.childNodes;if(0===a.length)return e.outerHTML;for(var o="",i=0;i<a.length;i++)"PRE"===e.tagName&&(t=!0),o+=s(a[i],t);return m.node.openTagString(e)+o+m.node.closeTagString(e)}var l=[];function y(e){var t=e.replace(/;;/gi,";");return";"!==(t=t.replace(/^;/gi,"")).charAt(t.length)&&(t+=";"),t}function c(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=t.match(C),r=null;"style"===t&&m.opts.htmlAllowedStyleProps.length&&(r=e[t].match(E)),n&&r?e[t]=y(r.join(";")):n&&("style"!==t||r)||delete e[t]}for(var a="",o=Object.keys(e).sort(),i=0;i<o.length;i++)e[t=o[i]].indexOf('"')<0?a+=" ".concat(t,'="').concat(e[t],'"'):a+=" ".concat(t,"='").concat(e[t],"'");return a}function d(e,t){var n,r=document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");f(r).append(e);var a="";if(r){var o=m.node.contents(r);for(n=0;n<o.length;n++)t(o[n]);for(o=m.node.contents(r),n=0;n<o.length;n++)a+=s(o[n])}return a}function p(e,t,n){var r=e=function o(e){return l=[],e=(e=(e=(e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,function(e){return l.push(e),"[FROALA.EDITOR.SCRIPT ".concat(l.length-1,"]")})).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi,function(e){return l.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(l.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="')}(e),a=null;return m.opts.fullPage&&(r=m.html.extractNode(e,"body")||(0<=e.indexOf("<body")?"":e),n&&(a=m.html.extractNode(e,"head")||"")),r=d(r,t),a&&(a=d(a,t)),function i(e){return e=(e=(e=e.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi,function(e,t){return 0<=m.opts.htmlRemoveTags.indexOf("script")?"":l[parseInt(t,10)]})).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi,function(e,t){if(0<=m.opts.htmlRemoveTags.indexOf("noscript"))return"";var n=l[parseInt(t,10)].replace(/&lt;/g,"<").replace(/&gt;/g,">"),r=f(n);if(r&&r.length){var a=d(r.html(),u);r.html(a),n=r.get(0).outerHTML}return n})).replace(/<img((?:[\w\W]*?)) data-fr-src="/g,'<img$1 src="')}(function s(e,t,n){if(m.opts.fullPage){var r=m.html.extractDoctype(n),a=c(m.html.extractNodeAttrs(n,"html"));t=null===t?m.html.extractNode(n,"head")||"<title></title>":t;var o=c(m.html.extractNodeAttrs(n,"head")),i=c(m.html.extractNodeAttrs(n,"body"));return"".concat(r,"<html").concat(a,"><head").concat(o,">").concat(t,"</head><body").concat(i,">").concat(e,"</body></html>")}return e}(r,a,e))}function w(e){var t=m.doc.createElement("DIV");return t.innerText=e,t.textContent}function u(e){for(var t=m.node.contents(e),n=0;n<t.length;n++)t[n].nodeType!==Node.TEXT_NODE&&u(t[n]);!function g(n){if("SPAN"===n.tagName&&0<=(n.getAttribute("class")||"").indexOf("fr-marker"))return!1;if("PRE"===n.tagName&&function h(e){var t=e.innerHTML;0<=t.indexOf("\n")&&(e.innerHTML=t.replace(/\n/g,"<br>"))}(n),n.nodeType===Node.ELEMENT_NODE&&(n.getAttribute("data-fr-src")&&0!==n.getAttribute("data-fr-src").indexOf("blob:")&&n.setAttribute("data-fr-src",m.helpers.sanitizeURL(w(n.getAttribute("data-fr-src")))),n.getAttribute("href")&&n.setAttribute("href",m.helpers.sanitizeURL(w(n.getAttribute("href")))),n.getAttribute("src")&&n.setAttribute("src",m.helpers.sanitizeURL(w(n.getAttribute("src")))),n.getAttribute("srcdoc")&&n.setAttribute("srcdoc",m.clean.html(n.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(n.tagName)&&(n.innerHTML=n.innerHTML.trim())),!m.opts.pasteAllowLocalImages&&n.nodeType===Node.ELEMENT_NODE&&"IMG"===n.tagName&&n.getAttribute("data-fr-src")&&0===n.getAttribute("data-fr-src").indexOf("file://"))return n.parentNode.removeChild(n),!1;if(n.nodeType===Node.ELEMENT_NODE&&kt.HTML5Map[n.tagName]&&""===m.node.attributes(n)){var e=kt.HTML5Map[n.tagName],t="<".concat(e,">").concat(n.innerHTML,"</").concat(e,">");n.insertAdjacentHTML("beforebegin",t),(n=n.previousSibling).parentNode.removeChild(n.nextSibling)}if(m.opts.htmlAllowComments||n.nodeType!==Node.COMMENT_NODE)if(n.tagName&&n.tagName.match(b)){if("STYLE"==n.tagName&&m.helpers.isMac()){var r,a=n.innerHTML.trim(),o=[],i=/{([^}]+)}/g;for(a=a.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|<!--[\s\S]*?-->$/,"");r=i.exec(a);)o.push(r[1]);for(var s=function s(t){var e=a.substring(0,a.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(e)&&n.parentNode.querySelectorAll(e).forEach(function(e){e.removeAttribute("class"),e.setAttribute("style",o[t])}),a=a.substring(a.indexOf("}")+1)},l=0;-1!=a.indexOf("{");l++)s(l)}n.parentNode.removeChild(n)}else if(n.tagName&&!n.tagName.match(v))"svg"===n.tagName?n.parentNode.removeChild(n):m.browser.safari&&"path"===n.tagName&&n.parentNode&&"svg"===n.parentNode.tagName||(n.outerHTML=n.innerHTML);else{var c=n.attributes;if(c)for(var d=c.length-1;0<=d;d--){var f=c[d],p=f.nodeName.match(C),u=null;"style"===f.nodeName&&m.opts.htmlAllowedStyleProps.length&&(u=f.value.match(E)),p&&u?f.value=y(u.join(";")):p&&("style"!==f.nodeName||u)||n.removeAttribute(f.nodeName)}}else 0!==n.data.indexOf("[FROALA.EDITOR")&&n.parentNode.removeChild(n)}(e)}return{_init:function e(){m.opts.fullPage&&f.merge(m.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function h(e,t,n,r){if(void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=!1),0<=e.indexOf("<plaintext>")){e=e.replace(/<plaintext>/g,"").replace(/<\/plaintext>/g,"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;").replace(/\t/g,m.opts.preserveTabSpaces?" ".repeat(m.opts.tabSpaces||4):"");var a=m.html.defaultTag();m.opts.enter!=kt.ENTER_BR&&(e="<".concat(a,">").concat(e,"</").concat(a,">"))}var o,i=f.merge([],m.opts.htmlAllowedTags);for(o=0;o<t.length;o++)0<=i.indexOf(t[o])&&i.splice(i.indexOf(t[o]),1);var s=f.merge([],m.opts.htmlAllowedAttrs);for(o=0;o<n.length;o++)0<=s.indexOf(n[o])&&s.splice(s.indexOf(n[o]),1);if(s.push("data-fr-.*"),s.push("fr-.*"),v=new RegExp("^".concat(i.join("$|^"),"$"),"gi"),C=new RegExp("^".concat(s.join("$|^"),"$"),"gi"),b=new RegExp("^".concat(m.opts.htmlRemoveTags.join("$|^"),"$"),"gi"),E=m.opts.htmlAllowedStyleProps.length?new RegExp("((^|;|\\s)".concat(m.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"),":.+?(?=(;)|$))"),"gi"):null,e=p(e,u,!0),"undefined"!=typeof m.opts.DOMPurify){var l={ALLOW_UNKNOWN_PROTOCOLS:!0};1===m.opts.htmlAllowedTags.length&&".*"===m.opts.htmlAllowedTags[0]||(l.ALLOWED_TAGS=m.opts.htmlAllowedTags),1===m.opts.htmlAllowedAttrs.length&&".*"===m.opts.htmlAllowedAttrs[0]||(l.ALLOWED_ATTR=m.opts.htmlAllowedAttrs),e=m.opts.DOMPurify.sanitize(e,l)}return e},toHTML5:function r(){var e=m.el.querySelectorAll(Object.keys(kt.HTML5Map).join(","));if(e.length){var t=!1;m.el.querySelector(".fr-marker")||(m.selection.save(),t=!0);for(var n=0;n<e.length;n++)""===m.node.attributes(e[n])&&f(e[n]).replaceWith("<".concat(kt.HTML5Map[e[n].tagName],">").concat(e[n].innerHTML,"</").concat(kt.HTML5Map[e[n].tagName],">"));t&&m.selection.restore()}},tables:function t(){!function d(){for(var e=m.el.querySelectorAll("tr"),t=0,n=0;n<e.length;n++){var r=e[n].outerHTML.match(/rowspan="([0-9]+)"/);r&&(t+=Number(r[1])-1);for(var a=e[n].children,o=!0,i=0;i<a.length;i++)if("TH"!==a[i].tagName){o=!1;break}if(!1!==o&&0!==a.length)if(1===a.length&&"TH"===a[0].tagName&&t)t--;else{var s=e[n],l=s.closest("table");if(l){var c=l.querySelector("thead");c||(c=m.doc.createElement("THEAD"),l.insertBefore(c,l.firstChild)),c.contains(s)||c.appendChild(s)}}}}(),function s(){for(var e=m.$el.find("table[style]"),t=0;t<e.length;t++){var n=f(e[t]);n.attr("style").indexOf("width")<0&&n.css("width","100%")}for(var r=m.$el.find("td[width]"),a=0;a<r.length;a++){var o=f(r[a]),i=o.attr("width");i&&(o.css("width",i),o.removeAttr("width"))}}()},lists:function g(){!function s(){var e,t=[];do{if(t.length){var n=t[0],r=m.doc.createElement("ul");n.parentNode.insertBefore(r,n);do{var a=n;n=n.nextSibling,r.appendChild(a)}while(n&&"LI"===n.tagName)}t=[];for(var o=m.el.querySelectorAll("li"),i=0;i<o.length;i++)e=o[i],m.node.isList(e.parentNode)||t.push(o[i])}while(0<t.length)}(),function o(){for(var e=m.el.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var n=e[t];if(m.node.isList(n.previousSibling)&&m.node.openTagString(n)===m.node.openTagString(n.previousSibling)){for(var r=m.node.contents(n),a=0;a<r.length;a++)n.previousSibling.appendChild(r[a]);n.parentNode.removeChild(n)}}}(),function i(){for(var e=m.el.querySelectorAll("ul, ol"),t=0;t<e.length;t++)for(var n=m.node.contents(e[t]),r=null,a=n.length-1;0<=a;a--)!n[a].tagName&&m.opts.htmlUntouched||"LI"===n[a].tagName||"UL"==n[a].tagName||"OL"==n[a].tagName?r=null:"BR"==n[a].tagName?f(n[a]).remove():(r||(r=f(m.doc.createElement("LI"))).insertBefore(n[a]),r.prepend(n[a]))}(),function l(){var e,t,n;do{t=!1;var r=m.el.querySelectorAll("li:empty");for(e=0;e<r.length;e++)r[e].parentNode.removeChild(r[e]);var a=m.el.querySelectorAll("ul, ol");for(e=0;e<a.length;e++)(n=a[e]).querySelector("LI")||(t=!0,n.parentNode.removeChild(n))}while(!0===t)}(),function a(){for(var e=m.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"),t=0;t<e.length;t++){var n=e[t],r=n.previousSibling;r&&("LI"===r.tagName?r.appendChild(n):f(n).wrap("<li></li>"))}}(),function c(){for(var e=m.el.querySelectorAll("li > ul, li > ol"),t=0;t<e.length;t++){var n=e[t];if(n.nextSibling)for(var r=n.nextSibling;0<r.childNodes.length;)n.append(r.childNodes[0])}}(),function d(){for(var e=m.el.querySelectorAll("li > ul, li > ol"),t=0;t<e.length;t++){var n=e[t];if(m.node.isFirstSibling(n)&&"none"!=n.parentNode.style.listStyleType)f(n).before("<br/>");else if(n.previousSibling&&"BR"===n.previousSibling.tagName){for(var r=n.previousSibling.previousSibling;r&&m.node.hasClass(r,"fr-marker");)r=r.previousSibling;r&&"BR"!==r.tagName&&f(n.previousSibling).remove()}}}(),function n(){for(var e=m.el.querySelectorAll("li:empty"),t=0;t<e.length;t++)f(e[t]).remove()}(),function r(){for(var e=m.el.querySelectorAll("ul, ol"),t=0;t<e.length;t++)for(var n=e[t],i=m.node.contents(n),s=function s(){var e=i[l],t=m.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){var r=n[0],a=i[l-1];if(!a)return 0;var o=f(a).data("tracking")&&m.opts.trackChangesEnabled;Se(r.querySelectorAll("li")).reverse().forEach(function(e){if(o){var t="pending-".concat(m.id,"-").concat(m.track_changes.getPendingChanges().length),n=m.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>"),m.track_changes.pushChange(t)}}),a.append(r),e.remove()}},l=0;l<i.length;l++)s()}()},invisibleSpaces:function n(e){return e.replace(/\u200b/g,"").length===e.length?e:m.clean.exec(e,a)},exec:p}},kt.XS=0,kt.SM=1,kt.MD=2,kt.LG=3;kt.LinkRegExCommon="[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.","]{1,}"),kt.LinkRegExEnd="((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&amp;\\/~+#-\\'*-_{}]*)|())",kt.LinkRegExTLD="((".concat(kt.LinkRegExCommon,")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"),kt.LinkRegExHTTP="((ftp|http|https):\\/\\/".concat(kt.LinkRegExCommon,")"),kt.LinkRegExAuth="((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat(kt.LinkRegExCommon,")"),kt.LinkRegExWWW="(www\\.".concat(kt.LinkRegExCommon,"\\.[a-z0-9-]{2,24})"),kt.LinkRegEx="(".concat(kt.LinkRegExTLD,"|").concat(kt.LinkRegExHTTP,"|").concat(kt.LinkRegExWWW,"|").concat(kt.LinkRegExAuth,")").concat(kt.LinkRegExEnd),kt.LinkProtocols=["mailto","tel","sms","notes","data"],kt.MAIL_REGEX=/.+@.+\..+/i,kt.MODULES.helpers=function(o){var i,s=o.$;function e(){var e={},t=function o(){var e,t=-1;return"Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),t}();if(0<t)e.msie=!0;else{var n=navigator.userAgent.toLowerCase(),r=/(edge)[ /]([\w.]+)/.exec(n)||/(chrome)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],a=r[1]||"";r[2];r[1]&&(e[a]=!0),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0)}return e.msie&&(e.version=t),e}function t(){return(/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||function e(){return navigator.maxTouchPoints&&2<navigator.maxTouchPoints&&/Macintosh/.test(navigator.userAgent)}())&&!a()}function n(){return/(Android)/g.test(navigator.userAgent)&&!a()}function r(){return/(Blackberry)/g.test(navigator.userAgent)}function a(){return/(Windows Phone)/gi.test(navigator.userAgent)}var l=null;return{_init:function c(){o.browser=e()},isIOS:t,isMac:function d(){return null===l&&(l=0<=navigator.platform.toUpperCase().indexOf("MAC")),l},getIOSVersion:function f(){if(t()){var e=navigator.userAgent.match(/OS (\d)?\d_\d(_\d)?/i)||navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/);return e&&e.length&&Math.abs(e[0].split("_")[0].replace("OS ",""))||NaN}return NaN},getSafariVersion:function p(){var e=navigator.userAgent;if(-1!==e.indexOf("Safari")){var t=e.match(/Version\/(\d+\.\d+)/);if(t)return parseInt(t[1])}return null},isAndroid:n,isBlackberry:r,isWindowsPhone:a,isMobile:function u(){return n()||t()||r()},isEmail:function h(e){return!/^(https?:|ftps?:|)\/\//i.test(e)&&kt.MAIL_REGEX.test(e)},requestAnimationFrame:function g(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}},getPX:function m(e){return parseInt(e,10)||0},screenSize:function v(e){try{var t=0;if((t=e?o.$box.width():o.$sc.width())<768)return kt.XS;if(768<=t&&t<992)return kt.SM;if(992<=t&&t<1200)return kt.MD;if(1200<=t)return kt.LG}catch(n){return kt.LG}},isTouch:function b(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch},sanitizeURL:function C(e){if(o.opts.DOMPurify){var 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===o.opts.htmlAllowedTags.length&&".*"===o.opts.htmlAllowedTags[0]||(t.ALLOWED_TAGS=o.opts.htmlAllowedTags),1===o.opts.htmlAllowedAttrs.length&&".*"===o.opts.htmlAllowedAttrs[0]||(t.ALLOWED_ATTR=o.opts.htmlAllowedAttrs),e=o.opts.DOMPurify.sanitize(e,t)}return e=e.replace(/(["'/]|\s+)on\w+=(?:"[^"]*"|'[^']*'|[^>\s]+)/gi,""),/^(https?:|ftps?:|)\/\//i.test(e)?e:/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)?e:new RegExp("^(".concat(kt.LinkProtocols.join("|"),"):"),"i").test(e)?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(/&amp;/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(e){return e&&!Object.prototype.propertyIsEnumerable.call(e,"length")&&"object"===St(e)&&"number"==typeof e.length},RGBToHex:function y(e){function t(e){return"0".concat(parseInt(e,10).toString(16)).slice(-2)}try{if(!e||"transparent"===e)return"";if(/^#[0-9A-F]{6}$/i.test(e)||/^#[0-9A-F]{8}$/i.test(e))return e.toUpperCase();var n=e.match(/^rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)$/i);if(n)return"#".concat(t(n[1])).concat(t(n[2])).concat(t(n[3])).toUpperCase();if(n=e.match(/^rgba\(\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\s*\)$/i))return"#".concat(t(n[1])).concat(t(n[2])).concat(t(n[3])).concat(t(Math.round(255*parseFloat(n[4])))).toUpperCase()}catch(r){return null}},HEXtoRGB:function w(e){if(e=e.replace(/^#/,""),/^rgba?\(\d+,\s*\d+,\s*\d+(,\s*(0|1|0?\.\d+))?\)$/i.test(e))return e;if(3!==e.length&&4!==e.length||(e=e.split("").map(function(e){return e+e}).join("")),6===e.length){var t=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?"rgb(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),")"):""}if(8===e.length){var n=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n){var r=parseInt(n[1],16),a=parseInt(n[2],16),o=parseInt(n[3],16),i=parseInt(n[4],16)/255;return"rgba(".concat(r,", ").concat(a,", ").concat(o,", ").concat(i.toFixed(2),")")}}return""},isURL:function T(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(kt.LinkRegExHTTP).concat(kt.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function L(e){e.css||(e=s(e));var t=(e.css("text-align")||"").replace(/-(.*)-/g,"");if(["left","right","justify","center"].indexOf(t)<0){if(!i){var n=s('<div dir="'.concat("rtl"===o.opts.direction?"rtl":"auto",'" style="text-align: ').concat(o.$el.css("text-align"),'; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>'));s("body").first().append(n);var r=n.find("#s1").get(0).getBoundingClientRect().left,a=n.find("#s2").get(0).getBoundingClientRect().left;n.remove(),i=r<a?"left":"right"}t=i}return t},scrollTop:function A(){return o.o_win.pageYOffset?o.o_win.pageYOffset:o.o_doc.documentElement&&o.o_doc.documentElement.scrollTop?o.o_doc.documentElement.scrollTop:o.o_doc.body.scrollTop?o.o_doc.body.scrollTop:0},scrollLeft:function _(){return o.o_win.pageXOffset?o.o_win.pageXOffset:o.o_doc.documentElement&&o.o_doc.documentElement.scrollLeft?o.o_doc.documentElement.scrollLeft:o.o_doc.body.scrollLeft?o.o_doc.body.scrollLeft:0},isInViewPort:function S(e){var t=e.getBoundingClientRect();return 0<=(t={top:Math.round(t.top),bottom:Math.round(t.bottom)}).top&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)||t.top<=0&&t.bottom>=(window.innerHeight||document.documentElement.clientHeight)}}},kt.MODULES.events=function(l){var e,o=l.$,i={};function s(e,t,n){m(e,t,n)}function c(e){if(void 0===e&&(e=!0),!l.$wp)return!1;if(l.helpers.isIOS()&&l.$win.get(0).focus(),l.core.hasFocus())return!1;if(!l.core.hasFocus()&&e){var t=l.$win.scrollTop();if(l.browser.msie&&l.$box&&l.$box.css("position","fixed"),l.browser.msie&&l.$wp&&l.$wp.css("overflow","visible"),l.browser.msie&&l.$sc&&l.$sc.css("position","fixed"),l.browser.msie||(p(),l.el.focus(),l.events.trigger("focus"),f()),l.browser.msie&&l.$sc&&l.$sc.css("position",""),l.browser.msie&&l.$box&&l.$box.css("position",""),l.browser.msie&&l.$wp&&l.$wp.css("overflow","auto"),t!==l.$win.scrollTop()&&l.$win.scrollTop(t),!l.selection.info(l.el).atStart)return!1}if(!l.core.hasFocus()||0<l.$el.find(".fr-marker").length)return!1;if(l.selection.info(l.el).atStart&&l.selection.isCollapsed()&&null!==l.html.defaultTag()){var n=l.markers.insert();if(n&&!l.node.blockParent(n)){o(n).remove();var r=l.$el.find(l.html.blockTagsQuery()).get(0);r&&(o(r).prepend(kt.MARKERS),l.selection.restore())}else n&&o(n).remove()}}var d=!1;function f(){e=!0}function p(){e=!1}function u(){return e}function h(e,t,n){var r,a=e.split(" ");if(1<a.length){for(var o=0;o<a.length;o++)h(a[o],t,n);return!0}void 0===n&&(n=!1),r=0!==e.indexOf("shared.")?(i[e]=i[e]||[],i[e]):(l.shared._events[e]=l.shared._events[e]||[],l.shared._events[e]),n?r.unshift(t):r.push(t)}var g=[];function m(e,t,n,r,a){"function"==typeof n&&(a=r,r=n,n=!1);var o=a?l.shared.$_events:g,i=a?l.sid:l.id,s="".concat(t.trim().split(" ").join(".ed".concat(i," ")),".ed").concat(i);n?e.on(s,n,r):e.on(s,r),o.push([e,s])}function t(e){for(var t=0;t<e.length;t++)e[t][0].off(e[t][1])}function v(e,t,n){if(!l.edit.isDisabled()||n){var r,a;if(0!==e.indexOf("shared."))r=i[e];else{if(0<l.shared.count)return!1;r=l.shared._events[e]}if(r)for(var o=0;o<r.length;o++)if(!1===(a=r[o].apply(l,t)))return!1;return(!l.opts.events||!l.opts.events[e]||!1!==(a=l.opts.events[e].apply(l,t)))&&a}}function b(){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&delete i[e]}function C(){for(var e in l.shared._events)Object.prototype.hasOwnProperty.call(l.shared._events,e)&&delete l.shared._events[e]}return{_init:function E(){l.shared.$_events=l.shared.$_events||[],l.shared._events={},function e(){l.helpers.isMobile()?(l._mousedown="touchstart",l._mouseup="touchend",l._move="touchmove",l._mousemove="touchmove"):(l._mousedown="mousedown",l._mouseup="mouseup",l._move="",l._mousemove="mousemove")}(),function t(){s(l.$el,"click mouseup mousemove mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart",function(e){v(e.type,[e])}),h("mousedown",function(){for(var e=0;e<kt.INSTANCES.length;e++)kt.INSTANCES[e]!==l&&kt.INSTANCES[e].popups&&kt.INSTANCES[e].popups.areVisible()&&kt.INSTANCES[e].$el.find(".fr-marker").remove()})}(),function n(){s(l.$win,l._mousedown,function(e){v("window.mousedown",[e]),f()}),s(l.$win,l._mouseup,function(e){v("window.mouseup",[e])}),s(l.$win,"beforeinput cut copy keydown keyup touchmove touchend",function(e){v("window.".concat(e.type),[e])})}(),function r(){s(l.$doc,"dragend drop",function(e){v("document.".concat(e.type),[e])})}(),function a(){s(l.$el,"beforeinput keydown keypress keyup input",function(e){v(e.type,[e])})}(),function o(){s(l.$el,"focus",function(e){u()&&(c(!1),!1===d&&(v(e.type,[e]),l.helpers.isMobile()&&p()))}),s(l.$el,"blur",function(e){u()&&!0===d&&(v(e.type,[e]),l.helpers.isMobile()&&l.opts.toolbarContainer&&(l.shared.selected_editor=l.id),f())}),m(l.$el,"mousedown",'[contenteditable="true"]',function(){p(),l.$el.blur()}),h("focus",function(){d=!0}),h("blur",function(){d=!1})}(),f(),function i(){s(l.$el,"cut copy paste beforepaste",function(e){v(e.type,[e])})}(),h("destroy",b),h("shared.destroy",C)},on:h,trigger:v,bindClick:function r(e,t,n){m(e,l._mousedown,t,function(e){l.edit.isDisabled()||function n(e){var t=o(e.currentTarget);return l.edit.isDisabled()||l.node.hasClass(t.get(0),"fr-disabled")?(e.preventDefault(),!1):"mousedown"===e.type&&1!==e.which||(l.helpers.isMobile()||e.preventDefault(),(l.helpers.isAndroid()||l.helpers.isWindowsPhone())&&0===t.parents(".fr-dropdown-menu").length&&(e.preventDefault(),e.stopPropagation()),t.addClass("fr-selected"),void l.events.trigger("commands.mousedown",[t]))}(e)},!0),m(e,"".concat(l._mouseup," ").concat(l._move),t,function(e){l.edit.isDisabled()||(l.helpers.isIOS()&&null!==l.selection.get().focusNode&&l.selection.save(),function a(e,t){var n=o(e.currentTarget);if(l.edit.isDisabled()||l.node.hasClass(n.get(0),"fr-disabled"))return e.preventDefault(),!1;if("mouseup"===e.type&&1!==e.which)return!0;if(l.button.getButtons(".fr-selected",!0).get(0)==n.get(0)&&!l.node.hasClass(n.get(0),"fr-selected"))return!0;if("touchmove"!==e.type){if(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!l.node.hasClass(n.get(0),"fr-selected"))return l.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),!1;if(l.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),n.data("dragging")||n.attr("disabled"))return n.removeData("dragging"),!1;var r=n.data("timeout");r&&(clearTimeout(r),n.removeData("timeout")),t.apply(l,[e])}else n.data("timeout")||n.data("timeout",setTimeout(function(){n.data("dragging",!0)},100))}(e,n))},!0),m(e,"mousedown click mouseup",t,function(e){l.edit.isDisabled()||e.stopPropagation()},!0),h("window.mouseup",function(){l.edit.isDisabled()||(e.find(t).removeClass("fr-selected"),f())}),m(e,"mouseover",t,function(){o(this).hasClass("fr-options")&&o(this).prev(".fr-btn").addClass("fr-btn-hover"),o(this).next(".fr-btn").hasClass("fr-options")&&o(this).next(".fr-btn").addClass("fr-btn-hover")}),m(e,"mouseout",t,function(){o(this).hasClass("fr-options")&&o(this).prev(".fr-btn").removeClass("fr-btn-hover"),o(this).next(".fr-btn").hasClass("fr-options")&&o(this).next(".fr-btn").removeClass("fr-btn-hover")})},disableBlur:p,enableBlur:f,blurActive:u,focus:c,chainTrigger:function y(e,t,n){if(!l.edit.isDisabled()||n){var r,a;if(0!==e.indexOf("shared."))r=i[e];else{if(0<l.shared.count)return!1;r=l.shared._events[e]}if(r)for(var o=0;o<r.length;o++)void 0!==(a=r[o].apply(l,[t]))&&(t=a);return l.opts.events&&l.opts.events[e]&&void 0!==(a=l.opts.events[e].apply(l,[t]))&&(t=a),t}},$on:m,$off:function n(){t(g),g=[],0===l.shared.count&&(t(l.shared.$_events),l.shared.$_events=[])}}},Object.assign(kt.DEFAULTS,{indentMargin:20}),kt.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}},kt.RegisterCommand=function(e,t){kt.COMMANDS[e]=t},kt.MODULES.commands=function(f){var p=f.$;function i(e){return f.html.defaultTag()&&(e="<".concat(f.html.defaultTag(),">").concat(e,"</").concat(f.html.defaultTag(),">")),e}var s={bold:function(){e("bold","strong")},subscript:function(){f.format.is("sup")&&f.format.remove("sup"),e("subscript","sub")},superscript:function(){f.format.is("sub")&&f.format.remove("sub"),