! 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 Fe(e) { return (Fe = "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) } 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 && (e.match(i) || e.match(s))) { 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 } return o.call(this, e) } } try { l.querySelectorAll(":scope *") } catch (t) { e(Element.prototype, "querySelector"), e(Element.prototype, "querySelectorAll"), e(HTMLElement.prototype, "querySelector"), e(HTMLElement.prototype, "querySelectorAll") } }(); function $e(e, t, n) { if ("string" != typeof e) return new $e.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 $e.Bootstrap(r[o], t, n)) } return 1 == a.length ? a[0] : a } $e.RegisterPlugins = function(e) { for (var t = 0; t < e.length; t++) e[t].call($e) }, Object.assign($e, { DEFAULTS: { initOnClick: !1, pluginsEnabled: null }, MODULES: {}, PLUGINS: {}, VERSION: "3.0.3", INSTANCES: [], OPTS_MAPPING: {}, SHARED: {}, ID: 0 }), $e.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 <= $e.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).sort(), 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, """)), 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($e.VOID_ELEMENTS.join(",")).length - e.querySelectorAll("br").length || e.querySelector("".concat(i.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || 1 < e.querySelectorAll($e.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 <= $e.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") && ($e.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName) < 0 || !n) && (!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 "") }, 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 <= $e.VOID_ELEMENTS.indexOf((e.tagName || "").toLowerCase()) }, hasFocus: function E(e) { return e === i.doc.activeElement && (!i.doc.hasFocus || i.doc.hasFocus()) && Boolean(r(e) || e.type || e.href || ~e.tabIndex) }, isEditable: function T(e) { return (!e.getAttribute || "false" !== e.getAttribute("contenteditable")) && ["STYLE", "SCRIPT"].indexOf(e.tagName) < 0 }, isDeletable: function A(e) { return e && e.nodeType === Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= (e.getAttribute("class") || "").indexOf("fr-deletable") }, hasClass: function C(e, t) { return e instanceof n && (e = e.get(0)), e && e.classList && e.classList.contains(t) }, filter: function S(e) { return i.browser.msie ? e : { acceptNode: e } } } }, Object.assign($e.DEFAULTS, { 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, fullPage: !1 }), $e.HTML5Map = { B: "STRONG", I: "EM", STRIKE: "S" }, $e.MODULES.clean = function(f) { var d, p, u, h, g = f.$; function a(e) { if (e.nodeType === Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= e.getAttribute("class").indexOf("fr-marker")) return !1; var t, n = f.node.contents(e), r = []; for (t = 0; t < n.length; t++) n[t].nodeType !== Node.ELEMENT_NODE || f.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 && !f.node.isVoid(e) && (e.normalize(), n = f.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, "&").replace(//g, ">") : e.textContent.replace(/&/g, "&").replace(//g, ">").replace(/\u00A0/g, " ").replace(/\u0009/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(/</g, "<").replace(/>/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 f.node.openTagString(e) + o + f.node.closeTagString(e) } var l = []; function m(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(u), r = null; "style" === t && f.opts.htmlAllowedStyleProps.length && (r = e[t].match(h)), n && r ? e[t] = m(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 v(e, t) { var n, r = document.implementation.createHTMLDocument("Froala DOC").createElement("DIV"); g(r).append(e); var a = ""; if (r) { var o = f.node.contents(r); for (n = 0; n < o.length; n++) t(o[n]); for (o = f.node.contents(r), n = 0; n < o.length; n++) a += s(o[n]) } return a } function b(e, t, n) { var r = e = function o(e) { return l = [], e = (e = (e = (e = e.replace(/)<[^<]*)*<\/script>/gi, function(e) { return l.push(e), "[FROALA.EDITOR.SCRIPT ".concat(l.length - 1, "]") })).replace(/)<[^<]*)*<\/noscript>/gi, function(e) { return l.push(e), "[FROALA.EDITOR.NOSCRIPT ".concat(l.length - 1, "]") })).replace(/") })).replace(/" : t; var o = c(f.html.extractNodeAttrs(n, "head")), i = c(f.html.extractNodeAttrs(n, "body")); return "".concat(r, "").concat(t, "").concat(e, "") } return e }(r, a, e)) } function E(e) { var t = f.doc.createElement("DIV"); return t.innerText = e, t.textContent } function T(e) { for (var t = f.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType !== Node.TEXT_NODE && T(t[n]); ! function c(e) { if ("SPAN" === e.tagName && 0 <= (e.getAttribute("class") || "").indexOf("fr-marker")) return !1; if ("PRE" === e.tagName && function l(e) { var t = e.innerHTML; 0 <= t.indexOf("\n") && (e.innerHTML = t.replace(/\n/g, "
")) }(e), e.nodeType === Node.ELEMENT_NODE && (e.getAttribute("data-fr-src") && 0 !== e.getAttribute("data-fr-src").indexOf("blob:") && e.setAttribute("data-fr-src", f.helpers.sanitizeURL(E(e.getAttribute("data-fr-src")))), e.getAttribute("href") && e.setAttribute("href", f.helpers.sanitizeURL(E(e.getAttribute("href")))), e.getAttribute("src") && e.setAttribute("src", f.helpers.sanitizeURL(E(e.getAttribute("src")))), 0 <= ["TABLE", "TBODY", "TFOOT", "TR"].indexOf(e.tagName) && (e.innerHTML = e.innerHTML.trim())), !f.opts.pasteAllowLocalImages && e.nodeType === Node.ELEMENT_NODE && "IMG" === e.tagName && e.getAttribute("data-fr-src") && 0 === e.getAttribute("data-fr-src").indexOf("file://")) return e.parentNode.removeChild(e), !1; if (e.nodeType === Node.ELEMENT_NODE && $e.HTML5Map[e.tagName] && "" === f.node.attributes(e)) { var t = $e.HTML5Map[e.tagName], n = "<".concat(t, ">").concat(e.innerHTML, ""); e.insertAdjacentHTML("beforebegin", n), (e = e.previousSibling).parentNode.removeChild(e.nextSibling) } if (f.opts.htmlAllowComments || e.nodeType !== Node.COMMENT_NODE) if (e.tagName && e.tagName.match(p)) e.parentNode.removeChild(e); else if (e.tagName && !e.tagName.match(d)) "svg" === e.tagName ? e.parentNode.removeChild(e) : f.browser.safari && "path" === e.tagName && e.parentNode && "svg" === e.parentNode.tagName || (e.outerHTML = e.innerHTML); else { var r = e.attributes; if (r) for (var a = r.length - 1; 0 <= a; a--) { var o = r[a], i = o.nodeName.match(u), s = null; "style" === o.nodeName && f.opts.htmlAllowedStyleProps.length && (s = o.value.match(h)), i && s ? o.value = m(s.join(";")) : i && ("style" !== o.nodeName || s) || e.removeAttribute(o.nodeName) } } else 0 !== e.data.indexOf("[FROALA.EDITOR") && e.parentNode.removeChild(e) }(e) } return { _init: function e() { f.opts.fullPage && g.merge(f.opts.htmlAllowedTags, ["head", "title", "style", "link", "base", "body", "html", "meta"]) }, html: function A(e, t, n, r) { void 0 === t && (t = []), void 0 === n && (n = []), void 0 === r && (r = !1); var a, o = g.merge([], f.opts.htmlAllowedTags); for (a = 0; a < t.length; a++) 0 <= o.indexOf(t[a]) && o.splice(o.indexOf(t[a]), 1); var i = g.merge([], f.opts.htmlAllowedAttrs); for (a = 0; a < n.length; a++) 0 <= i.indexOf(n[a]) && i.splice(i.indexOf(n[a]), 1); return i.push("data-fr-.*"), i.push("fr-.*"), d = new RegExp("^".concat(o.join("$|^"), "$"), "gi"), u = new RegExp("^".concat(i.join("$|^"), "$"), "gi"), p = new RegExp("^".concat(f.opts.htmlRemoveTags.join("$|^"), "$"), "gi"), h = f.opts.htmlAllowedStyleProps.length ? new RegExp("((^|;|\\s)".concat(f.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"), ":.+?(?=(;)|$))"), "gi") : null, e = b(e, T, !0) }, toHTML5: function r() { var e = f.el.querySelectorAll(Object.keys($e.HTML5Map).join(",")); if (e.length) { var t = !1; f.el.querySelector(".fr-marker") || (f.selection.save(), t = !0); for (var n = 0; n < e.length; n++) "" === f.node.attributes(e[n]) && g(e[n]).replaceWith("<".concat($e.HTML5Map[e[n].tagName], ">").concat(e[n].innerHTML, "")); t && f.selection.restore() } }, tables: function t() { ! function s() { for (var e = f.el.querySelectorAll("tr"), t = 0; t < e.length; t++) { for (var n = e[t].children, r = !0, a = 0; a < n.length; a++) if ("TH" !== n[a].tagName) { r = !1; break } if (!1 !== r && 0 !== n.length) { for (var o = e[t]; o && "TABLE" !== o.tagName && "THEAD" !== o.tagName;) o = o.parentNode; var i = o; "THEAD" !== i.tagName && (i = f.doc.createElement("THEAD"), o.insertBefore(i, o.firstChild)), i.appendChild(e[t]) } } }() }, lists: function C() { ! function s() { var e, t = []; do { if (t.length) { var n = t[0], r = f.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 = f.el.querySelectorAll("li"), i = 0; i < o.length; i++) e = o[i], f.node.isList(e.parentNode) || t.push(o[i]) } while (0 < t.length) }(), function o() { for (var e = f.el.querySelectorAll("ol + ol, ul + ul"), t = 0; t < e.length; t++) { var n = e[t]; if (f.node.isList(n.previousSibling) && f.node.openTagString(n) === f.node.openTagString(n.previousSibling)) { for (var r = f.node.contents(n), a = 0; a < r.length; a++) n.previousSibling.appendChild(r[a]); n.parentNode.removeChild(n) } } }(), function i() { for (var e = f.el.querySelectorAll("ul, ol"), t = 0; t < e.length; t++) for (var n = f.node.contents(e[t]), r = null, a = n.length - 1; 0 <= a; a--) "LI" !== n[a].tagName && "UL" != n[a].tagName && "OL" != n[a].tagName ? (r || (r = g(f.doc.createElement("LI"))).insertBefore(n[a]), r.prepend(n[a])) : r = null }(), function l() { var e, t, n; do { t = !1; var r = f.el.querySelectorAll("li:empty"); for (e = 0; e < r.length; e++) r[e].parentNode.removeChild(r[e]); var a = f.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 = f.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) : g(n).wrap("
  • ")) } }(), function c() { for (var e = f.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) { var n = e[t]; if (n.nextSibling) { var r = n.nextSibling, a = g(f.doc.createElement("LI")); g(n.parentNode).after(a.get(0)); do { var o = r; r = r.nextSibling, a.append(o) } while (r) } } }(), function d() { for (var e = f.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) { var n = e[t]; if (f.node.isFirstSibling(n)) g(n).before("
    "); else if (n.previousSibling && "BR" === n.previousSibling.tagName) { for (var r = n.previousSibling.previousSibling; r && f.node.hasClass(r, "fr-marker");) r = r.previousSibling; r && "BR" !== r.tagName && g(n.previousSibling).remove() } } }(), function n() { for (var e = f.el.querySelectorAll("li:empty"), t = 0; t < e.length; t++) g(e[t]).remove() }() }, invisibleSpaces: function n(e) { return e.replace(/\u200b/g, "").length === e.length ? e : f.clean.exec(e, a) }, exec: b } }, $e.XS = 0, $e.SM = 1, $e.MD = 2, $e.LG = 3; $e.LinkRegExCommon = "[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.", "]{1,}"), $e.LinkRegExEnd = "((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&\\/~+#-\\'*-_{}]*)|())", $e.LinkRegExTLD = "((".concat($e.LinkRegExCommon, ")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"), $e.LinkRegExHTTP = "((ftp|http|https):\\/\\/".concat($e.LinkRegExCommon, ")"), $e.LinkRegExAuth = "((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat($e.LinkRegExCommon, ")"), $e.LinkRegExWWW = "(www\\.".concat($e.LinkRegExCommon, "\\.[a-z0-9-]{2,24})"), $e.LinkRegEx = "(".concat($e.LinkRegExTLD, "|").concat($e.LinkRegExHTTP, "|").concat($e.LinkRegExWWW, "|").concat($e.LinkRegExAuth, ")").concat($e.LinkRegExEnd), $e.LinkProtocols = ["mailto", "tel", "sms", "notes", "data"], $e.MAIL_REGEX = /.+@.+\..+/i, $e.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) && !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) } function l(e) { return parseInt(e, 10) || 0 } var c = null; return { _init: function d() { o.browser = e() }, isIOS: t, isMac: function f() { return null === c && (c = 0 <= navigator.platform.toUpperCase().indexOf("MAC")), c }, isAndroid: n, isBlackberry: r, isWindowsPhone: a, isMobile: function p() { return n() || t() || r() }, isEmail: function u(e) { return !/^(https?:|ftps?:|)\/\//i.test(e) && $e.MAIL_REGEX.test(e) }, requestAnimationFrame: function h() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(e) { window.setTimeout(e, 1e3 / 60) } }, getPX: l, screenSize: function g() { var e = s(o.doc.createElement("DIV")); e.addClass("fr-visibility-helper"), s("body").first().append(e); try { var t = l(e.css("margin-left")); return e.remove(), t } catch (n) { return $e.LG } }, isTouch: function m() { return "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch }, sanitizeURL: function v(e) { return /^(https?:|ftps?:|)\/\//i.test(e) ? e : /^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e) ? e : new RegExp("^(".concat($e.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(/&/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, "}") }, isArray: function b(e) { return e && !Object.prototype.propertyIsEnumerable.call(e, "length") && "object" === Fe(e) && "number" == typeof e.length }, RGBToHex: function E(e) { function t(e) { return "0".concat(parseInt(e, 10).toString(16)).slice(-2) } try { return e && "transparent" !== e ? /^#[0-9A-F]{6}$/i.test(e) ? e : (e = e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/), "#".concat(t(e[1])).concat(t(e[2])).concat(t(e[3])).toUpperCase()) : "" } catch (n) { return null } }, HEXtoRGB: function T(e) { e = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(e, t, n, r) { return t + t + n + n + r + r }); 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), ")") : "" }, isURL: function A(e) { return !!/^(https?:|ftps?:|)\/\//i.test(e) && (e = String(e).replace(//g, "%3E").replace(/"/g, "%22").replace(/ /g, "%20"), new RegExp("^".concat($e.LinkRegExHTTP).concat($e.LinkRegExEnd, "$"), "gi").test(e)) }, getAlignment: function C(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('
    ..
    ')); 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 S() { 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 y() { 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 R(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) } } }, $e.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"), 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($e.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 E() { for (var e in l.shared._events) Object.prototype.hasOwnProperty.call(l.shared._events, e) && delete l.shared._events[e] } return { _init: function T() { 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 mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart", function(e) { v(e.type, [e]) }), h("mousedown", function() { for (var e = 0; e < $e.INSTANCES.length; e++) $e.INSTANCES[e] !== l && $e.INSTANCES[e].popups && $e.INSTANCES[e].popups.areVisible() && $e.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, "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, "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])) }), s(l.$el, "blur", function(e) { u() && !0 === d && (v(e.type, [e]), 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", E) }, 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() || 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.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 A(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($e.DEFAULTS, { indentMargin: 20 }), $e.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 } }, $e.RegisterCommand = function(e, t) { $e.COMMANDS[e] = t }, $e.MODULES.commands = function(i) { var s = i.$; function a(e) { return i.html.defaultTag() && (e = "<".concat(i.html.defaultTag(), ">").concat(e, "")), e } var o = { bold: function() { e("bold", "strong") }, subscript: function() { i.format.is("sup") && i.format.remove("sup"), e("subscript", "sub") }, superscript: function() { i.format.is("sub") && i.format.remove("sub"), e("superscript", "sup") }, italic: function() { e("italic", "em") }, strikeThrough: function() { e("strikeThrough", "s") }, underline: function() { e("underline", "u") }, undo: function() { i.undo.run() }, redo: function() { i.undo.redo() }, indent: function() { r(1) }, outdent: function() { r(-1) }, show: function() { i.opts.toolbarInline && i.toolbar.showInline(null, !0) }, insertHR: function() { i.selection.remove(); var e = ""; i.core.isEmpty() && (e = a(e = "
    ")), i.html.insert('
    '.concat(e)); var t, n = i.$el.find("hr#fr-just"); if (n.removeAttr("id"), 0 === n.next().length) { var r = i.html.defaultTag(); r ? n.after(s(i.doc.createElement(r)).append("
    ").get(0)) : n.after("
    ") } n.prev().is("hr") ? t = i.selection.setAfter(n.get(0), !1) : n.next().is("hr") ? t = i.selection.setBefore(n.get(0), !1) : i.selection.setAfter(n.get(0), !1) || i.selection.setBefore(n.get(0), !1), t || void 0 === t || (e = a(e = "".concat($e.MARKERS, "
    ")), n.after(e)), i.selection.restore() }, clearFormatting: function() { i.format.remove() }, selectAll: function() { i.doc.execCommand("selectAll", !1, !1) }, moreText: function(e) { t(e) }, moreParagraph: function(e) { t(e) }, moreRich: function(e) { t(e) }, moreMisc: function(e) { t(e) } }; function t(e) { ! function n(e) { var t = i.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"), '"]')); i.$tb.find(".fr-open").not(e).removeClass("fr-open"), e.toggleClass("fr-open"), i.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"), i.$tb.find(".fr-expanded").not(t).length ? (i.$tb.find(".fr-expanded").toggleClass("fr-expanded"), t.toggleClass("fr-expanded")) : (t.toggleClass("fr-expanded"), i.$box.toggleClass("fr-toolbar-open"), i.$tb.toggleClass("fr-toolbar-open")) }(i.$tb.find("[data-cmd=".concat(e, "]"))), i.toolbar.setMoreToolbarsHeight() } function n(e, t) { if (!1 !== i.events.trigger("commands.before", s.merge([e], t || []))) { var n = $e.COMMANDS[e] && $e.COMMANDS[e].callback || o[e], r = !0, a = !1; $e.COMMANDS[e] && ("undefined" != typeof $e.COMMANDS[e].focus && (r = $e.COMMANDS[e].focus), "undefined" != typeof $e.COMMANDS[e].accessibilityFocus && (a = $e.COMMANDS[e].accessibilityFocus)), (!i.core.hasFocus() && r && !i.popups.areVisible() || !i.core.hasFocus() && a && i.accessibility.hasFocus()) && i.events.focus(!0), $e.COMMANDS[e] && !1 !== $e.COMMANDS[e].undo && (i.$el.find(".fr-marker").length && (i.events.disableBlur(), i.selection.restore()), i.undo.saveStep()), n && n.apply(i, s.merge([e], t || [])), i.events.trigger("commands.after", s.merge([e], t || [])), $e.COMMANDS[e] && !1 !== $e.COMMANDS[e].undo && i.undo.saveStep() } } function e(e, t) { i.format.toggle(t) } function r(e) { i.selection.save(), i.html.wrap(!0, !0, !0, !0), i.selection.restore(); for (var t = i.selection.blocks(), n = 0; n < t.length; n++) if ("LI" !== t[n].tagName || "LI" !== t[n].parentNode.tagName) { var r = s(t[n]); "LI" != t[n].tagName && "LI" == t[n].parentNode.tagName && (r = s(t[n].parentNode)); var a = "rtl" === i.opts.direction || "rtl" === r.css("direction") ? "margin-right" : "margin-left", o = i.helpers.getPX(r.css(a)); if (r.width() < 2 * i.opts.indentMargin && 0 < e) continue; r.css(a, Math.max(o + e * i.opts.indentMargin, 0) || ""), r.removeClass("fr-temp-div") } i.selection.save(), i.html.unwrap(), i.selection.restore() } function l(e) { return function() { n(e) } } var c = {}; for (var d in o) Object.prototype.hasOwnProperty.call(o, d) && (c[d] = l(d)); return Object.assign(c, { exec: n, _init: function f() { i.events.on("keydown", function(e) { var t = i.selection.element(); if (t && "HR" === t.tagName && !i.keys.isArrow(e.which)) return e.preventDefault(), !1 }), i.events.on("keyup", function(e) { var t = i.selection.element(); if (t && "HR" === t.tagName) if (e.which === $e.KEYCODE.ARROW_LEFT || e.which === $e.KEYCODE.ARROW_UP) { if (t.previousSibling) return i.node.isBlock(t.previousSibling) ? i.selection.setAtEnd(t.previousSibling) : s(t).before($e.MARKERS), i.selection.restore(), !1 } else if ((e.which === $e.KEYCODE.ARROW_RIGHT || e.which === $e.KEYCODE.ARROW_DOWN) && t.nextSibling) return i.node.isBlock(t.nextSibling) ? i.selection.setAtStart(t.nextSibling) : s(t).after($e.MARKERS), i.selection.restore(), !1 }), i.events.on("mousedown", function(e) { if (e.target && "HR" === e.target.tagName) return e.preventDefault(), e.stopPropagation(), !1 }), i.events.on("mouseup", function() { var e = i.selection.element(); e === i.selection.endElement() && e && "HR" === e.tagName && (e.nextSibling && (i.node.isBlock(e.nextSibling) ? i.selection.setAtStart(e.nextSibling) : s(e).after($e.MARKERS)), i.selection.restore()) }) } }) }, $e.MODULES.cursorLists = function(g) { var m = g.$; function v(e) { for (var t = e; "LI" !== t.tagName;) t = t.parentNode; return t } function b(e) { for (var t = e; !g.node.isList(t);) t = t.parentNode; return t } return { _startEnter: function E(e) { var t, n = v(e), r = n.nextSibling, a = n.previousSibling, o = g.html.defaultTag(); if (g.node.isEmpty(n, !0) && r) { for (var i = "", s = "", l = e.parentNode; !g.node.isList(l) && l.parentNode && ("LI" !== l.parentNode.tagName || l.parentNode === n);) i = g.node.openTagString(l) + i, s += g.node.closeTagString(l), l = l.parentNode; i = g.node.openTagString(l) + i, s += g.node.closeTagString(l); var c = ""; for (c = l.parentNode && "LI" === l.parentNode.tagName ? "".concat(s, "
  • ").concat($e.MARKERS, "
    ").concat(i) : o ? "".concat(s, "<").concat(o, ">").concat($e.MARKERS, "
    ").concat(i) : "".concat(s + $e.MARKERS, "
    ").concat(i); ["UL", "OL"].indexOf(l.tagName) < 0 || l.parentNode && "LI" === l.parentNode.tagName;) l = l.parentNode; m(n).replaceWith(''); var d = g.node.openTagString(l) + m(l).html() + g.node.closeTagString(l); d = d.replace(/<\/span>/g, c), m(l).replaceWith(d), g.$el.find("li:empty").remove() } else if (a && r || !g.node.isEmpty(n, !0)) { for (var f = "
    ", p = e.parentNode; p && "LI" !== p.tagName;) f = g.node.openTagString(p) + f + g.node.closeTagString(p), p = p.parentNode; m(n).before("
  • ".concat(f, "
  • ")), m(e).remove() } else if (a) { t = b(n); for (var u = "".concat($e.MARKERS, "
    "), h = e.parentNode; h && "LI" !== h.tagName;) u = g.node.openTagString(h) + u + g.node.closeTagString(h), h = h.parentNode; t.parentNode && "LI" === t.parentNode.tagName ? m(t.parentNode).after("
  • ".concat(u, "
  • ")) : o ? m(t).after("<".concat(o, ">").concat(u, "")) : m(t).after(u), m(n).remove() } else(t = b(n)).parentNode && "LI" === t.parentNode.tagName ? r ? m(t.parentNode).before("".concat(g.node.openTagString(n) + $e.MARKERS, "
    ")) : m(t.parentNode).after("".concat(g.node.openTagString(n) + $e.MARKERS, "
    ")) : o ? m(t).before("<".concat(o, ">").concat($e.MARKERS, "
    ")) : m(t).before("".concat($e.MARKERS, "
    ")), m(n).remove() }, _middleEnter: function c(e) { for (var t = v(e), n = "", r = e, a = "", o = "", i = !1; r !== t;) { var s = "A" === (r = r.parentNode).tagName && g.cursor.isAtEnd(e, r) ? "fr-to-remove" : ""; i || r == t || g.node.isBlock(r) || (i = !0, a += $e.INVISIBLE_SPACE), a = g.node.openTagString(m(r).clone().addClass(s).get(0)) + a, o = g.node.closeTagString(r) + o } n = o + n + a + $e.MARKERS + (g.opts.keepFormatOnDelete ? $e.INVISIBLE_SPACE : ""), m(e).replaceWith(''); var l = g.node.openTagString(t) + m(t).html() + g.node.closeTagString(t); l = l.replace(/<\/span>/g, n), m(t).replaceWith(l) }, _endEnter: function l(e) { for (var t = v(e), n = $e.MARKERS, r = "", a = e, o = !1; a !== t;) { var i = "A" === (a = a.parentNode).tagName && g.cursor.isAtEnd(e, a) ? "fr-to-remove" : ""; o || a === t || g.node.isBlock(a) || (o = !0, r += $e.INVISIBLE_SPACE), r = g.node.openTagString(m(a).clone().addClass(i).get(0)) + r, n += g.node.closeTagString(a) } var s = r + n; m(e).remove(), m(t).after(s) }, _backspace: function d(e) { var t = v(e), n = t.previousSibling; if (n) { n = m(n).find(g.html.blockTagsQuery()).get(-1) || n, m(e).replaceWith($e.MARKERS); var r = g.node.contents(n); r.length && "BR" === r[r.length - 1].tagName && m(r[r.length - 1]).remove(), m(t).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() { this.parentNode === t && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "
    ")) }); for (var a, o = g.node.contents(t)[0]; o && !g.node.isList(o);) a = o.nextSibling, m(n).append(o), o = a; for (n = t.previousSibling; o;) a = o.nextSibling, m(n).append(o), o = a; 1 < (r = g.node.contents(n)).length && "BR" === r[r.length - 1].tagName && m(r[r.length - 1]).remove(), m(t).remove() } else { var i = b(t); if (m(e).replaceWith($e.MARKERS), i.parentNode && "LI" === i.parentNode.tagName) { var s = i.previousSibling; g.node.isBlock(s) ? (m(t).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() { this.parentNode === t && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "
    ")) }), m(s).append(m(t).html())) : m(i).before(m(t).html()) } else { var l = g.html.defaultTag(); l && 0 === m(t).find(g.html.blockTagsQuery()).length ? m(i).before("<".concat(l, ">").concat(m(t).html(), "")) : m(i).before(m(t).html()) } m(t).remove(), g.html.wrap(), 0 === m(i).find("li").length && m(i).remove() } }, _del: function f(e) { var t, n = v(e), r = n.nextSibling; if (r) { (t = g.node.contents(r)).length && "BR" === t[0].tagName && m(t[0]).remove(), m(r).find(g.html.blockTagsQuery()).not("ol, ul, table").each(function() { this.parentNode === r && m(this).replaceWith(m(this).html() + (g.node.isEmpty(this) ? "" : "
    ")) }); for (var a, o = e, i = g.node.contents(r)[0]; i && !g.node.isList(i);) a = i.nextSibling, m(o).after(i), o = i, i = a; for (; i;) a = i.nextSibling, m(n).append(i), i = a; m(e).replaceWith($e.MARKERS), m(r).remove() } else { for (var s = n; !s.nextSibling && s !== g.el;) s = s.parentNode; if (s === g.el) return !1; if (s = s.nextSibling, g.node.isBlock(s)) $e.NO_DELETE_TAGS.indexOf(s.tagName) < 0 && (m(e).replaceWith($e.MARKERS), (t = g.node.contents(n)).length && "BR" === t[t.length - 1].tagName && m(t[t.length - 1]).remove(), m(n).append(m(s).html()), m(s).remove()); else for ((t = g.node.contents(n)).length && "BR" === t[t.length - 1].tagName && m(t[t.length - 1]).remove(), m(e).replaceWith($e.MARKERS); s && !g.node.isBlock(s) && "BR" !== s.tagName;) m(n).append(m(s)), s = s.nextSibling } } } }, $e.NO_DELETE_TAGS = ["TH", "TD", "TR", "TABLE", "FORM"], $e.SIMPLE_ENTER_TAGS = ["TH", "TD", "LI", "DL", "DT", "FORM"], $e.MODULES.cursor = function(u) { var h = u.$; function o(e) { return !!e && (!!u.node.isBlock(e) || (e.nextSibling && e.nextSibling.nodeType === Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? o(e.nextSibling) : !(e.nextSibling && (!e.previousSibling || "BR" !== e.nextSibling.tagName || e.nextSibling.nextSibling)) && o(e.parentNode))) } function i(e) { return !!e && (!!u.node.isBlock(e) || (e.previousSibling && e.previousSibling.nodeType === Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? i(e.previousSibling) : !e.previousSibling && (!(e.previousSibling || !u.node.hasClass(e.parentNode, "fr-inner")) || i(e.parentNode)))) } function g(e, t) { return !!e && (e !== u.$wp.get(0) && (e.previousSibling && e.previousSibling.nodeType === Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? g(e.previousSibling, t) : !e.previousSibling && (e.parentNode === t || g(e.parentNode, t)))) } function m(e, t) { return !!e && (e !== u.$wp.get(0) && (e.nextSibling && e.nextSibling.nodeType === Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? m(e.nextSibling, t) : !(e.nextSibling && (!e.previousSibling || "BR" !== e.nextSibling.tagName || e.nextSibling.nextSibling)) && (e.parentNode === t || m(e.parentNode, t)))) } function c(e) { return 0 < h(e).parentsUntil(u.$el, "LI").length && 0 === h(e).parentsUntil("LI", "TABLE").length } function d(e, t) { var n = new RegExp("".concat(t ? "^" : "", "(([\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+\\u200D)*[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]{2})").concat(t ? "" : "$"), "i"), r = e.match(n); return r ? r[0].length : 1 } function f(e) { for (var t, n = e; !n.previousSibling;) if (n = n.parentNode, u.node.isElement(n)) return !1; if (n = n.previousSibling, !u.node.isBlock(n) && u.node.isEditable(n)) { for (t = u.node.contents(n); n.nodeType !== Node.TEXT_NODE && !u.node.isDeletable(n) && t.length && u.node.isEditable(n);) n = t[t.length - 1], t = u.node.contents(n); if (n.nodeType === Node.TEXT_NODE) { var r = n.textContent, a = r.length; if (r.length && "\n" === r[r.length - 1]) return n.textContent = r.substring(0, a - 2), 0 === n.textContent.length && n.parentNode.removeChild(n), f(e); if (u.opts.tabSpaces && r.length >= u.opts.tabSpaces) 0 === r.substr(r.length - u.opts.tabSpaces, r.length - 1).replace(/ /g, "").replace(new RegExp($e.UNICODE_NBSP, "g"), "").length && (a = r.length - u.opts.tabSpaces + 1); n.textContent = r.substring(0, a - d(r)), u.opts.htmlUntouched && !e.nextSibling && n.textContent.length && " " === n.textContent[n.textContent.length - 1] && (n.textContent = n.textContent.substring(0, n.textContent.length - 1) + $e.UNICODE_NBSP); var o = r.length !== n.textContent.length; if (0 === n.textContent.length) if (o && u.opts.keepFormatOnDelete) h(n).after($e.INVISIBLE_SPACE + $e.MARKERS); else if (0 !== r.length && u.node.isBlock(n.parentNode)) h(n).after($e.MARKERS); else if ((2 != n.parentNode.childNodes.length || n.parentNode != e.parentNode) && 1 != n.parentNode.childNodes.length || u.node.isBlock(n.parentNode) || u.node.isElement(n.parentNode) || !u.node.isDeletable(n.parentNode)) { for (; !u.node.isElement(n.parentNode) && u.node.isEmpty(n.parentNode) && $e.NO_DELETE_TAGS.indexOf(n.parentNode.tagName) < 0;) { var i = n; n = n.parentNode, i.parentNode.removeChild(i) } h(n).after($e.MARKERS), u.node.isElement(n.parentNode) && !e.nextSibling && n.previousSibling && "BR" === n.previousSibling.tagName && h(e).after("
    "), n.parentNode.removeChild(n) } else h(n.parentNode).after($e.MARKERS), h(n.parentNode).remove(); else h(n).after($e.MARKERS) } else u.node.isDeletable(n) ? (h(n).after($e.MARKERS), h(n).remove()) : e.nextSibling && "BR" === e.nextSibling.tagName && u.node.isVoid(n) && "BR" !== n.tagName ? (h(e.nextSibling).remove(), h(e).replaceWith($e.MARKERS)) : !1 !== u.events.trigger("node.remove", [h(n)]) && (h(n).after($e.MARKERS), h(n).remove()) } else if ($e.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n))) if (u.node.isDeletable(n)) h(e).replaceWith($e.MARKERS), h(n).remove(); else if (u.node.isEmpty(n) && !u.node.isList(n)) h(n).remove(), h(e).replaceWith($e.MARKERS); else { for (u.node.isList(n) && (n = h(n).find("li").last().get(0)), (t = u.node.contents(n)) && "BR" === t[t.length - 1].tagName && h(t[t.length - 1]).remove(), t = u.node.contents(n); t && u.node.isBlock(t[t.length - 1]);) n = t[t.length - 1], t = u.node.contents(n); h(n).append($e.MARKERS); for (var s = e; !s.previousSibling;) s = s.parentNode; for (; s && "BR" !== s.tagName && !u.node.isBlock(s);) { var l = s; s = s.nextSibling, h(n).append(l) } s && "BR" === s.tagName && h(s).remove(), h(e).remove() } else e.nextSibling && "BR" === e.nextSibling.tagName && h(e.nextSibling).remove(); return !0 } function s(e) { var t = 0 < h(e).parentsUntil(u.$el, "BLOCKQUOTE").length, n = u.node.deepestParent(e, [], !t); if (n && "BLOCKQUOTE" === n.tagName) { var r = u.node.deepestParent(e, [h(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]); r && r.nextSibling && (n = r) } if (null !== n) { var a, o = n.nextSibling; if (u.node.isBlock(n) && (u.node.isEditable(n) || u.node.isDeletable(n)) && o && $e.NO_DELETE_TAGS.indexOf(o.tagName) < 0) if (u.node.isDeletable(o)) h(o).remove(), h(e).replaceWith($e.MARKERS); else if (u.node.isBlock(o) && u.node.isEditable(o)) if (u.node.isList(o)) if (u.node.isEmpty(n, !0)) h(n).remove(), h(o).find("li").first().prepend($e.MARKERS); else { var i = h(o).find("li").first(); "BLOCKQUOTE" === n.tagName && (a = u.node.contents(n)).length && u.node.isBlock(a[a.length - 1]) && (n = a[a.length - 1]), 0 === i.find("ul, ol").length && (h(e).replaceWith($e.MARKERS), i.find(u.html.blockTagsQuery()).not("ol, ul, table").each(function() { this.parentNode === i.get(0) && h(this).replaceWith(h(this).html() + (u.node.isEmpty(this) ? "" : "
    ")) }), h(n).append(u.node.contents(i.get(0))), i.remove(), 0 === h(o).find("li").length && h(o).remove()) } else { if ((a = u.node.contents(o)).length && "BR" === a[0].tagName && h(a[0]).remove(), "BLOCKQUOTE" !== o.tagName && "BLOCKQUOTE" === n.tagName) for (a = u.node.contents(n); a.length && u.node.isBlock(a[a.length - 1]);) n = a[a.length - 1], a = u.node.contents(n); else if ("BLOCKQUOTE" === o.tagName && "BLOCKQUOTE" !== n.tagName) for (a = u.node.contents(o); a.length && u.node.isBlock(a[0]);) o = a[0], a = u.node.contents(o); h(e).replaceWith($e.MARKERS), h(n).append(o.innerHTML), h(o).remove() } else { for (h(e).replaceWith($e.MARKERS); o && "BR" !== o.tagName && !u.node.isBlock(o) && u.node.isEditable(o);) { var s = o; o = o.nextSibling, h(n).append(s) } o && "BR" === o.tagName && u.node.isEditable(o) && h(o).remove() } } } function n(e) { for (var t, n = e; !n.nextSibling;) if (n = n.parentNode, u.node.isElement(n)) return !1; if ("BR" === (n = n.nextSibling).tagName && u.node.isEditable(n)) if (n.nextSibling) { if (u.node.isBlock(n.nextSibling) && u.node.isEditable(n.nextSibling)) { if (!($e.NO_DELETE_TAGS.indexOf(n.nextSibling.tagName) < 0)) return void h(n).remove(); n = n.nextSibling, h(n.previousSibling).remove() } } else if (o(n)) { if (c(e)) u.cursorLists._del(e); else u.node.deepestParent(n) && ((!u.node.isEmpty(u.node.blockParent(n)) || (u.node.blockParent(n).nextSibling && $e.NO_DELETE_TAGS.indexOf(u.node.blockParent(n).nextSibling.tagName)) < 0) && h(n).remove(), s(e)); return } if (!u.node.isBlock(n) && u.node.isEditable(n)) { for (t = u.node.contents(n); n.nodeType !== Node.TEXT_NODE && t.length && !u.node.isDeletable(n) && u.node.isEditable(n);) n = t[0], t = u.node.contents(n); n.nodeType === Node.TEXT_NODE ? (h(n).before($e.MARKERS), n.textContent.length && (n.textContent = n.textContent.substring(d(n.textContent, !0), n.textContent.length))) : u.node.isDeletable(n) ? (h(n).before($e.MARKERS), h(n).remove()) : !1 !== u.events.trigger("node.remove", [h(n)]) && (h(n).before($e.MARKERS), h(n).remove()), h(e).remove() } else if ($e.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n))) if (u.node.isDeletable(n)) h(e).replaceWith($e.MARKERS), h(n).remove(); else if (u.node.isList(n)) e.previousSibling ? (h(n).find("li").first().prepend(e), u.cursorLists._backspace(e)) : (h(n).find("li").first().prepend($e.MARKERS), h(e).remove()); else if ((t = u.node.contents(n)) && "BR" === t[0].tagName && h(t[0]).remove(), t && "BLOCKQUOTE" === n.tagName) { var r = t[0]; for (h(e).before($e.MARKERS); r && "BR" !== r.tagName;) { var a = r; r = r.nextSibling, h(e).before(a) } r && "BR" === r.tagName && h(r).remove() } else h(e).after(h(n).html()).after($e.MARKERS), h(n).remove() } function p() { for (var e = u.el.querySelectorAll("blockquote:empty"), t = 0; t < e.length; t++) e[t].parentNode.removeChild(e[t]) } function l(e, t, n) { var r, a = u.node.deepestParent(e, [], !n); if (a && "BLOCKQUOTE" === a.tagName) return m(e, a) ? (r = u.html.defaultTag(), t ? h(e).replaceWith("
    " + $e.MARKERS) : r ? h(a).after("<".concat(r, ">").concat($e.MARKERS, "
    ")) : h(a).after("".concat($e.MARKERS, "
    ")), h(e).remove()) : v(e, t, n), !1; if (null === a)(r = u.html.defaultTag()) && u.node.isElement(e.parentNode) ? h(e).replaceWith("<".concat(r, ">").concat($e.MARKERS, "
    ")) : !e.previousSibling || h(e.previousSibling).is("br") || e.nextSibling ? h(e).replaceWith("
    ".concat($e.MARKERS)) : h(e).replaceWith("
    ".concat($e.MARKERS, "
    ")); else { var o = e, i = ""; "PRE" != a.tagName || e.nextSibling || (t = !0), u.node.isBlock(a) && !t || (i = "
    "); var s, l = "", c = "", d = "", f = ""; (r = u.html.defaultTag()) && u.node.isBlock(a) && (d = "<".concat(r, ">"), f = ""), a.tagName === r.toUpperCase() && (d = u.node.openTagString(h(a).clone().removeAttr("id").get(0)))); do { if (o = o.parentNode, !t || o !== a || t && !u.node.isBlock(a)) if (l += u.node.closeTagString(o), o === a && u.node.isBlock(a)) c = d + c; else { var p = ("A" === o.tagName || u.node.hasClass(o, "fa")) && m(e, o) ? "fr-to-remove" : ""; c = u.node.openTagString(h(o).clone().addClass(p).get(0)) + c } } while (o !== a); i = l + i + c + (e.parentNode === a && u.node.isBlock(a) ? "" : $e.INVISIBLE_SPACE) + $e.MARKERS, u.node.isBlock(a) && !h(a).find("*").last().is("br") && h(a).append("
    "), h(e).after(''), h(e).remove(), a.nextSibling && !u.node.isBlock(a.nextSibling) || u.node.isBlock(a) || h(a).after("
    "), s = (s = !t && u.node.isBlock(a) ? u.node.openTagString(a) + h(a).html() + f : u.node.openTagString(a) + h(a).html() + u.node.closeTagString(a)).replace(/<\/span>/g, i), h(a).replaceWith(s) } } function v(e, t, n) { var r = u.node.deepestParent(e, [], !n); if (null === r) u.html.defaultTag() && e.parentNode === u.el ? h(e).replaceWith("<".concat(u.html.defaultTag(), ">").concat($e.MARKERS, "
    ")) : (e.nextSibling && !u.node.isBlock(e.nextSibling) || h(e).after("
    "), h(e).replaceWith("
    ".concat($e.MARKERS))); else if (e.previousSibling && "IMG" == e.previousSibling.tagName || e.nextSibling && "IMG" == e.nextSibling.tagName) h(e).replaceWith("<" + u.html.defaultTag() + ">" + $e.MARKERS + "
    "); else { var a = e, o = ""; "PRE" === r.tagName && (t = !0), u.node.isBlock(r) && !t || (o = "
    "); var i = "", s = ""; do { var l = a; if (a = a.parentNode, "BLOCKQUOTE" === r.tagName && u.node.isEmpty(l) && !u.node.hasClass(l, "fr-marker") && h(l).contains(e) && h(l).after(e), "BLOCKQUOTE" !== r.tagName || !m(e, a) && !g(e, a)) if (!t || a !== r || t && !u.node.isBlock(r)) { i += u.node.closeTagString(a); var c = "A" == a.tagName && m(e, a) || u.node.hasClass(a, "fa") ? "fr-to-remove" : ""; s = u.node.openTagString(h(a).clone().addClass(c).removeAttr("id").get(0)) + s } else "BLOCKQUOTE" == r.tagName && t && (s = i = "") } while (a !== r); var d = r === e.parentNode && u.node.isBlock(r) || e.nextSibling; if ("BLOCKQUOTE" === r.tagName) if (e.previousSibling && u.node.isBlock(e.previousSibling) && e.nextSibling && "BR" === e.nextSibling.tagName && (h(e.nextSibling).after(e), e.nextSibling && "BR" === e.nextSibling.tagName && h(e.nextSibling).remove()), t) o = i + o + $e.MARKERS + s; else { var f = u.html.defaultTag(); o = "".concat(i + o + (f ? "<".concat(f, ">") : "") + $e.MARKERS, "
    ").concat(f ? "") : "").concat(s) } else o = i + o + s + (d ? "" : $e.INVISIBLE_SPACE) + $e.MARKERS; h(e).replaceWith(''); var p = u.node.openTagString(r) + h(r).html() + u.node.closeTagString(r); p = p.replace(/<\/span>/g, o), h(r).replaceWith(p) } } return { enter: function b(e) { var t = u.markers.insert(); if (!t) return !0; for (var n = t.parentNode; n && !u.node.isElement(n);) { if ("false" === n.getAttribute("contenteditable")) return h(t).replaceWith($e.MARKERS), u.selection.restore(), !1; if ("true" === n.getAttribute("contenteditable")) break; n = n.parentNode } u.el.normalize(); var r = !1; 0 < h(t).parentsUntil(u.$el, "BLOCKQUOTE").length && (r = !0), h(t).parentsUntil(u.$el, "TD, TH").length && (r = !1), o(t) ? !c(t) || e || r ? l(t, e, r) : u.cursorLists._endEnter(t) : i(t) ? !c(t) || e || r ? function s(e, t, n) { var r, a = u.node.deepestParent(e, [], !n); if (a && "TABLE" === a.tagName) return h(a).find("td, th").first().prepend(e), s(e, t, n); if (a && "BLOCKQUOTE" === a.tagName) if (g(e, a)) { if (!t) return (r = u.html.defaultTag()) ? h(a).before("<".concat(r, ">").concat($e.MARKERS, "
    ")) : h(a).before("".concat($e.MARKERS, "
    ")), h(e).remove(), !1 } else m(e, a) ? l(e, t, !0) : v(e, t, !0); if (null === a)(r = u.html.defaultTag()) && u.node.isElement(e.parentNode) ? h(e).replaceWith("<".concat(r, ">").concat($e.MARKERS, "
    ")) : h(e).replaceWith("
    ".concat($e.MARKERS)); else { if (u.node.isBlock(a)) if ("PRE" === a.tagName && (t = !0), t) h(e).remove(), h(a).prepend("
    ".concat($e.MARKERS)); else if (e.nextSibling && "IMG" == e.nextSibling.tagName || e.nextSibling && e.nextSibling.nextElementSibling && "IMG" == e.nextSibling.nextElementSibling) h(e).replaceWith("<" + u.html.defaultTag() + ">" + $e.MARKERS + "
    "); else { if (u.node.isEmpty(a, !0)) return l(e, t, n); if (u.opts.keepFormatOnDelete) { for (var o = e, i = $e.INVISIBLE_SPACE; o !== a && !u.node.isElement(o);) o = o.parentNode, i = u.node.openTagString(o) + i + u.node.closeTagString(o); h(a).before(i) } else h(a).before("".concat(u.node.openTagString(h(a).clone().removeAttr("id").get(0)), "
    ").concat(u.node.closeTagString(a))) } else h(a).before("
    "); h(e).remove() } }(t, e, r) : u.cursorLists._startEnter(t) : !c(t) || e || r ? v(t, e, r) : u.cursorLists._middleEnter(t), function a() { u.$el.find(".fr-to-remove").each(function() { for (var e = u.node.contents(this), t = 0; t < e.length; t++) e[t].nodeType === Node.TEXT_NODE && (e[t].textContent = e[t].textContent.replace(/\u200B/g, "")); h(this).replaceWith(this.innerHTML) }) }(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists(), u.spaces.normalizeAroundCursor()), u.selection.restore() }, backspace: function E() { var e = !1, t = u.markers.insert(); if (!t) return !0; for (var n = t.parentNode; n && !u.node.isElement(n);) { if ("false" === n.getAttribute("contenteditable")) return h(t).replaceWith($e.MARKERS), u.selection.restore(), !1; if ("true" === n.getAttribute("contenteditable")) break; n = n.parentNode } u.el.normalize(); var r = t.previousSibling; if (r) { var a = r.textContent; a && a.length && 8203 === a.charCodeAt(a.length - 1) && (1 === a.length ? h(r).remove() : r.textContent = r.textContent.substr(0, a.length - d(a))) } return o(t) ? c(t) && g(t, h(t).parents("li:first").get(0)) ? u.cursorLists._backspace(t) : e = f(t) : i(t) ? c(t) && g(t, h(t).parents("li").first().get(0)) ? u.cursorLists._backspace(t) : function l(e) { for (var t = 0 < h(e).parentsUntil(u.$el, "BLOCKQUOTE").length, n = u.node.deepestParent(e, [], !t), r = n; n && !n.previousSibling && "BLOCKQUOTE" !== n.tagName && n.parentElement !== u.el && !u.node.hasClass(n.parentElement, "fr-inner") && $e.SIMPLE_ENTER_TAGS.indexOf(n.parentElement.tagName) < 0;) n = n.parentElement; if (n && "BLOCKQUOTE" === n.tagName) { var a = u.node.deepestParent(e, [h(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]); a && a.previousSibling && (r = n = a) } if (null !== n) { var o, i = n.previousSibling; if (u.node.isBlock(n) && u.node.isEditable(n)) if (i && $e.NO_DELETE_TAGS.indexOf(i.tagName) < 0) { if (u.node.isDeletable(i)) h(i).remove(), h(e).replaceWith($e.MARKERS); else if (u.node.isEditable(i)) if (u.node.isBlock(i)) if (u.node.isEmpty(i) && !u.node.isList(i)) h(i).remove(), h(e).after(u.opts.keepFormatOnDelete ? $e.INVISIBLE_SPACE : ""); else { if (u.node.isList(i) && (i = h(i).find("li").last().get(0)), (o = u.node.contents(i)).length && "BR" === o[o.length - 1].tagName && h(o[o.length - 1]).remove(), "BLOCKQUOTE" === i.tagName && "BLOCKQUOTE" !== n.tagName) for (o = u.node.contents(i); o.length && u.node.isBlock(o[o.length - 1]);) i = o[o.length - 1], o = u.node.contents(i); else if ("BLOCKQUOTE" !== i.tagName && "BLOCKQUOTE" === r.tagName) for (o = u.node.contents(r); o.length && u.node.isBlock(o[0]);) r = o[0], o = u.node.contents(r); if (u.node.isEmpty(n)) h(e).remove(), u.selection.setAtEnd(i, !0); else { h(e).replaceWith($e.MARKERS); var s = i.childNodes; u.node.isBlock(s[s.length - 1]) ? h(s[s.length - 1]).append(r.innerHTML) : h(i).append(r.innerHTML) } h(r).remove(), u.node.isEmpty(n) && h(n).remove() } else h(e).replaceWith($e.MARKERS), "BLOCKQUOTE" === n.tagName && i.nodeType === Node.ELEMENT_NODE ? h(i).remove() : (h(i).after(u.node.isEmpty(n) ? "" : h(n).html()), h(n).remove(), "BR" === i.tagName && h(i).remove()) } else i || (n && "BLOCKQUOTE" === n.tagName && 0 === h(n).text().replace(/\u200B/g, "").length ? h(n).remove() : u.node.isEmpty(n) && n.parentNode && u.node.isEditable(n.parentNode) && n.parentNode != u.el && h(n.parentNode).remove()) } }(t) : e = f(t), h(t).remove(), p(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists(), u.spaces.normalizeAroundCursor()), u.selection.restore(), e }, del: function r() { var e = u.markers.insert(); if (!e) return !1; if (u.el.normalize(), o(e)) if (c(e)) if (0 === h(e).parents("li").first().find("ul, ol").length) u.cursorLists._del(e); else { var t = h(e).parents("li").first().find("ul, ol").first().find("li").first(); (t = t.find(u.html.blockTagsQuery()).get(-1) || t).prepend(e), u.cursorLists._backspace(e) } else s(e); else i(e), n(e); h(e).remove(), p(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists()), u.spaces.normalizeAroundCursor(), u.selection.restore() }, isAtEnd: m, isAtStart: g } }, $e.MODULES.data = function(f) { function p(e) { return e } function c(e) { for (var t = e.toString(), n = 0, r = 0; r < t.length; r++) n += parseInt(t.charAt(r), 10); return 10 < n ? n % 9 + 1 : n } function d(e, t, n) { for (var r = Math.abs(n); 0 < r--;) e -= t; return n < 0 && (e += 123), e } function u(e) { return e && "block" !== e.css("display") ? (e.remove(), !0) : e && 0 === f.helpers.getPX(e.css("height")) ? (e.remove(), !0) : !(!e || "absolute" !== e.css("position") && "fixed" !== e.css("position") || (e.remove(), 0)) } function h(e) { return e && 0 === f.$box.find(e).length } function g() { if (10 < e && (f[p(R("0ppecjvc=="))](), setTimeout(function() { E.FE = null }, 10)), !f.$box) return !1; f.$wp.prepend(R(p(R(S)))), v = f.$wp.find("> div").first(), b = v.find("> a"), "rtl" === f.opts.direction && v.css("left", "auto").css("right", 0).attr("direction", "rtl"), e++ } function m(e) { for (var t = [R("9qqG-7amjlwq=="), R("KA3B3C2A6D1D5H5H1A3=="), R("3B9B3B5F3C4G3E3=="), R("QzbzvxyB2yA-9m=="), R("ji1kacwmgG5bc=="), R("nmA-13aogi1A3c1jd=="), R("BA9ggq=="), R("emznbjbH3fij=="), R("tkC-22d1qC-13sD1wzF-7=="), R("tA3jjf=="), R("1D1brkm==")], n = 0; n < t.length; n++) if (String.prototype.endsWith || (String.prototype.endsWith = function(e, t) { return (void 0 === t || t > this.length) && (t = this.length), this.substring(t - e.length, t) === e }), e.endsWith(t[n])) return !0; return !1 } var v, b, E = f.$, T = "sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2FC1A3NB2IF1HE1TH4WB8eB-11zVG2F3I3yYB5ZG4CB2DA15CC5AD3F1A1KG1oLA10B1A6wQF1H3vgale2C4F4XA2qc2A5D5B3pepmriKB3OE1HD1fUC10pjD-11E-11TB4YJ3bC-16zE-11yc1B2CE2BC3jhjKC1pdA-21OA6C1D5B-8vF4QA11pD6sqf1C3lldA-16BD4A2H3qoEA7bB-16rmNH5H1F1vSB7RE2A3TH4YC5A5b1A4d1B3whepyAC3AA2zknC3mbgf1SC4WH4PD8TC5ZB2C3H3jb2A5ZA2EF2aoFC5qqHC4B1H1zeGA7UA5RF4TA29TA6ZC4d1C3hyWA10A3rBB2E3decorationRD3QC10UD3E6E6ZD2F3F3fme2E5uxxrEC9C3E4fB-11azhHB1LD7D6VF4VVTPC6b1C4TYG3qzDD6B3B3AH4I2H2kxbHE1JD1yihfd1QD6WB1D4mhrc1B5rvFG3A14A7cDA2OC1AA1JB5zC-16KA6WB4C-8wvlTB5A5lkZB2C2C7zynBD2D2bI-7C-21d1HE2cubyvPC8A6VB3aroxxZE4C4F4e1I2BE1WjdifH1H4A14NA1GB1YG-10tWA3A14A9sVA2C5XH2A29b2A6gsleGG2jaED2D-13fhE1OA8NjwytyTD4e1sc1D-16ZC3B5C-9e1C2FB6EFF5B2C2JH4E1C2tdLE5A3UG4G-7b2D3B4fA-9oh1G3kqvB4AG3ibnjcAC6D2B1cDA9KC2QA6bRC4VA30RB8hYB2A4A-8h1A21A2B2==", A = "7D4YH4fkhHB3pqDC3H2E1fkMD1IB1NF1D3QD9wB5rxqlh1A8c2B4ZA3FD2AA6FB5EB3jJG4D2J-7aC-21GB6PC5RE4TC11QD6XC4XE3XH3mlvnqjbaOA2OC2BE6A1fmI-7ujwbc1G5f1F3e1C11mXF4owBG3E1yD1E4F1D2D-8B-8C-7yC-22HD1MF5UE4cWA3D8D6a1B2C3H3a3I3sZA4B3A2akfwEB3xHD5D1F1wIC11pA-16xdxtVI2C9A6YC4a1A2F3B2GA6B4C3lsjyJB1eMA1D-11MF5PE4ja1D3D7byrf1C3e1C7D-16lwqAF3H2A1B-21wNE1MA1OG1HB2A-16tSE5UD4RB3icRA4F-10wtwzBB3E1C3CC2DA8LA2LA1EB1kdH-8uVB7decorg1J2B7B6qjrqGI2J1C6ijehIB1hkemC-13hqkrH4H-7QD6XF5XF3HLNAC3CB2aD2CD2KB10B4ycg1A-8KA4H4B11jVB5TC4yqpB-21pd1E4pedzGB6MD5B3ncB-7MA4LD2JB6PD5uH-8TB9C7YD5XD2E3I3jmiDB3zeimhLD8E2F2JC1H-9ivkPC5lG-10SB1D3H3A-21rc1A3d1E3fsdqwfGA2KA1OrC-22LA6D1B4afUB16SC7AitC-8qYA11fsxcajGA15avjNE2A-9h1hDB16B9tPC1C5F5UC1G3B8d2A5d1D4RnHJ3C3JB5D3ucMG1yzD-17hafjC-8VD3yWC6e1YD2H3ZE2C8C5oBA3H3D2vFA4WzJC4C2i1A-65fNB8afWA1H4A26mvkC-13ZB3E3h1A21BC4eFB2GD2AA5ghqND2A2B2==", C = "IC1A8A3A5A8B1E2E5A4B3==", S = "sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==", y = function() { for (var e = 0, t = document.domain, n = t.split("."), r = "_gd".concat((new Date).getTime()); e < n.length - 1 && -1 === document.cookie.indexOf("".concat(r, "=").concat(r));) t = n.slice(-1 - ++e).join("."), document.cookie = "".concat(r, "=").concat(r, ";domain=").concat(t, ";"); return document.cookie = "".concat(r, "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(t, ";"), (t || "").replace(/(^\.*)|(\.*$)/g, "") }(), R = p(function L(e) { if (!e) return e; for (var t = "", n = p("charCodeAt"), r = p("fromCharCode"), a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(e[0]), o = 1; o < e.length - 2; o++) { for (var i = c(++a), s = e[n](o), l = ""; /[0-9-]/.test(e[o + 1]);) l += e[++o]; s = d(s, i, l = parseInt(l, 10) || 0), s ^= a - 1 & 31, t += String[r](s) } return t }), e = 0; return { _init: function w() { var e = f.opts.key || [""], t = R(p("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9==")); "string" == typeof e && (e = [e]); for (var n, r, a, o = !(f.ul = !0), i = 0, s = 0; s < e.length; s++) { var l = (r = e[s], 4 === (a = (R(r) || "").split("|")).length && "V3" === a[0] ? [a[1], a[3], a[2]] : [null, null, ""]), c = l[2]; if (c === R(p(R("LGnD1KNZf1CPBYCAZB-8F3UDSLLSG1VFf1A3C2=="))) || 0 <= c.indexOf(y, c.length - y.length) || m(y)) { if (null !== (n = l[1]) && !(0 == n.indexOf("TRIAL") ? (n = new Date(n.replace(/TRIAL/, "")), new Date(n) < new Date && (T = A, 1)) : new Date(n) < new Date(R(C))) || !(0 < (y || "").length) || m(y)) { f.ul = !1; break } o = !0, S = T, i = l[0] || -1 } } /**var d = new Image; !0 === f.ul && (g(), d.src = o ? "".concat(p(R(t)), "e=").concat(i) : "".concat(p(R(t)), "u")), !0 === f.ul && (f.events.on("contentChanged", function() { (function e() { return u(v) || u(b) || h(v) || h(b) })() && g() }), f.events.on("html.get", function(e) { return e + R("qD2H-9G3ioD-17qA1tE1B-8qI3A4hA-13C-11E2C1njfldD1E6pg1C-8sC3hfbkcD2G3stC-22gqgB3G2B-7vtoA4nweeD1A31A15B9uC-16A1F5dkykdc1B8dE-11bA3F2D3A9gd1E7F2tlI-8H-7vtxB2A5B2C3B2F2B5A6ldbyC4iqC-22D-17E-13mA3D2dywiB3oxlvfC1H4C2TjqbzlnI3ntB4E3qA2zaqsC6D3pmnkoE3C6D5wvuE3bwifdhB6hch1E4xibD-17dmrC1rG-7pntnF6nB-8F1D2A11C8plrkmF2F3MC-16bocqA2WwA-21ayeA1C4d1isC-22rD-13D6DfjpjtC2E6hB2G2G4A-7D2==") })), f.events.on("html.set", function() { var e = f.el.querySelector('[data-f-id="pbf"]'); e && E(e).remove() }), f.events.on("destroy", function() { v && v.length && v.remove() }, !0)**/ } } }, $e.MODULES.edit = function(t) { function e() { if (t.browser.mozilla) try { t.doc.execCommand("enableObjectResizing", !1, "false"), t.doc.execCommand("enableInlineTableEditing", !1, "false") } catch (e) {} if (t.browser.msie) try { t.doc.body.addEventListener("mscontrolselect", function(e) { return e.preventDefault(), !1 }) } catch (e) {} } var n = !1; function r() { return n } return { _init: function a() { t.events.on("focus", function() { r() ? t.edit.off() : t.edit.on() }) }, on: function o() { t.$wp ? (t.$el.attr("contenteditable", !0), t.$el.removeClass("fr-disabled").attr("aria-disabled", !1), e()) : t.$el.is("a") && t.$el.attr("contenteditable", !0), t.events.trigger("edit.on", [], !0), n = !1 }, off: function i() { t.events.disableBlur(), t.$wp ? (t.$el.attr("contenteditable", !1), t.$el.addClass("fr-disabled").attr("aria-disabled", !0)) : t.$el.is("a") && t.$el.attr("contenteditable", !1), t.events.trigger("edit.off"), t.events.enableBlur(), n = !0 }, disableDesign: e, isDisabled: r } }, $e.MODULES.format = function(m) { var v = m.$; function f(e, t) { var n = "<".concat(e); for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n += " ".concat(r, '="').concat(t[r], '"')); return n += ">" } function p(e, t) { var n = e; for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n += "id" === r ? "#".concat(t[r]) : "class" === r ? ".".concat(t[r]) : "[".concat(r, '="').concat(t[r], '"]')); return n } function u(e, t) { return !(!e || e.nodeType !== Node.ELEMENT_NODE) && (e.matches || e.matchesSelector || e.msMatchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.oMatchesSelector).call(e, t) } function b(e, t, n) { if (e) { for (; e.nodeType === Node.COMMENT_NODE;) e = e.nextSibling; if (e) { if (m.node.isBlock(e) && "HR" !== e.tagName) return m.node.hasClass(e.firstChild, "fr-marker") ? b(e.firstChild.nextSibling, t, n) : b(e.firstChild, t, n), !1; var r = v(m.doc.createElement(t)); r.attr(n), r.insertBefore(e); for (var a = e; a && !v(a).is(".fr-marker") && 0 === v(a).find(".fr-marker").length && "UL" !== a.tagName && "OL" !== a.tagName;) { var o = a; if (m.node.isBlock(a) && "HR" !== e.tagName) return b(a.firstChild, t, n), !1; a = a.nextSibling, r.append(o) } if (a) { if (v(a).find(".fr-marker").length || "UL" === a.tagName || "OL" === a.tagName) b(a.firstChild, t, n); else if (m.browser.mozilla && m.node.hasClass(a, "fr-marker")) { var i, s = m.selection.blocks(), l = s.length; for (i = 0; i < l; i++) s[i] != a.parentNode && s[i].childNodes.length && s[i].childNodes[0] != a.parentNode && (a = s[i].childNodes[1] || s[i].childNodes[0], (r = v(f(t, n)).insertBefore(a)).append(a)) } } else { for (var c = r.get(0).parentNode; c && !c.nextSibling && !m.node.isElement(c);) c = c.parentNode; if (c) { var d = c.nextSibling; d && (m.node.isBlock(d) ? "HR" === d.tagName ? b(d.nextSibling, t, n) : b(d.firstChild, t, n) : b(d, t, n)) } } r.is(":empty") && r.remove() } } } function n(e, t) { var n; if (void 0 === t && (t = {}), t.style && delete t.style, m.selection.isCollapsed()) { m.markers.insert(), m.$el.find(".fr-marker").replaceWith(f(e, t) + $e.INVISIBLE_SPACE + $e.MARKERS + function i(e) { return "") }(e)), m.selection.restore() } else { var r; m.selection.save(), b(m.$el.find('.fr-marker[data-type="true"]').length && m.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling, e, t); do { for (r = m.$el.find("".concat(p(e, t), " > ").concat(p(e, t))), n = 0; n < r.length; n++) r[n].outerHTML = r[n].innerHTML } while (r.length); m.el.normalize(); var a = m.el.querySelectorAll(".fr-marker"); for (n = 0; n < a.length; n++) { var o = v(a[n]); !0 === o.data("type") ? u(o.get(0).nextSibling, p(e, t)) && o.next().prepend(o) : u(o.get(0).previousSibling, p(e, t)) && o.prev().append(o) } m.selection.restore() } } function E(e, t, n, r) { if (!r) { var a = !1; if (!0 === e.data("type")) for (; m.node.isFirstSibling(e.get(0)) && !e.parent().is(m.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().before(e), a = !0; else if (!1 === e.data("type")) for (; m.node.isLastSibling(e.get(0)) && !e.parent().is(m.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().after(e), a = !0; if (a) return !0 } if (e.parents(t).length || void 0 === t) { var o = "", i = "", s = e.parent(); if (s.is(m.$el) || m.node.isBlock(s.get(0))) return !1; for (; !(m.node.isBlock(s.parent().get(0)) || void 0 !== t && u(s.get(0), p(t, n)));) o += m.node.closeTagString(s.get(0)), i = m.node.openTagString(s.get(0)) + i, s = s.parent(); var l = e.get(0).outerHTML; e.replaceWith(''); var c = s.html().replace(/<\/span>/, o + m.node.closeTagString(s.get(0)) + i + l + o + m.node.openTagString(s.get(0)) + i); return s.replaceWith(m.node.openTagString(s.get(0)) + c + m.node.closeTagString(s.get(0))), !0 } return !1 } function r(e, t) { void 0 === t && (t = {}), t.style && delete t.style; var n = m.selection.isCollapsed(); m.selection.save(); for (var r = !0; r;) { r = !1; for (var a = m.$el.find(".fr-marker"), o = 0; o < a.length; o++) { var i = v(a[o]), s = null; if (i.attr("data-cloned") || n || (s = i.clone().removeClass("fr-marker").addClass("fr-clone"), i.data("type") && "true" === i.data("type").toString() ? i.attr("data-cloned", !0).after(s) : i.attr("data-cloned", !0).before(s)), E(i, e, t, n)) { r = !0; break } } }! function d(e, t, n, r) { for (var a = m.node.contents(e.get(0)), o = 0; o < a.length; o++) { var i = a[o]; if (m.node.hasClass(i, "fr-marker")) t = (t + 1) % 2; else if (t) if (0 < v(i).find(".fr-marker").length) t = d(v(i), t, n, r); else { for (var s = v(i).find(n || "*:not(br)"), l = s.length - 1; 0 <= l; l--) { var c = s[l]; m.node.isBlock(c) || m.node.isVoid(c) || void 0 !== n && !u(c, p(n, r)) ? m.node.isBlock(c) && void 0 === n && "TABLE" !== i.tagName && m.node.clearAttributes(c) : m.node.hasClass(c, "fr-clone") || (c.outerHTML = c.innerHTML) } void 0 === n && i.nodeType === Node.ELEMENT_NODE && !m.node.isVoid(i) || u(i, p(n, r)) ? m.node.isBlock(i) || m.node.hasClass(i, "fr-clone") || (i.outerHTML = i.innerHTML) : void 0 === n && i.nodeType === Node.ELEMENT_NODE && m.node.isBlock(i) && "TABLE" !== i.tagName && m.node.clearAttributes(i) } else 0 < v(i).find(".fr-marker").length && (t = d(v(i), t, n, r)) } return t }(m.$el, 0, e, t), n || (m.$el.find(".fr-marker").remove(), m.$el.find(".fr-clone").removeClass("fr-clone").addClass("fr-marker")), n && m.$el.find(".fr-marker").before($e.INVISIBLE_SPACE).after($e.INVISIBLE_SPACE), m.html.cleanEmptyTags(), m.el.normalize(), m.selection.restore() } function t(e, t) { var n, r, a, o, i, s = null; if (m.selection.isCollapsed()) { m.markers.insert(); var l = (r = m.$el.find(".fr-marker")).parent(); if (m.node.openTagString(l.get(0)) === '')) { if (m.node.isEmpty(l.get(0))) s = v(m.doc.createElement("span")).attr("style", "".concat(e, ": ").concat(t, ";")).html("".concat($e.INVISIBLE_SPACE).concat($e.MARKERS)), l.replaceWith(s); else { var c = {}; c["style*"] = "".concat(e, ":"), E(r, "span", c, !0), r = m.$el.find(".fr-marker"), t ? (s = v(m.doc.createElement("span")).attr("style", "".concat(e, ": ").concat(t, ";")).html("".concat($e.INVISIBLE_SPACE).concat($e.MARKERS)), r.replaceWith(s)) : r.replaceWith($e.INVISIBLE_SPACE + $e.MARKERS) } m.html.cleanEmptyTags() } else m.node.isEmpty(l.get(0)) && l.is("span") ? (r.replaceWith($e.MARKERS), l.css(e, t)) : (s = v('').concat($e.INVISIBLE_SPACE).concat($e.MARKERS, "")), r.replaceWith(s)); s && T(s, e, t) } else { if (m.selection.save(), null === t || "color" === e && 0 < m.$el.find(".fr-marker").parents("u, a").length) { var d = m.$el.find(".fr-marker"); for (n = 0; n < d.length; n++) if (!0 === (r = v(d[n])).data("type") || "true" === r.data("type")) for (; m.node.isFirstSibling(r.get(0)) && !r.parent().is(m.$el) && !m.node.isElement(r.parent().get(0)) && !m.node.isBlock(r.parent().get(0));) r.parent().before(r); else for (; m.node.isLastSibling(r.get(0)) && !r.parent().is(m.$el) && !m.node.isElement(r.parent().get(0)) && !m.node.isBlock(r.parent().get(0));) r.parent().after(r) } for (var f = m.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling; f.firstChild;) f = f.firstChild; var p = { "class": "fr-unprocessed" }; for (t && (p.style = "".concat(e, ": ").concat(t, ";")), b(f, "span", p), m.$el.find(".fr-marker + .fr-unprocessed").each(function() { v(this).prepend(v(this).prev()) }), m.$el.find(".fr-unprocessed + .fr-marker").each(function() { v(this).prev().append(v(this)) }), (t || "").match(/\dem$/) && m.$el.find("span.fr-unprocessed").removeClass("fr-unprocessed"); 0 < m.$el.find("span.fr-unprocessed").length;) { if ((s = m.$el.find("span.fr-unprocessed").first().removeClass("fr-unprocessed")).parent().get(0).normalize(), s.parent().is("span") && 1 === s.parent().get(0).childNodes.length) { s.parent().css(e, t); var u = s; s = s.parent(), u.replaceWith(u.html()) } var h = s.find("span"); for (n = h.length - 1; 0 <= n; n--) a = h[n], o = e, i = void 0, (i = v(a)).css(o, ""), "" === i.attr("style") && i.replaceWith(i.html()); T(s, e, t) } }! function g() { var e; for (; 0 < m.$el.find(".fr-split:empty").length;) m.$el.find(".fr-split:empty").remove(); m.$el.find(".fr-split").removeClass("fr-split"), m.$el.find('[style=""]').removeAttr("style"), m.$el.find('[class=""]').removeAttr("class"), m.html.cleanEmptyTags(); for (var t = m.$el.find("span"), n = t.length - 1; 0 <= n; n--) { var r = t[n]; r.attributes && 0 !== r.attributes.length || v(r).replaceWith(r.innerHTML) } m.el.normalize(); var a = m.$el.find("span[style] + span[style]"); for (e = 0; e < a.length; e++) { var o = v(a[e]), i = v(a[e]).prev(); o.get(0).previousSibling === i.get(0) && m.node.openTagString(o.get(0)) === m.node.openTagString(i.get(0)) && (o.prepend(i.html()), i.remove()) } m.$el.find("span[style] span[style]").each(function() { if (0 <= v(this).attr("style").indexOf("font-size")) { var e = v(this).parents("span[style]"); 0 <= e.attr("style").indexOf("background-color") && (v(this).attr("style", "".concat(v(this).attr("style"), ";").concat(e.attr("style"))), E(v(this), "span[style]", {}, !1)) } }), m.el.normalize(), m.selection.restore() }() } function T(e, t, n) { var r, a, o, i = e.parentsUntil(m.$el, "span[style]"), s = []; for (r = i.length - 1; 0 <= r; r--) a = i[r], o = t, 0 === v(a).attr("style").indexOf("".concat(o, ":")) || 0 <= v(a).attr("style").indexOf(";".concat(o, ":")) || 0 <= v(a).attr("style").indexOf("; ".concat(o, ":")) || s.push(i[r]); if ((i = i.not(s)).length) { for (var l = "", c = "", d = "", f = "", p = e.get(0); p = p.parentNode, v(p).addClass("fr-split"), l += m.node.closeTagString(p), c = m.node.openTagString(v(p).clone().addClass("fr-split").get(0)) + c, i.get(0) !== p && (d += m.node.closeTagString(p), f = m.node.openTagString(v(p).clone().addClass("fr-split").get(0)) + f), i.get(0) !== p;); var u = "".concat(l + m.node.openTagString(v(i.get(0)).clone().css(t, n || "").get(0)) + f + e.css(t, "").get(0).outerHTML + d, "").concat(c); e.replaceWith(''); var h = i.get(0).outerHTML; v(i.get(0)).replaceWith(h.replace(/<\/span>/g, function() { return u })) } } function a(e, t) { void 0 === t && (t = {}), t.style && delete t.style; var n = m.selection.ranges(0), r = n.startContainer; if (r.nodeType === Node.ELEMENT_NODE && 0 < r.childNodes.length && r.childNodes[n.startOffset] && (r = r.childNodes[n.startOffset]), !n.collapsed && r.nodeType === Node.TEXT_NODE && n.startOffset === (r.textContent || "").length) { for (; !m.node.isBlock(r.parentNode) && !r.nextSibling;) r = r.parentNode; r.nextSibling && (r = r.nextSibling) } for (var a = r; a && a.nodeType === Node.ELEMENT_NODE && !u(a, p(e, t));) a = a.firstChild; if (a && a.nodeType === Node.ELEMENT_NODE && u(a, p(e, t))) return !0; var o = r; for (o && o.nodeType !== Node.ELEMENT_NODE && (o = o.parentNode); o && o.nodeType === Node.ELEMENT_NODE && o !== m.el && !u(o, p(e, t));) o = o.parentNode; return !(!o || o.nodeType !== Node.ELEMENT_NODE || o === m.el || !u(o, p(e, t))) } return { is: a, toggle: function o(e, t) { a(e, t) ? r(e, t) : n(e, t) }, apply: n, remove: r, applyStyle: t, removeStyle: function i(e) { t(e, null) } } }, $e.MODULES.spaces = function(l) { function r(e, t) { var n = e.previousSibling, r = e.nextSibling, a = e.textContent, o = e.parentNode; if (!l.html.isPreformatted(o)) { t && (a = a.replace(/[\f\n\r\t\v ]{2,}/g, " "), r && "BR" !== r.tagName && !l.node.isBlock(r) || !(l.node.isBlock(o) || l.node.isLink(o) && !o.nextSibling || l.node.isElement(o)) || (a = a.replace(/[\f\n\r\t\v ]{1,}$/g, "")), n && "BR" !== n.tagName && !l.node.isBlock(n) || !(l.node.isBlock(o) || l.node.isLink(o) && !o.previousSibling || l.node.isElement(o)) || (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), (l.node.isBlock(r) || l.node.isBlock(n)) && (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), " " === a && (n && l.node.isVoid(n) || r && l.node.isVoid(r)) && !(n && r && l.node.isVoid(n) || r && n && l.node.isVoid(r)) && (a = "")), (!n && l.node.isBlock(r) || !r && l.node.isBlock(n)) && l.node.isBlock(o) && o !== l.el && (a = a.replace(/^[\f\n\r\t\v ]{1,}/g, "")), t || (a = a.replace(new RegExp($e.UNICODE_NBSP, "g"), " ")); for (var i = "", s = 0; s < a.length; s++) 32 != a.charCodeAt(s) || 0 !== s && 32 != i.charCodeAt(s - 1) || n && r && l.node.isVoid(n) || n && r && l.node.isVoid(r) ? i += a[s] : i += $e.UNICODE_NBSP; (!r || r && l.node.isBlock(r) || r && r.nodeType === Node.ELEMENT_NODE && l.win.getComputedStyle(r) && "block" === l.win.getComputedStyle(r).display) && (l.node.isVoid(n) || (i = i.replace(/ $/, $e.UNICODE_NBSP))), !n || l.node.isVoid(n) || l.node.isBlock(n) || 1 !== (i = i.replace(/^\u00A0([^ $])/, " $1")).length || 160 !== i.charCodeAt(0) || !r || l.node.isVoid(r) || l.node.isBlock(r) || l.node.hasClass(n, "fr-marker") && l.node.hasClass(r, "fr-marker") || (i = " "), t || (i = i.replace(/([^ \u00A0])\u00A0([^ \u00A0])/g, "$1 $2")), e.textContent !== i && (e.textContent = i) } } function c(e, t) { if (void 0 !== e && e || (e = l.el), void 0 === t && (t = !1), !e.getAttribute || "false" !== e.getAttribute("contenteditable")) if (e.nodeType === Node.TEXT_NODE) r(e, t); else if (e.nodeType === Node.ELEMENT_NODE) for (var n = l.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, l.node.filter(function(e) { for (var t = e.parentNode; t && t !== l.el;) { if ("STYLE" === t.tagName || "IFRAME" === t.tagName) return !1; if ("PRE" === t.tagName) return !1; t = t.parentNode } return null !== e.textContent.match(/([ \u00A0\f\n\r\t\v]{2,})|(^[ \u00A0\f\n\r\t\v]{1,})|([ \u00A0\f\n\r\t\v]{1,}$)/g) && !l.node.hasClass(e.parentNode, "fr-marker") }), !1); n.nextNode();) r(n.currentNode, t) } return { normalize: c, normalizeAroundCursor: function d() { for (var e = [], t = l.el.querySelectorAll(".fr-marker"), n = 0; n < t.length; n++) { for (var r = null, a = l.node.blockParent(t[n]), o = (r = a || t[n]).nextSibling, i = r.previousSibling; o && "BR" === o.tagName;) o = o.nextSibling; for (; i && "BR" === i.tagName;) i = i.previousSibling; r && e.indexOf(r) < 0 && e.push(r), i && e.indexOf(i) < 0 && e.push(i), o && e.indexOf(o) < 0 && e.push(o) } for (var s = 0; s < e.length; s++) c(e[s]) } } }, $e.START_MARKER = '"), $e.END_MARKER = '"), $e.MARKERS = $e.START_MARKER + $e.END_MARKER, $e.MODULES.markers = function(d) { var f = d.$; function l() { if (!d.$wp) return null; try { var e = d.selection.ranges(0), t = e.commonAncestorContainer; if (t !== d.el && !d.$el.contains(t)) return null; var n = e.cloneRange(), r = e.cloneRange(); n.collapse(!0); var a = f(d.doc.createElement("SPAN")).addClass("fr-marker").attr("style", "display: none; line-height: 0;").html($e.INVISIBLE_SPACE).get(0); if (n.insertNode(a), a = d.$el.find("span.fr-marker").get(0)) { for (var o = a.nextSibling; o && o.nodeType === Node.TEXT_NODE && 0 === o.textContent.length;) f(o).remove(), o = d.$el.find("span.fr-marker").get(0).nextSibling; return d.selection.clear(), d.selection.get().addRange(r), a } return null } catch (i) {} } function c() { d.$el.find(".fr-marker").remove() } return { place: function p(e, t, n) { var r, a, o; try { var i = e.cloneRange(); if (i.collapse(t), i.insertNode(function l(e, t) { var n = f(d.doc.createElement("SPAN")); return n.addClass("fr-marker").attr("data-id", t).attr("data-type", e).attr("style", "display: ".concat(d.browser.safari ? "none" : "inline-block", "; line-height: 0;")).html($e.INVISIBLE_SPACE), n.get(0) }(t, n)), !0 === t) for (o = (r = d.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(n, '"]')).get(0)).nextSibling; o && o.nodeType === Node.TEXT_NODE && 0 === o.textContent.length;) f(o).remove(), o = r.nextSibling; if (!0 === t && !e.collapsed) { for (; !d.node.isElement(r.parentNode) && !o;) f(r.parentNode).after(r), o = r.nextSibling; if (o && o.nodeType === Node.ELEMENT_NODE && d.node.isBlock(o) && "HR" !== o.tagName) { for (a = [o]; o = a[0], (a = d.node.contents(o))[0] && d.node.isBlock(a[0]);); f(o).prepend(f(r)) } } if (!1 === t && !e.collapsed) { if ((o = (r = d.$el.find('span.fr-marker[data-type="false"][data-id="'.concat(n, '"]')).get(0)).previousSibling) && o.nodeType === Node.ELEMENT_NODE && d.node.isBlock(o) && "HR" !== o.tagName) { for (a = [o]; o = a[a.length - 1], (a = d.node.contents(o))[a.length - 1] && d.node.isBlock(a[a.length - 1]);); f(o).append(f(r)) }(r.parentNode && 0 <= ["TD", "TH"].indexOf(r.parentNode.tagName) || !r.previousSibling && d.node.isBlock(r.parentElement)) && r.parentNode.previousSibling && !r.previousSibling && f(r.parentNode.previousSibling).append(r) } var s = d.$el.find('span.fr-marker[data-type="'.concat(t, '"][data-id="').concat(n, '"]')).get(0); return s && (s.style.display = "none"), s } catch (c) { return null } }, insert: l, split: function i() { d.selection.isCollapsed() || d.selection.remove(); var e = d.$el.find(".fr-marker").get(0); if (e || (e = l()), !e) return null; var t = d.node.deepestParent(e); if (t || (t = d.node.blockParent(e)) && "LI" !== t.tagName && (t = null), t) if (d.node.isBlock(t) && d.node.isEmpty(t)) "LI" !== t.tagName || t.parentNode.firstElementChild !== t || d.node.isEmpty(t.parentNode) ? f(t).replaceWith('') : f(t).append(''); else if (d.cursor.isAtStart(e, t)) f(t).before(''), f(e).remove(); else if (d.cursor.isAtEnd(e, t)) f(t).after(''), f(e).remove(); else { for (var n = e, r = "", a = ""; n = n.parentNode, r += d.node.closeTagString(n), a = d.node.openTagString(n) + a, n !== t;); f(e).replaceWith(''); var o = d.node.openTagString(t) + f(t).html() + d.node.closeTagString(t); o = o.replace(/<\/span>/g, "".concat(r, '').concat(a)), f(t).replaceWith(o) } return d.$el.find(".fr-marker").get(0) }, insertAtPoint: function u(e) { var t, n = e.clientX, r = e.clientY; c(); var a = null; if ("undefined" != typeof d.doc.caretPositionFromPoint ? (t = d.doc.caretPositionFromPoint(n, r), (a = d.doc.createRange()).setStart(t.offsetNode, t.offset), a.setEnd(t.offsetNode, t.offset)) : "undefined" != typeof d.doc.caretRangeFromPoint && (t = d.doc.caretRangeFromPoint(n, r), (a = d.doc.createRange()).setStart(t.startContainer, t.startOffset), a.setEnd(t.startContainer, t.startOffset)), null !== a && "undefined" != typeof d.win.getSelection) { var o = d.win.getSelection(); o.removeAllRanges(), o.addRange(a) } else if ("undefined" != typeof d.doc.body.createTextRange) try { (a = d.doc.body.createTextRange()).moveToPoint(n, r); var i = a.duplicate(); i.moveToPoint(n, r), a.setEndPoint("EndToEnd", i), a.select() } catch (s) { return !1 } l() }, remove: c } }, $e.MODULES.selection = function(A) { var C = A.$; function s() { var e = ""; return A.win.getSelection ? e = A.win.getSelection() : A.doc.getSelection ? e = A.doc.getSelection() : A.doc.selection && (e = A.doc.selection.createRange().text), e.toString() } function T() { return A.win.getSelection ? A.win.getSelection() : A.doc.getSelection ? A.doc.getSelection() : A.doc.selection.createRange() } function d(e) { var t = T(), n = []; if (t && t.getRangeAt && t.rangeCount) { n = []; for (var r = 0; r < t.rangeCount; r++) n.push(t.getRangeAt(r)) } else n = A.doc.createRange ? [A.doc.createRange()] : []; return void 0 !== e ? n[e] : n } function S() { var e = T(); try { e.removeAllRanges ? e.removeAllRanges() : e.empty ? e.empty() : e.clear && e.clear() } catch (t) {} } function f(e, t) { var n = e; return n.nodeType === Node.ELEMENT_NODE && 0 < n.childNodes.length && n.childNodes[t] && (n = n.childNodes[t]), n.nodeType === Node.TEXT_NODE && (n = n.parentNode), n } function y() { if (A.$wp) { A.markers.remove(); var e, t, n = d(), r = []; for (t = 0; t < n.length; t++) if (n[t].startContainer !== A.doc || A.browser.msie) { var a = (e = n[t]).collapsed, o = A.markers.place(e, !0, t), i = A.markers.place(e, !1, t); if (void 0 !== o && o || !a || (C(".fr-marker").remove(), A.selection.setAtEnd(A.el)), A.el.normalize(), A.browser.safari && !a) try { (e = A.doc.createRange()).setStartAfter(o), e.setEndBefore(i), r.push(e) } catch (s) {} } if (A.browser.safari && r.length) for (A.selection.clear(), t = 0; t < r.length; t++) A.selection.get().addRange(r[t]) } } function R() { var e, t = A.el.querySelectorAll('.fr-marker[data-type="true"]'); if (!A.$wp) return A.markers.remove(), !1; if (0 === t.length) return !1; if (A.browser.msie || A.browser.edge) for (e = 0; e < t.length; e++) t[e].style.display = "inline-block"; A.core.hasFocus() || A.browser.msie || A.browser.webkit || A.$el.focus(), S(); var n = T(); for (e = 0; e < t.length; e++) { var r = C(t[e]).data("id"), a = t[e], o = A.doc.createRange(), i = A.$el.find('.fr-marker[data-type="false"][data-id="'.concat(r, '"]')); (A.browser.msie || A.browser.edge) && i.css("display", "inline-block"); var s = null; if (0 < i.length) { i = i[0]; try { for (var l = !1, c = a.nextSibling, d = null; c && c.nodeType === Node.TEXT_NODE && 0 === c.textContent.length;) c = (d = c).nextSibling, C(d).remove(); for (var f = i.nextSibling; f && f.nodeType === Node.TEXT_NODE && 0 === f.textContent.length;) f = (d = f).nextSibling, C(d).remove(); if (a.nextSibling === i || i.nextSibling === a) { for (var p = a.nextSibling === i ? a : i, u = p === a ? i : a, h = p.previousSibling; h && h.nodeType === Node.TEXT_NODE && 0 === h.length;) h = (d = h).previousSibling, C(d).remove(); if (h && h.nodeType === Node.TEXT_NODE) for (; h && h.previousSibling && h.previousSibling.nodeType === Node.TEXT_NODE;) h.previousSibling.textContent += h.textContent, h = h.previousSibling, C(h.nextSibling).remove(); for (var g = u.nextSibling; g && g.nodeType === Node.TEXT_NODE && 0 === g.length;) g = (d = g).nextSibling, C(d).remove(); if (g && g.nodeType === Node.TEXT_NODE) for (; g && g.nextSibling && g.nextSibling.nodeType === Node.TEXT_NODE;) g.nextSibling.textContent = g.textContent + g.nextSibling.textContent, g = g.nextSibling, C(g.previousSibling).remove(); if (h && (A.node.isVoid(h) || A.node.isBlock(h)) && (h = null), g && (A.node.isVoid(g) || A.node.isBlock(g)) && (g = null), h && g && h.nodeType === Node.TEXT_NODE && g.nodeType === Node.TEXT_NODE) { C(a).remove(), C(i).remove(); var m = h.textContent.length; h.textContent += g.textContent, C(g).remove(), A.opts.htmlUntouched || A.spaces.normalize(h), o.setStart(h, m), o.setEnd(h, m), l = !0 } else !h && g && g.nodeType === Node.TEXT_NODE ? (C(a).remove(), C(i).remove(), A.opts.htmlUntouched || A.spaces.normalize(g), s = C(A.doc.createTextNode("\u200b")).get(0), C(g).before(s), o.setStart(g, 0), o.setEnd(g, 0), l = !0) : !g && h && h.nodeType === Node.TEXT_NODE && (C(a).remove(), C(i).remove(), A.opts.htmlUntouched || A.spaces.normalize(h), s = C(A.doc.createTextNode("\u200b")).get(0), C(h).after(s), o.setStart(h, h.textContent.length), o.setEnd(h, h.textContent.length), l = !0) } if (!l) { var v = void 0, b = void 0; b = (A.browser.chrome || A.browser.edge) && a.nextSibling === i ? (v = L(i, o, !0) || o.setStartAfter(i), L(a, o, !1) || o.setEndBefore(a)) : (a.previousSibling === i && (i = (a = i).nextSibling), i.nextSibling && "BR" === i.nextSibling.tagName || !i.nextSibling && A.node.isBlock(a.previousSibling) || a.previousSibling && "BR" === a.previousSibling.tagName || (a.style.display = "inline", i.style.display = "inline", s = C(A.doc.createTextNode("\u200b")).get(0)), v = L(a, o, !0) || C(a).before(s) && o.setStartBefore(a), L(i, o, !1) || C(i).after(s) && o.setEndAfter(i)), "function" == typeof v && v(), "function" == typeof b && b() } } catch (E) {} } s && C(s).remove(); try { n.addRange(o) } catch (E) {} } A.markers.remove() } function L(e, t, n) { var r, a = e.previousSibling, o = e.nextSibling; return a && o && a.nodeType === Node.TEXT_NODE && o.nodeType === Node.TEXT_NODE ? (r = a.textContent.length, n ? (o.textContent = a.textContent + o.textContent, C(a).remove(), C(e).remove(), A.opts.htmlUntouched || A.spaces.normalize(o), function() { t.setStart(o, r) }) : (a.textContent += o.textContent, C(o).remove(), C(e).remove(), A.opts.htmlUntouched || A.spaces.normalize(a), function() { t.setEnd(a, r) })) : a && !o && a.nodeType === Node.TEXT_NODE ? (r = a.textContent.length, n ? (A.opts.htmlUntouched || A.spaces.normalize(a), function() { t.setStart(a, r) }) : (A.opts.htmlUntouched || A.spaces.normalize(a), function() { t.setEnd(a, r) })) : !(!o || a || o.nodeType !== Node.TEXT_NODE) && (n ? (A.opts.htmlUntouched || A.spaces.normalize(o), function() { t.setStart(o, 0) }) : (A.opts.htmlUntouched || A.spaces.normalize(o), function() { t.setEnd(o, 0) })) } function w() { for (var e = d(), t = 0; t < e.length; t++) if (!e[t].collapsed) return !1; return !0 } function a(e) { var t, n, r = !1, a = !1; if (A.win.getSelection) { var o = A.win.getSelection(); o.rangeCount && ((n = (t = o.getRangeAt(0)).cloneRange()).selectNodeContents(e), n.setEnd(t.startContainer, t.startOffset), r = "" === n.toString(), n.selectNodeContents(e), n.setStart(t.endContainer, t.endOffset), a = "" === n.toString()) } else A.doc.selection && "Control" !== A.doc.selection.type && ((n = (t = A.doc.selection.createRange()).duplicate()).moveToElementText(e), n.setEndPoint("EndToStart", t), r = "" === n.text, n.moveToElementText(e), n.setEndPoint("StartToEnd", t), a = "" === n.text); return { atStart: r, atEnd: a } } function _(e, t) { void 0 === t && (t = !0); var n = C(e).html(); n && n.replace(/\u200b/g, "").length !== n.length && C(e).html(n.replace(/\u200b/g, "")); for (var r = A.node.contents(e), a = 0; a < r.length; a++) r[a].nodeType !== Node.ELEMENT_NODE ? C(r[a]).remove() : (_(r[a], 0 === a), 0 === a && (t = !1)); if (e.nodeType === Node.TEXT_NODE) { var o = C(document.createElement("span")).attr("data-first", "true").attr("data-text", "true"); C(e)[0].replaceWith(o[0]) } else t && C(e).attr("data-first", !0) } function O() { return 0 === C(this).find("fr-inner").length } function p() { try { if (!A.$wp) return !1; for (var e = d(0).commonAncestorContainer; e && !A.node.isElement(e);) e = e.parentNode; return !!A.node.isElement(e) } catch (t) { return !1 } } function r(e, t) { if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1; for (var n = e.firstChild; n && (A.node.isBlock(n) || t && !A.node.isVoid(n) && n.nodeType === Node.ELEMENT_NODE);) n = (e = n).firstChild; e.innerHTML = $e.MARKERS + e.innerHTML } function o(e, t) { if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1; for (var n = e.lastChild; n && (A.node.isBlock(n) || t && !A.node.isVoid(n) && n.nodeType === Node.ELEMENT_NODE);) n = (e = n).lastChild; var r = A.doc.createElement("SPAN"); for (r.setAttribute("id", "fr-sel-markers"), r.innerHTML = $e.MARKERS; e.parentNode && A.opts.htmlAllowedEmptyTags && 0 <= A.opts.htmlAllowedEmptyTags.indexOf(e.tagName.toLowerCase());) e = e.parentNode; e.appendChild(r); var a = e.querySelector("#fr-sel-markers"); a.outerHTML = a.innerHTML } return { text: s, get: T, ranges: d, clear: S, element: function l() { var e = T(); try { if (e.rangeCount) { var t, n = d(0), r = n.startContainer; if (A.node.isElement(r) && 0 === n.startOffset && r.childNodes.length) for (; r.childNodes.length && r.childNodes[0].nodeType === Node.ELEMENT_NODE;) r = r.childNodes[0]; if (r.nodeType === Node.TEXT_NODE && n.startOffset === (r.textContent || "").length && r.nextSibling && (r = r.nextSibling), r.nodeType === Node.ELEMENT_NODE) { var a = !1; if (0 < r.childNodes.length && r.childNodes[n.startOffset]) { for (t = r.childNodes[n.startOffset]; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling; if (t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0), !a && 1 < r.childNodes.length && 0 < n.startOffset && r.childNodes[n.startOffset - 1]) { for (t = r.childNodes[n.startOffset - 1]; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling; t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0) } } else !n.collapsed && r.nextSibling && r.nextSibling.nodeType === Node.ELEMENT_NODE && (t = r.nextSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0); !a && 0 < r.childNodes.length && C(r.childNodes[0]).text().replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && ["BR", "IMG", "HR"].indexOf(r.childNodes[0].tagName) < 0 && (r = r.childNodes[0]) } for (; r.nodeType !== Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode; for (var o = r; o && "HTML" !== o.tagName;) { if (o === A.el) return r; o = C(o).parent()[0] } } } catch (i) {} return A.el }, endElement: function c() { var e = T(); try { if (e.rangeCount) { var t, n = d(0), r = n.endContainer; if (r.nodeType === Node.ELEMENT_NODE) { var a = !1; 0 < r.childNodes.length && r.childNodes[n.endOffset] && C(r.childNodes[n.endOffset]).text() === s() ? (r = r.childNodes[n.endOffset], a = !0) : !n.collapsed && r.previousSibling && r.previousSibling.nodeType === Node.ELEMENT_NODE ? (t = r.previousSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0) : !n.collapsed && 0 < r.childNodes.length && r.childNodes[n.endOffset] && (t = r.childNodes[n.endOffset].previousSibling).nodeType === Node.ELEMENT_NODE && t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, a = !0), !a && 0 < r.childNodes.length && C(r.childNodes[r.childNodes.length - 1]).text() === s() && ["BR", "IMG", "HR"].indexOf(r.childNodes[r.childNodes.length - 1].tagName) < 0 && (r = r.childNodes[r.childNodes.length - 1]) } for (r.nodeType === Node.TEXT_NODE && 0 === n.endOffset && r.previousSibling && r.previousSibling.nodeType === Node.ELEMENT_NODE && (r = r.previousSibling); r.nodeType !== Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode; for (var o = r; o && "HTML" !== o.tagName;) { if (o === A.el) return r; o = C(o).parent()[0] } } } catch (i) {} return A.el }, save: y, restore: R, isCollapsed: w, isFull: function i() { if (w()) return !1; A.selection.save(); var e, t = A.el.querySelectorAll("td, th, img, br"); for (e = 0; e < t.length; e++) t[e].nextSibling && (t[e].innerHTML = ''.concat($e.INVISIBLE_SPACE, "").concat(t[e].innerHTML)); var n = !1, r = a(A.el); for (r.atStart && r.atEnd && (n = !0), t = A.el.querySelectorAll(".fr-mk"), e = 0; e < t.length; e++) t[e].parentNode.removeChild(t[e]); return A.selection.restore(), n }, inEditor: p, remove: function N() { if (w()) return !0; var e; function t(e) { for (var t = e.previousSibling; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) { var n = t; t = t.previousSibling, C(n).remove() } return t } function n(e) { for (var t = e.nextSibling; t && t.nodeType === Node.TEXT_NODE && 0 === t.textContent.length;) { var n = t; t = t.nextSibling, C(n).remove() } return t } y(); var r = A.$el.find('.fr-marker[data-type="true"]'); for (e = 0; e < r.length; e++) for (var a = r[e]; !(t(a) || A.node.isBlock(a.parentNode) || A.$el.is(a.parentNode) || A.node.hasClass(a.parentNode, "fr-inner"));) C(a.parentNode).before(a); var o = A.$el.find('.fr-marker[data-type="false"]'); for (e = 0; e < o.length; e++) { for (var i = o[e]; !(n(i) || A.node.isBlock(i.parentNode) || A.$el.is(i.parentNode) || A.node.hasClass(i.parentNode, "fr-inner"));) C(i.parentNode).after(i); i.parentNode && A.node.isBlock(i.parentNode) && A.node.isEmpty(i.parentNode) && !A.$el.is(i.parentNode) && !A.node.hasClass(i.parentNode, "fr-inner") && A.opts.keepFormatOnDelete && C(i.parentNode).after(i) } if (function E() { for (var e = A.$el.find(".fr-marker"), t = 0; t < e.length; t++) if (C(e[t]).parentsUntil('.fr-element, [contenteditable="true"]', '[contenteditable="false"]').length) return !1; return !0 }()) { ! function T(e, t) { var n = A.node.contents(e.get(0)); 0 <= ["TD", "TH"].indexOf(e.get(0).tagName) && 1 === e.find(".fr-marker").length && (A.node.hasClass(n[0], "fr-marker") || "BR" == n[0].tagName && A.node.hasClass(n[0].nextElementSibling, "fr-marker")) && e.attr("data-del-cell", !0); for (var r = 0; r < n.length; r++) { var a = n[r]; A.node.hasClass(a, "fr-marker") ? t = (t + 1) % 2 : t ? 0 < C(a).find(".fr-marker").length ? t = T(C(a), t) : ["TD", "TH"].indexOf(a.tagName) < 0 && !A.node.hasClass(a, "fr-inner") ? !A.opts.keepFormatOnDelete || 0 < A.$el.find("[data-first]").length || A.node.isVoid(a) ? C(a).remove() : _(a) : A.node.hasClass(a, "fr-inner") ? 0 === C(a).find(".fr-inner").length ? C(a).html("
    ") : C(a).find(".fr-inner").filter(O).html("
    ") : (C(a).empty(), C(a).attr("data-del-cell", !0)) : 0 < C(a).find(".fr-marker").length && (t = T(C(a), t)) } return t }(A.$el, 0); var s = A.$el.find('[data-first="true"]'); if (s.length) A.$el.find(".fr-marker").remove(), s.append($e.INVISIBLE_SPACE + $e.MARKERS).removeAttr("data-first"), s.attr("data-text") && s.replaceWith(s.html()); else for (A.$el.find("table").filter(function() { return 0 < C(this).find("[data-del-cell]").length && C(this).find("[data-del-cell]").length === C(this).find("td, th").length }).remove(), A.$el.find("[data-del-cell]").removeAttr("data-del-cell"), r = A.$el.find('.fr-marker[data-type="true"]'), e = 0; e < r.length; e++) { var l = r[e], c = l.nextSibling, d = A.$el.find('.fr-marker[data-type="false"][data-id="'.concat(C(l).data("id"), '"]')).get(0); if (d) { if (l && (!c || c !== d)) { var f = A.node.blockParent(l), p = A.node.blockParent(d), u = !1, h = !1; if (f && 0 <= ["UL", "OL"].indexOf(f.tagName) && (u = !(f = null)), p && 0 <= ["UL", "OL"].indexOf(p.tagName) && (h = !(p = null)), C(l).after(d), f !== p) if (null !== f || u) if (null !== p || h || 0 !== C(f).parentsUntil(A.$el, "table").length) f && p && 0 === C(f).parentsUntil(A.$el, "table").length && 0 === C(p).parentsUntil(A.$el, "table").length && !C(f).contains(p) && !C(p).contains(f) && (C(f).append(C(p).html()), C(p).remove()); else { for (c = f; !c.nextSibling && c.parentNode !== A.el;) c = c.parentNode; for (c = c.nextSibling; c && "BR" !== c.tagName;) { var g = c.nextSibling; C(f).append(c), c = g } c && "BR" === c.tagName && C(c).remove() } else { var m = A.node.deepestParent(l); m ? (C(m).after(C(p).html()), C(p).remove()) : 0 === C(p).parentsUntil(A.$el, "table").length && (C(l).next().after(C(p).html()), C(p).remove()) } } } else d = C(l).clone().attr("data-type", !1), C(l).after(d) } } A.$el.find("li:empty").remove(), A.opts.keepFormatOnDelete || A.html.fillEmptyBlocks(), A.html.cleanEmptyTags(!0), A.opts.htmlUntouched || (A.clean.lists(), A.$el.find("li:empty").append("
    "), A.spaces.normalize()); var v = A.$el.find(".fr-marker").last().get(0), b = A.$el.find(".fr-marker").first().get(0); void 0 !== v && void 0 !== b && !v.nextSibling && b.previousSibling && "BR" === b.previousSibling.tagName && A.node.isElement(v.parentNode) && A.node.isElement(b.parentNode) && A.$el.append("
    "), R() }, blocks: function u() { var e, t, n = [], r = T(); if (p() && r.rangeCount) { var a = d(); for (e = 0; e < a.length; e++) { var o = a[e], i = f(o.startContainer, o.startOffset), s = f(o.endContainer, o.endOffset); (A.node.isBlock(i) || A.node.hasClass(i, "fr-inner")) && n.indexOf(i) < 0 && n.push(i), (t = A.node.blockParent(i)) && n.indexOf(t) < 0 && n.push(t); for (var l = [], c = i; c !== s && c !== A.el;) l.indexOf(c) < 0 && c.children && c.children.length ? (l.push(c), c = c.children[0]) : c.nextSibling ? c = c.nextSibling : c.parentNode && (c = c.parentNode, l.push(c)), A.node.isBlock(c) && l.indexOf(c) < 0 && n.indexOf(c) < 0 && (c !== s || 0 < o.endOffset) && n.push(c); A.node.isBlock(s) && n.indexOf(s) < 0 && 0 < o.endOffset && n.push(s), (t = A.node.blockParent(s)) && n.indexOf(t) < 0 && n.push(t) } } for (e = n.length - 1; 0 < e; e--) C(n[e]).find(n).length && n.splice(e, 1); return n }, info: a, setAtEnd: o, setAtStart: r, setBefore: function h(e, t) { void 0 === t && (t = !0); for (var n = e.previousSibling; n && n.nodeType === Node.TEXT_NODE && 0 === n.textContent.length;) n = n.previousSibling; return n ? (A.node.isBlock(n) ? o(n) : "BR" === n.tagName ? C(n).before($e.MARKERS) : C(n).after($e.MARKERS), !0) : !!t && (A.node.isBlock(e) ? r(e) : C(e).before($e.MARKERS), !0) }, setAfter: function g(e, t) { void 0 === t && (t = !0); for (var n = e.nextSibling; n && n.nodeType === Node.TEXT_NODE && 0 === n.textContent.length;) n = n.nextSibling; return n ? (A.node.isBlock(n) ? r(n) : C(n).before($e.MARKERS), !0) : !!t && (A.node.isBlock(e) ? o(e) : C(e).after($e.MARKERS), !0) }, rangeElement: f } }, Object.assign($e.DEFAULTS, { language: null }), $e.LANGUAGE = {}, $e.MODULES.language = function(e) { var t; return { _init: function n() { $e.LANGUAGE && (t = $e.LANGUAGE[e.opts.language]), t && t.direction && (e.opts.direction = t.direction) }, translate: function r(e) { return t && t.translation[e] && t.translation[e].length ? t.translation[e] : e } } }, Object.assign($e.DEFAULTS, { placeholderText: "Type something" }), $e.MODULES.placeholder = function(f) { var p = f.$; function e() { f.$placeholder || function d() { f.$placeholder = p(f.doc.createElement("SPAN")).addClass("fr-placeholder"), f.$wp.append(f.$placeholder) }(); var e = f.opts.iframe ? f.$iframe.prev().outerHeight(!0) : f.$el.prev().outerHeight(!0), t = 0, n = 0, r = 0, a = 0, o = 0, i = 0, s = f.node.contents(f.el), l = p(f.selection.element()).css("text-align"); if (s.length && s[0].nodeType === Node.ELEMENT_NODE) { var c = p(s[0]); (0 < f.$wp.prev().length || 0 < f.$el.prev().length) && f.ready && (t = f.helpers.getPX(c.css("margin-top")), a = f.helpers.getPX(c.css("padding-top")), n = f.helpers.getPX(c.css("margin-left")), r = f.helpers.getPX(c.css("margin-right")), o = f.helpers.getPX(c.css("padding-left")), i = f.helpers.getPX(c.css("padding-right"))), f.$placeholder.css("font-size", c.css("font-size")), f.$placeholder.css("line-height", c.css("line-height")) } else f.$placeholder.css("font-size", f.$el.css("font-size")), f.$placeholder.css("line-height", f.$el.css("line-height")); f.$wp.addClass("show-placeholder"), f.$placeholder.css({ marginTop: Math.max(f.helpers.getPX(f.$el.css("margin-top")), t) + (e || 0), paddingTop: Math.max(f.helpers.getPX(f.$el.css("padding-top")), a), paddingLeft: Math.max(f.helpers.getPX(f.$el.css("padding-left")), o), marginLeft: Math.max(f.helpers.getPX(f.$el.css("margin-left")), n), paddingRight: Math.max(f.helpers.getPX(f.$el.css("padding-right")), i), marginRight: Math.max(f.helpers.getPX(f.$el.css("margin-right")), r), textAlign: l }).text(f.language.translate(f.opts.placeholderText || f.$oel.attr("placeholder") || "")), f.$placeholder.html(f.$placeholder.text().replace(/\n/g, "
    ")) } function t() { f.$wp.removeClass("show-placeholder") } function n() { if (!f.$wp) return !1; f.core.isEmpty() ? e() : t() } return { _init: function r() { if (!f.$wp) return !1; f.events.on("init input keydown keyup contentChanged initialized", n) }, show: e, hide: t, refresh: n, isVisible: function a() { return !f.$wp || f.node.hasClass(f.$wp.get(0), "show-placeholder") } } }, $e.UNICODE_NBSP = String.fromCharCode(160), $e.VOID_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"], $e.BLOCK_TAGS = ["address", "article", "aside", "audio", "blockquote", "canvas", "details", "dd", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li", "main", "nav", "noscript", "ol", "output", "p", "pre", "section", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul", "video"], Object.assign($e.DEFAULTS, { htmlAllowedEmptyTags: ["textarea", "a", "iframe", "object", "video", "style", "script", ".fa", ".fr-emoticon", ".fr-inner", "path", "line"], htmlDoNotWrapTags: ["script", "style"], htmlSimpleAmpersand: !1, htmlIgnoreCSSProperties: [], htmlExecuteScripts: !0 }), $e.MODULES.html = function(N) { var p = N.$; function d() { return N.opts.enter === $e.ENTER_P ? "p" : N.opts.enter === $e.ENTER_DIV ? "div" : N.opts.enter === $e.ENTER_BR ? null : void 0 } function s(e, t) { return !(!e || e === N.el) && (t ? -1 != ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName) || s(e.parentNode, t) : -1 !== ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName)) } function o(e) { var t, n = [], r = []; if (e) { var a = N.el.querySelectorAll(".fr-marker"); for (t = 0; t < a.length; t++) { var o = N.node.blockParent(a[t]) || a[t]; if (o) { var i = o.nextSibling, s = o.previousSibling; o && r.indexOf(o) < 0 && N.node.isBlock(o) && r.push(o), s && N.node.isBlock(s) && r.indexOf(s) < 0 && r.push(s), i && N.node.isBlock(i) && r.indexOf(i) < 0 && r.push(i) } } } else r = N.el.querySelectorAll(u()); var l = u(); for (l += ",".concat($e.VOID_ELEMENTS.join(",")), l += ", .fr-inner", l += ",".concat(N.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)"), t = r.length - 1; 0 <= t; t--) if (!(r[t].textContent && 0 < r[t].textContent.replace(/\u200B|\n/g, "").length || 0 < r[t].querySelectorAll(l).length)) { for (var c = N.node.contents(r[t]), d = !1, f = 0; f < c.length; f++) if (c[f].nodeType !== Node.COMMENT_NODE && c[f].textContent && 0 < c[f].textContent.replace(/\u200B|\n/g, "").length) { d = !0; break } d || n.push(r[t]) } return n } function u() { return $e.BLOCK_TAGS.join(", ") } function e(e) { var t, n, r = p.merge([], $e.VOID_ELEMENTS); r = p.merge(r, N.opts.htmlAllowedEmptyTags), r = void 0 === e ? p.merge(r, $e.BLOCK_TAGS) : p.merge(r, $e.NO_DELETE_TAGS), t = N.el.querySelectorAll("*:empty:not(".concat(r.join("):not("), "):not(.fr-marker)")); do { n = !1; for (var a = 0; a < t.length; a++) 0 !== t[a].attributes.length && void 0 === t[a].getAttribute("href") || (t[a].parentNode.removeChild(t[a]), n = !0); t = N.el.querySelectorAll("*:empty:not(".concat(r.join("):not("), "):not(.fr-marker)")) } while (t.length && n) } function i(e, t) { var n = d(); if (t && (n = "div"), n) { for (var r = N.doc.createDocumentFragment(), a = null, o = !1, i = e.firstChild, s = !1; i;) { var l = i.nextSibling; if (i.nodeType === Node.ELEMENT_NODE && (N.node.isBlock(i) || 0 <= N.opts.htmlDoNotWrapTags.indexOf(i.tagName.toLowerCase()) && !N.node.hasClass(i, "fr-marker"))) a = null, r.appendChild(i.cloneNode(!0)); else if (i.nodeType !== Node.ELEMENT_NODE && i.nodeType !== Node.TEXT_NODE) a = null, r.appendChild(i.cloneNode(!0)); else if ("BR" === i.tagName) null === a ? (a = N.doc.createElement(n), s = !0, t && (a.setAttribute("class", "fr-temp-div"), a.setAttribute("data-empty", !0)), a.appendChild(i.cloneNode(!0)), r.appendChild(a)) : !1 === o && (a.appendChild(N.doc.createElement("br")), t && (a.setAttribute("class", "fr-temp-div"), a.setAttribute("data-empty", !0))), a = null; else { var c = i.textContent; i.nodeType !== Node.TEXT_NODE || 0 < c.replace(/\n/g, "").replace(/(^ *)|( *$)/g, "").length || c.replace(/(^ *)|( *$)/g, "").length && c.indexOf("\n") < 0 ? (null === a && (a = N.doc.createElement(n), s = !0, t && a.setAttribute("class", "fr-temp-div"), r.appendChild(a), o = !1), a.appendChild(i.cloneNode(!0)), o || N.node.hasClass(i, "fr-marker") || i.nodeType === Node.TEXT_NODE && 0 === c.replace(/ /g, "").length || (o = !0)) : s = !0 } i = l } s && (e.innerHTML = "", e.appendChild(r)) } } function l(e, t) { for (var n = e.length - 1; 0 <= n; n--) i(e[n], t) } function t(e, t, n, r, a) { if (!N.$wp) return !1; void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1), void 0 === r && (r = !1), void 0 === a && (a = !1); var o = N.$wp.scrollTop(); i(N.el, e), r && l(N.el.querySelectorAll(".fr-inner"), e), t && l(N.el.querySelectorAll("td, th"), e), n && l(N.el.querySelectorAll("blockquote"), e), a && l(N.el.querySelectorAll("li"), e), o !== N.$wp.scrollTop() && N.$wp.scrollTop(o) } function n(e) { if (void 0 === e && (e = N.el), e && 0 <= ["SCRIPT", "STYLE", "PRE"].indexOf(e.tagName)) return !1; for (var t = N.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, N.node.filter(function(e) { return null !== e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g) }), !1); t.nextNode();) { var n = t.currentNode; if (!s(n.parentNode, !0)) { var r = N.node.isBlock(n.parentNode) || N.node.isElement(n.parentNode), a = n.textContent.replace(/(?!^)( ){2,}(?!$)/g, " ").replace(/\n/g, " ").replace(/^[ ]{2,}/g, " ").replace(/[ ]{2,}$/g, " "); if (r) { var o = n.previousSibling, i = n.nextSibling; o && i && " " === a ? a = N.node.isBlock(o) && N.node.isBlock(i) ? "" : " " : (o || (a = a.replace(/^ */, "")), i || (a = a.replace(/ *$/, ""))) } n.textContent = a } } } function r(e, t, n) { var r = new RegExp(t, "gi").exec(e); return r ? r[n] : null } function x(e) { var t = e.doctype, n = ""; return t && (n = "")), n } function c(e) { var t = e.parentNode; if (t && (N.node.isBlock(t) || N.node.isElement(t)) && ["TD", "TH"].indexOf(t.tagName) < 0) { for (var n = e.previousSibling, r = e.nextSibling; n && (n.nodeType === Node.TEXT_NODE && 0 === n.textContent.replace(/\n|\r/g, "").length || N.node.hasClass(n, "fr-tmp"));) n = n.previousSibling; if (r) return !1; n && t && "BR" !== n.tagName && !N.node.isBlock(n) && !r && 0 < t.textContent.replace(/\u200B/g, "").length && 0 < n.textContent.length && !N.node.hasClass(n, "fr-marker") && (N.el === t && !r && N.opts.enter === $e.ENTER_BR && N.browser.msie || e.parentNode.removeChild(e)) } else !t || N.node.isBlock(t) || N.node.isElement(t) || e.previousSibling || e.nextSibling || !N.node.isDeletable(e.parentNode) || c(e.parentNode) } function h() { N.opts.htmlUntouched || (e(), t(), n(), N.spaces.normalize(null, !0), N.html.fillEmptyBlocks(), N.clean.lists(), N.clean.tables(), N.clean.toHTML5(), N.html.cleanBRs()), N.selection.restore(), a(), N.placeholder.refresh() } function a() { N.node.isEmpty(N.el) && (null !== d() ? N.el.querySelector(u()) || N.el.querySelector("".concat(N.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || (N.core.hasFocus() ? (N.$el.html("<".concat(d(), ">").concat($e.MARKERS, "
    ")), N.selection.restore()) : N.$el.html("<".concat(d(), ">
    "))) : N.el.querySelector("*:not(.fr-marker):not(br)") || (N.core.hasFocus() ? (N.$el.html("".concat($e.MARKERS, "
    ")), N.selection.restore()) : N.$el.html("
    "))) } function g(e, t) { return r(e, "<".concat(t, "[^>]*?>([\\w\\W]*)"), 1) } function m(e, t) { var n = p("
    ]*?)>"), 1) || "", ">")); return N.node.rawAttributes(n.get(0)) } function v(e) { return (r(e, "]*?)>", 0) || "").replace(/\n/g, " ").replace(/ {2,}/g, " ") } function b(e, t) { N.opts.htmlExecuteScripts ? e.html(t) : e.get(0).innerHTML = t } function I(e) { var t; (t = /:not\(([^)]*)\)/g).test(e) && (e = e.replace(t, " $1 ")); var n = 100 * (e.match(/(#[^\s+>~.[:]+)/g) || []).length + 10 * (e.match(/(\[[^]]+\])/g) || []).length + 10 * (e.match(/(\.[^\s+>~.[:]+)/g) || []).length + 10 * (e.match(/(:[\w-]+\([^)]*\))/gi) || []).length + 10 * (e.match(/(:[^\s+>~.[:]+)/g) || []).length + (e.match(/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi) || []).length; return n += ((e = (e = e.replace(/[*\s+>~]/g, " ")).replace(/[#.]/g, " ")).match(/([^\s+>~.[:]+)/g) || []).length } function k(e) { if (N.events.trigger("html.processGet", [e]), e && e.getAttribute && "" === e.getAttribute("class") && e.removeAttribute("class"), e && e.getAttribute && "" === e.getAttribute("style") && e.removeAttribute("style"), e && e.nodeType === Node.ELEMENT_NODE) { var t, n = e.querySelectorAll('[class=""],[style=""]'); for (t = 0; t < n.length; t++) { var r = n[t]; "" === r.getAttribute("class") && r.removeAttribute("class"), "" === r.getAttribute("style") && r.removeAttribute("style") } if ("BR" === e.tagName) c(e); else { var a = e.querySelectorAll("br"); for (t = 0; t < a.length; t++) c(a[t]) } } } function M(e, t) { return e[3] - t[3] } function f(e) { var t = N.doc.createElement("div"); return t.innerHTML = e, null !== t.querySelector(u()) } function E(e) { var t = null; if (void 0 === e && (t = N.selection.element()), N.opts.keepFormatOnDelete) return !1; var n, r, a = t ? (t.textContent.match(/\u200B/g) || []).length - t.querySelectorAll(".fr-marker").length : 0; if ((N.el.textContent.match(/\u200B/g) || []).length - N.el.querySelectorAll(".fr-marker").length === a) return !1; do { r = !1, n = N.el.querySelectorAll("*:not(.fr-marker)"); for (var o = 0; o < n.length; o++) { var i = n[o]; if (t !== i) { var s = i.textContent; 0 === i.children.length && 1 === s.length && 8203 === s.charCodeAt(0) && "TD" !== i.tagName && (p(i).remove(), r = !0) } } } while (r) } function T() { E(), N.placeholder && setTimeout(N.placeholder.refresh, 0) } return { defaultTag: d, isPreformatted: s, emptyBlocks: o, emptyBlockTagsQuery: function A() { return "".concat($e.BLOCK_TAGS.join(":empty, "), ":empty") }, blockTagsQuery: u, fillEmptyBlocks: function C(e) { var t = o(e); N.node.isEmpty(N.el) && N.opts.enter === $e.ENTER_BR && t.push(N.el); for (var n = 0; n < t.length; n++) { var r = t[n]; "false" === r.getAttribute("contenteditable") || r.querySelector("".concat(N.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"), ":not(.fr-marker)")) || N.node.isVoid(r) || "TABLE" !== r.tagName && "TBODY" !== r.tagName && "TR" !== r.tagName && "UL" !== r.tagName && "OL" !== r.tagName && r.appendChild(N.doc.createElement("br")) } if (N.browser.msie && N.opts.enter === $e.ENTER_BR) { var a = N.node.contents(N.el); a.length && a[a.length - 1].nodeType === Node.TEXT_NODE && N.$el.append("
    ") } }, cleanEmptyTags: e, cleanWhiteTags: E, cleanBlankSpaces: n, blocks: function S() { return N.$el.get(0).querySelectorAll(u()) }, getDoctype: x, set: function y(e) { var t = N.clean.html((e || "").trim(), [], [], N.opts.fullPage); if (N.opts.fullPage) { var n = g(t, "body") || (0 <= t.indexOf("", o = m(t, "head"), i = p("
    "); i.append(a).contents().each(function() { (this.nodeType === Node.COMMENT_NODE || 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName)) && this.parentNode.removeChild(this) }); var s = i.html().trim(); a = p("
    ").append(a).contents().map(function() { return this.nodeType === Node.COMMENT_NODE ? "\x3c!--".concat(this.nodeValue, "--\x3e") : 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName) ? this.outerHTML : "" }).toArray().join(""); var l = v(t), c = m(t, "html"); b(N.$el, "".concat(s, "\n").concat(n)), N.node.clearAttributes(N.el), N.$el.attr(r), N.$el.addClass("fr-view"), N.$el.attr("spellcheck", N.opts.spellcheck), N.$el.attr("dir", N.opts.direction), b(N.$head, a), N.node.clearAttributes(N.$head.get(0)), N.$head.attr(o), N.node.clearAttributes(N.$html.get(0)), N.$html.attr(c), N.iframe_document.doctype.parentNode.replaceChild(function f(e, t) { var n = e.match(//i); return n ? t.implementation.createDocumentType(n[1], n[3], n[4]) : t.implementation.createDocumentType("html") }(l, N.iframe_document), N.iframe_document.doctype) } else b(N.$el, t); var d = N.edit.isDisabled(); N.edit.on(), N.core.injectStyle(N.opts.iframeDefaultStyle + N.opts.iframeStyle), h(), N.opts.useClasses || (N.$el.find("[fr-original-class]").each(function() { this.setAttribute("class", this.getAttribute("fr-original-class")), this.removeAttribute("fr-original-class") }), N.$el.find("[fr-original-style]").each(function() { this.setAttribute("style", this.getAttribute("fr-original-style")), this.removeAttribute("fr-original-style") })), d && N.edit.off(), N.events.trigger("html.set") }, get: function D(e, t) { if (!N.$wp) return N.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML; var n = ""; N.events.trigger("html.beforeGet"); var r, a, o = [], i = {}, s = [], l = N.el.querySelectorAll("input, textarea"); for (r = 0; r < l.length; r++) l[r].setAttribute("value", l[r].value); if (!N.opts.useClasses && !t) { var c = new RegExp("^".concat(N.opts.htmlIgnoreCSSProperties.join("$|^"), "$"), "gi"); for (r = 0; r < N.doc.styleSheets.length; r++) { var d = void 0, f = 0; try { d = N.doc.styleSheets[r].cssRules, N.doc.styleSheets[r].ownerNode && "STYLE" === N.doc.styleSheets[r].ownerNode.nodeType && (f = 1) } catch (O) {} if (d) for (var p = 0, u = d.length; p < u; p++) if (d[p].selectorText && 0 < d[p].style.cssText.length) { var h = d[p].selectorText.replace(/body |\.fr-view /g, "").replace(/::/g, ":"), g = void 0; try { g = N.el.querySelectorAll(h) } catch (O) { g = [] } for (a = 0; a < g.length; a++) { !g[a].getAttribute("fr-original-style") && g[a].getAttribute("style") ? (g[a].setAttribute("fr-original-style", g[a].getAttribute("style")), o.push(g[a])) : g[a].getAttribute("fr-original-style") || (g[a].setAttribute("fr-original-style", ""), o.push(g[a])), i[g[a]] || (i[g[a]] = {}); for (var m = 1e3 * f + I(d[p].selectorText), v = d[p].style.cssText.split(";"), b = 0; b < v.length; b++) { var E = v[b].trim().split(":")[0]; if (E && !E.match(c) && (i[g[a]][E] || (i[g[a]][E] = 0) <= (g[a].getAttribute("fr-original-style") || "").indexOf("".concat(E, ":")) && (i[g[a]][E] = 1e4), m >= i[g[a]][E] && (i[g[a]][E] = m, v[b].trim().length))) { var T = v[b].trim().split(":"); T.splice(0, 1), s.push([g[a], E.trim(), T.join(":").trim(), m]) } } } } } for (s.sort(M), r = 0; r < s.length; r++) { var A = s[r]; A[0].style[A[1]] = A[2] } for (r = 0; r < o.length; r++) if (o[r].getAttribute("class") && (o[r].setAttribute("fr-original-class", o[r].getAttribute("class")), o[r].removeAttribute("class")), 0 < (o[r].getAttribute("fr-original-style") || "").trim().length) { var C = o[r].getAttribute("fr-original-style").split(";"); for (a = 0; a < C.length; a++) if (0 < C[a].indexOf(":")) { var S = C[a].split(":"), y = S[0]; S.splice(0, 1), o[r].style[y.trim()] = S.join(":").trim() } } } if (N.node.isEmpty(N.el)) N.opts.fullPage && (n = x(N.iframe_document), n += "").concat(N.$html.find("head").get(0).outerHTML, "")); else if (void 0 === e && (e = !1), N.opts.fullPage) { n = x(N.iframe_document), N.$el.removeClass("fr-view"); var R = N.opts.heightMin, L = N.opts.height, w = N.opts.heightMax; N.opts.heightMin = null, N.opts.height = null, N.opts.heightMax = null, N.size.refresh(), n += "").concat(N.$html.html(), ""), N.opts.heightMin = R, N.opts.height = L, N.opts.heightMax = w, N.size.refresh(), N.$el.addClass("fr-view") } else n = N.$el.html(); if (!N.opts.useClasses && !t) for (r = 0; r < o.length; r++) o[r].getAttribute("fr-original-class") && (o[r].setAttribute("class", o[r].getAttribute("fr-original-class")), o[r].removeAttribute("fr-original-class")), null !== o[r].getAttribute("fr-original-style") && void 0 !== o[r].getAttribute("fr-original-style") ? (0 !== o[r].getAttribute("fr-original-style").length ? o[r].setAttribute("style", o[r].getAttribute("fr-original-style")) : o[r].removeAttribute("style"), o[r].removeAttribute("fr-original-style")) : o[r].removeAttribute("style"); N.opts.fullPage && (n = (n = (n = (n = (n = (n = (n = (n = n.replace(/")); for (var t = 0; t < i.opts.iframeStyleFiles.length; t++) { var n = r('')); n.get(0).addEventListener("load", i.size.syncIframe), i.$head.append(n) } } }, hasFocus: function l() { return i.browser.mozilla && i.helpers.isMobile() ? i.selection.inEditor() : i.node.hasFocus(i.el) || 0 < i.$el.find("*:focus").length }, sameInstance: function c(e) { if (!e) return !1; var t = e.data("instance"); return !!t && t.id === i.id } } }, $e.POPUP_TEMPLATES = { "text.edit": "[_EDIT_]" }, $e.RegisterTemplate = function(e, t) { $e.POPUP_TEMPLATES[e] = t }, $e.MODULES.popups = function(f) { var d = f.$; f.shared.popups || (f.shared.popups = {}); var p, u = f.shared.popups; function h(e, t) { t.isVisible() || (t = f.$sc), t.is(u[e].data("container")) || (u[e].data("container", t), t.append(u[e])) } function i() { d(this).toggleClass("fr-not-empty", !0) } function s() { var e = d(this); e.toggleClass("fr-not-empty", "" !== e.val()) } function g(e) { return u[e] && f.node.hasClass(u[e], "fr-active") && f.core.sameInstance(u[e]) || !1 } function m(e) { for (var t in u) if (Object.prototype.hasOwnProperty.call(u, t) && g(t) && (void 0 === e || u[t].data("instance") === e)) return u[t]; return !1 } function n(e) { var t = null; if ((t = "string" != typeof e ? e : u[e]) && f.node.hasClass(t, "fr-active") && (t.removeClass("fr-active fr-above"), f.events.trigger("popups.hide.".concat(e)), f.$tb && (1 < f.opts.zIndex ? f.$tb.css("zIndex", f.opts.zIndex + 1) : f.$tb.css("zIndex", "")), f.events.disableBlur(), t.find("input, textarea, button").each(function() { this === this.ownerDocument.activeElement && this.blur() }), t.find("input, textarea").attr("disabled", "disabled"), p)) for (var n = 0; n < p.length; n++) d(p[n]).removeClass("fr-btn-active-popup") } function v(e) { for (var t in void 0 === e && (e = []), u) Object.prototype.hasOwnProperty.call(u, t) && e.indexOf(t) < 0 && n(t) } function t() { f.shared.exit_flag = !0 } function b() { f.shared.exit_flag = !1 } function o() { return f.shared.exit_flag } function l(e, t) { var n, r = function c(e, t) { var n = $e.POPUP_TEMPLATES[e]; if (!n) return null; for (var r in "function" == typeof n && (n = n.apply(f)), t) Object.prototype.hasOwnProperty.call(t, r) && (n = n.replace("[_".concat(r.toUpperCase(), "_]"), t[r])); return n }(e, t), a = d(f.doc.createElement("DIV")); if (!r) return a.addClass("fr-popup fr-empty"), (n = d("body").first()).append(a), a.data("container", n), u[e] = a; a.addClass("fr-popup".concat(f.helpers.isMobile() ? " fr-mobile" : " fr-desktop").concat(f.opts.toolbarInline ? " fr-inline" : "")), a.html(r), f.opts.theme && a.addClass("".concat(f.opts.theme, "-theme")), 1 < f.opts.zIndex && (f.opts.editInPopup ? a.css("z-index", f.opts.zIndex + 2) : f.$tb.css("z-index", f.opts.zIndex + 2)), "auto" !== f.opts.direction && a.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(f.opts.direction)), a.find("input, textarea").attr("dir", f.opts.direction).attr("disabled", "disabled"), (n = d("body").first()).append(a), a.data("container", n); var o = (u[e] = a).find(".fr-color-hex-layer"); if (0 < o.length) { var i = f.helpers.getPX(a.find(".fr-color-set > span").css("width")), s = f.helpers.getPX(o.css("paddingLeft")), l = f.helpers.getPX(o.css("paddingRight")); o.css("width", i * f.opts.colorsStep + s + l) } return f.button.bindCommands(a, !1), a } function E(r) { var a = u[r]; return { _windowResize: function() { var e = a.data("instance") || f; !e.helpers.isMobile() && a.isVisible() && (e.events.disableBlur(), e.popups.hide(r), e.events.enableBlur()) }, _inputFocus: function(e) { var t = a.data("instance") || f, n = d(e.currentTarget); if (n.is("input:file") && n.closest(".fr-layer").addClass("fr-input-focus"), e.preventDefault(), e.stopPropagation(), setTimeout(function() { t.events.enableBlur() }, 100), t.helpers.isMobile()) { var r = d(t.o_win).scrollTop(); setTimeout(function() { d(t.o_win).scrollTop(r) }, 0) } }, _inputBlur: function(e) { var t = a.data("instance") || f, n = d(e.currentTarget); n.is("input:file") && n.closest(".fr-layer").removeClass("fr-input-focus"), document.activeElement !== this && d(this).isVisible() && (t.events.blurActive() && t.events.trigger("blur"), t.events.enableBlur()) }, _editorKeydown: function(e) { var t = a.data("instance") || f; t.keys.ctrlKey(e) || e.which === $e.KEYCODE.ALT || e.which === $e.KEYCODE.ESC || (g(r) && a.findVisible(".fr-back").length ? t.button.exec(a.findVisible(".fr-back").first()) : e.which !== $e.KEYCODE.ALT && t.popups.hide(r)) }, _preventFocus: function(e) { var t = a.data("instance") || f, n = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null; "mouseup" === e.type || d(n).is(":focus") || t.events.disableBlur(), "mouseup" !== e.type || d(n).hasClass("fr-command") || 0 < d(n).parents(".fr-command").length || d(n).hasClass("fr-dropdown-content") || f.button.hideActiveDropdowns(a), (f.browser.safari || f.browser.mozilla) && "mousedown" === e.type && d(n).is("input[type=file]") && t.events.disableBlur(); var r = "input, textarea, button, select, label, .fr-command"; if (n && !d(n).is(r) && 0 === d(n).parents(r).length) return e.stopPropagation(), !1; n && d(n).is(r) && e.stopPropagation(), b() }, _editorMouseup: function() { a.isVisible() && o() && 0 < a.findVisible("input:focus, textarea:focus, button:focus, select:focus").length && f.events.disableBlur() }, _windowMouseup: function(e) { if (!f.core.sameInstance(a)) return !0; var t = a.data("instance") || f; a.isVisible() && o() && (e.stopPropagation(), t.markers.remove(), t.popups.hide(r), b()) }, _windowKeydown: function(e) { if (!f.core.sameInstance(a)) return !0; var t = a.data("instance") || f, n = e.which; if ($e.KEYCODE.ESC === n) { if (t.popups.isVisible(r) && t.opts.toolbarInline) return e.stopPropagation(), t.popups.isVisible(r) && (a.findVisible(".fr-back").length ? (t.button.exec(a.findVisible(".fr-back").first()), t.accessibility.focusPopupButton(a)) : a.findVisible(".fr-dismiss").length ? t.button.exec(a.findVisible(".fr-dismiss").first()) : (t.popups.hide(r), t.toolbar.showInline(null, !0), t.accessibility.focusPopupButton(a))), !1; if (t.popups.isVisible(r)) return a.findVisible(".fr-back").length ? (t.button.exec(a.findVisible(".fr-back").first), t.accessibility.focusPopupButton(a)) : a.findVisible(".fr-dismiss").length ? t.button.exec(a.findVisible(".fr-dismiss").first()) : (t.popups.hide(r), t.accessibility.focusPopupButton(a)), !1 } }, _repositionPopup: function() { if (!f.opts.height && !f.opts.heightMax || f.opts.toolbarInline) return !0; if (f.$wp && g(r) && a.parent().get(0) === f.$sc.get(0)) { var e = a.offset().top - f.$wp.offset().top, t = f.$wp.outerHeight(); f.node.hasClass(a.get(0), "fr-above") && (e += a.outerHeight()), t < e || e < 0 ? a.addClass("fr-hidden") : a.removeClass("fr-hidden") } } } } function c(e, t) { f.events.on("mouseup", e._editorMouseup, !0), f.$wp && f.events.on("keydown", e._editorKeydown), f.events.on("blur", function() { m() && f.markers.remove(), u[t].find("iframe").length || v() }), f.$wp && !f.helpers.isMobile() && f.events.$on(f.$wp, "scroll.popup".concat(t), e._repositionPopup), f.events.on("window.mouseup", e._windowMouseup, !0), f.events.on("window.keydown", e._windowKeydown, !0), u[t].data("inst".concat(f.id), !0), f.events.on("destroy", function() { f.core.sameInstance(u[t]) && (d("body").first().append(u[t]), u[t].removeClass("fr-active")) }, !0) } function T() { var e = d(this).prev().children().first(); e.attr("checked", !e.attr("checked")) } function e() { for (var e in u) if (Object.prototype.hasOwnProperty.call(u, e)) { var t = u[e]; t && (t.html("").removeData().remove(), u[e] = null) } u = [] } return f.shared.exit_flag = !1, { _init: function r() { f.events.on("shared.destroy", e, !0), f.events.on("window.mousedown", t), f.events.on("window.touchmove", b), f.events.$on(d(f.o_win), "scroll", b), f.events.on("mousedown", function(e) { m() && (e.stopPropagation(), f.$el.find(".fr-marker").remove(), t(), f.events.disableBlur()) }) }, create: function A(e, t) { var n = l(e, t), r = E(e); c(r, e), f.events.$on(n, "mousedown mouseup touchstart touchend touch", "*", r._preventFocus, !0), f.events.$on(n, "focus", "input, textarea, button, select", r._inputFocus, !0), f.events.$on(n, "blur", "input, textarea, button, select", r._inputBlur, !0); var a = n.find("input, textarea"); return function o(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = d(n); 0 === r.next().length && r.attr("placeholder") && (r.after('")), r.attr("placeholder", "")) } }(a), f.events.$on(a, "focus", i), f.events.$on(a, "blur change", s), f.events.$on(n, "click", ".fr-checkbox + label", T), f.accessibility.registerPopup(e), f.helpers.isIOS() && f.events.$on(n, "touchend", "label", function() { d("#".concat(d(this).attr("for"))).prop("checked", function(e, t) { return !t }) }, !0), f.events.$on(d(f.o_win), "resize", r._windowResize, !0), n }, get: function a(e) { var t = u[e]; return t && !t.data("inst".concat(f.id)) && c(E(e), e), t }, show: function C(e, t, n, r, a) { if (g(e) || (m() && 0 < f.$el.find(".fr-marker").length ? (f.events.disableBlur(), f.selection.restore()) : m() || (f.events.disableBlur(), f.events.focus(), f.events.enableBlur())), v([e]), !u[e]) return !1; var o = f.button.getButtons(".fr-dropdown.fr-active"); o.removeClass("fr-active").attr("aria-expanded", !1).parents(".fr-toolbar").css("zIndex", "").find("> .fr-dropdown-wrapper").css("height", ""), o.next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), u[e].data("instance", f), f.$tb && f.$tb.data("instance", f); var i = g(e); u[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled"); var s = u[e].data("container"); if (function d(e, t) { t.isVisible() || (t = f.$sc), t.contains([u[e].get(0)]) || t.append(u[e]) }(e, s), f.opts.toolbarInline && s && f.$tb && s.get(0) === f.$tb.get(0) && (h(e, f.$sc), n = f.$tb.offset().top - f.helpers.getPX(f.$tb.css("margin-top")), t = f.$tb.offset().left + f.$tb.outerWidth() / 2, f.node.hasClass(f.$tb.get(0), "fr-above") && n && (n += f.$tb.outerHeight()), r = 0), s = u[e].data("container"), f.opts.iframe && !r && !i) { var l = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-top")), c = f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-left")); t && (t -= f.$iframe.offset().left + c), n && (n -= f.$iframe.offset().top + l) } s.is(f.$tb) ? f.$tb.css("zIndex", (f.opts.zIndex || 1) + 4) : u[e].css("zIndex", (f.opts.zIndex || 1) + 4), f.opts.toolbarBottom && s && f.$tb && s.get(0) === f.$tb.get(0) && (u[e].addClass("fr-above"), n && (n -= u[e].outerHeight())), a && (t -= u[e].width() / 2), t + u[e].outerWidth() > f.$sc.offset().left + f.$sc.width() && (t -= t + u[e].outerWidth() - f.$sc.offset().left - f.$sc.width()), t < f.$sc.offset().left && "rtl" === f.opts.direction && (t = f.$sc.offset().left), u[e].removeClass("fr-active"), f.position.at(t, n, u[e], r || 0), u[e].addClass("fr-active"), i || f.accessibility.focusPopup(u[e]), f.opts.toolbarInline && f.toolbar.hide(), f.$tb && (p = f.$tb.find(".fr-btn-active-popup")), f.events.trigger("popups.show.".concat(e)), E(e)._repositionPopup(), b() }, hide: n, onHide: function S(e, t) { f.events.on("popups.hide.".concat(e), t) }, hideAll: v, setContainer: h, refresh: function y(e) { u[e].data("instance", f), f.events.trigger("popups.refresh.".concat(e)); for (var t = u[e].find(".fr-command"), n = 0; n < t.length; n++) { var r = d(t[n]); 0 === r.parents(".fr-dropdown-menu").length && f.button.refresh(r) } }, onRefresh: function R(e, t) { f.events.on("popups.refresh.".concat(e), t) }, onShow: function L(e, t) { f.events.on("popups.show.".concat(e), t) }, isVisible: g, areVisible: m } }, $e.MODULES.accessibility = function(f) { var p = f.$, o = !0; function l(t) { t && t.length && !f.$el.find('[contenteditable="true"]').is(":focus") && (t.data("blur-event-set") || t.parents(".fr-popup").length || (f.events.$on(t, "blur", function() { var e = t.parents(".fr-toolbar, .fr-popup").data("instance") || f; e.events.blurActive() && !f.core.hasFocus() && e.events.trigger("blur"), setTimeout(function() { e.events.enableBlur() }, 100) }, !0), t.data("blur-event-set", !0)), (t.parents(".fr-toolbar, .fr-popup").data("instance") || f).events.disableBlur(), t.get(0).focus(), f.shared.$f_el = t) } function u(e, t) { var n = t ? "last" : "first", r = s(g(e))[n](); if (r.length) return l(r), !0 } function i(e) { return e.is("input, textarea, select") && t(), f.events.disableBlur(), e.get(0).focus(), !0 } function h(e, t) { var n = e.find("input, textarea, button, select").filter(function() { return p(this).isVisible() }).not(":disabled"); if ((n = t ? n.last() : n.first()).length) return i(n); if (f.shared.with_kb) { var r = e.findVisible(".fr-active-item").first(); if (r.length) return i(r); var a = e.findVisible("[tabIndex]").first(); if (a.length) return i(a) } } function t() { 0 === f.$el.find(".fr-marker").length && f.core.hasFocus() && f.selection.save() } function c() { var e = f.popups.areVisible(); if (e) { var t = e.find(".fr-buttons"); return t.find("button:focus, .fr-group span:focus").length ? !u(e.data("instance").$tb) : !u(t) } return !u(f.$tb) } function d() { var e = null; return f.shared.$f_el.is(".fr-dropdown.fr-active") ? e = f.shared.$f_el : f.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active") && (e = f.shared.$f_el.closest(".fr-dropdown-menu").prev()), e } function s(e) { for (var t = -1, n = 0; n < e.length; n++) p(e[n]).hasClass("fr-open") && (t = n); var r = e.index(f.$tb.find(".fr-more-toolbar.fr-expanded > button.fr-command").first()); if (0 < r && -1 !== t) { var a = e.slice(r, e.length), o = (e = e.slice(0, r)).slice(0, t + 1), i = e.slice(t + 1, e.length); e = o; for (var s = 0; s < a.length; s++) e.push(a[s]); for (var l = 0; l < i.length; l++) e.push(i[l]) } return e } function g(e) { return e.findVisible("button:not(.fr-disabled), .fr-group span.fr-command").filter(function(e) { var t = p(e).parents(".fr-more-toolbar"); return 0 === t.length || 0 < t.length && t.hasClass("fr-expanded") }) } function n(e, t, n) { if (f.shared.$f_el) { var r = d(); r && (f.button.click(r), f.shared.$f_el = r); var a = s(g(e)), o = a.index(f.shared.$f_el); if (0 === o && !n || o === a.length - 1 && n) { var i; if (t) { if (e.parent().is(".fr-popup")) i = !h(e.parent().children().not(".fr-buttons"), !n); !1 === i && (f.shared.$f_el = null) } t && !1 === i || u(e, !n) } else l(p(a.get(o + (n ? 1 : -1)))); return !1 } } function m(e, t) { return n(e, t, !0) } function v(e, t) { return n(e, t) } function b(e) { if (f.shared.$f_el) { var t; if (f.shared.$f_el.is(".fr-dropdown.fr-active")) return l(t = e ? f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()), !1; if (f.shared.$f_el.is("a.fr-command")) return (t = e ? f.shared.$f_el.closest("li").nextAllVisible().first().find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest("li").prevAllVisible().first().find(".fr-command:not(.fr-disabled)").first()).length || (t = e ? f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()), l(t), !1 } } function E() { if (f.shared.$f_el) { if (f.shared.$f_el.hasClass("fr-dropdown")) f.button.click(f.shared.$f_el); else if (f.shared.$f_el.is("button.fr-back")) { f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus()); var e = f.popups.areVisible(f); e && (f.shared.with_kb = !1), f.button.click(f.shared.$f_el), A(e) } else { if (f.events.disableBlur(), f.button.click(f.shared.$f_el), f.shared.$f_el.attr("data-group-name")) { var t = f.$tb.find('.fr-more-toolbar[data-name="'.concat(f.shared.$f_el.attr("data-group-name"), '"]')), n = f.shared.$f_el; t.hasClass("fr-expanded") && (n = t.findVisible("button:not(.fr-disabled)").first()), n && l(n) } else if (f.shared.$f_el.attr("data-popup")) { var r = f.popups.areVisible(f); r && r.data("popup-button", f.shared.$f_el) } else if (f.shared.$f_el.attr("data-modal")) { var a = f.modals.areVisible(f); a && a.data("modal-button", f.shared.$f_el) } f.shared.$f_el = null } return !1 } } function T() { f.shared.$f_el && (f.events.disableBlur(), f.shared.$f_el.blur(), f.shared.$f_el = null), !1 !== f.events.trigger("toolbar.focusEditor") && (f.events.disableBlur(), f.$el.get(0).focus(), f.events.focus()) } function a(r) { r && r.length && (f.events.$on(r, "keydown", function(e) { if (!p(e.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command")) return !0; var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f; f.shared.with_kb = !0; var n = t.accessibility.exec(e, r); return f.shared.with_kb = !1, n }, !0), f.events.$on(r, "mouseenter", "[tabIndex]", function(e) { var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f; if (!o) return e.stopPropagation(), void e.preventDefault(); var n = p(e.currentTarget); t.shared.$f_el && t.shared.$f_el.not(n) && t.accessibility.focusEditor() }, !0), f.$tb && f.events.$on(f.$tb, "transitionend", ".fr-more-toolbar", function() { f.shared.$f_el = p(document.activeElement) })) } function A(e) { var t = e.data("popup-button"); t && setTimeout(function() { l(t), e.data("popup-button", null) }, 0) } function C(e) { var t = f.popups.areVisible(e); t && t.data("popup-button", null) } function e(e) { var t = -1 !== navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey; if (e.which !== $e.KEYCODE.F10 || t || e.shiftKey || !e.altKey) return !0; f.shared.with_kb = !0; var n = f.popups.areVisible(f), r = !1; return n && (r = h(n.children().not(".fr-buttons"))), r || c(), f.shared.with_kb = !1, e.preventDefault(), e.stopPropagation(), !1 } return { _init: function r() { f.$wp ? f.events.on("keydown", e, !0) : f.events.$on(f.$win, "keydown", e, !0), f.events.on("mousedown", function(e) { C(f), f.shared.$f_el && (f.accessibility.restoreSelection(), e.stopPropagation(), f.events.disableBlur(), f.shared.$f_el = null) }, !0), f.events.on("blur", function() { f.shared.$f_el = null, C(f) }, !0) }, registerPopup: function S(e) { var t = f.popups.get(e), n = function r(c) { var d = f.popups.get(c); return { _tiKeydown: function(e) { var t = d.data("instance") || f; if (!1 === t.events.trigger("popup.tab", [e])) return !1; var n = e.which, r = d.find(":focus").first(); if ($e.KEYCODE.TAB === n) { e.preventDefault(); var a = d.children().not(".fr-buttons"), o = a.findVisible("input, textarea, button, select").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(), i = o.indexOf(this) + (e.shiftKey ? -1 : 1); if (0 <= i && i < o.length) return t.events.disableBlur(), p(o[i]).focus(), e.stopPropagation(), !1; var s = d.find(".fr-buttons"); if (s.length && u(s, Boolean(e.shiftKey))) return e.stopPropagation(), !1; if (h(a)) return e.stopPropagation(), !1 } else { if ($e.KEYCODE.ENTER !== n || !e.target || "TEXTAREA" === e.target.tagName) return $e.KEYCODE.ESC === n ? (e.preventDefault(), e.stopPropagation(), t.accessibility.restoreSelection(), t.popups.isVisible(c) && d.findVisible(".fr-back").length ? (t.opts.toolbarInline && (t.events.disableBlur(), t.events.focus()), t.button.exec(d.findVisible(".fr-back").first()), A(d)) : t.popups.isVisible(c) && d.findVisible(".fr-dismiss").length ? t.button.exec(d.findVisible(".fr-dismiss").first()) : (t.popups.hide(c), t.opts.toolbarInline && t.toolbar.showInline(null, !0), A(d)), !1) : $e.KEYCODE.SPACE === n && (r.is(".fr-submit") || r.is(".fr-dismiss")) ? (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(r), !0) : t.keys.isBrowserAction(e) ? void e.stopPropagation() : r.is("input[type=text], textarea") ? void e.stopPropagation() : $e.KEYCODE.SPACE === n && (r.is(".fr-link-attr") || r.is("input[type=file]")) ? void e.stopPropagation() : (e.stopPropagation(), e.preventDefault(), !1); var l = null; 0 < d.findVisible(".fr-submit").length ? l = d.findVisible(".fr-submit").first() : d.findVisible(".fr-dismiss").length && (l = d.findVisible(".fr-dismiss").first()), l && (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(l)) } }, _tiMouseenter: function() { var e = d.data("instance") || f; C(e) } } }(e); a(t.find(".fr-buttons")), f.events.$on(t, "mouseenter", "tabIndex", n._tiMouseenter, !0), f.events.$on(t.children().not(".fr-buttons"), "keydown", "[tabIndex]", n._tiKeydown, !0), f.popups.onHide(e, function() { (t.data("instance") || f).accessibility.restoreSelection() }), f.popups.onShow(e, function() { o = !1, setTimeout(function() { o = !0 }, 0) }) }, registerToolbar: a, focusToolbarElement: l, focusToolbar: u, focusContent: h, focusPopup: function y(r) { var a = r.children().not(".fr-buttons"); a.data("mouseenter-event-set") || (f.events.$on(a, "mouseenter", "[tabIndex]", function(e) { var t = r.data("instance") || f; if (!o) return e.stopPropagation(), void e.preventDefault(); var n = a.find(":focus").first(); n.length && !n.is("input, button, textarea, select") && (t.events.disableBlur(), n.blur(), t.events.disableBlur(), t.events.focus()) }), a.data("mouseenter-event-set", !0)), !h(a) && f.shared.with_kb && u(r.find(".fr-buttons")) }, focusModal: function R(e) { f.core.hasFocus() || (f.events.disableBlur(), f.events.focus()), f.accessibility.saveSelection(), f.events.disableBlur(), f.el.blur(), f.selection.clear(), f.events.disableBlur(), f.shared.with_kb ? e.find(".fr-command[tabIndex], [tabIndex]").first().focus() : e.find("[tabIndex]").first().focus() }, focusEditor: T, focusPopupButton: A, focusModalButton: function L(e) { var t = e.data("modal-button"); t && setTimeout(function() { l(t), e.data("modal-button", null) }, 0) }, hasFocus: function w() { return null !== f.shared.$f_el }, exec: function _(e, t) { var n = -1 !== navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey, r = e.which, a = !1; return r !== $e.KEYCODE.TAB || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_RIGHT || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.TAB || n || !e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_LEFT || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_UP || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ARROW_DOWN || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ENTER && r !== $e.KEYCODE.SPACE || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.ESC || n || e.shiftKey || e.altKey ? r !== $e.KEYCODE.F10 || n || e.shiftKey || !e.altKey || (a = c()) : a = function o(e) { if (f.shared.$f_el) { var t = d(); return t ? (f.button.click(t), l(t)) : e.parent().findVisible(".fr-back").length ? (f.shared.with_kb = !1, f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus()), f.button.exec(e.parent().findVisible(".fr-back")).first(), A(e.parent())) : f.shared.$f_el.is("button, .fr-group span") && (e.parent().is(".fr-popup") ? (f.accessibility.restoreSelection(), f.shared.$f_el = null, !1 !== f.events.trigger("toolbar.esc") && (f.popups.hide(e.parent()), f.opts.toolbarInline && f.toolbar.showInline(null, !0), A(e.parent()))) : T()), !1 } }(t) : a = E() : a = function i() { return f.shared.$f_el && f.shared.$f_el.is(".fr-dropdown:not(.fr-active)") ? E() : b(!0) }() : a = function s() { return b() }() : a = v(t) : a = v(t, !0) : a = m(t) : a = m(t, !0), f.shared.$f_el || void 0 !== a || (a = !0), !a && f.keys.isBrowserAction(e) && (a = !0), !!a || (e.preventDefault(), e.stopPropagation(), !1) }, saveSelection: t, restoreSelection: function O() { f.$el.find(".fr-marker").length && (f.events.disableBlur(), f.selection.restore(), f.events.enableBlur()) } } }, Object.assign($e.DEFAULTS, { tooltips: !0 }), $e.MODULES.tooltip = function(o) { var i = o.$; function r() { o.helpers.isMobile() || o.$tooltip && o.$tooltip.removeClass("fr-visible").css("left", "-3000px").css("position", "fixed") } function a(e, t) { if (!o.helpers.isMobile() && (e.data("title") || e.data("title", e.attr("title")), e.data("title"))) { o.$tooltip || function a() { o.opts.tooltips && !o.helpers.isMobile() && (o.shared.$tooltip ? o.$tooltip = o.shared.$tooltip : (o.shared.$tooltip = i(o.doc.createElement("DIV")).addClass("fr-tooltip"), o.$tooltip = o.shared.$tooltip, o.opts.theme && o.$tooltip.addClass("".concat(o.opts.theme, "-theme")), i(o.o_doc).find("body").first().append(o.$tooltip)), o.events.on("shared.destroy", function() { o.$tooltip.html("").removeData().remove(), o.$tooltip = null }, !0)) }(), e.removeAttr("title"), o.$tooltip.text(o.language.translate(e.data("title"))), o.$tooltip.addClass("fr-visible"); var n = e.offset().left + (e.outerWidth() - o.$tooltip.outerWidth()) / 2; n < 0 && (n = 0), n + o.$tooltip.outerWidth() > i(o.o_win).width() && (n = i(o.o_win).width() - o.$tooltip.outerWidth()), void 0 === t && (t = o.opts.toolbarBottom), e.offset().top - i(window).scrollTop() + e.outerHeight() + 10 >= i(window).height() && (t = !0); var r = t ? e.offset().top - o.$tooltip.height() : e.offset().top + e.outerHeight(); o.$tooltip.css("position", ""), o.$tooltip.css("left", n), o.$tooltip.css("top", Math.ceil(r)), "static" !== i(o.o_doc).find("body").first().css("position") ? (o.$tooltip.css("margin-left", -i(o.o_doc).find("body").first().offset().left), o.$tooltip.css("margin-top", -i(o.o_doc).find("body").first().offset().top)) : (o.$tooltip.css("margin-left", ""), o.$tooltip.css("margin-top", "")) } } return { hide: r, to: a, bind: function s(e, t, n) { o.opts.tooltips && !o.helpers.isMobile() && (o.events.$on(e, "mouseover", t, function(e) { o.node.hasClass(e.currentTarget, "fr-disabled") || o.edit.isDisabled() || a(i(e.currentTarget), n) }, !0), o.events.$on(e, "mouseout ".concat(o._mousedown, " ").concat(o._mouseup), t, function() { r() }, !0)) } } }, $e.TOOLBAR_VISIBLE_BUTTONS = 3, $e.MODULES.button = function(g) { var h = g.$, i = []; (g.opts.toolbarInline || g.opts.toolbarContainer) && (g.shared.buttons || (g.shared.buttons = []), i = g.shared.buttons); var s = []; function l(e, t, n) { for (var r = h(), a = 0; a < e.length; a++) { var o = h(e[a]); if (o.is(t) && (r = r.add(o)), n && o.is(".fr-dropdown")) { var i = o.next().find(t); r = r.add(i) } } return r } function m(e, t) { var n, r = h(); if (!e) return r; for (n in r = (r = r.add(l(i, e, t))).add(l(s, e, t)), g.shared.popups) if (Object.prototype.hasOwnProperty.call(g.shared.popups, n)) { var a = g.shared.popups[n].children().find(e); r = r.add(a) } for (n in g.shared.modals) if (Object.prototype.hasOwnProperty.call(g.shared.modals, n)) { var o = g.shared.modals[n].$modal.find(e); r = r.add(o) } return r } function a(e) { var t = e.next(), n = g.node.hasClass(e.get(0), "fr-active"), r = m(".fr-dropdown.fr-active").not(e), a = e.parents(".fr-toolbar, .fr-popup").data("instance") || g; a.helpers.isIOS() && !a.el.querySelector(".fr-marker") && (a.selection.save(), a.selection.clear(), a.selection.restore()), t.parents(".fr-more-toolbar").addClass("fr-overflow-visible"); var o = 0, i = 0, s = t.find("> .fr-dropdown-wrapper"); if (!n) { var l = e.data("cmd"); t.find(".fr-command").removeClass("fr-active").attr("aria-selected", !1), $e.COMMANDS[l] && $e.COMMANDS[l].refreshOnShow && $e.COMMANDS[l].refreshOnShow.apply(a, [e, t]), t.css("left", e.offset().left - e.parents(".fr-btn-wrap, .fr-toolbar, .fr-buttons").offset().left - ("rtl" === g.opts.direction ? t.width() - e.outerWidth() : 0)), t.addClass("test-height"), o = t.outerHeight(), i = g.helpers.getPX(s.css("max-height")), t.removeClass("test-height"), t.css("top", "").css("bottom", ""); var c = e.outerHeight() / 10; if (!g.opts.toolbarBottom && t.offset().top + e.outerHeight() + o < h(g.o_doc).height()) t.css("top", e.position().top + e.outerHeight() - c); else { var d = 0, f = e.parents(".fr-more-toolbar"); 0 < f.length && (d = f.first().height()), t.css("bottom", e.parents(".fr-popup, .fr-toolbar").first().height() - d - e.position().top) } }(e.addClass("fr-blink").toggleClass("fr-active"), e.hasClass("fr-options")) && e.prev().toggleClass("fr-expanded"); e.hasClass("fr-active") ? (t.attr("aria-hidden", !1), e.attr("aria-expanded", !0), function u(e, t, n) { n <= t && e.parent().css("overflow", "auto"), e.css("height", Math.min(t, n)) }(s, o, i)) : (t.attr("aria-hidden", !0).css("overflow", ""), e.attr("aria-expanded", !1), s.css("height", "")), setTimeout(function() { e.removeClass("fr-blink") }, 300), t.css("margin-left", ""), t.offset().left + t.outerWidth() > g.$sc.offset().left + g.$sc.width() && t.css("margin-left", -(t.offset().left + t.outerWidth() - g.$sc.offset().left - g.$sc.width())), t.offset().left < g.$sc.offset().left && "rtl" === g.opts.direction && t.css("margin-left", g.$sc.offset().left), r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), r.prev(".fr-expanded").removeClass("fr-expanded"), r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", ""), 0 !== e.parents(".fr-popup").length || g.opts.toolbarInline || (g.node.hasClass(e.get(0), "fr-active") ? g.$tb.css("zIndex", (g.opts.zIndex || 1) + 4) : g.$tb.css("zIndex", "")); var p = t.find("a.fr-command.fr-active").first(); g.helpers.isMobile() || (p.length ? (g.accessibility.focusToolbarElement(p), s.scrollTop(Math.abs(p.parents(".fr-dropdown-content").offset().top - p.offset().top) - p.offset().top)) : (g.accessibility.focusToolbarElement(e), s.scrollTop(0))) } function o(e) { e.addClass("fr-blink"), setTimeout(function() { e.removeClass("fr-blink") }, 500); for (var t = e.data("cmd"), n = []; void 0 !== e.data("param".concat(n.length + 1));) n.push(e.data("param".concat(n.length + 1))); var r = m(".fr-dropdown.fr-active"); r.length && (r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), r.prev(".fr-expanded").removeClass("fr-expanded"), r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", "")), e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t, n) } function t(e) { var t = e.parents(".fr-popup, .fr-toolbar").data("instance"); if (0 === e.parents(".fr-popup").length && e.data("popup") && !e.hasClass("fr-btn-active-popup") && e.addClass("fr-btn-active-popup"), 0 !== e.parents(".fr-popup").length || e.data("popup") || t.popups.hideAll(), t.popups.areVisible() && !t.popups.areVisible(t)) { for (var n = 0; n < $e.INSTANCES.length; n++) $e.INSTANCES[n] !== t && $e.INSTANCES[n].popups && $e.INSTANCES[n].popups.areVisible() && $e.INSTANCES[n].$el.find(".fr-marker").remove(); t.popups.hideAll() } g.node.hasClass(e.get(0), "fr-dropdown") ? a(e) : (! function r(e) { o(e) }(e), $e.COMMANDS[e.data("cmd")] && !1 !== $e.COMMANDS[e.data("cmd")].refreshAfterCallback && t.button.bulkRefresh()) } function c(e) { t(h(e.currentTarget)) } function d(e) { var t = e.find(".fr-dropdown.fr-active"); t.length && (t.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0).css("overflow", "").find("> .fr-dropdown-wrapper").css("height", ""), t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex", ""), t.prev().removeClass("fr-expanded")) } function f(e) { e.preventDefault(), e.stopPropagation() } function p(e) { if (e.stopPropagation(), !g.helpers.isMobile()) return !1 } function v(e) { var t = 1 < arguments.length && arguments[1] !== undefined ? arguments[1] : {}, n = 2 < arguments.length ? arguments[2] : undefined; if (g.helpers.isMobile() && !1 === t.showOnMobile) return ""; var r = t.displaySelection; "function" == typeof r && (r = r(g)); var a = ""; if ("options" !== t.type) if (r) { var o = "function" == typeof t.defaultSelection ? t.defaultSelection(g) : t.defaultSelection; a = '').concat(g.language.translate(o || t.title), "") } else a = g.icon.create(t.icon || e), a += ''.concat(g.language.translate(t.title) || "", ""); var i = t.popup ? ' data-popup="true"' : "", s = t.modal ? ' data-modal="true"' : "", l = g.shortcuts.get("".concat(e, ".")); l = l ? " (".concat(l, ")") : ""; var c = "".concat(e, "-").concat(g.id), d = "dropdown-menu-".concat(c), f = '"); if ("dropdown" === t.type || "options" === t.type) { var p = '" } return t.hasOptions && t.hasOptions.apply(g) && (f = '
    '.concat(f, " ").concat(v(e + "Options", Object.assign({}, t, { type: "options", hasOptions: !1 }), n), "
    ")), f } function e(a) { var o = g.$tb && g.$tb.data("instance") || g; if (!1 === g.events.trigger("buttons.refresh")) return !0; setTimeout(function() { for (var e = o.selection.inEditor() && o.core.hasFocus(), t = 0; t < a.length; t++) { var n = h(a[t]), r = n.data("cmd"); 0 === n.parents(".fr-popup").length ? e || $e.COMMANDS[r] && $e.COMMANDS[r].forcedRefresh ? o.button.refresh(n) : g.node.hasClass(n.get(0), "fr-dropdown") || (n.removeClass("fr-active"), n.attr("aria-pressed") && n.attr("aria-pressed", !1)) : n.parents(".fr-popup").isVisible() && o.button.refresh(n) } }, 0) } function n() { e(i), e(s) } function r() { i = [], s = [] } g.shared.popup_buttons || (g.shared.popup_buttons = []), s = g.shared.popup_buttons; var u = null; function b() { clearTimeout(u), u = setTimeout(n, 50) } return { _init: function E() { g.opts.toolbarInline ? g.events.on("toolbar.show", n) : (g.events.on("mouseup", b), g.events.on("keyup", b), g.events.on("blur", b), g.events.on("focus", b), g.events.on("contentChanged", b), g.helpers.isMobile() && g.events.$on(g.$doc, "selectionchange", n)), g.events.on("shared.destroy", r) }, build: v, buildList: function T(e, t) { for (var n = "", r = 0; r < e.length; r++) { var a = e[r], o = $e.COMMANDS[a]; o && "undefined" != typeof o.plugin && g.opts.pluginsEnabled.indexOf(o.plugin) < 0 || (o ? n += v(a, o, void 0 === t || 0 <= t.indexOf(a)) : "|" === a ? n += '' : "-" === a && (n += '')) } return n }, buildGroup: function A(e) { var t = "", n = ""; for (var r in e) { var a = e[r]; if (a.buttons) { for (var o = "", i = "", s = 0, l = "left", c = $e.TOOLBAR_VISIBLE_BUTTONS, d = 0; d < a.buttons.length; d++) { var f = a.buttons[d], p = $e.COMMANDS[f]; !p || p && "undefined" != typeof p.plugin && g.opts.pluginsEnabled.indexOf(p.plugin) < 0 || (e[r].align !== undefined && (l = e[r].align), e[r].buttonsVisible !== undefined && (c = e[r].buttonsVisible), e.showMoreButtons && c <= s ? i += v(f, p, !0) : o += v(f, p, !0), s++) } if (e.showMoreButtons && c < s) { var u = r, h = $e.COMMANDS[u]; h.more_btn = !0, o += v(u, h, !0) } t += '
    ').concat(o, "
    "), e.showMoreButtons && 0 < i.length && (n += '
    ').concat(i, "
    ")) } } return g.opts.toolbarBottom ? "".concat(n, '
    ').concat(t) : "".concat(t, '
    ').concat(n) }, bindCommands: function C(t, e) { g.events.bindClick(t, ".fr-command:not(.fr-disabled)", c), g.events.$on(t, "".concat(g._mousedown, " ").concat(g._mouseup, " ").concat(g._move), ".fr-dropdown-menu", f, !0), g.events.$on(t, "".concat(g._mousedown, " ").concat(g._mouseup, " ").concat(g._move), ".fr-dropdown-menu .fr-dropdown-wrapper", p, !0); var n = t.get(0).ownerDocument, r = "defaultView" in n ? n.defaultView : n.parentWindow; function a(e) { (!e || e.type === g._mouseup && e.target !== h("html").get(0) || "keydown" === e.type && (g.keys.isCharacter(e.which) && !g.keys.ctrlKey(e) || e.which === $e.KEYCODE.ESC)) && d(t) } g.events.$on(h(r), "".concat(g._mouseup, " resize keydown"), a, !0), g.opts.iframe && g.events.$on(g.$win, g._mouseup, a, !0), g.node.hasClass(t.get(0), "fr-popup") ? h.merge(s, t.find(".fr-btn").toArray()) : h.merge(i, t.find(".fr-btn").toArray()), g.tooltip.bind(t, ".fr-btn, .fr-title", e) }, refresh: function S(e) { var t, n = e.parents(".fr-popup, .fr-toolbar").data("instance") || g, r = e.data("cmd"); g.node.hasClass(e.get(0), "fr-dropdown") ? t = e.next() : (e.removeClass("fr-active"), e.attr("aria-pressed") && e.attr("aria-pressed", !1)), $e.COMMANDS[r] && $e.COMMANDS[r].refresh ? $e.COMMANDS[r].refresh.apply(n, [e, t]) : g.refresh[r] && n.refresh[r](e, t) }, bulkRefresh: n, exec: o, click: t, hideActiveDropdowns: d, addButtons: function y(e) { for (var t = 0; t < e.length; t++) i.push(e) }, getButtons: m, getPosition: function R(e) { var t = e.offset().left, n = g.opts.toolbarBottom ? 10 : e.outerHeight() - 10; return { left: t, top: e.offset().top + n } } } }, $e.ICON_TEMPLATES = { font_awesome: '', font_awesome_5: '', font_awesome_5r: '', font_awesome_5l: '', font_awesome_5b: '', text: '[NAME]', image: "[ALT]", svg: '', empty: " " }, $e.ICONS = { bold: { NAME: "bold", SVG_KEY: "bold" }, italic: { NAME: "italic", SVG_KEY: "italic" }, underline: { NAME: "underline", SVG_KEY: "underline" }, strikeThrough: { NAME: "strikethrough", SVG_KEY: "strikeThrough" }, subscript: { NAME: "subscript", SVG_KEY: "subscript" }, superscript: { NAME: "superscript", SVG_KEY: "superscript" }, color: { NAME: "tint", SVG_KEY: "textColor" }, outdent: { NAME: "outdent", SVG_KEY: "outdent" }, indent: { NAME: "indent", SVG_KEY: "indent" }, undo: { NAME: "rotate-left", FA5NAME: "undo", SVG_KEY: "undo" }, redo: { NAME: "rotate-right", FA5NAME: "redo", SVG_KEY: "redo" }, insertHR: { NAME: "minus", SVG_KEY: "horizontalLine" }, clearFormatting: { NAME: "eraser", SVG_KEY: "clearFormatting" }, selectAll: { NAME: "mouse-pointer", SVG_KEY: "selectAll" }, moreText: { NAME: "ellipsis-v", SVG_KEY: "textMore" }, moreParagraph: { NAME: "ellipsis-v", SVG_KEY: "paragraphMore" }, moreRich: { NAME: "ellipsis-v", SVG_KEY: "insertMore" }, moreMisc: { NAME: "ellipsis-v", SVG_KEY: "more" } }, $e.DefineIconTemplate = function(e, t) { $e.ICON_TEMPLATES[e] = t }, $e.DefineIcon = function(e, t) { $e.ICONS[e] = t }, Object.assign($e.DEFAULTS, { iconsTemplate: "svg" }), $e.MODULES.icon = function(a) { return { create: function o(n) { var e = null, r = $e.ICONS[n]; if (void 0 !== r) { var t = r.template || $e.ICON_DEFAULT_TEMPLATE || a.opts.iconsTemplate; t && t.apply && (t = t.apply(a)), r.FA5NAME || (r.FA5NAME = r.NAME), "svg" !== t || r.PATH || (r.PATH = $e.SVG[r.SVG_KEY] || ""), t && (t = $e.ICON_TEMPLATES[t]) && (e = t.replace(/\[([a-zA-Z0-9]*)\]/g, function(e, t) { return "NAME" === t ? r[t] || n : r[t] })) } return e || n }, getTemplate: function r(e) { var t = $e.ICONS[e], n = a.opts.iconsTemplate; return void 0 !== t ? n = t.template || $e.ICON_DEFAULT_TEMPLATE || a.opts.iconsTemplate : n } } }, $e.SVG = { add: "M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z", advancedImageEditor: "M3,17v2h6v-2H3z M3,5v2h10V5H3z M13,21v-2h8v-2h-8v-2h-2v6H13z M7,9v2H3v2h4v2h2V9H7z M21,13v-2H11v2H21z M15,9h2V7h4V5h-4 V3h-2V9z", alignCenter: "M9,18h6v-2H9V18z M6,11v2h12v-2H6z M3,6v2h18V6H3z", alignJustify: "M3,18h18v-2H3V18z M3,11v2h18v-2H3z M3,6v2h18V6H3z", alignLeft: "M3,18h6v-2H3V18z M3,11v2h12v-2H3z M3,6v2h18V6H3z", alignRight: "M15,18h6v-2h-6V18z M9,11v2h12v-2H9z M3,6v2h18V6H3z", anchors: "M16,4h-4H8C6.9,4,6,4.9,6,6v4v10l6-2.6l6,2.6V10V6C18,4.9,17.1,4,16,4z M16,17l-4-1.8L8,17v-7V6h4h4v4V17z", back: "M20 11L7.83 11 11.425 7.405 10.01 5.991 5.416 10.586 5.414 10.584 4 11.998 4.002 12 4 12.002 5.414 13.416 5.416 13.414 10.01 18.009 11.425 16.595 7.83 13 20 13 20 13 20 11 20 11Z", backgroundColor: "M9.91752,12.24082l7.74791-5.39017,1.17942,1.29591-6.094,7.20747L9.91752,12.24082M7.58741,12.652l4.53533,4.98327a.93412.93412,0,0,0,1.39531-.0909L20.96943,8.7314A.90827.90827,0,0,0,20.99075,7.533l-2.513-2.76116a.90827.90827,0,0,0-1.19509-.09132L7.809,11.27135A.93412.93412,0,0,0,7.58741,12.652ZM2.7939,18.52772,8.41126,19.5l1.47913-1.34617-3.02889-3.328Z", blockquote: "M10.31788,5l.93817,1.3226A12.88271,12.88271,0,0,0,8.1653,9.40125a5.54242,5.54242,0,0,0-.998,3.07866v.33733q.36089-.04773.66067-.084a4.75723,4.75723,0,0,1,.56519-.03691,2.87044,2.87044,0,0,1,2.11693.8427,2.8416,2.8416,0,0,1,.8427,2.09274,3.37183,3.37183,0,0,1-.8898,2.453A3.143,3.143,0,0,1,8.10547,19,3.40532,3.40532,0,0,1,5.375,17.7245,4.91156,4.91156,0,0,1,4.30442,14.453,9.3672,9.3672,0,0,1,5.82051,9.32933,14.75716,14.75716,0,0,1,10.31788,5Zm8.39243,0,.9369,1.3226a12.88289,12.88289,0,0,0-3.09075,3.07865,5.54241,5.54241,0,0,0-.998,3.07866v.33733q.33606-.04773.63775-.084a4.91773,4.91773,0,0,1,.58938-.03691,2.8043,2.8043,0,0,1,2.1042.83,2.89952,2.89952,0,0,1,.80578,2.10547,3.42336,3.42336,0,0,1-.86561,2.453A3.06291,3.06291,0,0,1,16.49664,19,3.47924,3.47924,0,0,1,13.742,17.7245,4.846,4.846,0,0,1,12.64721,14.453,9.25867,9.25867,0,0,1,14.17476,9.3898,15.26076,15.26076,0,0,1,18.71031,5Z", bold: "M15.25,11.8h0A3.68,3.68,0,0,0,17,9a3.93,3.93,0,0,0-3.86-4H6.65V19h7a3.74,3.74,0,0,0,3.7-3.78V15.1A3.64,3.64,0,0,0,15.25,11.8ZM8.65,7h4.2a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61,2.23,2.23,0,0,1-.63.09H8.65Zm4.6,10H8.65V13h4.6a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61A2.23,2.23,0,0,1,13.25,17Z", cellBackground: "M16.6,12.4L7.6,3.5L6.2,4.9l2.4,2.4l-5.2,5.2c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4 l5.5-5.5C17.2,14,17.2,13,16.6,12.4z M5.2,13.5L10,8.7l4.8,4.8H5.2z M19,15c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2 C21,17.2,19,15,19,15z", cellBorderColor: "M22,22H2v2h20V22z", cellOptions: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M9.5,6.5h5V9h-5V6.5z M8,17.5H4 c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4 c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0V9z", cellStyle: "M20,19.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L12.3,17h3.8l1.7-3.5l1.4,3.5H23L20,19.9z M20,5H4C2.9,5,2,5.9,2,7v10 c0,1.1,0.9,2,2,2h7.5l-0.6-0.6L10,17.5H9.5V15h5.4l1.1-2.3v-2.2h4.5v3H20l0.6,1.5H22V7C22,5.9,21.1,5,20,5z M3.5,7 c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0.1,0h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M4,17.5c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0-0.1v-2H8v2.5H4 z M14.5,9h-5V6.5h5V9z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0.1V9z", clearFormatting: "M11.48,10.09l-1.2-1.21L8.8,7.41,6.43,5,5.37,6.1,8.25,9,4.66,19h2l1.43-4h5.14l1.43,4h2l-.89-2.51L18.27,19l1.07-1.06L14.59,13.2ZM8.8,13l.92-2.56L12.27,13Zm.56-7.15L9.66,5h2l1.75,4.9Z", close: "M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z", codeView: "M9.4,16.6,4.8,12,9.4,7.4,8,6,2,12l6,6Zm5.2,0L19.2,12,14.6,7.4,16,6l6,6-6,6Z", cogs: "M18.877 12.907a6.459 6.459 0 0 0 0 -1.814l1.952 -1.526a0.468 0.468 0 0 0 0.111 -0.593l-1.851 -3.2a0.461 0.461 0 0 0 -0.407 -0.231 0.421 0.421 0 0 0 -0.157 0.028l-2.3 0.925a6.755 6.755 0 0 0 -1.563 -0.907l-0.352 -2.452a0.451 0.451 0 0 0 -0.453 -0.388h-3.7a0.451 0.451 0 0 0 -0.454 0.388L9.347 5.588A7.077 7.077 0 0 0 7.783 6.5l-2.3 -0.925a0.508 0.508 0 0 0 -0.166 -0.028 0.457 0.457 0 0 0 -0.4 0.231l-1.851 3.2a0.457 0.457 0 0 0 0.111 0.593l1.952 1.526A7.348 7.348 0 0 0 5.063 12a7.348 7.348 0 0 0 0.064 0.907L3.175 14.433a0.468 0.468 0 0 0 -0.111 0.593l1.851 3.2a0.461 0.461 0 0 0 0.407 0.231 0.421 0.421 0 0 0 0.157 -0.028l2.3 -0.925a6.74 6.74 0 0 0 1.564 0.907L9.7 20.864a0.451 0.451 0 0 0 0.454 0.388h3.7a0.451 0.451 0 0 0 0.453 -0.388l0.352 -2.452a7.093 7.093 0 0 0 1.563 -0.907l2.3 0.925a0.513 0.513 0 0 0 0.167 0.028 0.457 0.457 0 0 0 0.4 -0.231l1.851 -3.2a0.468 0.468 0 0 0 -0.111 -0.593Zm-0.09 2.029l-0.854 1.476 -2.117 -0.852 -0.673 0.508a5.426 5.426 0 0 1 -1.164 0.679l-0.795 0.323 -0.33 2.269h-1.7l-0.32 -2.269 -0.793 -0.322a5.3 5.3 0 0 1 -1.147 -0.662L8.2 15.56l-2.133 0.86 -0.854 -1.475 1.806 -1.411 -0.1 -0.847c-0.028 -0.292 -0.046 -0.5 -0.046 -0.687s0.018 -0.4 0.045 -0.672l0.106 -0.854L5.217 9.064l0.854 -1.475 2.117 0.851 0.673 -0.508a5.426 5.426 0 0 1 1.164 -0.679l0.8 -0.323 0.331 -2.269h1.7l0.321 2.269 0.792 0.322a5.3 5.3 0 0 1 1.148 0.661l0.684 0.526 2.133 -0.859 0.853 1.473 -1.8 1.421 0.1 0.847a5 5 0 0 1 0.046 0.679c0 0.193 -0.018 0.4 -0.045 0.672l-0.106 0.853ZM12 14.544A2.544 2.544 0 1 1 14.546 12 2.552 2.552 0 0 1 12 14.544Z", columns: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4 c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M20.5,17 c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0 V9z", editLink: "M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z", exitFullscreen: "M5,16H8v3h2V14H5ZM8,8H5v2h5V5H8Zm6,11h2V16h3V14H14ZM16,8V5H14v5h5V8Z", fontAwesome: "M18.99018,13.98212V7.52679c-.08038-1.21875-1.33929-.683-1.33929-.683-2.933,1.39282-4.36274.61938-5.85938.15625a6.23272,6.23272,0,0,0-2.79376-.20062l-.00946.004A1.98777,1.98777,0,0,0,7.62189,5.106a.984.984,0,0,0-.17517-.05432c-.02447-.0055-.04882-.01032-.0736-.0149A.9565.9565,0,0,0,7.1908,5H6.82539a.9565.9565,0,0,0-.18232.0368c-.02472.00458-.04907.0094-.07348.01484a.985.985,0,0,0-.17523.05438,1.98585,1.98585,0,0,0-.573,3.49585v9.394A1.004,1.004,0,0,0,6.82539,19H7.1908a1.00406,1.00406,0,0,0,1.00409-1.00409V15.52234c3.64221-1.09827,5.19709.64282,7.09888.57587a5.57291,5.57291,0,0,0,3.25446-1.05805A1.2458,1.2458,0,0,0,18.99018,13.98212Z", fontFamily: "M16,19h2L13,5H11L6,19H8l1.43-4h5.14Zm-5.86-6L12,7.8,13.86,13Z", fontSize: "M20.75,19h1.5l-3-10h-1.5l-3,10h1.5L17,16.5h3Zm-3.3-4,1.05-3.5L19.55,15Zm-5.7,4h2l-5-14h-2l-5,14h2l1.43-4h5.14ZM5.89,13,7.75,7.8,9.61,13Z", fullscreen: "M7,14H5v5h5V17H7ZM5,10H7V7h3V5H5Zm12,7H14v2h5V14H17ZM14,5V7h3v3h2V5Z", help: "M11,17h2v2h-2V17z M12,5C9.8,5,8,6.8,8,9h2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,2-3,1.7-3,5v1h2v-1c0-2.2,3-2.5,3-5 C16,6.8,14.2,5,12,5z", horizontalLine: "M5,12h14 M19,11H5v2h14V11z", imageAltText: "M19,7h-6v12h-2V7H5V5h6h2h6V7z", imageCaption: "M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z M22,22H2v2h20V22z", imageClass: "M9.5,13.4l-2.9-2.9h3.8L12.2,7l1.4,3.5h3.8l-3,2.9l0.9,3.6L12,15.1L8.8,17L9.5,13.4z M22,6v12c0,1.1-0.9,2-2,2H4 c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,6H4v12h16V8.8V6z", imageDisplay: "M3,5h18v2H3V5z M13,9h8v2h-8V9z M13,13h8v2h-8V13z M3,17h18v2H3V17z M3,9h8v6H3V9z", imageManager: "M20,6h-7l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V6h6.2l2,2H20V18z M18,16l-3.8-5H14l-2.9,3.8L9,12.1L6,16H18z M10,9.5C10,8.7,9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11S10,10.3,10,9.5z", imageSize: "M16.9,4c-0.3,0-0.5,0.2-0.8,0.3L3.3,13c-0.9,0.6-1.1,1.9-0.5,2.8l2.2,3.3c0.4,0.7,1.2,1,2,0.8c0.3,0,0.5-0.2,0.8-0.3 L20.7,11c0.9-0.6,1.1-1.9,0.5-2.8l-2.2-3.3C18.5,4.2,17.7,3.9,16.9,4L16.9,4z M16.9,9.9L18.1,9l-2-2.9L17,5.6c0.1,0,0.1-0.1,0.2-0.1 c0.2,0,0.4,0,0.5,0.2L19.9,9c0.2,0.2,0.1,0.5-0.1,0.7L7,18.4c-0.1,0-0.1,0.1-0.2,0.1c-0.2,0-0.4,0-0.5-0.2L4.1,15 c-0.2-0.2-0.1-0.5,0.1-0.7L5,13.7l2,2.9l1.2-0.8l-2-2.9L7.5,12l1.1,1.7l1.2-0.8l-1.1-1.7l1.2-0.8l2,2.9l1.2-0.8l-2-2.9l1.2-0.8 l1.1,1.7l1.2-0.8l-1.1-1.7L14.9,7L16.9,9.9z", indent: "M3,9v6l3-3L3,9z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z", inlineClass: "M9.9,13.313A1.2,1.2,0,0,1,9.968,13H6.277l1.86-5.2,1.841,5.148A1.291,1.291,0,0,1,11.212,12h.426l-2.5-7h-2l-5,14h2l1.43-4H9.9Zm2.651,6.727a2.884,2.884,0,0,1-.655-2.018v-2.71A1.309,1.309,0,0,1,13.208,14h3.113a3.039,3.039,0,0,1,2,1.092s1.728,1.818,2.964,2.928a1.383,1.383,0,0,1,.318,1.931,1.44,1.44,0,0,1-.19.215l-3.347,3.31a1.309,1.309,0,0,1-1.832.258h0a1.282,1.282,0,0,1-.258-.257l-1.71-1.728Zm2.48-3.96a.773.773,0,1,0,.008,0Z", inlineStyle: "M11.88,15h.7l.7-1.7-3-8.3h-2l-5,14h2l1.4-4Zm-4.4-2,1.9-5.2,1.9,5.2ZM15.4,21.545l3.246,1.949-.909-3.637L20.72,17H16.954l-1.429-3.506L13.837,17H10.071l2.857,2.857-.779,3.637Z", insertEmbed: "M20.73889,15.45929a3.4768,3.4768,0,0,0-5.45965-.28662L9.5661,12.50861a3.49811,3.49811,0,0,0-.00873-1.01331l5.72174-2.66809a3.55783,3.55783,0,1,0-.84527-1.81262L8.70966,9.6839a3.50851,3.50851,0,1,0,.0111,4.63727l5.7132,2.66412a3.49763,3.49763,0,1,0,6.30493-1.526ZM18.00745,5.01056A1.49993,1.49993,0,1,1,16.39551,6.3894,1.49994,1.49994,0,0,1,18.00745,5.01056ZM5.99237,13.49536a1.49989,1.49989,0,1,1,1.61194-1.37878A1.49982,1.49982,0,0,1,5.99237,13.49536Zm11.78211,5.494a1.49993,1.49993,0,1,1,1.61193-1.37885A1.49987,1.49987,0,0,1,17.77448,18.98932Z", insertFile: "M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z", insertImage: "M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z", insertLink: "M11,17H7A5,5,0,0,1,7,7h4V9H7a3,3,0,0,0,0,6h4ZM17,7H13V9h4a3,3,0,0,1,0,6H13v2h4A5,5,0,0,0,17,7Zm-1,4H8v2h8Z", insertMore: "M16.5,13h-6v6h-2V13h-6V11h6V5h2v6h6Zm5,4.5A1.5,1.5,0,1,1,20,16,1.5,1.5,0,0,1,21.5,17.5Zm0-4A1.5,1.5,0,1,1,20,12,1.5,1.5,0,0,1,21.5,13.5Zm0-4A1.5,1.5,0,1,1,20,8,1.5,1.5,0,0,1,21.5,9.5Z", insertTable: "M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M9.5,13.5v-3 h5v3H9.5z M14.5,15v2.5h-5V15H14.5z M9.5,9V6.5h5V9H9.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M3.5,17 v-2H8v2.5H4C3.7,17.5,3.5,17.3,3.5,17z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M16,9V6.5h4 c0.3,0,0.5,0.2,0.5,0.5v2H16z", insertVideo: "M15,8v8H5V8H15m2,2.5V7a1,1,0,0,0-1-1H4A1,1,0,0,0,3,7V17a1,1,0,0,0,1,1H16a1,1,0,0,0,1-1V13.5l2.29,2.29A1,1,0,0,0,21,15.08V8.91a1,1,0,0,0-1.71-.71Z", upload: "M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z", italic: "M11.76,9h2l-2.2,10h-2Zm1.68-4a1,1,0,1,0,1,1,1,1,0,0,0-1-1Z", search: "M15.5 14h-0.79l-0.28 -0.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09 -0.59 4.23 -1.57l0.27 0.28v0.79l5 4.99L20.49 19l-4.99 -5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z", lineHeight: "M6.25,7h2.5L5.25,3.5,1.75,7h2.5V17H1.75l3.5,3.5L8.75,17H6.25Zm4-2V7h12V5Zm0,14h12V17h-12Zm0-6h12V11h-12Z", linkStyles: "M19,17.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L11.3,15h3.8l1.7-3.5l1.4,3.5H22L19,17.9z M20,12c0,0.3-0.1,0.7-0.2,1h2.1 c0.1-0.3,0.1-0.6,0.1-1c0-2.8-2.2-5-5-5h-4v2h4C18.7,9,20,10.3,20,12z M14.8,11H8v2h3.3h2.5L14.8,11z M9.9,16.4L8.5,15H7 c-1.7,0-3-1.3-3-3s1.3-3,3-3h4V7H7c-2.8,0-5,2.2-5,5s2.2,5,5,5h3.5L9.9,16.4z", mention: "M12.4,5c-4.1,0-7.5,3.4-7.5,7.5S8.3,20,12.4,20h3.8v-1.5h-3.8c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6v1.1 c0,0.6-0.5,1.2-1.1,1.2s-1.1-0.6-1.1-1.2v-1.1c0-2.1-1.7-3.8-3.8-3.8s-3.7,1.7-3.7,3.8s1.7,3.8,3.8,3.8c1,0,2-0.4,2.7-1.1 c0.5,0.7,1.3,1.1,2.2,1.1c1.5,0,2.6-1.2,2.6-2.7v-1.1C19.9,8.4,16.6,5,12.4,5z M12.4,14.7c-1.2,0-2.3-1-2.3-2.2s1-2.3,2.3-2.3 s2.3,1,2.3,2.3S13.6,14.7,12.4,14.7z", more: "M13.5,17c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,16.2,13.5,17z M13.5,12c0,0.8-0.7,1.5-1.5,1.5 s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,11.2,13.5,12z M13.5,7c0,0.8-0.7,1.5-1.5,1.5S10.5,7.8,10.5,7s0.7-1.5,1.5-1.5 S13.5,6.2,13.5,7z", openLink: "M17,17H7V7h3V5H7C6,5,5,6,5,7v10c0,1,1,2,2,2h10c1,0,2-1,2-2v-3h-2V17z M14,5v2h1.6l-5.8,5.8l1.4,1.4L17,8.4V10h2V5H14z", orderedList: "M2.5,16h2v.5h-1v1h1V18h-2v1h3V15h-3Zm1-7h1V5h-2V6h1Zm-1,2H4.3L2.5,13.1V14h3V13H3.7l1.8-2.1V10h-3Zm5-5V8h14V6Zm0,12h14V16H7.5Zm0-5h14V11H7.5Z", outdent: "M3,12l3,3V9L3,12z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z", pageBreaker: "M3,9v6l3-3L3,9z M21,9H8V4h2v3h9V4h2V9z M21,20h-2v-3h-9v3H8v-5h13V20z M11,13H8v-2h3V13z M16,13h-3v-2h3V13z M21,13h-3v-2 h3V13z", paragraphFormat: "M10.15,5A4.11,4.11,0,0,0,6.08,8.18,4,4,0,0,0,10,13v6h2V7h2V19h2V7h2V5ZM8,9a2,2,0,0,1,2-2v4A2,2,0,0,1,8,9Z", paragraphMore: "M7.682,5a4.11,4.11,0,0,0-4.07,3.18,4,4,0,0,0,3.11,4.725h0l.027.005a3.766,3.766,0,0,0,.82.09v6h2V7h2V19h2V7h2V5ZM5.532,9a2,2,0,0,1,2-2v4A2,2,0,0,1,5.532,9Zm14.94,8.491a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,17.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,13.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,9.491Z", paragraphStyle: "M4,9c0-1.1,0.9-2,2-2v4C4.9,11,4,10.1,4,9z M16.7,20.5l3.2,1.9L19,18.8l3-2.9h-3.7l-1.4-3.5L15.3,16h-3.8l2.9,2.9l-0.9,3.6 L16.7,20.5z M10,17.4V19h1.6L10,17.4z M6.1,5c-1.9,0-3.6,1.3-4,3.2c-0.5,2.1,0.8,4.2,2.9,4.7c0,0,0,0,0,0h0.2C5.5,13,5.8,13,6,13v6 h2V7h2v7h2V7h2V5H6.1z", pdfExport: "M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z M16.3,13.5 c-0.2-0.6-1.1-0.8-2.6-0.8c-0.1,0-0.1,0-0.2,0c-0.3-0.3-0.8-0.9-1-1.2c-0.2-0.2-0.3-0.3-0.4-0.6c0.2-0.7,0.2-1,0.3-1.5 c0.1-0.9,0-1.6-0.2-1.8c-0.4-0.2-0.7-0.2-0.9-0.2c-0.1,0-0.3,0.2-0.7,0.7c-0.2,0.7-0.1,1.8,0.6,2.8c-0.2,0.8-0.7,1.6-1,2.4 c-0.8,0.2-1.5,0.7-1.9,1.1c-0.7,0.7-0.9,1.1-0.7,1.6c0,0.3,0.2,0.6,0.7,0.6c0.3-0.1,0.3-0.2,0.7-0.3c0.6-0.3,1.2-1.7,1.7-2.4 c0.8-0.2,1.7-0.3,2-0.3c0.1,0,0.3,0,0.6,0c0.8,0.8,1.2,1.1,1.8,1.2c0.1,0,0.2,0,0.3,0c0.3,0,0.8-0.1,1-0.6 C16.4,14.1,16.4,13.9,16.3,13.5z M8.3,15.7c-0.1,0.1-0.2,0.1-0.2,0.1c0-0.1,0-0.3,0.6-0.8c0.2-0.2,0.6-0.3,0.9-0.7 C9,15,8.6,15.5,8.3,15.7z M11.3,9c0-0.1,0.1-0.2,0.1-0.2S11.6,9,11.5,10c0,0.1,0,0.3-0.1,0.7C11.3,10.1,11,9.5,11.3,9z M10.9,13.1 c0.2-0.6,0.6-1,0.7-1.5c0.1,0.1,0.1,0.1,0.2,0.2c0.1,0.2,0.3,0.7,0.7,0.9C12.2,12.8,11.6,13,10.9,13.1z M15.2,14.1 c-0.1,0-0.1,0-0.2,0c-0.2,0-0.7-0.2-1-0.7c1.1,0,1.6,0.2,1.6,0.6C15.5,14.1,15.4,14.1,15.2,14.1z", print: "M16.1,17c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1s-0.4,1-1,1C16.5,18,16.1,17.6,16.1,17z M22,15v4c0,1.1-0.9,2-2,2H4 c-1.1,0-2-0.9-2-2v-4c0-1.1,0.9-2,2-2h1V5c0-1.1,0.9-2,2-2h7.4L19,7.6V13h1C21.1,13,22,13.9,22,15z M7,13h10V9h-4V5H7V13z M20,15H4 v4h16V15z", redo: "M13.6,9.4c1.7,0.3,3.2,0.9,4.6,2L21,8.5v7h-7l2.7-2.7C13,10.1,7.9,11,5.3,14.7c-0.2,0.3-0.4,0.5-0.5,0.8L3,14.6 C5.1,10.8,9.3,8.7,13.6,9.4z", removeTable: "M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z", remove: "M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z", replaceImage: "M16,5v3H4v2h12v3l4-4L16,5z M8,19v-3h12v-2H8v-3l-4,4L8,19z", row: "M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M16,6.5h4 c0.3,0,0.5,0.2,0.5,0.5v2H16V6.5z M9.5,6.5h5V9h-5V6.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.5 v-2H8V17.5z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z", selectAll: "M5,7h2V5C5.9,5,5,5.9,5,7z M5,11h2V9H5V11z M9,19h2v-2H9V19z M5,11h2V9H5V11z M15,5h-2v2h2V5z M17,5v2h2C19,5.9,18.1,5,17,5 z M7,19v-2H5C5,18.1,5.9,19,7,19z M5,15h2v-2H5V15z M11,5H9v2h2V5z M13,19h2v-2h-2V19z M17,11h2V9h-2V11z M17,19c1.1,0,2-0.9,2-2h-2 V19z M17,11h2V9h-2V11z M17,15h2v-2h-2V15z M13,19h2v-2h-2V19z M13,7h2V5h-2V7z M9,15h6V9H9V15z M11,11h2v2h-2V11z", smile: "M11.991,3A9,9,0,1,0,21,12,8.99557,8.99557,0,0,0,11.991,3ZM12,19a7,7,0,1,1,7-7A6.99808,6.99808,0,0,1,12,19Zm3.105-5.2h1.503a4.94542,4.94542,0,0,1-9.216,0H8.895a3.57808,3.57808,0,0,0,6.21,0ZM7.5,9.75A1.35,1.35,0,1,1,8.85,11.1,1.35,1.35,0,0,1,7.5,9.75Zm6.3,0a1.35,1.35,0,1,1,1.35,1.35A1.35,1.35,0,0,1,13.8,9.75Z", spellcheck: "M19.1,13.6l-5.6,5.6l-2.7-2.7l-1.4,1.4l4.1,4.1l7-7L19.1,13.6z M10.8,13.7l2.7,2.7l0.8-0.8L10.5,5h-2l-5,14h2l1.4-4h2.6 L10.8,13.7z M9.5,7.8l1.9,5.2H7.6L9.5,7.8z", star: "M12.1,7.7l1,2.5l0.4,0.9h1h2.4l-2.1,2l-0.6,0.6l0.2,0.9l0.6,2.3l-2.2-1.3L12,15.2l-0.8,0.5L9,17l0.5-2.5l0.1-0.8L9,13.1 l-2-2h2.5h0.9l0.4-0.8L12.1,7.7 M12.2,4L9.5,9.6H3.4L8,14.2L6.9,20l5.1-3.1l5.3,3.1l-1.5-5.8l4.8-4.6h-6.1L12.2,4L12.2,4z", strikeThrough: "M3,12.20294H21v1.5H16.63422a3.59782,3.59782,0,0,1,.34942,1.5929,3.252,3.252,0,0,1-1.31427,2.6997A5.55082,5.55082,0,0,1,12.20251,19a6.4421,6.4421,0,0,1-2.62335-.539,4.46335,4.46335,0,0,1-1.89264-1.48816,3.668,3.668,0,0,1-.67016-2.15546V14.704h.28723v-.0011h.34149v.0011H9.02v.11334a2.18275,2.18275,0,0,0,.85413,1.83069,3.69,3.69,0,0,0,2.32836.67926,3.38778,3.38778,0,0,0,2.07666-.5462,1.73346,1.73346,0,0,0,.7013-1.46655,1.69749,1.69749,0,0,0-.647-1.43439,3.00525,3.00525,0,0,0-.27491-.17725H3ZM16.34473,7.05981A4.18163,4.18163,0,0,0,14.6236,5.5462,5.627,5.627,0,0,0,12.11072,5,5.16083,5.16083,0,0,0,8.74719,6.06213,3.36315,3.36315,0,0,0,7.44006,8.76855a3.22923,3.22923,0,0,0,.3216,1.42786h2.59668c-.08338-.05365-.18537-.10577-.25269-.16064a1.60652,1.60652,0,0,1-.65283-1.30036,1.79843,1.79843,0,0,1,.68842-1.5108,3.12971,3.12971,0,0,1,1.96948-.55243,3.04779,3.04779,0,0,1,2.106.6687,2.35066,2.35066,0,0,1,.736,1.83258v.11341h2.00317V9.17346A3.90013,3.90013,0,0,0,16.34473,7.05981Z", subscript: "M10.4,12l3.6,3.6L12.6,17L9,13.4L5.4,17L4,15.6L7.6,12L4,8.4L5.4,7L9,10.6L12.6,7L14,8.4L10.4,12z M18.31234,19.674 l1.06812-1.1465c0.196-0.20141,0.37093-0.40739,0.5368-0.6088c0.15975-0.19418,0.30419-0.40046,0.432-0.617 c0.11969-0.20017,0.21776-0.41249,0.29255-0.6334c0.07103-0.21492,0.10703-0.43986,0.10662-0.66621 c0.00297-0.28137-0.04904-0.56062-0.1531-0.82206c-0.09855-0.24575-0.25264-0.46534-0.45022-0.6416 c-0.20984-0.18355-0.45523-0.32191-0.72089-0.40646c-0.63808-0.19005-1.3198-0.17443-1.94851,0.04465 c-0.28703,0.10845-0.54746,0.2772-0.76372,0.49487c-0.20881,0.20858-0.37069,0.45932-0.47483,0.73548 c-0.10002,0.26648-0.15276,0.54838-0.15585,0.833l-0.00364,0.237H17.617l0.00638-0.22692 c0.00158-0.12667,0.01966-0.25258,0.05377-0.37458c0.03337-0.10708,0.08655-0.20693,0.15679-0.29437 c0.07105-0.08037,0.15959-0.14335,0.25882-0.1841c0.22459-0.08899,0.47371-0.09417,0.7018-0.01458 c0.0822,0.03608,0.15559,0.08957,0.21509,0.15679c0.06076,0.07174,0.10745,0.15429,0.13761,0.24333 c0.03567,0.10824,0.05412,0.22141,0.05469,0.33538c-0.00111,0.08959-0.0118,0.17881-0.0319,0.26612 c-0.02913,0.10428-0.07076,0.20465-0.124,0.29893c-0.07733,0.13621-0.1654,0.26603-0.26338,0.38823 c-0.13438,0.17465-0.27767,0.34226-0.42929,0.50217l-2.15634,2.35315V21H21v-1.326H18.31234z", superscript: "M10.4,12,14,15.6,12.6,17,9,13.4,5.4,17,4,15.6,7.6,12,4,8.4,5.4,7,9,10.6,12.6,7,14,8.4Zm8.91234-3.326,1.06812-1.1465c.196-.20141.37093-.40739.5368-.6088a4.85745,4.85745,0,0,0,.432-.617,3.29,3.29,0,0,0,.29255-.6334,2.11079,2.11079,0,0,0,.10662-.66621,2.16127,2.16127,0,0,0-.1531-.82206,1.7154,1.7154,0,0,0-.45022-.6416,2.03,2.03,0,0,0-.72089-.40646,3.17085,3.17085,0,0,0-1.94851.04465,2.14555,2.14555,0,0,0-.76372.49487,2.07379,2.07379,0,0,0-.47483.73548,2.446,2.446,0,0,0-.15585.833l-.00364.237H18.617L18.62338,5.25a1.45865,1.45865,0,0,1,.05377-.37458.89552.89552,0,0,1,.15679-.29437.70083.70083,0,0,1,.25882-.1841,1.00569,1.00569,0,0,1,.7018-.01458.62014.62014,0,0,1,.21509.15679.74752.74752,0,0,1,.13761.24333,1.08893,1.08893,0,0,1,.05469.33538,1.25556,1.25556,0,0,1-.0319.26612,1.34227,1.34227,0,0,1-.124.29893,2.94367,2.94367,0,0,1-.26338.38823,6.41629,6.41629,0,0,1-.42929.50217L17.19709,8.92642V10H22V8.674Z", symbols: "M15.77493,16.98885a8.21343,8.21343,0,0,0,1.96753-2.57651,7.34824,7.34824,0,0,0,.6034-3.07618A6.09092,6.09092,0,0,0,11.99515,5a6.13347,6.13347,0,0,0-4.585,1.79187,6.417,6.417,0,0,0-1.756,4.69207,6.93955,6.93955,0,0,0,.622,2.97415,8.06587,8.06587,0,0,0,1.949,2.53076H5.41452V19h5.54114v-.04331h-.00147V16.84107a5.82825,5.82825,0,0,1-2.2052-2.2352A6.40513,6.40513,0,0,1,7.97672,11.447,4.68548,4.68548,0,0,1,9.07785,8.19191a3.73232,3.73232,0,0,1,2.9173-1.22462,3.76839,3.76839,0,0,1,2.91241,1.21489,4.482,4.482,0,0,1,1.11572,3.154,6.71141,6.71141,0,0,1-.75384,3.24732,5.83562,5.83562,0,0,1-2.22357,2.25759v2.11562H13.0444V19h5.54108V16.98885Z", tags: "M8.9749 7.47489a1.5 1.5 0 1 1 -1.5 1.5A1.5 1.5 0 0 1 8.9749 7.47489Zm3.78866 -3.12713L16.5362 8.12041l0.33565 0.33564 2.77038 2.77038a2.01988 2.01988 0 0 1 0.59 1.42 1.95518 1.95518 0 0 1 -0.5854 1.40455l0.00044 0.00043 -5.59583 5.59583 -0.00043 -0.00044a1.95518 1.95518 0 0 1 -1.40455 0.5854 1.98762 1.98762 0 0 1 -1.41 -0.58L8.45605 16.87185l-0.33564 -0.33565L4.35777 12.77357a1.99576 1.99576 0 0 1 -0.59 -1.42V9.36358l0 -3.59582a2.00579 2.00579 0 0 1 2 -2l3.59582 0h1.98995A1.98762 1.98762 0 0 1 12.76356 4.34776ZM15.46186 9.866l-0.33564 -0.33564L11.36359 5.76776H5.76776v5.59583L9.866 15.46186l2.7794 2.7794 5.5878 -5.60385 -0.001 -0.001Z", tableHeader: "M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4 l0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M14.5,17.5h-5V15h5V17.5z M14.5,13.5h-5v-3h5V13.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5l0,0 H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9h-4.4H16h-1.5h-5H8H7.9H3.5V7c0-0.3,0.2-0.5,0.4-0.5l0,0h4l0,0h8.2l0,0H20 c0.3,0,0.5,0.2,0.5,0.4l0,0V9z", tableStyle: "M20.0171,19.89752l.9,3.6-3.2-1.9-3.3,1.9.8-3.6-2.9-2.9h3.8l1.7-3.5,1.4,3.5h3.8ZM20,5H4A2.00591,2.00591,0,0,0,2,7V17a2.00591,2.00591,0,0,0,2,2h7.49115l-.58826-.58826L9.99115,17.5H9.5V14.9975h5.36511L16,12.66089V10.5h4.5v3h-.52783l.599,1.4975H22V7A2.00591,2.00591,0,0,0,20,5ZM3.5,7A.4724.4724,0,0,1,4,6.5H8V9H3.5Zm0,3.5H8v3H3.5Zm.5,7a.4724.4724,0,0,1-.5-.5V15H8v2.5Zm10.5-4h-5v-3h5Zm0-4.5h-5V6.5h5Zm6,0H16V6.5h4a.4724.4724,0,0,1,.5.5Z", textColor: "M15.2,13.494s-3.6,3.9-3.6,6.3a3.65,3.65,0,0,0,7.3.1v-.1C18.9,17.394,15.2,13.494,15.2,13.494Zm-1.47-1.357.669-.724L12.1,5h-2l-5,14h2l1.43-4h2.943A24.426,24.426,0,0,1,13.726,12.137ZM11.1,7.8l1.86,5.2H9.244Z", textMore: "M13.55,19h2l-5-14h-2l-5,14h2l1.4-4h5.1Zm-5.9-6,1.9-5.2,1.9,5.2Zm12.8,4.5a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,17.5Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,13.5Zm0-4A1.5,1.5,0,1,1,18.95,8,1.5,1.5,0,0,1,20.45,9.5Z", underline: "M19,20v2H5V20Zm-3-6.785a4,4,0,0,1-5.74,3.4A3.75,3.75,0,0,1,8,13.085V5.005H6v8.21a6,6,0,0,0,8,5.44,5.851,5.851,0,0,0,4-5.65v-8H16ZM16,5v0h2V5ZM8,5H6v0H8Z", undo: "M10.4,9.4c-1.7,0.3-3.2,0.9-4.6,2L3,8.5v7h7l-2.7-2.7c3.7-2.6,8.8-1.8,11.5,1.9c0.2,0.3,0.4,0.5,0.5,0.8l1.8-0.9 C18.9,10.8,14.7,8.7,10.4,9.4z", unlink: "M14.4,11l1.6,1.6V11H14.4z M17,7h-4v1.9h4c1.7,0,3.1,1.4,3.1,3.1c0,1.3-0.8,2.4-1.9,2.8l1.4,1.4C21,15.4,22,13.8,22,12 C22,9.2,19.8,7,17,7z M2,4.3l3.1,3.1C3.3,8.1,2,9.9,2,12c0,2.8,2.2,5,5,5h4v-1.9H7c-1.7,0-3.1-1.4-3.1-3.1c0-1.6,1.2-2.9,2.8-3.1 L8.7,11H8v2h2.7l2.3,2.3V17h1.7l4,4l1.4-1.4L3.4,2.9L2,4.3z", unorderedList: "M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,5.5C3.2,5.5,2.5,6.2,2.5,7 S3.2,8.5,4,8.5S5.5,7.8,5.5,7S4.8,5.5,4,5.5z M4,15.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,15.5,4,15.5z M7.5,6v2h14V6H7.5z M7.5,18h14v-2h-14V18z M7.5,13h14v-2h-14V13z", verticalAlignBottom: "M16,13h-3V3h-2v10H8l4,4L16,13z M3,19v2h18v-2H3z", verticalAlignMiddle: "M3,11v2h18v-2H3z M8,18h3v3h2v-3h3l-4-4L8,18z M16,6h-3V3h-2v3H8l4,4L16,6z", verticalAlignTop: "M8,11h3v10h2V11h3l-4-4L8,11z M21,5V3H3v2H21z" }, $e.MODULES.modals = function(l) { var i = l.$; l.shared.modals || (l.shared.modals = {}); var a, c = l.shared.modals; function e() { for (var e in c) if (Object.prototype.hasOwnProperty.call(c, e)) { var t = c[e]; t && t.$modal && t.$modal.removeData().remove() } a && a.removeData().remove(), c = {} } function s(e, t) { if (c[e]) { var n = c[e].$modal, r = n.data("instance") || l; r.events.enableBlur(), n.hide(), a.hide(), i(r.o_doc).find("body").first().removeClass("prevent-scroll fr-mobile"), n.removeClass("fr-active"), t || (r.accessibility.restoreSelection(), r.events.trigger("modals.hide")) } } function n(e) { var t; if ("string" == typeof e) { if (!c[e]) return; t = c[e].$modal } else t = e; return t && l.node.hasClass(t, "fr-active") && l.core.sameInstance(t) || !1 } return { _init: function t() { l.events.on("shared.destroy", e, !0) }, get: function r(e) { return c[e] }, create: function d(n, e, t) { if (e = '
    '.concat(e, "
    "), l.shared.$overlay || (l.shared.$overlay = i(l.doc.createElement("DIV")).addClass("fr-overlay"), i("body").first().append(l.shared.$overlay)), a = l.shared.$overlay, l.opts.theme && a.addClass("".concat(l.opts.theme, "-theme")), !c[n]) { var r = function o(e, t) { var n = '
    '), r = ''); n += '
    '.concat(e).concat(r, "
    "), n += '
    '.concat(t, "
    "), n += "
    "; var a = i(l.doc.createElement("DIV")); return a.html(n), a.find("> .fr-modal") }(e, t); c[n] = { $modal: r, $head: r.find(".fr-modal-head"), $body: r.find(".fr-modal-body") }, l.helpers.isMobile() || r.addClass("fr-desktop"), i("body").first().append(r), l.events.$on(r, "click", ".fr-modal-close", function() { s(n) }, !0), c[n].$body.css("margin-top", c[n].$head.outerHeight()), l.events.$on(r, "keydown", function(e) { var t = e.which; return t === $e.KEYCODE.ESC ? (s(n), l.accessibility.focusModalButton(r), !1) : !(!i(e.currentTarget).is("input[type=text], textarea") && t !== $e.KEYCODE.ARROW_UP && t !== $e.KEYCODE.ARROW_DOWN && !l.keys.isBrowserAction(e) && (e.preventDefault(), e.stopPropagation(), 1)) }, !0), s(n, !0) } return c[n] }, show: function o(e) { if (c[e]) { var t = c[e].$modal; t.data("instance", l), t.show(), a.show(), i(l.o_doc).find("body").first().addClass("prevent-scroll"), l.helpers.isMobile() && i(l.o_doc).find("body").first().addClass("fr-mobile"), t.addClass("fr-active"), l.accessibility.focusModal(t) } }, hide: s, resize: function f(e) { if (c[e]) { var t = c[e], n = t.$modal, r = t.$body, a = l.o_win.innerHeight, o = n.find(".fr-modal-wrapper"), i = a - o.outerHeight(!0) + (o.height() - (r.outerHeight(!0) - r.height())), s = "auto"; i < r.get(0).scrollHeight && (s = i), r.height(s) } }, isVisible: n, areVisible: function p(e) { for (var t in c) if (Object.prototype.hasOwnProperty.call(c, t) && n(t) && (void 0 === e || c[t].$modal.data("instance") === e)) return c[t].$modal; return !1 } } }, $e.MODULES.position = function(T) { var A = T.$; function a() { var e = T.selection.ranges(0).getBoundingClientRect(); if (0 === e.top && 0 === e.left && 0 === e.width || 0 === e.height) { var t = !1; 0 === T.$el.find(".fr-marker").length && (T.selection.save(), t = !0); var n = T.$el.find(".fr-marker").first(); n.css("display", "inline"), n.css("line-height", ""); var r = n.offset(), a = n.outerHeight(); n.css("display", "none"), n.css("line-height", 0), (e = {}).left = r && r.left, e.width = 0, e.height = a, e.top = r && r.top - (T.helpers.isMobile() && !T.helpers.isIOS() || T.opts.iframe ? 0 : T.helpers.scrollTop()), e.right = 1, e.bottom = 1, e.ok = !0, t && T.selection.restore() } return e } function o(e, t, n, r) { var a = n.data("container"); if (!a || "BODY" === a.get(0).tagName && "static" === a.css("position") || (e && (e -= a.offset().left), t && (t -= a.offset().top), "BODY" !== a.get(0).tagName ? (e && (e += a.get(0).scrollLeft), t && (t += a.get(0).scrollTop)) : "absolute" === a.css("position") && (e && (e += a.position().left), t && (t += a.position().top))), T.opts.iframe && a && T.$tb && a.get(0) !== T.$tb.get(0)) { var o = T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top")), i = T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-left")); e && (e += T.$iframe.offset().left + i), t && (t += T.$iframe.offset().top + o) } var s = function l(e, t) { var n = e.outerWidth(!0); return t + n > T.$sc.get(0).clientWidth - 10 && (t = T.$sc.get(0).clientWidth - n - 10), t < 0 && (t = 10), t }(n, e); e && n.css("left", s), t && n.css("top", function c(e, t, n) { var r = e.outerHeight(!0); if (!T.helpers.isMobile() && T.$tb && e.parent().get(0) !== T.$tb.get(0)) { var a = e.parent().offset().top, o = t - r - (n || 0); e.parent().get(0) === T.$sc.get(0) && (a -= e.parent().position().top); var i = T.$sc.get(0).clientHeight; a + t + r > T.$sc.offset().top + i && 0 < e.parent().offset().top + o && 0 < o ? o > T.$wp.scrollTop() && (t = o, e.addClass("fr-above")) : e.removeClass("fr-above") } return t }(n, t, r)) } function t(e) { var n = A(e), t = n.is(".fr-sticky-on"), r = n.data("sticky-top"), a = n.data("sticky-scheduled"); if (void 0 === r) { n.data("sticky-top", 0); var o = A('
    ')); T.$box.prepend(o) } else T.$box.find(".fr-sticky-dummy").css("height", n.outerHeight()); if (T.core.hasFocus() || 0 < T.$tb.findVisible("input:focus").length) { var i = T.helpers.scrollTop(), s = Math.min(Math.max(i - T.$tb.parent().offset().top, 0), T.$tb.parent().outerHeight() - n.outerHeight()); if (s !== r && s !== a && (clearTimeout(n.data("sticky-timeout")), n.data("sticky-scheduled", s), n.outerHeight() < i - T.$tb.parent().offset().top && n.addClass("fr-opacity-0"), n.data("sticky-timeout", setTimeout(function() { var e = T.helpers.scrollTop(), t = Math.min(Math.max(e - T.$tb.parent().offset().top, 0), T.$tb.parent().outerHeight() - n.outerHeight()); 0 < t && "BODY" === T.$tb.parent().get(0).tagName && (t += T.$tb.parent().position().top), t !== r && (n.css("top", Math.max(t, 0)), n.data("sticky-top", t), n.data("sticky-scheduled", t)), n.removeClass("fr-opacity-0") }, 100))), !t) { var l = T.$tb.parent(), c = l.get(0).offsetWidth - l.get(0).clientWidth; n.css("top", "0"), n.width(l.width() - c), n.addClass("fr-sticky-on"), T.$box.addClass("fr-sticky-box") } } else clearTimeout(A(e).css("sticky-timeout")), n.css("top", "0"), n.css("position", ""), n.css("width", ""), n.data("sticky-top", 0), n.removeClass("fr-sticky-on"), T.$box.removeClass("fr-sticky-box") } function n(e) { if (e.offsetWidth) { var t = A(e), n = t.outerHeight(), r = t.data("sticky-position"), a = A("body" === T.opts.scrollableContainer ? T.o_win : T.opts.scrollableContainer).outerHeight(), o = 0, i = 0; "body" !== T.opts.scrollableContainer && (o = T.$sc.offset().top, i = A(T.o_win).outerHeight() - o - a); var s = "body" === T.opts.scrollableContainer ? T.helpers.scrollTop() : o, l = t.is(".fr-sticky-on"); t.data("sticky-parent") || t.data("sticky-parent", t.parent()); var c = t.data("sticky-parent"), d = c.offset().top, f = c.outerHeight(); if (t.data("sticky-offset") ? T.$box.find(".fr-sticky-dummy").css("height", "".concat(n, "px")) : (t.data("sticky-offset", !0), t.after('
    '))), !r) { var p = "auto" !== t.css("top") || "auto" !== t.css("bottom"); p || t.css("position", "fixed"), r = { top: T.node.hasClass(t.get(0), "fr-top"), bottom: T.node.hasClass(t.get(0), "fr-bottom") }, p || t.css("position", ""), t.data("sticky-position", r), t.data("top", T.node.hasClass(t.get(0), "fr-top") ? t.css("top") : "auto"), t.data("bottom", T.node.hasClass(t.get(0), "fr-bottom") ? t.css("bottom") : "auto") } var u = T.helpers.getPX(t.data("top")), h = T.helpers.getPX(t.data("bottom")), g = r.top && function b() { return d < s + u && s + u <= d + f - n }() && (T.helpers.isInViewPort(T.$sc.get(0)) || "body" === T.opts.scrollableContainer), m = r.bottom && function E() { return d + n < s + a - h && s + a - h < d + f }(); if (g || m) { var v = c.get(0).offsetWidth - c.get(0).clientWidth; t.css("width", "".concat(c.get(0).getBoundingClientRect().width - v, "px")), l || (t.addClass("fr-sticky-on"), t.removeClass("fr-sticky-off"), t.css("top") && ("auto" !== t.data("top") ? t.css("top", T.helpers.getPX(t.data("top")) + o) : t.data("top", "auto")), t.css("bottom") && ("auto" !== t.data("bottom") ? t.css("bottom", T.helpers.getPX(t.data("bottom")) + i) : t.css("bottom", "auto"))) } else T.node.hasClass(t.get(0), "fr-sticky-off") || (t.css("width", ""), t.removeClass("fr-sticky-on"), t.addClass("fr-sticky-off"), t.css("top") && "auto" !== t.data("top") && r.top && t.css("top", 0), t.css("bottom") && "auto" !== t.data("bottom") && r.bottom && t.css("bottom", 0)) } } function r() { if (T.helpers.requestAnimationFrame()(r), !1 !== T.events.trigger("position.refresh")) for (var e = 0; e < T._stickyElements.length; e++) t(T._stickyElements[e]) } function i() { if (T._stickyElements) for (var e = 0; e < T._stickyElements.length; e++) n(T._stickyElements[e]) } return { _init: function s() { ! function e() { T._stickyElements = [], T.helpers.isIOS() ? (r(), T.events.$on(A(T.o_win), "scroll", function() { if (T.core.hasFocus()) for (var e = 0; e < T._stickyElements.length; e++) { var t = A(T._stickyElements[e]), n = t.parent(), r = T.helpers.scrollTop(); t.outerHeight() < r - n.offset().top && (t.addClass("fr-opacity-0"), t.data("sticky-top", -1), t.data("sticky-scheduled", -1)) } }, !0)) : ("body" !== T.opts.scrollableContainer && T.events.$on(A(T.opts.scrollableContainer), "scroll", i, !0), T.events.$on(A(T.o_win), "scroll", i, !0), T.events.$on(A(T.o_win), "resize", i, !0), T.events.on("initialized", i), T.events.on("focus", i), T.events.$on(A(T.o_win), "resize", "textarea", i, !0)), T.events.on("destroy", function() { T._stickyElements = [] }) }() }, forSelection: function l(e) { var t = a(); e.css({ top: 0, left: 0 }); var n = t.top + t.height, r = t.left + t.width / 2 - e.get(0).offsetWidth / 2 + T.helpers.scrollLeft(); T.opts.iframe || (n += T.helpers.scrollTop()), o(r, n, e, t.height) }, addSticky: function c(e) { e.addClass("fr-sticky"), T.helpers.isIOS() && e.addClass("fr-sticky-ios"), e.removeClass("fr-sticky"), T._stickyElements.push(e.get(0)) }, refresh: i, at: o, getBoundingRect: a } }, $e.MODULES.refresh = function(l) { var c = l.$; function a(e, t) { e.toggleClass("fr-disabled", t).attr("aria-disabled", t) } function e(e) { var t = l.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"), '"]')), n = function s(e, t) { var n = 0, r = t.find("> .fr-command, > .fr-btn-wrap"); r.each(function(e, t) { n += c(t).outerWidth() }); var a, o = l.helpers.getPX(c(r[0]).css("margin-left")), i = l.helpers.getPX(c(r[0]).css("margin-right")); a = "rtl" === l.opts.direction ? l.$tb.outerWidth() - e.offset().left + l.$tb.offset().left - (n + e.outerWidth() + r.length * (o + i)) / 2 : e.offset().left - l.$tb.offset().left - (n - e.outerWidth() + r.length * (o + i)) / 2; a + n + r.length * (o + i) > l.$tb.outerWidth() && (a -= (n + r.length * (o + i) - e.outerWidth()) / 2); a < 0 && (a = 0); return a }(e, t); "rtl" === l.opts.direction ? t.css("padding-right", n) : t.css("padding-left", n) } return { undo: function t(e) { a(e, !l.undo.canDo()) }, redo: function n(e) { a(e, !l.undo.canRedo()) }, outdent: function o(e) { if (l.node.hasClass(e.get(0), "fr-no-refresh")) return !1; for (var t = l.selection.blocks(), n = 0; n < t.length; n++) { var r = "rtl" === l.opts.direction || "rtl" === c(t[n]).css("direction") ? "margin-right" : "margin-left"; if ("LI" === t[n].tagName || "LI" === t[n].parentNode.tagName) return a(e, !1), !0; if (0 < l.helpers.getPX(c(t[n]).css(r))) return a(e, !1), !0 } a(e, !0) }, indent: function i(e) { if (l.node.hasClass(e.get(0), "fr-no-refresh")) return !1; for (var t = l.selection.blocks(), n = 0; n < t.length; n++) { for (var r = t[n].previousSibling; r && r.nodeType === Node.TEXT_NODE && 0 === r.textContent.length;) r = r.previousSibling; if ("LI" !== t[n].tagName || r) return a(e, !1), !0; a(e, !0) } }, moreText: e, moreParagraph: e, moreMisc: e, moreRich: e } }, Object.assign($e.DEFAULTS, { attribution: !0, toolbarBottom: !1, toolbarButtons: null, toolbarButtonsXS: null, toolbarButtonsSM: null, toolbarButtonsMD: null, toolbarContainer: null, toolbarInline: !1, toolbarSticky: !0, toolbarStickyOffset: 0, toolbarVisibleWithoutSelection: !1 }), $e.TOOLBAR_BUTTONS = { moreText: { buttons: ["bold", "italic", "underline", "strikeThrough", "subscript", "superscript", "fontFamily", "fontSize", "textColor", "backgroundColor", "inlineClass", "inlineStyle", "clearFormatting"] }, moreParagraph: { buttons: ["alignLeft", "alignCenter", "formatOLSimple", "alignRight", "alignJustify", "formatOL", "formatUL", "paragraphFormat", "paragraphStyle", "lineHeight", "outdent", "indent", "quote"] }, moreRich: { buttons: ["insertLink", "insertImage", "insertVideo", "insertTable", "emoticons", "fontAwesome", "specialCharacters", "embedly", "insertFile", "insertHR"] }, moreMisc: { buttons: ["undo", "redo", "fullscreen", "print", "getPDF", "spellChecker", "selectAll", "html", "help"], align: "right", buttonsVisible: 2 } }, $e.TOOLBAR_BUTTONS_MD = null, ($e.TOOLBAR_BUTTONS_SM = {}).moreText = Object.assign({}, $e.TOOLBAR_BUTTONS.moreText, { buttonsVisible: 2 }), $e.TOOLBAR_BUTTONS_SM.moreParagraph = Object.assign({}, $e.TOOLBAR_BUTTONS.moreParagraph, { buttonsVisible: 2 }), $e.TOOLBAR_BUTTONS_SM.moreRich = Object.assign({}, $e.TOOLBAR_BUTTONS.moreRich, { buttonsVisible: 2 }), $e.TOOLBAR_BUTTONS_SM.moreMisc = Object.assign({}, $e.TOOLBAR_BUTTONS.moreMisc, { buttonsVisible: 2 }), ($e.TOOLBAR_BUTTONS_XS = {}).moreText = Object.assign({}, $e.TOOLBAR_BUTTONS.moreText, { buttonsVisible: 0 }), $e.TOOLBAR_BUTTONS_XS.moreParagraph = Object.assign({}, $e.TOOLBAR_BUTTONS.moreParagraph, { buttonsVisible: 0 }), $e.TOOLBAR_BUTTONS_XS.moreRich = Object.assign({}, $e.TOOLBAR_BUTTONS.moreRich, { buttonsVisible: 0 }), $e.TOOLBAR_BUTTONS_XS.moreMisc = Object.assign({}, $e.TOOLBAR_BUTTONS.moreMisc, { buttonsVisible: 2 }), $e.POWERED_BY = '', $e.MODULES.toolbar = function(m) { var v, b = m.$, t = []; function e(e) { var n = {}; if (Array.isArray(e)) { if (!Array.isArray(e[0])) { for (var t = [], r = [], a = 0; a < e.length; a++) "|" === e[a] || "-" === e[a] ? (0 < r.length && t.push(r), r = []) : r.push(e[a]); 0 < r.length && t.push(r), e = t } e.forEach(function(e, t) { n["group".concat(t + 1)] = { buttons: e } }), n.showMoreButtons = !1 } else "object" !== Fe(e) || Array.isArray(e) || ((n = e).showMoreButtons = !0); return n } function E() { var e = m.helpers.screenSize(); return t[v = e] } function T() { for (var e = m.$tb.find(".fr-more-toolbar"), c = "", t = 0; t < e.length; t++) { var d = b(e[t]); d.hasClass("fr-expanded") ? function() { var n = m.helpers.getPX(d.css("padding-left")), e = d.find("> .fr-command, > .fr-btn-wrap"), t = b(e[0]), r = m.helpers.getPX(t.css("margin-left")), a = m.helpers.getPX(t.css("margin-right")), o = m.helpers.getPX(t.css("margin-top")), i = m.helpers.getPX(t.css("margin-bottom")); if (e.each(function(e, t) { n += b(t).outerWidth() + r + a }), m.$tb.outerWidth() < n) { var s = Math.floor(n / m.$tb.outerWidth()); n += s * (n / d[0].childElementCount), s = Math.ceil(n / m.$tb.outerWidth()); var l = (m.helpers.getPX(t.css("height")) + o + i) * s; d.css("height", l), c = l } }() : d.css("height", "") } m.$tb.css("padding-bottom", c) } function r() { if (v !== m.helpers.screenSize()) { var e = E(), t = b(), n = b(); for (var r in m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").addClass("fr-hidden"), function g() { for (var t = m.$tb.find(".fr-btn-grp, .fr-more-toolbar"), r = function r(e) { var n = b(t[e]); n.children().each(function(e, t) { n.before(t) }), n.remove() }, e = 0; e < t.length; e++) r(e) }(), e) { var a = e[r]; if (a.buttons) { var o = void 0, i = 0, s = 3, l = b('
    ')); e.showMoreButtons && (o = b('
    ').data("name", "".concat(r, "-").concat(m.id))); for (var c = 0; c < a.buttons.length; c++) { a.buttonsVisible !== undefined && (s = a.buttonsVisible); var d = m.$tb.find('> .fr-command[data-cmd="' + a.buttons[c] + '"], > div.fr-btn-wrap > .fr-command[data-cmd="' + a.buttons[c] + '"]'), f = null; m.node.hasClass(d.next().get(0), "fr-dropdown-menu") && (f = d.next()), m.node.hasClass(d.next().get(0), "fr-options") && (d.removeClass("fr-hidden"), d.next().removeClass("fr-hidden"), d = d.parent()), d.removeClass("fr-hidden"), e.showMoreButtons && s <= i ? (o.append(d), f && o.append(f)) : (l.append(d), f && l.append(f)), i++ } if (e.showMoreButtons && s < i) { var p = m.$tb.find('.fr-command[data-cmd="'.concat(r, '"]')); if (0 < p.length) p.removeClass("fr-hidden fr-open"); else { var u = r, h = $e.COMMANDS[u]; h.more_btn = !0, p = b(m.button.build(u, h, !0)), m.button.addButtons(p) } l.append(p) } t.push(l), e.showMoreButtons && n.push(o) } } m.opts.toolbarBottom ? (m.$tb.append(n), m.$tb.find(".fr-newline").remove(), m.$tb.append('
    '), m.$tb.append(t)) : (m.$tb.append(t), m.$tb.find(".fr-newline").remove(), m.$tb.append('
    '), m.$tb.append(n)), m.$tb.removeClass("fr-toolbar-open"), m.$box.removeClass("fr-toolbar-open"), m.events.trigger("codeView.toggle") } T() } function n(e, t) { setTimeout(function() { if ((!e || e.which != $e.KEYCODE.ESC) && m.selection.inEditor() && m.core.hasFocus() && !m.popups.areVisible() && "false" != b(m.selection.blocks()[0]).closest("table").attr("contenteditable") && (m.opts.toolbarVisibleWithoutSelection || !m.selection.isCollapsed() && !m.keys.isIME() || t)) { if (m.$tb.data("instance", m), !1 === m.events.trigger("toolbar.show", [e])) return; m.$tb.show(), m.opts.toolbarContainer || m.position.forSelection(m.$tb), 1 < m.opts.zIndex ? m.$tb.css("z-index", m.opts.zIndex + 1) : m.$tb.css("z-index", null) } }, 0) } function a(e) { return (!e || "blur" !== e.type || document.activeElement !== m.el) && (!(!e || "keydown" !== e.type || !m.keys.ctrlKey(e)) || (!!m.button.getButtons(".fr-dropdown.fr-active").next().find(m.o_doc.activeElement).length || void(!1 !== m.events.trigger("toolbar.hide") && m.$tb.hide()))) } t[$e.XS] = e(m.opts.toolbarButtonsXS || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_XS || $e.TOOLBAR_BUTTONS || []), t[$e.SM] = e(m.opts.toolbarButtonsSM || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_SM || $e.TOOLBAR_BUTTONS || []), t[$e.MD] = e(m.opts.toolbarButtonsMD || m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS_MD || $e.TOOLBAR_BUTTONS || []), t[$e.LG] = e(m.opts.toolbarButtons || $e.TOOLBAR_BUTTONS || []); var o = null; function i(e) { clearTimeout(o), e && e.which === $e.KEYCODE.ESC || (o = setTimeout(n, m.opts.typingTimer)) } function s() { m.events.on("window.mousedown", a), m.events.on("keydown", a), m.events.on("blur", a), m.events.$on(m.$tb, "transitionend", ".fr-more-toolbar", function() { m.position.forSelection(m.$tb) }), m.helpers.isMobile() || m.events.on("window.mouseup", n), m.helpers.isMobile() ? m.helpers.isIOS() || (m.events.on("window.touchend", n), m.browser.mozilla && setInterval(n, 200)) : m.events.on("window.keyup", i), m.events.on("keydown", function(e) { e && e.which === $e.KEYCODE.ESC && a() }), m.events.on("keydown", function(e) { if (e.which === $e.KEYCODE.ALT) return e.stopPropagation(), !1 }, !0), m.events.$on(m.$wp, "scroll.toolbar", n), m.events.on("commands.after", n), m.helpers.isMobile() && (m.events.$on(m.$doc, "selectionchange", i), m.events.$on(m.$doc, "orientationchange", n)) } function l() { m.$tb.html("").removeData().remove(), m.$tb = null, m.$second_tb && (m.$second_tb.html("").removeData().remove(), m.$second_tb = null) } function c() { m.$box.removeClass("fr-top fr-bottom fr-inline fr-basic"), m.$box.find(".fr-sticky-dummy").remove() } function d() { m.opts.theme && m.$tb.addClass("".concat(m.opts.theme, "-theme")), 1 < m.opts.zIndex && m.$tb.css("z-index", m.opts.zIndex + 1), "auto" !== m.opts.direction && m.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(m.opts.direction)), m.helpers.isMobile() ? m.$tb.addClass("fr-mobile") : m.$tb.addClass("fr-desktop"), m.opts.toolbarContainer ? (m.opts.toolbarInline && (s(), a()), m.opts.toolbarBottom ? m.$tb.addClass("fr-bottom") : m.$tb.addClass("fr-top")) : function e() { m.opts.toolbarInline ? (m.$sc.append(m.$tb), m.$tb.data("container", m.$sc), m.$tb.addClass("fr-inline"), s(), m.opts.toolbarBottom = !1) : (m.opts.toolbarBottom && !m.helpers.isIOS() ? (m.$box.append(m.$tb), m.$tb.addClass("fr-bottom"), m.$box.addClass("fr-bottom")) : (m.opts.toolbarBottom = !1, m.$box.prepend(m.$tb), m.$tb.addClass("fr-top"), m.$box.addClass("fr-top")), m.$tb.addClass("fr-basic"), m.opts.toolbarSticky && (m.opts.toolbarStickyOffset && (m.opts.toolbarBottom ? m.$tb.css("bottom", m.opts.toolbarStickyOffset) : m.$tb.css("top", m.opts.toolbarStickyOffset)), m.position.addSticky(m.$tb))) }(), function t() { var e = m.button.buildGroup(E()); m.$tb.append(e), T(), m.button.bindCommands(m.$tb) }(), function n() { m.events.$on(b(m.o_win), "resize", r), m.events.$on(b(m.o_win), "orientationchange", r) }(), m.accessibility.registerToolbar(m.$tb), m.events.$on(m.$tb, "".concat(m._mousedown, " ").concat(m._mouseup), function(e) { var t = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null; if (t && "INPUT" !== t.tagName && !m.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1 }, !0), m.events.$on(m.$tb, "transitionend", ".fr-more-toolbar", function() { m.$box.hasClass("fr-fullscreen") && (m.opts.height = m.o_win.innerHeight - (m.opts.toolbarInline ? 0 : m.$tb.outerHeight() + (m.$second_tb ? m.$second_tb.outerHeight() : 0)), m.size.refresh()) }) } var f = !1; return { _init: function p() { if (m.$sc = b(m.opts.scrollableContainer).first(), !m.$wp) return !1; m.opts.toolbarInline || m.opts.toolbarBottom || (m.$second_tb = b(m.doc.createElement("div")).attr("class", "second-toolbar"), m.$box.append(m.$second_tb), (!1 !== m.ul || m.opts.attribution) && m.$second_tb.prepend($e.POWERED_BY)), m.opts.toolbarContainer ? (m.shared.$tb ? (m.$tb = m.shared.$tb, m.opts.toolbarInline && s()) : (m.shared.$tb = b(m.doc.createElement("DIV")), m.shared.$tb.addClass("fr-toolbar"), m.$tb = m.shared.$tb, b(m.opts.toolbarContainer).append(m.$tb), d(), m.$tb.data("instance", m)), m.opts.toolbarInline ? m.$box.addClass("fr-inline") : m.$box.addClass("fr-basic"), m.events.on("focus", function() { m.$tb.data("instance", m) }, !0), m.opts.toolbarInline = !1) : m.opts.toolbarInline ? (m.$box.addClass("fr-inline"), m.shared.$tb ? (m.$tb = m.shared.$tb, s()) : (m.shared.$tb = b(m.doc.createElement("DIV")), m.shared.$tb.addClass("fr-toolbar"), m.$tb = m.shared.$tb, d())) : (m.$box.addClass("fr-basic"), m.$tb = b(m.doc.createElement("DIV")), m.$tb.addClass("fr-toolbar"), d(), m.$tb.data("instance", m)), m.events.on("destroy", c, !0), m.events.on(m.opts.toolbarInline || m.opts.toolbarContainer ? "shared.destroy" : "destroy", l, !0), m.events.on("edit.on", function() { m.$tb.removeClass("fr-disabled").removeAttr("aria-disabled") }), m.events.on("edit.off", function() { m.$tb.addClass("fr-disabled").attr("aria-disabled", !0) }), function e() { m.events.on("shortcut", function(e, t, n) { var r; if (t && !n ? r = m.$tb.find('.fr-command[data-cmd="'.concat(t, '"]')) : t && n && (r = m.$tb.find('.fr-command[data-cmd="'.concat(t, '"][data-param1="').concat(n, '"]'))), r.length && (e.preventDefault(), e.stopPropagation(), r.parents(".fr-toolbar").data("instance", m), "keydown" === e.type)) return m.button.exec(r), !1 }) }() }, hide: a, show: function u() { if (!1 === m.events.trigger("toolbar.show")) return !1; m.$tb.show() }, showInline: n, disable: function h() { !f && m.$tb && (m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled", !0), f = !0) }, enable: function g() { f && m.$tb && (m.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled", !1), f = !1), m.button.bulkRefresh() }, setMoreToolbarsHeight: T } }; var c = ["scroll", "wheel", "touchmove", "touchstart", "touchend"], d = ["webkit", "moz", "ms", "o"], f = ["transitionend"], a = document.createElement("div").style, o = ["Webkit", "Moz", "ms", "O", "css", "style"], s = { visibility: "hidden", display: "block" }, r = ["focus", "blur", "click"], l = {}, p = function p(e, t) { return { altKey: e.altKey, bubbles: e.bubbles, cancelable: e.cancelable, changedTouches: e.changedTouches, ctrlKey: e.ctrlKey, detail: e.detail, eventPhase: e.eventPhase, metaKey: e.metaKey, pageX: e.pageX, pageY: e.pageY, shiftKey: e.shiftKey, view: e.view, "char": e["char"], key: e.key, keyCode: e.keyCode, button: e.button, buttons: e.buttons, clientX: e.clientX, clientY: e.clientY, offsetX: e.offsetX, offsetY: e.offsetY, pointerId: e.pointerId, pointerType: e.pointerType, screenX: e.screenX, screenY: e.screenY, targetTouches: e.targetTouches, toElement: e.toElement, touches: e.touches, type: e.type, which: e.which, target: e.target, currentTarget: t, originalEvent: e, stopPropagation: function() { e.stopPropagation() }, stopImmediatePropagation: function() { e.stopImmediatePropagation() }, preventDefault: function() { -1 === c.indexOf(e.type) && e.preventDefault() } } }, u = function u(e) { return e.ownerDocument && e.ownerDocument.body.contains(e) || "#document" === e.nodeName || "HTML" === e.nodeName || e === window }, h = function h(n, r) { return function(e) { var t = e.target; if (r) for (r = m(r); t && t !== this;) t.matches && t.matches(m(r)) && n.call(t, p(e, t)), t = t.parentNode; else u(t) && n.call(t, p(e, t)) } }, g = function g(e, t) { return new E(e, t) }, m = function m(e) { return e && "string" == typeof e ? e.replace(/^\s*>/g, ":scope >").replace(/,\s*>/g, ", :scope >") : e }, v = function v(e) { return "function" == typeof e && "number" != typeof e.nodeType }, b = g; g.fn = g.prototype = { constructor: g, length: 0, contains: function(e) { if (!e) return !1; if (Array.isArray(e)) { for (var t = 0; t < e.length; t++) if (this.contains(e[t]) && this != e[t]) return !0; return !1 } for (var n = 0; n < this.length; n++) for (var r = e; r;) { if (r == this[n] || r[0] && r[0].isEqualNode(this[n])) return !0; r = r.parentNode } return !1 }, findVisible: function(e) { for (var t = this.find(e), n = t.length - 1; 0 <= n; n--) b(t[n]).isVisible() || t.splice(n, 1); return t }, formatParams: function(t) { var e = "?".concat(Object.keys(t).map(function(e) { return "".concat(e, "=").concat(encodeURIComponent(t[e])) }).join("&")); return "?" === e ? "" : e }, ajax: function(t) { var n = new XMLHttpRequest; for (var e in "GET" === t.method.toUpperCase() && (t.url = t.url + this.formatParams(t.data)), n.open(t.method, t.url, !0), t.withCredentials && (n.withCredentials = !0), t.crossDomain && n.setRequestHeader("Access-Control-Allow-Origin", "*"), t.headers) Object.prototype.hasOwnProperty.call(t.headers, e) && n.setRequestHeader(e, t.headers[e]); "json" === t.dataType && n.setRequestHeader("Content-Type", "application/json"), n.onload = function() { if (200 == n.status) { var e = n.responseText; "json" === t.dataType && (e = JSON.parse(e)), t.done(e, n.status, n) } else t.fail(n) }; var r = new FormData; for (var a in t.data) r.append(a, encodeURIComponent(t.data[a])); n.send(r) }, prevAll: function() { var e = b(); if (!this[0]) return e; for (var t = this[0]; t && t.previousSibling;) t = t.previousSibling, e.push(t); return e }, index: function(e) { return e ? "string" == typeof e ? [].indexOf.call(b(e), this[0]) : [].indexOf.call(this, e.length ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, isVisible: function() { return !!this[0] && !!(this[0].offsetWidth || this[0].offsetHeight || this[0].getClientRects().length) }, toArray: function() { return [].slice.call(this) }, get: function(e) { return null == e ? [].slice.call(this) : e < 0 ? this[e + this.length] : this[e] }, pushStack: function(e) { var t = g.merge(this.constructor(), e); return t.prevObject = this, t }, wrapAll: function(e) { var t; return this[0] && (v(e) && (e = e.call(this[0])), t = g(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() { for (var e = this; e.firstElementChild;) e = e.firstElementChild; return e }).append(this)), this }, wrapInner: function(e) { if ("string" == typeof e) { for (var t = e.split(" "), n = 0; n < t.length && 0 === t[n].trim().length;) n++; if (n < t.length && (e = document.createElement(t[n].trim()), n++), "string" != typeof e) for (var r = b(e); n < t.length; n++) { t[n] = t[n].trim(); var a = t[n].split("="); r.attr(a[0], a[1].replace('"', "")) } } for (; !this[0].firstChild && this[0].firstChild !== e;) e.appendChild(this[0].firstChild) }, wrap: function(t) { var n = v(t); return this.each(function(e) { b(this).wrapAll(n ? t.call(this, e) : t) }) }, unwrap: function() { return this.parent().each(function() { this.nodeName && this.nodeName.toLowerCase() === name.toLowerCase() || g(this).replaceWith(this.childNodes) }) }, grep: function(e, t, n) { for (var r = [], a = 0, o = e.length, i = !n; a < o; a++)!t(e[a], a) !== i && r.push(e[a]); return r }, map: function(n) { return this.pushStack(g.map(this, function(e, t) { return n.call(e, t, e) })) }, slice: function() { return this.pushStack([].slice.apply(this, arguments)) }, each: function(e) { if (this.length) for (var t = 0; t < this.length && !1 !== e.call(this[t], t, this[t]); t++); return this }, first: function() { return this.eq(0) }, last: function() { return this.eq(-1) }, eq: function(e) { var t = this.length, n = +e + (e < 0 ? t : 0); return this.pushStack(0 <= n && n < t ? [this[n]] : []) }, empty: function() { for (var e = 0; e < this.length; e++) this[e].innerHTML = "" }, contents: function() { for (var e = b(), t = 0; t < this.length; t++) for (var n = this[t].childNodes, r = 0; r < n.length; r++) e.push(n[r]); return e }, attr: function(e, t) { if ("object" === Fe(e)) { for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && null !== e[n] && this.attr(n, e[n]); return this } if (void 0 === t) return 0 === this.length || !this[0].getAttribute && "checked" !== e ? undefined : "checked" === e ? this[0].checked : "tagName" === e ? this[0].tagName : this[0].getAttribute(e); if ("checked" === e) for (var r = 0; r < this.length; r++) this[r].checked = t; else if ("tagName" === e) for (var a = 0; a < this.length; a++) this[a].tagName = t; else for (var o = 0; o < this.length; o++) this[o].setAttribute(e, t); return this }, removeAttr: function(e) { for (var t = 0; t < this.length; t++) this[t].removeAttribute && this[t].removeAttribute(e); return this }, hide: function() { return this.css("display", "none"), this }, show: function() { return this.css("display", "block"), this }, focus: function() { return this.length && this[0].focus(), this }, blur: function() { return this.length && this[0].blur(), this }, data: function(e, t) { if (void 0 !== t) { for (var n = 0; n < this.length; n++) "object" !== Fe(this[n]["data-" + e] = t) && "function" != typeof t && this[n].setAttribute && this[n].setAttribute("data-" + e, t); return this } if (void 0 !== t) return this.attr("data-" + e, t); if (0 === this.length) return undefined; for (var r = 0; r < this.length; r++) { var a = this[r]["data-" + e]; if (null == a && this[r].getAttribute && (a = this[r].getAttribute("data-" + e)), void 0 !== a && null != a) return a } return undefined }, removeData: function(e) { for (var t = 0; t < this.length; t++) this[t].removeAttribute && this[t].removeAttribute("data-" + e), this[t]["data-" + e] = null; return this }, getCorrectStyleName: function(e) { if (!l[e]) { var t; e in a && (t = e); for (var n = e[0].toUpperCase() + e.slice(1), r = o.length; r--;)(e = o[r] + n) in a && (t = e); l[e] = t } return l[e] }, css: function(e, t) { if (void 0 !== t) { if (0 === this.length) return this; ("string" != typeof t || "" === t.trim() || isNaN(t)) && "number" != typeof t || !/(margin)|(padding)|(height)|(width)|(top)|(left)|(right)|(bottom)/gi.test(e) || /(line-height)/gi.test(e) || (t += "px"); for (var n = 0; n < this.length; n++) e = b(this).getCorrectStyleName(e), this[n].style[e] = t; return this } if ("string" == typeof e) { if (0 === this.length) return undefined; var r = this[0].ownerDocument || document, a = r.defaultView || r.parentWindow; return e = b(this).getCorrectStyleName(e), a.getComputedStyle(this[0])[e] } for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && this.css(o, e[o]); return this }, toggleClass: function(e, t) { if (1 < e.split(" ").length) { for (var n = e.split(" "), r = 0; r < n.length; r++) this.toggleClass(n[r], t); return this } for (var a = 0; a < this.length; a++) void 0 === t ? this[a].classList.contains(e) ? this[a].classList.remove(e) : this[a].classList.add(e) : t ? this[a].classList.contains(e) || this[a].classList.add(e) : this[a].classList.contains(e) && this[a].classList.remove(e); return this }, addClass: function(e) { if (0 === e.length) return this; if (1 < e.split(" ").length) { for (var t = e.split(" "), n = 0; n < t.length; n++) this.addClass(t[n]); return this } for (var r = 0; r < this.length; r++) this[r].classList.add(e); return this }, removeClass: function(e) { if (1 < e.split(" ").length) { for (var t = e.split(" "), n = 0; n < t.length; n++) t[n] = t[n].trim(), t[n].length && this.removeClass(t[n]); return this } for (var r = 0; r < this.length; r++) e.length && this[r].classList.remove(e); return this }, getClass: function(e) { return e.getAttribute && e.getAttribute("class") || "" }, stripAndCollapse: function(e) { return (e.match(/[^\x20\t\r\n\f]+/g) || []).join(" ") }, hasClass: function(e) { var t, n, r = 0; for (t = " " + e + " "; n = this[r++];) if (1 === n.nodeType && -1 < (" " + b(this).stripAndCollapse(b(this).getClass(n)) + " ").indexOf(t)) return !0; return !1 }, scrollTop: function(e) { if (void 0 === e) return 0 === this.length ? undefined : this[0] === document ? document.documentElement.scrollTop : this[0].scrollTop; for (var t = 0; t < this.length; t++) this[t] === document ? window.scrollTo(document.documentElement.scrollLeft, e) : this[t].scrollTop = e }, scrollLeft: function(e) { if (void 0 === e) return 0 === this.length ? undefined : this[0] === document ? document.documentElement.scrollLeft : this[0].scrollLeft; for (var t = 0; t < this.length; t++) this[t] === document ? window.scrollTo(e, document.documentElement.scrollTop) : this[t].scrollLeft = e }, on: function(e, t, n) { if (1 < e.split(" ").length) { for (var r = e.split(" "), a = 0; a < r.length; a++) if (-1 !== f.indexOf(e)) for (var o = 0; o < d.length; o++) this.on(d[o] + e[0].toUpperCase() + e.slice(1), t, n); else this.on(r[a], t, n); return this } n = "function" == typeof t ? h(t, null) : h(n, t); for (var i = 0; i < this.length; i++) { var s = b(this[i]); s.data("events") || s.data("events", []), s.data("events").push([e, n]); var l = e.split("."); l = l[0], 0 <= c.indexOf(l) ? s.get(0).addEventListener(l, n, { passive: !0 }) : s.get(0).addEventListener(l, n) } }, off: function(e) { if (1 < e.split(" ").length) { for (var t = e.split(" "), n = 0; n < t.length; n++) this.off(t[n]); return this } for (var r = 0; r < this.length; r++) { var a = b(this[r]); if (a.data("events")) { var o = e.split("."); o = o[0]; for (var i = a.data("events") || [], s = i.length - 1; 0 <= s; s--) { var l = i[s]; l[0] == e && (a.get(0).removeEventListener(o, l[1]), i.splice(s, 1)) } } } }, trigger: function(e) { for (var t = 0; t < this.length; t++) { var n = void 0; "function" == typeof Event ? n = 0 <= e.search(/^mouse/g) ? new MouseEvent(e, { view: window, cancelable: !0, bubbles: !0 }) : new Event(e) : 0 <= e.search(/^mouse/g) ? (n = document.createEvent("MouseEvents")).initMouseEvent(e, !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null) : (n = document.createEvent("Event")).initEvent(e, !0, !0), 0 <= r.indexOf(e) && "function" == typeof this[t][e] ? this[t][e]() : this[t].dispatchEvent(n) } }, triggerHandler: function() {}, val: function(e) { if (void 0 === e) return this[0].value; for (var t = 0; t < this.length; t++) this[t].value = e; return this }, siblings: function() { return b(this[0]).parent().children().not(this) }, find: function(e) { var t = b(); if ("string" != typeof e) { for (var n = 0; n < e.length; n++) for (var r = 0; r < this.length; r++) if (this[r] !== e[n] && b(this[r]).contains(e[n])) { t.push(e[n]); break } return t } var a = function a(e) { return "object" === ("undefined" == typeof HTMLElement ? "undefined" : Fe(HTMLElement)) ? e instanceof HTMLElement : e && "object" === Fe(e) && null !== e && 1 === e.nodeType && "string" == typeof e.nodeName }; e = m(e); for (var o = 0; o < this.length; o++) if (this[o].querySelectorAll) { var i = []; e && "string" == typeof e ? i = this[o].querySelectorAll(e) : a(e) && (i = [e]); for (var s = 0; s < i.length; s++) t.push(i[s]) } return t }, children: function() { for (var e = b(), t = 0; t < this.length; t++) for (var n = this[t].children, r = 0; r < n.length; r++) e.push(n[r]); return e }, not: function(e) { if ("string" == typeof e) for (var t = this.length - 1; 0 <= t; t--) this[t].matches(e) && this.splice(t, 1); else if (e instanceof g) { for (var n = this.length - 1; 0 <= n; n--) for (var r = 0; r < e.length; r++) if (this[n] === e[r]) { this.splice(n, 1); break } } else for (var a = this.length - 1; 0 <= a; a--) this[a] === e[0] && this.splice(a, 1); return this }, add: function(e) { for (var t = 0; t < e.length; t++) this.push(e[t]); return this }, closest: function(e) { for (var t = 0; t < this.length; t++) { var n = this[t].closest(e); if (n) return b(n) } return b() }, html: function(e) { if (void 0 === e) return 0 === this.length ? undefined : this[0].innerHTML; if ("string" == typeof e) for (var t = 0; t < this.length; t++) { this[t].innerHTML = e; for (var n = this[t].children, r = this[t].ownerDocument || document, a = 0; a < n.length; a++) if ("SCRIPT" === n[a].tagName) { var o = r.createElement("script"); o.innerHTML = n[a].innerHTML, r.head.appendChild(o).parentNode.removeChild(o) } } else { this[0].innerHTML = "", this.append(e[0]); var i = this[0].ownerDocument || document; if ("SCRIPT" === e[0].tagName) { var s = i.createElement("script"); s.innerHTML = e[0].innerHTML, i.head.appendChild(s).parentNode.removeChild(s) } } return this }, text: function(e) { if (!e) return this.length ? this[0].textContent : ""; for (var t = 0; t < this.length; t++) this[t].textContent = e }, after: function e(t) { if (t) if ("string" == typeof t) for (var n = 0; n < this.length; n++) { var e = this[n]; if (e.nodeType != Node.ELEMENT_NODE) { var r = e.ownerDocument.createElement("SPAN"); b(e).after(r), b(r).after(t).remove() } else e.insertAdjacentHTML("afterend", t) } else { var a = this[0]; if (a.nextSibling) if (t instanceof g) for (var o = 0; o < t.length; o++) a.nextSibling.parentNode.insertBefore(t[o], a.nextSibling); else a.nextSibling.parentNode.insertBefore(t, a.nextSibling); else b(a.parentNode).append(t) } return this }, clone: function(e) { for (var t = b(), n = 0; n < this.length; n++) t.push(this[n].cloneNode(e)); return t }, replaceWith: function(e) { if ("string" == typeof e) for (var t = 0; t < this.length; t++) this[t].parentNode && (this[t].outerHTML = e); else if (e.length) for (var n = 0; n < this.length; n++) this.replaceWith(e[n]); else this.after(e).remove() }, insertBefore: function(e) { return b(e).before(this[0]), this }, before: function e(t) { if (t instanceof g) { for (var n = 0; n < t.length; n++) this.before(t[n]); return this } if (t) if ("string" == typeof t) for (var r = 0; r < this.length; r++) { var e = this[r]; if (e.nodeType != Node.ELEMENT_NODE) { var a = e.ownerDocument.createElement("SPAN"); b(e).before(a), b(a).before(t).remove() } else e.parentNode && e.insertAdjacentHTML("beforebegin", t) } else { var o = this[0]; if (o.parentNode) if (t instanceof g) for (var i = 0; i < t.length; i++) o.parentNode.insertBefore(t[i], o); else o.parentNode.insertBefore(t, o) } return this }, append: function(e) { if (0 == this.length) return this; if ("string" == typeof e) for (var t = 0; t < this.length; t++) { var n = this[t], r = n.ownerDocument.createElement("SPAN"); b(n).append(r), b(r).after(e).remove() } else if (e instanceof g || Array.isArray(e)) for (var a = 0; a < e.length; a++) this.append(e[a]); else this[0].appendChild(e); return this }, prepend: function(e) { if (0 == this.length) return this; if ("string" == typeof e) for (var t = 0; t < this.length; t++) { var n = this[t], r = n.ownerDocument.createElement("SPAN"); b(n).prepend(r), b(r).before(e).remove() } else if (e instanceof g) for (var a = 0; a < e.length; a++) this.prepend(e[a]); else { var o = this[0]; o.firstChild ? o.firstChild ? o.insertBefore(e, o.firstChild) : o.appendChild(e) : b(o).append(e) } return this }, remove: function() { for (var e = 0; e < this.length; e++) this[e].parentNode && this[e].parentNode.removeChild(this[e]); return this }, prev: function() { return this.length && this[0].previousElementSibling ? b(this[0].previousElementSibling) : b() }, next: function() { return this.length && this[0].nextElementSibling ? b(this[0].nextElementSibling) : b() }, outerHeight: function(e) { if (0 === this.length) return undefined; var t = this[0]; if (t === t.window) return t.innerHeight; var n = {}, r = this.isVisible(); if (!r) for (var a in s) n[a] = t.style[a], t.style[a] = s[a]; var o = t.offsetHeight; if (e && (o += parseInt(b(t).css("marginTop")) + parseInt(b(t).css("marginBottom"))), !r) for (var i in s) t.style[i] = n[i]; return o }, outerWidth: function(e) { if (0 === this.length) return undefined; var t = this[0]; if (t === t.window) return t.outerWidth; var n = {}, r = this.isVisible(); if (!r) for (var a in s) n[a] = t.style[a], t.style[a] = s[a]; var o = t.offsetWidth; if (e && (o += parseInt(b(t).css("marginLeft")) + parseInt(b(t).css("marginRight"))), !r) for (var i in s) t.style[i] = n[i]; return o }, width: function(e) { if (e === undefined) return this[0] instanceof HTMLDocument ? this[0].body.offsetWidth : this[0].offsetWidth; this[0].style.width = e + "px" }, height: function(e) { var t = this[0]; if (e === undefined) { if (t instanceof HTMLDocument) { var n = t.documentElement; return Math.max(t.body.scrollHeight, n.scrollHeight, t.body.offsetHeight, n.offsetHeight, n.clientHeight) } return t.offsetHeight } t.style.height = e + "px" }, is: function(e) { return 0 !== this.length && ("string" == typeof e && this[0].matches ? this[0].matches(e) : e instanceof g ? this[0] == e[0] : this[0] == e) }, parent: function() { return 0 === this.length ? b() : b(this[0].parentNode) }, parents: function(e) { for (var t = b(), n = 0; n < this.length; n++) for (var r = this[n].parentNode; r && r != document && r.matches;) e ? r.matches(e) && t.push(r) : t.push(r), r = r.parentNode; return t }, parentsUntil: function(e, t) { var n = b(); e instanceof g && 0 < e.length && (e = e[0]); for (var r = 0; r < this.length; r++) for (var a = this[r].parentNode; a && a != document && a.matches && a != e && this[r] != e && ("string" != typeof e || !a.matches(e));) t ? a.matches(t) && n.push(a) : n.push(a), a = a.parentNode; return n }, insertAfter: function(e) { var t = e.parent()[0]; t && t.insertBefore(this[0], e[0].nextElementSibling) }, filter: function(e) { var t = b(); if ("function" == typeof e) for (var n = 0; n < this.length; n++) e.call(this[n], this[n]) && t.push(this[n]); else if ("string" == typeof e) for (var r = 0; r < this.length; r++) this[r].matches(e) && t.push(this[r]); return t }, offset: function() { var e = this[0].getBoundingClientRect(), t = this[0].ownerDocument.defaultView; return { top: e.top + t.pageYOffset, left: e.left + t.pageXOffset } }, position: function() { return { left: this[0].offsetLeft, top: this[0].offsetTop } }, push: [].push, splice: [].splice }, g.extend = function(e) { e = e || {}; for (var t = 1; t < arguments.length; t++) if (arguments[t]) for (var n in arguments[t]) Object.prototype.hasOwnProperty.call(arguments[t], n) && (e[n] = arguments[t][n]); return e }, g.merge = function(e, t) { for (var n = +t.length, r = 0, a = e.length; r < n; r++) e[a++] = t[r]; return e.length = a, e }, g.map = function(e, t, n) { var r, a, o = 0, i = []; if (Array.isArray(e)) for (r = e.length; o < r; o++) null != (a = t(e[o], o, n)) && i.push(a); else for (o in e) null != (a = t(e[o], o, n)) && i.push(a); return [].concat.apply([], i) }; var E = function E(e, t) { if (!e) return this; if ("string" == typeof e && "<" === e[0]) { var n = document.createElement("DIV"); return n.innerHTML = e, b(n.firstElementChild) } if (t = t instanceof g ? t[0] : t, "string" != typeof e) return e instanceof g ? e : (this[0] = e, this.length = 1, this); e = m(e); for (var r = (t || document).querySelectorAll(e), a = 0; a < r.length; a++) this[a] = r[a]; return this.length = r.length, this }; E.prototype = g.prototype; var T = $e; function A() { this.doc = this.$el.get(0).ownerDocument, this.win = "defaultView" in this.doc ? this.doc.defaultView : this.doc.parentWindow, this.$doc = g(this.doc), this.$win = g(this.win), this.opts.pluginsEnabled || (this.opts.pluginsEnabled = Object.keys(T.PLUGINS)), this.opts.initOnClick ? (this.load(T.MODULES), this.$el.on("touchstart.init", function() { g(this).data("touched", !0) }), this.$el.on("touchmove.init", function() { g(this).removeData("touched") }), this.$el.on("mousedown.init touchend.init dragenter.init focus.init", function r(e) { if ("touchend" === e.type && !this.$el.data("touched")) return !0; if (1 === e.which || !e.which) { this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"), this.load(T.MODULES), this.load(T.PLUGINS); var t = e.originalEvent && e.originalEvent.originalTarget; if (t && "IMG" === t.tagName && g(t).trigger("mousedown"), "undefined" == typeof this.ul && this.destroy(), "touchend" === e.type && this.image && e.originalEvent && e.originalEvent.target && g(e.originalEvent.target).is("img")) { var n = this; setTimeout(function() { n.image.edit(g(e.originalEvent.target)) }, 100) } this.ready = !0, this.events.trigger("initialized") } }.bind(this)), this.events.trigger("initializationDelayed")) : (this.load(T.MODULES), this.load(T.PLUGINS), g(this.o_win).scrollTop(this.c_scroll), "undefined" == typeof this.ul && this.destroy(), this.ready = !0, this.events.trigger("initialized")) } if (T.Bootstrap = function(e, t, n) { this.id = ++T.ID, this.$ = g; var r = {}; "function" == typeof t && (n = t, t = {}), n && (t.events || (t.events = {}), t.events.initialized = n), t && t.documentReady && (r.toolbarButtons = [ ["fullscreen", "undo", "redo", "getPDF", "print"], ["bold", "italic", "underline", "textColor", "backgroundColor", "clearFormatting"], ["alignLeft", "alignCenter", "alignRight", "alignJustify"], ["formatOL", "formatUL", "indent", "outdent"], ["paragraphFormat"], ["fontFamily"], ["fontSize"], ["insertLink", "insertImage", "quote"] ], r.paragraphFormatSelection = !0, r.fontFamilySelection = !0, r.fontSizeSelection = !0, r.placeholderText = "", r.quickInsertEnabled = !1, r.charCounterCount = !1), this.opts = Object.assign({}, Object.assign({}, T.DEFAULTS, r, "object" === Fe(t) && t)); var a = JSON.stringify(this.opts); T.OPTS_MAPPING[a] = T.OPTS_MAPPING[a] || this.id, this.sid = T.OPTS_MAPPING[a], T.SHARED[this.sid] = T.SHARED[this.sid] || {}, this.shared = T.SHARED[this.sid], this.shared.count = (this.shared.count || 0) + 1, this.$oel = g(e), this.$oel.data("froala.editor", this), this.o_doc = e.ownerDocument, this.o_win = "defaultView" in this.o_doc ? this.o_doc.defaultView : this.o_doc.parentWindow, this.c_scroll = g(this.o_win).scrollTop(), this._init() }, T.Bootstrap.prototype._init = function() { var e = this.$oel.get(0).tagName; this.$oel.closest("label").length; var t = function() { "TEXTAREA" !== e && (this._original_html = this._original_html || this.$oel.html()), this.$box = this.$box || this.$oel, this.opts.fullPage && (this.opts.iframe = !0), this.opts.iframe ? (this.$iframe = g('', provider: "youtube" }, { test_regex: /^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/, url_regex: /(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i, url_text: "https://player.vimeo.com/video/$1", html: '', provider: "vimeo" }, { test_regex: /^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/, url_regex: /(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g, url_text: "https://www.dailymotion.com/embed/video/$1", html: '', provider: "dailymotion" }, { test_regex: /^.+(screen.yahoo.com)\/[^_&]+/, url_regex: "", url_text: "", html: '', provider: "yahoo" }, { test_regex: /^.+(rutube.ru)\/[^_&]+/, url_regex: /(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g, url_text: "https://rutube.ru/play/embed/$1", html: '', provider: "rutube" }, { test_regex: /^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/, url_regex: /^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g, url_text: "https://play.vidyard.com/$1", html: '', provider: "vidyard" }], $e.VIDEO_EMBED_REGEX = /^\W*(((\s|\n)*<\/iframe>)|())\W*$/i, $e.PLUGINS.video = function(u) { var s, d, f, p, r, n, h = u.$, l = "https://i.froala.com/upload", g = 2, m = 3, v = 4, c = 5, b = 6, a = {}; function E() { var e = u.popups.get("video.insert"); e.find(".fr-video-by-url-layer input").val("").trigger("change"); var t = e.find(".fr-video-embed-layer textarea"); t.val("").trigger("change"), (t = e.find(".fr-video-upload-layer input")).val("").trigger("change") } function o() { var e = u.popups.get("video.edit"); if (e || (e = function a() { var e = ""; if (0 < u.opts.videoEditButtons.length) { u.opts.videoResponsive && (-1 < u.opts.videoEditButtons.indexOf("videoSize") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoSize"), 1), -1 < u.opts.videoEditButtons.indexOf("videoDisplay") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoDisplay"), 1), -1 < u.opts.videoEditButtons.indexOf("videoAlign") && u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoAlign"), 1)); var t = { buttons: e += '
    \n '.concat(u.button.buildList(u.opts.videoEditButtons), " \n
    ") }, n = u.popups.create("video.edit", t); return u.events.$on(u.$wp, "scroll.video-edit", function() { p && u.popups.isVisible("video.edit") && (u.events.disableBlur(), w(p)) }), n } return !1 }()), e) { u.popups.setContainer("video.edit", u.$sc), u.popups.refresh("video.edit"); var t = p.find("iframe, embed, video"), n = t.offset().left + t.outerWidth() / 2, r = t.offset().top + t.outerHeight(); u.popups.show("video.edit", n, r, t.outerHeight(), !0) } } function i(e) { if (e) return u.popups.onRefresh("video.insert", E), u.popups.onHide("video.insert", X), !0; var t = ""; u.opts.videoUpload || -1 === u.opts.videoInsertButtons.indexOf("videoUpload") || u.opts.videoInsertButtons.splice(u.opts.videoInsertButtons.indexOf("videoUpload"), 1); var n = u.button.buildList(u.opts.videoInsertButtons); "" !== n && (t = '
    ' + n + "
    "); var r, a = "", o = u.opts.videoInsertButtons.indexOf("videoUpload"), i = u.opts.videoInsertButtons.indexOf("videoByURL"), s = u.opts.videoInsertButtons.indexOf("videoEmbed"); 0 <= i && (r = " fr-active", (o < i && 0 <= o || s < i && 0 <= s) && (r = ""), a = '
    "); var l = ""; 0 <= s && (r = " fr-active", (o < s && 0 <= o || i < s && 0 <= i) && (r = ""), l = '
    "); var c = ""; 0 <= o && (r = " fr-active", (s < o && 0 <= s || i < o && 0 <= i) && (r = ""), c = '
    ' + u.language.translate("Drop video") + "
    (" + u.language.translate("or click") + ')
    '); var d = { buttons: t, by_url_layer: a, embed_layer: l, upload_layer: c, progress_bar: '

    Uploading

    ' }, f = u.popups.create("video.insert", d); return function p(r) { u.events.$on(r, "dragover dragenter", ".fr-video-upload-layer", function() { return h(this).addClass("fr-drop"), !1 }, !0), u.events.$on(r, "dragleave dragend", ".fr-video-upload-layer", function() { return h(this).removeClass("fr-drop"), !1 }, !0), u.events.$on(r, "drop", ".fr-video-upload-layer", function(e) { e.preventDefault(), e.stopPropagation(), h(this).removeClass("fr-drop"); var t = e.originalEvent.dataTransfer; if (t && t.files) { var n = r.data("instance") || u; n.events.disableBlur(), n.video.upload(t.files), n.events.enableBlur() } }, !0), u.helpers.isIOS() && u.events.$on(r, "touchstart", '.fr-video-upload-layer input[type="file"]', function() { h(this).trigger("click") }, !0); u.events.$on(r, "change", '.fr-video-upload-layer input[type="file"]', function() { if (this.files) { var e = r.data("instance") || u; e.events.disableBlur(), r.find("input:focus").blur(), e.events.enableBlur(), e.video.upload(this.files) } h(this).val("") }, !0) }(f), f } function T(e) { u.events.focus(!0), u.selection.restore(); var t = !1; p && (q(), t = !0), u.html.insert('' + e + "", !1, u.opts.videoSplitHTML), u.popups.hide("video.insert"); var n = u.$el.find(".fr-jiv"); n.removeClass("fr-jiv"), n.toggleClass("fr-rv", u.opts.videoResponsive), Z(n, u.opts.videoDefaultDisplay, u.opts.videoDefaultAlign), n.toggleClass("fr-draggable", u.opts.videoMove), u.events.trigger(t ? "video.replaced" : "video.inserted", [n]) } function A() { var e = h(this); u.popups.hide("video.insert"), e.removeClass("fr-uploading"), e.parent().next().is("br") && e.parent().next().remove(), w(e.parent()), u.events.trigger("video.loaded", [e.parent()]) } function C(s, e, c, d, f) { u.edit.off(), R("Loading video"), e && (s = u.helpers.sanitizeURL(s)); var p = function p() { var e, t; if (d) { u.undo.canDo() || d.find("video").hasClass("fr-uploading") || u.undo.saveStep(); var n = d.find("video").data("fr-old-src"), r = d.data("fr-replaced"); d.data("fr-replaced", !1), u.$wp ? ((e = d.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"), e.find("video").off("canplay"), n && d.find("video").attr("src", n), d.replaceWith(e)) : e = d; for (var a = e.find("video").get(0).attributes, o = 0; o < a.length; o++) { var i = a[o]; 0 === i.nodeName.indexOf("data-") && e.find("video").removeAttr(i.nodeName) } if (void 0 !== c) for (t in c) c.hasOwnProperty(t) && "link" != t && e.find("video").attr("data-" + t, c[t]); e.find("video").on("canplay", A), e.find("video").attr("src", s), u.edit.on(), F(), u.undo.saveStep(), u.$el.blur(), u.events.trigger(r ? "video.replaced" : "video.inserted", [e, f]) } else e = function l(e, t, n) { var r, a = ""; if (t && void 0 !== t) for (r in t) t.hasOwnProperty(r) && "link" != r && (a += " data-" + r + '="' + t[r] + '"'); var o = u.opts.videoDefaultWidth; o && "auto" != o && (o += "px"); var i = h(document.createElement("span")).attr("contenteditable", "false").attr("draggable", "true").attr("class", "fr-video fr-dv" + u.opts.videoDefaultDisplay[0] + ("center" != u.opts.videoDefaultAlign ? " fr-fv" + u.opts.videoDefaultAlign[0] : "")).html('"); i.toggleClass("fr-draggable", u.opts.videoMove), u.edit.on(), u.events.focus(!0), u.selection.restore(), u.undo.saveStep(), u.opts.videoSplitHTML ? u.markers.split() : u.markers.insert(); u.html.wrap(); var s = u.$el.find(".fr-marker"); u.node.isLastSibling(s) && s.parent().hasClass("fr-deletable") && s.insertAfter(s.parent()); s.replaceWith(i), u.selection.clear(), i.find("video").get(0).readyState > i.find("video").get(0).HAVE_FUTURE_DATA || u.helpers.isIOS() ? n.call(i.find("video").get(0)) : i.find("video").on("canplaythrough load", n); return i }(s, c, A), F(), u.undo.saveStep(), u.events.trigger("video.inserted", [e, f]) }; S("Loading video"), p() } function S(e) { var t = u.popups.get("video.insert"); if (t || (t = i()), t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"), t.find(".fr-video-progress-bar-layer").addClass("fr-active"), t.find(".fr-buttons").hide(), p) { var n = p.find("video"); u.popups.setContainer("video.insert", u.$sc); var r = n.offset().left, a = n.offset().top + n.height(); u.popups.show("video.insert", r, a, n.outerHeight()) } void 0 === e && R(u.language.translate("Uploading"), 0) } function y(e) { var t = u.popups.get("video.insert"); if (t && (t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"), t.find(".fr-video-progress-bar-layer").removeClass("fr-active"), t.find(".fr-buttons").show(), e || u.$el.find("video.fr-error").length)) { if (u.events.focus(), u.$el.find("video.fr-error").length && (u.$el.find("video.fr-error").parent().remove(), u.undo.saveStep(), u.undo.run(), u.undo.dropRedo()), !u.$wp && p) { var n = p; P(!0), u.selection.setAfter(n.find("video").get(0)), u.selection.restore() } u.popups.hide("video.insert") } } function R(e, t) { var n = u.popups.get("video.insert"); if (n) { var r = n.find(".fr-video-progress-bar-layer"); r.find("h3").text(e + (t ? " " + t + "%" : "")), r.removeClass("fr-error"), t ? (r.find("div").removeClass("fr-indeterminate"), r.find("div > span").css("width", t + "%")) : r.find("div").addClass("fr-indeterminate") } } function L(e) { S(); var t = u.popups.get("video.insert").find(".fr-video-progress-bar-layer"); t.addClass("fr-error"); var n = t.find("h3"); n.text(e), u.events.disableBlur(), n.focus() } function w(e) { t.call(e.get(0)) } function _(e) { R("Loading video"); var t = this.status, n = this.response, r = this.responseXML, a = this.responseText; try { if (u.opts.videoUploadToS3) if (201 == t) { var o = function s(e) { try { var t = h(e).find("Location").text(), n = h(e).find("Key").text(); return !1 === u.events.trigger("video.uploadedToS3", [t, n, e], !0) ? (u.edit.on(), !1) : t } catch (r) { return V(v, e), !1 } }(r); o && C(o, !1, [], e, n || r) } else V(v, n || r); else if (200 <= t && t < 300) { var i = function l(e) { try { if (!1 === u.events.trigger("video.uploaded", [e], !0)) return u.edit.on(), !1; var t = JSON.parse(e); return t.link ? t : (V(g, e), !1) } catch (n) { return V(v, e), !1 } }(a); i && C(i.link, !1, i, e, n || a) } else V(m, n || a) } catch (c) { V(v, n || a) } } function O() { V(v, this.response || this.responseText || this.responseXML) } function N(e) { if (e.lengthComputable) { var t = e.loaded / e.total * 100 | 0; R(u.language.translate("Uploading"), t) } } function x() { u.edit.on(), y(!0) } function I(e) { if (!u.core.sameInstance(f)) return !0; e.preventDefault(), e.stopPropagation(); var t = e.pageX || (e.originalEvent.touches ? e.originalEvent.touches[0].pageX : null), n = e.pageY || (e.originalEvent.touches ? e.originalEvent.touches[0].pageY : null); if (!t || !n) return !1; if ("mousedown" == e.type) { var r = u.$oel.get(0).ownerDocument, a = r.defaultView || r.parentWindow, o = !1; try { o = a.location != a.parent.location && !(a.$ && a.$.FE) } catch (i) {} o && a.frameElement && (t += u.helpers.getPX(h(a.frameElement).offset().left) + a.frameElement.clientLeft, n = e.clientY + u.helpers.getPX(h(a.frameElement).offset().top) + a.frameElement.clientTop) } u.undo.canDo() || u.undo.saveStep(), (d = h(this)).data("start-x", t), d.data("start-y", n), s.show(), u.popups.hideAll(), K() } function k(e) { if (!u.core.sameInstance(f)) return !0; if (d) { e.preventDefault(); var t = e.pageX || (e.originalEvent.touches ? e.originalEvent.touches[0].pageX : null), n = e.pageY || (e.originalEvent.touches ? e.originalEvent.touches[0].pageY : null); if (!t || !n) return !1; var r = d.data("start-x"), a = d.data("start-y"); d.data("start-x", t), d.data("start-y", n); var o = t - r, i = n - a, s = p.find("iframe, embed, video"), l = s.width(), c = s.height(); (d.hasClass("fr-hnw") || d.hasClass("fr-hsw")) && (o = 0 - o), (d.hasClass("fr-hnw") || d.hasClass("fr-hne")) && (i = 0 - i), s.css("width", l + o), s.css("height", c + i), s.removeAttr("width"), s.removeAttr("height"), $() } } function M(e) { if (!u.core.sameInstance(f)) return !0; d && p && (e && e.stopPropagation(), d = null, s.hide(), $(), o(), u.undo.saveStep()) } function D(e) { return '
    ' } function B(e, t, n, r) { return e.pageX = t, e.pageY = t, I.call(this, e), e.pageX = e.pageX + n * Math.floor(Math.pow(1.1, r)), e.pageY = e.pageY + n * Math.floor(Math.pow(1.1, r)), k.call(this, e), M.call(this, e), ++r } function F() { var e, t = Array.prototype.slice.call(u.el.querySelectorAll("video, .fr-video > *")), n = []; for (e = 0; e < t.length; e++) n.push(t[e].getAttribute("src")), h(t[e]).toggleClass("fr-draggable", u.opts.videoMove), "" === t[e].getAttribute("class") && t[e].removeAttribute("class"), "" === t[e].getAttribute("style") && t[e].removeAttribute("style"); if (r) for (e = 0; e < r.length; e++) n.indexOf(r[e].getAttribute("src")) < 0 && u.events.trigger("video.removed", [h(r[e])]); r = t } function $() { f || function i() { var e; if (u.shared.$video_resizer ? (f = u.shared.$video_resizer, s = u.shared.$vid_overlay, u.events.on("destroy", function() { h("body").first().append(f.removeClass("fr-active")) }, !0)) : (u.shared.$video_resizer = h(document.createElement("div")).attr("class", "fr-video-resizer"), f = u.shared.$video_resizer, u.events.$on(f, "mousedown", function(e) { e.stopPropagation() }, !0), u.opts.videoResize && (f.append(D("nw") + D("ne") + D("sw") + D("se")), u.shared.$vid_overlay = h(document.createElement("div")).attr("class", "fr-video-overlay"), s = u.shared.$vid_overlay, e = f.get(0).ownerDocument, h(e).find("body").first().append(s))), u.events.on("shared.destroy", function() { f.html("").removeData().remove(), f = null, u.opts.videoResize && (s.remove(), s = null) }, !0), u.helpers.isMobile() || u.events.$on(h(u.o_win), "resize.video", function() { P(!0) }), u.opts.videoResize) { e = f.get(0).ownerDocument, u.events.$on(f, u._mousedown, ".fr-handler", I), u.events.$on(h(e), u._mousemove, k), u.events.$on(h(e.defaultView || e.parentWindow), u._mouseup, M), u.events.$on(s, "mouseleave", M); var r = 1, a = null, o = 0; u.events.on("keydown", function(e) { if (p) { var t = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey, n = e.which; (n !== a || 200 < e.timeStamp - o) && (r = 1), (n == $e.KEYCODE.EQUALS || u.browser.mozilla && n == $e.KEYCODE.FF_EQUALS) && t && !e.altKey ? r = B.call(this, e, 1, 1, r) : (n == $e.KEYCODE.HYPHEN || u.browser.mozilla && n == $e.KEYCODE.FF_HYPHEN) && t && !e.altKey && (r = B.call(this, e, 2, -1, r)), a = n, o = e.timeStamp } }), u.events.on("keyup", function() { r = 1 }) } }(), (u.$wp || u.$sc).append(f), f.data("instance", u); var e = p.find("iframe, embed, video"), t = 0, n = 0; u.opts.iframe && (n = u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-top")), t = u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-left"))), f.css("top", (u.opts.iframe ? e.offset().top + n - 1 : e.offset().top - u.$wp.offset().top - 1) + u.$wp.scrollTop()).css("left", (u.opts.iframe ? e.offset().left + t - 1 : e.offset().left - u.$wp.offset().left - 1) + u.$wp.scrollLeft()).css("width", e.get(0).getBoundingClientRect().width).css("height", e.get(0).getBoundingClientRect().height).addClass("fr-active") } function t(e) { if (e && "touchend" == e.type && n) return !0; if (e && u.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1; if (u.edit.isDisabled()) return !1; for (var t = 0; t < $e.INSTANCES.length; t++) $e.INSTANCES[t] != u && $e.INSTANCES[t].events.trigger("video.hideResizer"); u.toolbar.disable(), u.helpers.isMobile() && (u.events.disableBlur(), u.$el.blur(), u.events.enableBlur()), u.$el.find(".fr-video.fr-active").removeClass("fr-active"), (p = h(this)).addClass("fr-active"), u.opts.iframe && u.size.syncIframe(), J(), $(), o(), u.selection.clear(), u.button.bulkRefresh(), u.events.trigger("image.hideResizer") } function P(e) { p && (function t() { return u.shared.vid_exit_flag }() || !0 === e) && (f.removeClass("fr-active"), u.toolbar.enable(), p.removeClass("fr-active"), p = null, K()) } function H() { u.shared.vid_exit_flag = !0 } function K() { u.shared.vid_exit_flag = !1 } function U(e) { var t = e.originalEvent.dataTransfer; if (t && t.files && t.files.length) { var n = t.files[0]; if (n && n.type && -1 !== n.type.indexOf("video")) { if (!u.opts.videoUpload) return e.preventDefault(), e.stopPropagation(), !1; u.markers.remove(), u.markers.insertAtPoint(e.originalEvent), u.$el.find(".fr-marker").replaceWith($e.MARKERS), u.popups.hideAll(); var r = u.popups.get("video.insert"); return r || (r = i()), u.popups.setContainer("video.insert", u.$sc), u.popups.show("video.insert", e.originalEvent.pageX, e.originalEvent.pageY), S(), 0 <= u.opts.videoAllowedTypes.indexOf(n.type.replace(/video\//g, "")) ? W(t.files) : V(b), e.preventDefault(), e.stopPropagation(), !1 } } } function W(e) { if (void 0 !== e && 0 < e.length) { if (!1 === u.events.trigger("video.beforeUpload", [e])) return !1; var t, n = e[0]; if ((null === u.opts.videoUploadURL || u.opts.videoUploadURL == l) && !u.opts.videoUploadToS3) return function s(r) { p && p.find("iframe") && p.find("iframe").length && q(); var a = new FileReader; a.onload = function() { a.result; for (var e = atob(a.result.split(",")[1]), t = [], n = 0; n < e.length; n++) t.push(e.charCodeAt(n)); C(window.URL.createObjectURL(new Blob([new Uint8Array(t)], { type: r.type })), !1, null, p) }, S(), a.readAsDataURL(r) }(n), !1; if (n.size > u.opts.videoMaxSize) return V(c), !1; if (u.opts.videoAllowedTypes.indexOf(n.type.replace(/video\//g, "")) < 0) return V(b), !1; if (u.drag_support.formdata && (t = u.drag_support.formdata ? new FormData : null), t) { var r; if (!1 !== u.opts.videoUploadToS3) for (r in t.append("key", u.opts.videoUploadToS3.keyStart + (new Date).getTime() + "-" + (n.name || "untitled")), t.append("success_action_status", "201"), t.append("X-Requested-With", "xhr"), t.append("Content-Type", n.type), u.opts.videoUploadToS3.params) u.opts.videoUploadToS3.params.hasOwnProperty(r) && t.append(r, u.opts.videoUploadToS3.params[r]); for (r in u.opts.videoUploadParams) u.opts.videoUploadParams.hasOwnProperty(r) && t.append(r, u.opts.videoUploadParams[r]); t.append(u.opts.videoUploadParam, n); var a = u.opts.videoUploadURL; u.opts.videoUploadToS3 && (a = u.opts.videoUploadToS3.uploadURL ? u.opts.videoUploadToS3.uploadURL : "https://" + u.opts.videoUploadToS3.region + ".amazonaws.com/" + u.opts.videoUploadToS3.bucket); var o = u.core.getXHR(a, u.opts.videoUploadMethod); o.onload = function() { _.call(o, p) }, o.onerror = O, o.upload.onprogress = N, o.onabort = x, S(), u.events.disableBlur(), u.edit.off(), u.events.enableBlur(); var i = u.popups.get("video.insert"); i && h(i.off("abortUpload")).on("abortUpload", function() { 4 != o.readyState && o.abort() }), o.send(t) } } } function V(e, t) { u.edit.on(), p && p.find("video").addClass("fr-error"), L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.error", [{ code: e, message: a[e] }, t ]) } function z() { if (p) { var e = u.popups.get("video.size"), t = p.find("iframe, embed, video"); e.find('input[name="width"]').val(t.get(0).style.width || t.attr("width")).trigger("change"), e.find('input[name="height"]').val(t.get(0).style.height || t.attr("height")).trigger("change") } } function G(e) { if (e) return u.popups.onRefresh("video.size", z), !0; var t = { buttons: '
    ' + u.button.buildList(u.opts.videoSizeButtons) + "
    ", size_layer: '
    " }, n = u.popups.create("video.size", t); return u.events.$on(u.$wp, "scroll", function() { p && u.popups.isVisible("video.size") && (u.events.disableBlur(), w(p)) }), n } function Y(e) { if (void 0 === e && (e = p), e) { if (e.hasClass("fr-fvl")) return "left"; if (e.hasClass("fr-fvr")) return "right"; if (e.hasClass("fr-dvb") || e.hasClass("fr-dvi")) return "center"; if ("block" == e.css("display")) { if ("left" == e.css("text-algin")) return "left"; if ("right" == e.css("text-align")) return "right" } else { if ("left" == e.css("float")) return "left"; if ("right" == e.css("float")) return "right" } } return "center" } function j(e) { void 0 === e && (e = p); var t = e.css("float"); return e.css("float", "none"), "block" == e.css("display") ? (e.css("float", ""), e.css("float") != t && e.css("float", t), "block") : (e.css("float", ""), e.css("float") != t && e.css("float", t), "inline") } function q() { if (p && !1 !== u.events.trigger("video.beforeRemove", [p])) { var e = p; u.popups.hideAll(), P(!0), u.selection.setBefore(e.get(0)) || u.selection.setAfter(e.get(0)), e.remove(), u.selection.restore(), u.html.fillEmptyBlocks() } } function X() { y() } function Z(e, t, n) { !u.opts.htmlUntouched && u.opts.useClasses ? (e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"), e.addClass("fr-fv" + n[0] + " fr-dv" + t[0])) : "inline" == t ? (e.css({ display: "inline-block" }), "center" == n ? e.css({ "float": "none" }) : "left" == n ? e.css({ "float": "left" }) : e.css({ "float": "right" })) : (e.css({ display: "block", clear: "both" }), "left" == n ? e.css({ textAlign: "left" }) : "right" == n ? e.css({ textAlign: "right" }) : e.css({ textAlign: "center" })) } function Q() { var e = u.$el.find("video").filter(function() { return 0 === h(this).parents("span.fr-video").length }); if (0 != e.length) { e.wrap(h(document.createElement("span")).attr("class", "fr-video fr-deletable").attr("contenteditable", "false")), u.$el.find("embed, iframe").filter(function() { if (u.browser.safari && this.getAttribute("src") && this.setAttribute("src", this.src), 0 < h(this).parents("span.fr-video").length) return !1; for (var e = h(this).attr("src"), t = 0; t < $e.VIDEO_PROVIDERS.length; t++) { var n = $e.VIDEO_PROVIDERS[t]; if (n.test_regex.test(e) && new RegExp(u.opts.videoAllowedProviders.join("|")).test(n.provider)) return !0 } return !1 }).map(function() { return 0 === h(this).parents("object").length ? this : h(this).parents("object").get(0) }).wrap(h(document.createElement("span")).attr("class", "fr-video").attr("contenteditable", "false")); for (var t, n, r, a, o = u.$el.find("span.fr-video, video"), i = 0; i < o.length; i++) { var s = h(o[i]); !u.opts.htmlUntouched && u.opts.useClasses ? ((a = s).hasClass("fr-dvi") || a.hasClass("fr-dvb") || (a.addClass("fr-fv" + Y(a)[0]), a.addClass("fr-dv" + j(a)[0])), u.opts.videoTextNear || s.removeClass("fr-dvi").addClass("fr-dvb")) : u.opts.htmlUntouched || u.opts.useClasses || (void 0, n = (t = s).hasClass("fr-dvb") ? "block" : t.hasClass("fr-dvi") ? "inline" : null, r = t.hasClass("fr-fvl") ? "left" : t.hasClass("fr-fvr") ? "right" : Y(t), Z(t, n, r), t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl")) } o.toggleClass("fr-draggable", u.opts.videoMove) } } function J() { if (p) { u.selection.clear(); var e = u.doc.createRange(); e.selectNode(p.get(0)), u.selection.get().addRange(e) } } return a[1] = "Video cannot be loaded from the passed link.", a[g] = "No link in upload response.", a[m] = "Error during file upload.", a[v] = "Parsing response failed.", a[c] = "File is too large.", a[b] = "Video file type is invalid.", a[7] = "Files can be uploaded only to same domain in IE 8 and IE 9.", u.shared.vid_exit_flag = !1, { _init: function ee() { u.opts.videoResponsive && (u.opts.videoResize = !1), function e() { u.events.on("drop", U, !0), u.events.on("mousedown window.mousedown", H), u.events.on("window.touchmove", K), u.events.on("mouseup window.mouseup", P), u.events.on("commands.mousedown", function(e) { 0 < e.parents(".fr-toolbar").length && P() }), u.events.on("video.hideResizer commands.undo commands.redo element.dropped", function() { P(!0) }) }(), u.helpers.isMobile() && (u.events.$on(u.$el, "touchstart", "span.fr-video", function() { n = !1 }), u.events.$on(u.$el, "touchmove", function() { n = !0 })), u.events.on("html.set", Q), Q(), u.events.$on(u.$el, "mousedown", "span.fr-video", function(e) { e.stopPropagation(), (u.browser.msie || u.browser.edge) && (e.target.dragDrop(), t.call(this, e)) }), u.events.$on(u.$el, "click touchend", "span.fr-video", function(e) { if ("false" == h(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable")) return !0; t.call(this, e) }), u.events.on("keydown", function(e) { var t = e.which; return !p || t != $e.KEYCODE.BACKSPACE && t != $e.KEYCODE.DELETE ? p && t == $e.KEYCODE.ESC ? (P(!0), e.preventDefault(), !1) : p && t != $e.KEYCODE.F10 && !u.keys.isBrowserAction(e) ? (e.preventDefault(), !1) : void 0 : (e.preventDefault(), q(), u.undo.saveStep(), !1) }, !0), u.events.on("toolbar.esc", function() { if (p) return u.events.disableBlur(), u.events.focus(), !1 }, !0), u.events.on("toolbar.focusEditor", function() { if (p) return !1 }, !0), u.events.on("keydown", function() { u.$el.find("span.fr-video:empty").remove() }), u.$wp && (F(), u.events.on("contentChanged", F)), i(!0), G(!0) }, showInsertPopup: function te() { var e = u.$tb.find('.fr-command[data-cmd="insertVideo"]'), t = u.popups.get("video.insert"); if (t || (t = i()), y(), !t.hasClass("fr-active")) if (u.popups.refresh("video.insert"), u.popups.setContainer("video.insert", u.$tb), e.isVisible()) { var n = u.button.getPosition(e), r = n.left, a = n.top; u.popups.show("video.insert", r, a, e.outerHeight()) } else u.position.forSelection(t), u.popups.show("video.insert") }, showLayer: function ne(e) { var t, n, r = u.popups.get("video.insert"); if (!p && !u.opts.toolbarInline) { var a = u.$tb.find('.fr-command[data-cmd="insertVideo"]'); t = a.offset().left, n = a.offset().top + (u.opts.toolbarBottom ? 10 : a.outerHeight() - 10) } u.opts.toolbarInline && (n = r.offset().top - u.helpers.getPX(r.css("margin-top")), r.hasClass("fr-above") && (n += r.outerHeight())), r.find(".fr-layer").removeClass("fr-active"), r.find(".fr-" + e + "-layer").addClass("fr-active"), u.popups.show("video.insert", t, n, 0), u.accessibility.focusPopup(r) }, refreshByURLButton: function re(e) { var t = u.popups.get("video.insert"); t && t.find(".fr-video-by-url-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0) }, refreshEmbedButton: function ae(e) { var t = u.popups.get("video.insert"); t && t.find(".fr-video-embed-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0) }, refreshUploadButton: function oe(e) { var t = u.popups.get("video.insert"); t && t.find(".fr-video-upload-layer").hasClass("fr-active") && e.addClass("fr-active").attr("aria-pressed", !0) }, upload: W, insertByURL: function ie(e) { void 0 === e && (e = (u.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val() || "").trim()); var t = null; if (/^http/.test(e) || (e = "https://" + e), u.helpers.isURL(e)) for (var n = 0; n < $e.VIDEO_PROVIDERS.length; n++) { var r = $e.VIDEO_PROVIDERS[n]; if (r.test_regex.test(e) && new RegExp(u.opts.videoAllowedProviders.join("|")).test(r.provider)) { t = e.replace(r.url_regex, r.url_text), t = r.html.replace(/\{url\}/, t); break } } t ? T(t) : (L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.linkError", [e])) }, insertEmbed: function se(e) { void 0 === e && (e = u.popups.get("video.insert").find(".fr-video-embed-layer textarea").val() || ""), 0 !== e.length && $e.VIDEO_EMBED_REGEX.test(e) ? T(e) : (L(u.language.translate("Something went wrong. Please try again.")), u.events.trigger("video.codeError", [e])) }, insert: T, align: function le(e) { p.removeClass("fr-fvr fr-fvl"), !u.opts.htmlUntouched && u.opts.useClasses ? "left" == e ? p.addClass("fr-fvl") : "right" == e && p.addClass("fr-fvr") : Z(p, j(), e), J(), $(), o(), u.selection.clear() }, refreshAlign: function ce(e) { if (!p) return !1; e.find(">*").first().replaceWith(u.icon.create("video-align-" + Y())) }, refreshAlignOnShow: function de(e, t) { p && t.find('.fr-command[data-param1="' + Y() + '"]').addClass("fr-active").attr("aria-selected", !0) }, display: function fe(e) { p.removeClass("fr-dvi fr-dvb"), !u.opts.htmlUntouched && u.opts.useClasses ? "inline" == e ? p.addClass("fr-dvi") : "block" == e && p.addClass("fr-dvb") : Z(p, e, Y()), J(), $(), o(), u.selection.clear() }, refreshDisplayOnShow: function pe(e, t) { p && t.find('.fr-command[data-param1="' + j() + '"]').addClass("fr-active").attr("aria-selected", !0) }, remove: q, hideProgressBar: y, showSizePopup: function ue() { var e = u.popups.get("video.size"); e || (e = G()), y(), u.popups.refresh("video.size"), u.popups.setContainer("video.size", u.$sc); var t = p.find("iframe, embed, video"), n = t.offset().left + t.outerWidth() / 2, r = t.offset().top + t.height(); u.popups.show("video.size", n, r, t.height(), !0) }, replace: function he() { var e = u.popups.get("video.insert"); e || (e = i()), u.popups.isVisible("video.insert") || (y(), u.popups.refresh("video.insert"), u.popups.setContainer("video.insert", u.$sc)); var t = p.offset().left + p.outerWidth() / 2, n = p.offset().top + p.height(); u.popups.show("video.insert", t, n, p.outerHeight(), !0) }, back: function e() { p ? (u.events.disableBlur(), p[0].click()) : (u.events.disableBlur(), u.selection.restore(), u.events.enableBlur(), u.popups.hide("video.insert"), u.toolbar.showInline()) }, setSize: function ge(e, t) { if (p) { var n = u.popups.get("video.size"), r = p.find("iframe, embed, video"); r.css("width", e || n.find('input[name="width"]').val()), r.css("height", t || n.find('input[name="height"]').val()), r.get(0).style.width && r.removeAttr("width"), r.get(0).style.height && r.removeAttr("height"), n.find("input:focus").blur(), setTimeout(function() { p.trigger("click") }, u.helpers.isAndroid() ? 50 : 0) } }, get: function me() { return p }, showProgressBar: S } }, $e.RegisterCommand("insertVideo", { title: "Insert Video", undo: !1, focus: !0, refreshAfterCallback: !1, popup: !0, callback: function() { this.popups.isVisible("video.insert") ? (this.$el.find(".fr-marker").length && (this.events.disableBlur(), this.selection.restore()), this.popups.hide("video.insert")) : this.video.showInsertPopup() }, plugin: "video" }), $e.DefineIcon("insertVideo", { NAME: "video-camera", FA5NAME: "camera", SVG_KEY: "insertVideo" }), $e.DefineIcon("videoByURL", { NAME: "link", SVG_KEY: "insertLink" }), $e.RegisterCommand("videoByURL", { title: "By URL", undo: !1, focus: !1, toggle: !0, callback: function() { this.video.showLayer("video-by-url") }, refresh: function(e) { this.video.refreshByURLButton(e) } }), $e.DefineIcon("videoEmbed", { NAME: "code", SVG_KEY: "codeView" }), $e.RegisterCommand("videoEmbed", { title: "Embedded Code", undo: !1, focus: !1, toggle: !0, callback: function() { this.video.showLayer("video-embed") }, refresh: function(e) { this.video.refreshEmbedButton(e) } }), $e.DefineIcon("videoUpload", { NAME: "upload", SVG_KEY: "upload" }), $e.RegisterCommand("videoUpload", { title: "Upload Video", undo: !1, focus: !1, toggle: !0, callback: function() { this.video.showLayer("video-upload") }, refresh: function(e) { this.video.refreshUploadButton(e) } }), $e.RegisterCommand("videoInsertByURL", { undo: !0, focus: !0, callback: function() { this.video.insertByURL() } }), $e.RegisterCommand("videoInsertEmbed", { undo: !0, focus: !0, callback: function() { this.video.insertEmbed() } }), $e.DefineIcon("videoDisplay", { NAME: "star", SVG_KEY: "star" }), $e.RegisterCommand("videoDisplay", { title: "Display", type: "dropdown", options: { inline: "Inline", block: "Break Text" }, callback: function(e, t) { this.video.display(t) }, refresh: function(e) { this.opts.videoTextNear || e.addClass("fr-hidden") }, refreshOnShow: function(e, t) { this.video.refreshDisplayOnShow(e, t) } }), $e.DefineIcon("video-align", { NAME: "align-left", SVG_KEY: "align Left" }), $e.DefineIcon("video-align-left", { NAME: "align-left", SVG_KEY: "alignLeft" }), $e.DefineIcon("video-align-right", { NAME: "align-right", SVG_KEY: "alignRight" }), $e.DefineIcon("video-align-center", { NAME: "align-justify", SVG_KEY: "alignJustify" }), $e.DefineIcon("videoAlign", { NAME: "align-center", SVG_KEY: "alignCenter" }), $e.RegisterCommand("videoAlign", { type: "dropdown", title: "Align", options: { left: "Align Left", center: "None", right: "Align Right" }, html: function() { var e = '" }, callback: function(e, t) { this.video.align(t) }, refresh: function(e) { this.video.refreshAlign(e) }, refreshOnShow: function(e, t) { this.video.refreshAlignOnShow(e, t) } }), $e.DefineIcon("videoReplace", { NAME: "exchange", FA5NAME: "exchange-alt", SVG_KEY: "replaceImage" }), $e.RegisterCommand("videoReplace", { title: "Replace", undo: !1, focus: !1, popup: !0, refreshAfterCallback: !1, callback: function() { this.video.replace() } }), $e.DefineIcon("videoRemove", { NAME: "trash", SVG_KEY: "remove" }), $e.RegisterCommand("videoRemove", { title: "Remove", callback: function() { this.video.remove() } }), $e.DefineIcon("videoSize", { NAME: "arrows-alt", SVG_KEY: "imageSize" }), $e.RegisterCommand("videoSize", { undo: !1, focus: !1, popup: !0, title: "Change Size", callback: function() { this.video.showSizePopup() } }), $e.DefineIcon("videoBack", { NAME: "arrow-left", SVG_KEY: "back" }), $e.RegisterCommand("videoBack", { title: "Back", undo: !1, focus: !1, back: !0, callback: function() { this.video.back() }, refresh: function(e) { this.video.get() || this.opts.toolbarInline ? (e.removeClass("fr-hidden"), e.next(".fr-separator").removeClass("fr-hidden")) : (e.addClass("fr-hidden"), e.next(".fr-separator").addClass("fr-hidden")) } }), $e.RegisterCommand("videoDismissError", { title: "OK", undo: !1, callback: function() { this.video.hideProgressBar(!0) } }), $e.RegisterCommand("videoSetSize", { undo: !0, focus: !1, title: "Update", refreshAfterCallback: !1, callback: function() { this.video.setSize() } }), Object.assign($e.DEFAULTS, { wordDeniedTags: [], wordDeniedAttrs: [], wordAllowedStyleProps: ["font-family", "font-size", "background", "color", "width", "text-align", "vertical-align", "background-color", "padding", "margin", "height", "margin-top", "margin-left", "margin-right", "margin-bottom", "text-decoration", "font-weight", "font-style", "text-indent", "border", "border-.*", "line-height", "list-style-type"], wordPasteModal: !0, wordPasteKeepFormatting: !0 }), $e.PLUGINS.wordPaste = function(A) { var s, a, u = A.$, l = "word_paste", h = {}; function t(e) { var t = A.opts.wordAllowedStyleProps; e || (A.opts.wordAllowedStyleProps = []), 0 === a.indexOf("") && (a = "" + a + "
    "), a = function p(e, t) { 0 <= e.indexOf("]*(]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i, "$1")); ! function d(e) { for (var t = e.split("v:shape"), n = 1; n < t.length; n++) { var r = t[n], a = r.split(' id="')[1]; if (a && 1 < a.length) { a = a.split('"')[0]; var o = r.split(' o:spid="')[1]; o && 1 < o.length && (o = o.split('"')[0], h[a] = o) } } }(e); var n = (new DOMParser).parseFromString(e, "text/html"), r = n.head, a = n.body, i = function f(e) { var t = {}, n = e.getElementsByTagName("style"); if (n.length) { var r = n[0], a = r.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi); if (a) for (var o = 0; o < a.length; o++) { var i = a[o], s = i.replace(/([\S ]+\s+){[\s\S]+?}/gi, "$1"), l = i.replace(/[\S ]+\s+{([\s\S]+?)}/gi, "$1"); s = s.replace(/^[\s]|[\s]$/gm, ""), l = l.replace(/^[\s]|[\s]$/gm, ""), s = s.replace(/\n|\r|\n\r/g, ""), l = l.replace(/\n|\r|\n\r/g, ""); for (var c = s.split(", "), d = 0; d < c.length; d++) t[c[d]] = l } } return t }(r); g(a, function(e) { if (e.nodeType === Node.TEXT_NODE && /\n|\u00a0|\r/.test(e.data)) { if (!/\S| /.test(e.data) && !/[\u00a0]+/.test(e.data)) return e.data === $e.UNICODE_NBSP ? (e.data = "\u200b", !0) : 1 === e.data.length && 10 === e.data.charCodeAt(0) ? (e.data = " ", !0) : (C(e), !1); e.data = e.data.replace(/\n|\r/gi, " ") } return !0 }), g(a, function(e) { return e.nodeType !== Node.ELEMENT_NODE || "V:IMAGEDATA" !== e.tagName && "IMG" !== e.tagName || function c(e, t) { if (!t) return; var n; if ("IMG" === e.tagName) { var r = e.getAttribute("src"); if (!r || -1 === r.indexOf("file://")) return; if (0 === r.indexOf("file://") && A.helpers.isURL(e.getAttribute("alt"))) return void e.setAttribute("src", e.getAttribute("alt")); (n = h[e.getAttribute("v:shapes")]) || (n = e.getAttribute("v:shapes"), e.parentNode && e.parentNode.parentNode && 0 <= e.parentNode.parentNode.innerHTML.indexOf("msEquation") && (n = null)) } else n = e.parentNode.getAttribute("o:spid"); if (e.removeAttribute("height"), !n) return; ! function s(e) { m = {}, v(e, "i", "\\shppict"), v(e, "s", "\\shp{") }(t); var a = m[n.substring(7)]; if (a) { var o = function l(e) { for (var t = e.match(/[0-9a-f]{2}/gi), n = [], r = 0; r < t.length; r++) n.push(String.fromCharCode(parseInt(t[r], 16))); var a = n.join(""); return btoa(a) }(a.image_hex), i = "data:" + a.image_type + ";base64," + o; "IMG" === e.tagName ? (e.src = i, e.setAttribute("data-fr-image-pasted", !0)) : u(e.parentNode).before('').remove() } }(e, t), !0 }); for (var o = a.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"), s = o.length - 1; 0 <= s; s--) o[s].previousElementSibling && "LI" === o[s].previousElementSibling.tagName && o[s].previousElementSibling.appendChild(o[s]); g(a, function(e) { if (e.nodeType === Node.TEXT_NODE) return e.data = e.data.replace(/
    (\n|\r)/gi, "
    "), !1; if (e.nodeType === Node.ELEMENT_NODE) { if (S(e)) { var t = e.parentNode, n = e.previousSibling, r = function E(e, t, n) { var r = /[0-9a-zA-Z]./gi; var a = !1; var o; var i; var s; var l = e.querySelector('span[style="mso-list:Ignore"]'); var c; var d; var f; var p; l && (a = a || r.test(l.textContent)); if (1 == a) { var u = l.textContent.trim().split(".")[0]; "a" == u ? p = "lower-alpha;" : "A" == u ? p = "upper-alpha;" : "1" == u ? p = "decimal;" : "i" == u ? p = "lower-roman;" : "I" == u ? p = "upper-roman;" : "o" == u && (p = "circle;"), p = "list-style-type: " + p, f = "ol" } else f = "ul"; var h = p ? "<" + f + ' style = "' + p + '">' : "<" + f + ">"; for (; e;) { if (!S(e)) { if (e.outerHTML && 0 < e.outerHTML.indexOf("mso-bookmark") && 0 == (e.textContent || "").length) { e = e.nextElementSibling; continue } break } var g = e.getAttribute("style").replace(/\n/gi, "").replace(/.*level([0-9]+?).*/gi, "$1"); if ((n = n || g) < g) d = E(e, t, g), h += d.el.outerHTML, e = d.currentNode; else { if (g < n) break; e.firstElementChild && e.firstElementChild.firstElementChild && e.firstElementChild.firstElementChild.firstChild && (r.lastIndex = 0, o = r.test(e.firstElementChild.firstElementChild.firstChild.data || e.firstElementChild.firstElementChild.firstChild.firstChild.data || "")), s && s.firstElementChild && s.firstElementChild.firstElementChild && s.firstElementChild.firstElementChild.firstChild && (r.lastIndex = 0, i = r.test(s.firstElementChild.firstElementChild.firstChild.data || s.firstElementChild.firstElementChild.firstChild.firstChild.data || "")), i === undefined || i === o ? (c = T(e, t), h += "
  • " + c + "
  • ") : (d = E(e, t, g), h += d.el.outerHTML, e = d.currentNode); var m = e && e.nextElementSibling; m && (s = m.previousElementSibling), e && e.parentNode && e.parentNode.removeChild(e), e = m } } h += ""; var v = document.createElement("div"); v.innerHTML = h; var b = v.firstElementChild; return { el: b, currentNode: e } }(e, i).el, a = null; return (a = n ? n.nextSibling : t.firstChild) ? t.insertBefore(r, a) : t.appendChild(r), !1 } return "FONT" === e.tagName && i["." + e.getAttribute("class")] && (e = y(e, "span")), b(e, i) } if (e.nodeType !== Node.COMMENT_NODE) return !0; if (-1 < e.data.indexOf("[if !supportLineBreakNewLine]")) for (var o = e.nextSibling; o;)(o = e.nextSibling) && C(o), o.data && -1 < o.data.indexOf("[endif]") && (o = null); return C(e), !1 }), g(a, function(e) { if (e.nodeType === Node.ELEMENT_NODE) { var t = e.tagName; if (!e.innerHTML && -1 === ["BR", "IMG"].indexOf(t)) { for (var n = e.parentNode; n && (C(e), !(e = n).innerHTML);) n = e.parentNode; return !1 }! function f(e) { var t = e.getAttribute("style"); if (!t) return; (t = L(t)) && ";" !== t.slice(-1) && (t += ";"); var n = t.match(/(^|\S+?):.+?;{1,1}/gi); if (!n) return; for (var r = {}, a = 0; a < n.length; a++) { var o = n[a], i = o.split(":"); 2 === i.length && ("text-align" === i[0] && "SPAN" === e.tagName || (r[i[0]] = i[1])) } var s = ""; for (var l in r) if (r.hasOwnProperty(l)) { if ("font-size" === l && "pt;" === r[l].slice(-3)) { var c = null; try { c = parseFloat(r[l].slice(0, -3), 10) } catch (d) { c = null } c && (c = Math.round(1.33 * c), r[l] = c + "px;") } s += l + ":" + r[l] } s && e.setAttribute("style", s) }(e) } return !0 }), g(a, function(e) { if (e && "A" === e.nodeName && "" === e.href) { for (var t = document.createDocumentFragment(); e.firstChild;) t.appendChild(e.firstChild); e.parentNode.replaceChild(t, e) } return !0 }); var l = a.outerHTML, c = A.opts.htmlAllowedStyleProps; return A.opts.htmlAllowedStyleProps = A.opts.wordAllowedStyleProps, l = A.clean.html(l, A.opts.wordDeniedTags, A.opts.wordDeniedAttrs, !1), A.opts.htmlAllowedStyleProps = c, l }(a = a.replace(/([\r\n\u00a0 ]*)<\/span>/g, function(e, t) { for (var n = "", r = 0; r++ < t.length;) n += " "; return n }), A.paste.getRtfClipboard()); var n = A.doc.createElement("DIV"); n.innerHTML = a, A.html.cleanBlankSpaces(n), a = n.innerHTML, a = (a = A.paste.cleanEmptyTagsAndDivs(a)).replace(/\u200b/g, ""), function r() { A.modals.hide(l) }(), A.paste.clean(a, !0, !0), A.opts.wordAllowedStyleProps = t } function C(e) { e.parentNode && e.parentNode.removeChild(e) } function g(e, t) { if (t(e)) for (var n = e.firstChild; n;) { var r = n, a = n.previousSibling; n = n.nextSibling, g(r, t), r.previousSibling || r.nextSibling || r.parentNode || !n || a === n.previousSibling || !n.parentNode ? r.previousSibling || r.nextSibling || r.parentNode || !n || n.previousSibling || n.nextSibling || n.parentNode || (a ? n = a.nextSibling ? a.nextSibling.nextSibling : null : e.firstChild && (n = e.firstChild.nextSibling)) : n = a ? a.nextSibling : e.firstChild } } function S(e) { if (!e.getAttribute("style") || !/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi, ""))) return !1; try { if (!e.querySelector('[style="mso-list:Ignore"]')) return !!(e.outerHTML && 0 <= e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e")) } catch (t) { return !1 } return !0 } function T(e, r) { var t = e.cloneNode(!0); if (-1 !== ["H1", "H2", "H3", "H4", "H5", "H6"].indexOf(e.tagName)) { var n = document.createElement(e.tagName.toLowerCase()); n.setAttribute("style", e.getAttribute("style")), n.innerHTML = t.innerHTML, t.innerHTML = n.outerHTML } g(t, function(e) { if (e.nodeType == Node.COMMENT_NODE && (A.browser.msie || A.browser.safari || A.browser.edge)) try { if ("[if !supportLists]" === e.data) { for (e = e.nextSibling; e && e.nodeType !== Node.COMMENT_NODE;) { var t = e.nextSibling; e.parentNode.removeChild(e), e = t } e && e.nodeType == Node.COMMENT_NODE && e.parentNode.removeChild(e) } } catch (n) {} return e.nodeType === Node.ELEMENT_NODE && ("mso-list:Ignore" === e.getAttribute("style") && e.parentNode.removeChild(e), e.setAttribute("style", function a(e) { var n = "", r = e.getAttribute("style"); r && ["line-height", "font-family", "font-size", "color", "background"].forEach(function(e) { var t = r.match(new RegExp(e + ":.*;")); t && (n += t[0] + ";") }); return n }(e)), b(e, r)), !0 }); var a = t.innerHTML; return a = a.replace(//gi, "") } function y(e, t) { for (var n = document.createElement(t), r = 0; r < e.attributes.length; r++) { var a = e.attributes[r].name; n.setAttribute(a, e.getAttribute(a)) } return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n } function R(e) { var t = e.getAttribute("align"); t && (e.style["text-align"] = t, e.removeAttribute("align")) } function L(e) { return e.replace(/\n|\r|\n\r|"/g, "") } function w(e, t, n) { if (t) { var r = e.getAttribute("style"); r && ";" !== r.slice(-1) && (r += ";"), t && ";" !== t.slice(-1) && (t += ";"), t = t.replace(/\n/gi, ""); var a = null; a = n ? (r || "") + t : t + (r || ""), e.setAttribute("style", a) } } var m = null; function v(e, t, n) { for (var r = e.split(n), a = 1; a < r.length; a++) { var o = r[a]; if (1 < (o = o.split("shplid")).length) { o = o[1]; for (var i = "", s = 0; s < o.length && "\\" !== o[s] && "{" !== o[s] && " " !== o[s] && "\r" !== o[s] && "\n" !== o[s];) i += o[s], s++; var l = o.split("bliptag"); if (l && l.length < 2) continue; var c = null; if (-1 !== l[0].indexOf("pngblip") ? c = "image/png" : -1 !== l[0].indexOf("jpegblip") && (c = "image/jpeg"), !c) continue; var d = l[1].split("}"); if (d && d.length < 2) continue; var f = void 0; if (2 < d.length && -1 !== d[0].indexOf("blipuid")) f = d[1].split(" "); else { if ((f = d[0].split(" ")) && f.length < 2) continue; f.shift() } var p = f.join(""); m[t + i] = { image_hex: p, image_type: c } } } } function b(e, t) { var n = e.tagName, r = n.toLowerCase(); e.firstElementChild && ("I" === e.firstElementChild.tagName ? y(e.firstElementChild, "em") : "B" === e.firstElementChild.tagName && y(e.firstElementChild, "strong")); if (-1 !== ["SCRIPT", "APPLET", "EMBED", "NOFRAMES", "NOSCRIPT"].indexOf(n)) return C(e), !1; for (var a = ["META", "LINK", "XML", "ST1:", "O:", "W:", "FONT"], o = 0; o < a.length; o++) if (-1 !== n.indexOf(a[o])) return e.innerHTML && (e.outerHTML = e.innerHTML), C(e), !1; if ("TD" !== n) { var s = e.getAttribute("class") || "MsoNormal"; if (t && s) { for (var l = (s = L(s)).split(" "), c = 0; c < l.length; c++) { var d = [], f = "." + l[c]; d.push(f), f = r + f, d.push(f); for (var p = 0; p < d.length; p++) t[d[p]] && w(e, t[d[p]]) } e.removeAttribute("class") } t && t[r] && w(e, t[r]) } if (-1 !== ["P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE"].indexOf(n)) { var u = e.getAttribute("class"); if (u && (t && t[n.toLowerCase() + "." + u] && w(e, t[n.toLowerCase() + "." + u]), -1 !== u.toLowerCase().indexOf("mso"))) { var h = L(u); (h = h.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi, "")) ? e.setAttribute("class", h): e.removeAttribute("class") } var g = e.getAttribute("style"); if (g) { var m = g.match(/text-align:.+?[; "]{1,1}/gi); m && m[m.length - 1].replace(/(text-align:.+?[; "]{1,1})/gi, "$1") } R(e) } if ("TR" === n && function T(e, t) { A.node.clearAttributes(e); for (var n = e.firstElementChild, r = 0, a = !1, o = null; n;) { n.firstElementChild && -1 !== n.firstElementChild.tagName.indexOf("W:") && (n.innerHTML = n.firstElementChild.innerHTML), (o = n.getAttribute("width")) || a || (a = !0), r += parseInt(o, 10), (!n.firstChild || n.firstChild && n.firstChild.data === $e.UNICODE_NBSP) && (n.firstChild && C(n.firstChild), n.innerHTML = "
    "); for (var i = n.firstElementChild, s = 1 === n.children.length; i;) "P" !== i.tagName || S(i) || s && R(i), i = i.nextElementSibling; if (t) { var l = n.getAttribute("class"); if (l) { var c = (l = L(l)).match(/xl[0-9]+/gi); if (c) { var d = "." + c[0]; t[d] && w(n, t[d]) } } t.td && w(n, t.td) } var f = n.getAttribute("style"); f && (f = L(f)) && ";" !== f.slice(-1) && (f += ";"); var p = n.getAttribute("valign"); if (!p && f) { var u = f.match(/vertical-align:.+?[; "]{1,1}/gi); u && (p = u[u.length - 1].replace(/vertical-align:(.+?)[; "]{1,1}/gi, "$1")) } var h = null; if (f) { var g = f.match(/text-align:.+?[; "]{1,1}/gi); g && (h = g[g.length - 1].replace(/text-align:(.+?)[; "]{1,1}/gi, "$1")), "general" === h && (h = null) } var m = null; if (f) { var v = f.match(/background:.+?[; "]{1,1}/gi); v && (m = v[v.length - 1].replace(/background:(.+?)[; "]{1,1}/gi, "$1")) } var b = n.getAttribute("colspan"), E = n.getAttribute("rowspan"); b && n.setAttribute("colspan", b), E && n.setAttribute("rowspan", E), p && (n.style["vertical-align"] = p), h && (n.style["text-align"] = h), m && (n.style["background-color"] = m), o && n.setAttribute("width", o), n = n.nextElementSibling } for (n = e.firstElementChild; n;) o = n.getAttribute("width"), a ? n.removeAttribute("width") : n.setAttribute("width", 100 * parseInt(o, 10) / r + "%"), n = n.nextElementSibling }(e, t), "A" !== n || e.attributes.getNamedItem("href") || e.attributes.getNamedItem("name") || !e.innerHTML || (e.outerHTML = e.innerHTML), "A" == n && e.getAttribute("href") && e.querySelector("img")) { var v = e.querySelectorAll("span"); for (i = 0; i < v.length; i++) v[i].innerText || (v[i].outerHTML = v[i].innerHTML) } if ("TD" !== n && "TH" !== n || e.innerHTML || (e.innerHTML = "
    "), "TABLE" === n && (e.style.width = e.style.width), e.getAttribute("lang") && e.removeAttribute("lang"), e.getAttribute("style") && -1 !== e.getAttribute("style").toLowerCase().indexOf("mso")) { var b = L(e.getAttribute("style")); (b = b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi, "")) ? e.setAttribute("style", b): e.removeAttribute("style") } return !0 } return { _init: function e() { A.events.on("paste.wordPaste", function(e) { return a = e, A.opts.wordPasteModal ? function o() { if (!s) { var e = '

    ' + A.language.translate("Word Paste Detected") + "

    ", t = function a() { var e = '
    '; return e += '

    ' + A.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?") + "

    ", e += '
    ", e += "
    " }(), n = A.modals.create(l, e, t), r = n.$body; s = n.$modal, n.$modal.addClass("fr-middle"), A.events.bindClick(r, "button.fr-remove-word", function() { var e = s.data("instance") || A; e.wordPaste.clean() }), A.events.bindClick(r, "button.fr-keep-word", function() { var e = s.data("instance") || A; e.wordPaste.clean(!0) }), A.events.$on(u(A.o_win), "resize", function() { A.modals.resize(l) }) } A.modals.show(l), A.modals.resize(l) }() : t(A.opts.wordPasteKeepFormatting), !1 }) }, clean: t } }, $e });