From 306dd30bcf3ed85d8f85d51de579ee04b6cf351a Mon Sep 17 00:00:00 2001 From: VaraPrasad Date: Wed, 2 Sep 2020 14:41:02 +0530 Subject: [PATCH 1/7] code as part of framework fix froala 3.2.3 2513, 2311 --- admin/class-froala-admin.php | 15 +++++++++++---- admin/css/froala-admin.css | 4 ++++ admin/js/froala_editor.min.js | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/admin/class-froala-admin.php b/admin/class-froala-admin.php index 6792b793..2b3cc749 100755 --- a/admin/class-froala-admin.php +++ b/admin/class-froala-admin.php @@ -114,7 +114,10 @@ public function enqueue_styles() { wp_register_style('table_css',plugin_dir_url( __FILE__ ) . 'css/plugins/table.css'); wp_register_style('video_css',plugin_dir_url( __FILE__ ) . 'css/plugins/video.css'); wp_register_style('files_manager_css',plugin_dir_url( __FILE__ ) .'css/plugins/files_manager.css'); - wp_enqueue_style('froala_editor_css'); + wp_register_style('code_view_css',plugin_dir_url( __FILE__ ) . 'css/plugins/code_view.min.css'); + wp_register_style('codemirror-css', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.css'); + + wp_enqueue_style('froala_editor_css'); wp_enqueue_style('froala_style_css'); wp_enqueue_style('froala_admin_css'); wp_enqueue_style('font_asm'); @@ -134,7 +137,9 @@ public function enqueue_styles() { wp_enqueue_style('table_css'); wp_enqueue_style('video_css'); wp_enqueue_style('files_manager_css'); - } + wp_enqueue_style('code_view_css'); + wp_enqueue_style( 'codemirror-css' ); + } /** * Register the JavaScript for the admin area. @@ -155,10 +160,12 @@ public function enqueue_scripts() { wp_register_script('froala_admin',plugin_dir_url( __FILE__ ) . 'js/froala-admin.js'); wp_register_script('froala_editor',plugin_dir_url( __FILE__ ) . 'js/froala_editor.min.js'); - + wp_enqueue_script('froala_admin'); wp_enqueue_script('froala_editor'); - } + wp_enqueue_script('codemirror-js', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js'); + wp_enqueue_script('codemirror-xml-js', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js'); + } /** * Add an options page diff --git a/admin/css/froala-admin.css b/admin/css/froala-admin.css index 7fab02c3..17ecffa2 100755 --- a/admin/css/froala-admin.css +++ b/admin/css/froala-admin.css @@ -45,3 +45,7 @@ div.fr-modal-body div.fr-image-list div.fr-image-container .fr-insert-img { -ms-transform: translateY(-50%) translateX(-50%) !important; -o-transform: translateY(-50%) translateX(-50%) !important; } + +.fr-dropdown-list h2 a { + text-decoration: none !important; +} diff --git a/admin/js/froala_editor.min.js b/admin/js/froala_editor.min.js index 25c1e96d..d5e02b43 100644 --- a/admin/js/froala_editor.min.js +++ b/admin/js/froala_editor.min.js @@ -1,7 +1,7 @@ /*! - * froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor) + * froala_editor v3.2.1 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 Froala Labs */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FroalaEditor=t()}(this,function(){"use strict";function M(e){return(M="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")},closeTagString:function u(e){return"")},isFirstSibling:function h(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&a.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&&a.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<=V.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function E(e){return e===a.doc.activeElement&&(!a.doc.hasFocus||a.doc.hasFocus())&&Boolean(r(e)||e.type||e.href||~e.tabIndex)},isEditable:function S(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function T(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function y(e,t){return e instanceof n&&(e=e.get(0)),e&&e.classList&&e.classList.contains(t)},filter:function C(e){return a.browser.msie?e:{acceptNode:e}}}},Object.assign(V.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}),V.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},V.MODULES.clean=function(f){var d,p,u,h,g=f.$;function o(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/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 o=e.childNodes;if(0===o.length)return e.outerHTML;for(var i="",a=0;a)<[^<]*)*<\/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 i=c(f.html.extractNodeAttrs(n,"head")),a=c(f.html.extractNodeAttrs(n,"body"));return"".concat(r,"").concat(t,"").concat(e,"")}return e}(r,o,e))}function E(e){var t=f.doc.createElement("DIV");return t.innerText=e,t.textContent}function S(e){for(var t=f.node.contents(e),n=0;n"))}(a),a.nodeType===Node.ELEMENT_NODE&&(a.getAttribute("data-fr-src")&&0!==a.getAttribute("data-fr-src").indexOf("blob:")&&a.setAttribute("data-fr-src",f.helpers.sanitizeURL(E(a.getAttribute("data-fr-src")))),a.getAttribute("href")&&a.setAttribute("href",f.helpers.sanitizeURL(E(a.getAttribute("href")))),a.getAttribute("src")&&a.setAttribute("src",f.helpers.sanitizeURL(E(a.getAttribute("src")))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(a.tagName)&&(a.innerHTML=a.innerHTML.trim())),!f.opts.pasteAllowLocalImages&&a.nodeType===Node.ELEMENT_NODE&&"IMG"===a.tagName&&a.getAttribute("data-fr-src")&&0===a.getAttribute("data-fr-src").indexOf("file://"))return a.parentNode.removeChild(a),!1;if(a.nodeType===Node.ELEMENT_NODE&&V.HTML5Map[a.tagName]&&""===f.node.attributes(a)){var e=V.HTML5Map[a.tagName],t="<".concat(e,">").concat(a.innerHTML,"");a.insertAdjacentHTML("beforebegin",t),(a=a.previousSibling).parentNode.removeChild(a.nextSibling)}if(f.opts.htmlAllowComments||a.nodeType!==Node.COMMENT_NODE)if(a.tagName&&a.tagName.match(p))"STYLE"==a.tagName&&f.helpers.isMac()&&function(){for(var e,n=a.innerHTML.trim(),r=[],t=/{([^}]+)}/g;e=t.exec(n);)r.push(e[1]);for(var o=function o(t){var e=n.substring(0,n.indexOf("{")).trim();a.parentNode.querySelectorAll(e).forEach(function(e){e.removeAttribute("class"),e.setAttribute("style",r[t])}),n=n.substring(n.indexOf("}")+1)},i=0;-1!=n.indexOf("{");i++)o(i)}(),a.parentNode.removeChild(a);else if(a.tagName&&!a.tagName.match(d))"svg"===a.tagName?a.parentNode.removeChild(a):f.browser.safari&&"path"===a.tagName&&a.parentNode&&"svg"===a.parentNode.tagName||(a.outerHTML=a.innerHTML);else{var n=a.attributes;if(n)for(var r=n.length-1;0<=r;r--){var o=n[r],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)||a.removeAttribute(o.nodeName)}}else 0!==a.data.indexOf("[FROALA.EDITOR")&&a.parentNode.removeChild(a)}(e)}return{_init:function e(){f.opts.fullPage&&g.merge(f.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function T(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=!1);var o,i=g.merge([],f.opts.htmlAllowedTags);for(o=0;o").concat(e[n].innerHTML,""));t&&f.selection.restore()}},tables:function t(){!function s(){for(var e=f.el.querySelectorAll("tr"),t=0;t ul, ol > ol, ul > ol, ol > ul"),t=0;t"))}}(),function c(){for(var e=f.el.querySelectorAll("li > ul, li > ol"),t=0;t ul, li > ol"),t=0;t");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/g,"%3E").replace(/"/g,"%22").replace(/ /g,"%20"),new RegExp("^".concat(V.LinkRegExHTTP).concat(V.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function y(e){e.css||(e=s(e));var t=(e.css("text-align")||"").replace(/-(.*)-/g,"");if(["left","right","justify","center"].indexOf(t)<0){if(!a){var n=s('
..
'));s("body").first().append(n);var r=n.find("#s1").get(0).getBoundingClientRect().left,o=n.find("#s2").get(0).getBoundingClientRect().left;n.remove(),a=r=(window.innerHeight||document.documentElement.clientHeight)}}},V.MODULES.events=function(l){var e,i=l.$,a={};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").concat(e,"")),e}var i={bold:function(){e("bold","strong")},subscript:function(){a.format.is("sup")&&a.format.remove("sup"),e("subscript","sub")},superscript:function(){a.format.is("sub")&&a.format.remove("sub"),e("superscript","sup")},italic:function(){e("italic","em")},strikeThrough:function(){e("strikeThrough","s")},underline:function(){e("underline","u")},undo:function(){a.undo.run()},redo:function(){a.undo.redo()},indent:function(){r(1)},outdent:function(){r(-1)},show:function(){a.opts.toolbarInline&&a.toolbar.showInline(null,!0)},insertHR:function(){a.selection.remove();var e="";a.core.isEmpty()&&(e=o(e="
")),a.html.insert('
'.concat(e));var t,n=a.$el.find("hr#fr-just").length?a.$el.find("hr#fr-just"):a.$el.find(".fr-just");if(n.removeAttr("id"),n.removeAttr("class"),0===n.next().length){var r=a.html.defaultTag();r?n.after(s(a.doc.createElement(r)).append("
").get(0)):n.after("
")}n.prev().is("hr")?t=a.selection.setAfter(n.get(0),!1):n.next().is("hr")?t=a.selection.setBefore(n.get(0),!1):a.selection.setAfter(n.get(0),!1)||a.selection.setBefore(n.get(0),!1),t||void 0===t||(e=o(e="".concat(V.MARKERS,"
")),n.after(e)),a.selection.restore()},clearFormatting:function(){a.format.remove()},selectAll:function(){a.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=a.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"),'"]'));a.$tb.find(".fr-open").not(e).removeClass("fr-open"),e.toggleClass("fr-open"),a.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"),a.$tb.find(".fr-expanded").not(t).length?(a.$tb.find(".fr-expanded").toggleClass("fr-expanded"),t.toggleClass("fr-expanded")):(t.toggleClass("fr-expanded"),a.$box.toggleClass("fr-toolbar-open"),a.$tb.toggleClass("fr-toolbar-open"))}(a.$tb.find("[data-cmd=".concat(e,"]"))),a.toolbar.setMoreToolbarsHeight()}function n(e,t){if(!1!==a.events.trigger("commands.before",s.merge([e],t||[]))){var n=V.COMMANDS[e]&&V.COMMANDS[e].callback||i[e],r=!0,o=!1;V.COMMANDS[e]&&("undefined"!=typeof V.COMMANDS[e].focus&&(r=V.COMMANDS[e].focus),"undefined"!=typeof V.COMMANDS[e].accessibilityFocus&&(o=V.COMMANDS[e].accessibilityFocus)),(!a.core.hasFocus()&&r&&!a.popups.areVisible()||!a.core.hasFocus()&&o&&a.accessibility.hasFocus())&&a.events.focus(!0),V.COMMANDS[e]&&!1!==V.COMMANDS[e].undo&&(a.$el.find(".fr-marker").length&&(a.events.disableBlur(),a.selection.restore()),a.undo.saveStep()),n&&n.apply(a,s.merge([e],t||[])),a.events.trigger("commands.after",s.merge([e],t||[])),V.COMMANDS[e]&&!1!==V.COMMANDS[e].undo&&a.undo.saveStep()}}function e(e,t){a.format.toggle(t)}function r(e){a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var t=a.selection.blocks(),n=0;n").concat(V.MARKERS,"
").concat(a):i?"".concat(s,"<").concat(i,">").concat(V.MARKERS,"
").concat(a):"".concat(s+V.MARKERS,"
").concat(a);["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(o&&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(o){t=b(n);for(var u="".concat(V.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,"
  • ")):i?m(t).after("<".concat(i,">").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)+V.MARKERS,"
    ")):m(t.parentNode).after("".concat(g.node.openTagString(n)+V.MARKERS,"
    ")):i?m(t).before("<".concat(i,">").concat(V.MARKERS,"
    ")):m(t).before("".concat(V.MARKERS,"
    ")),m(n).remove()},_middleEnter:function c(e){for(var t=v(e),n="",r=e,o="",i="",a=!1;r!==t;){var s="A"===(r=r.parentNode).tagName&&g.cursor.isAtEnd(e,r)?"fr-to-remove":"";a||r==t||g.node.isBlock(r)||(a=!0,o+=V.INVISIBLE_SPACE),o=g.node.openTagString(m(r).clone().addClass(s).get(0))+o,i=g.node.closeTagString(r)+i}n=i+n+o+V.MARKERS+(g.opts.keepFormatOnDelete?V.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=V.MARKERS,r="",o=e,i=!1;o!==t;)if(!(o=o.parentNode).classList.contains("fr-img-space-wrap")&&!o.classList.contains("fr-img-space-wrap2")){var a="A"===o.tagName&&g.cursor.isAtEnd(e,o)?"fr-to-remove":"";i||o===t||g.node.isBlock(o)||(i=!0,r+=V.INVISIBLE_SPACE),r=g.node.openTagString(m(o).clone().addClass(a).get(0))+r,n+=g.node.closeTagString(o)}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(V.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 o,i=g.node.contents(t)[0];i&&!g.node.isList(i);)o=i.nextSibling,m(n).append(i),i=o;for(n=t.previousSibling;i;)o=i.nextSibling,m(n).append(i),i=o;1<(r=g.node.contents(n)).length&&"BR"===r[r.length-1].tagName&&m(r[r.length-1]).remove(),m(t).remove()}else{var a=b(t);if(m(e).replaceWith(V.MARKERS),a.parentNode&&"LI"===a.parentNode.tagName){var s=a.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(a).before(m(t).html())}else{var l=g.html.defaultTag();l&&0===m(t).find(g.html.blockTagsQuery()).length?m(a).before("<".concat(l,">").concat(m(t).html(),"")):m(a).before(m(t).html())}m(t).remove(),g.html.wrap(),0===m(a).find("li").length&&m(a).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 o,i=e,a=g.node.contents(r)[0];a&&!g.node.isList(a);)o=a.nextSibling,m(i).after(a),i=a,a=o;for(;a;)o=a.nextSibling,m(n).append(a),a=o;m(e).replaceWith(V.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))V.NO_DELETE_TAGS.indexOf(s.tagName)<0&&(m(e).replaceWith(V.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(V.MARKERS);s&&!g.node.isBlock(s)&&"BR"!==s.tagName;)m(n).append(m(s)),s=s.nextSibling}}}},V.NO_DELETE_TAGS=["TH","TD","TR","TABLE","FORM"],V.SIMPLE_ENTER_TAGS=["TH","TD","LI","DL","DT","FORM"],V.MODULES.cursor=function(u){var h=u.$;function i(e){return!!e&&(!!u.node.isBlock(e)||(e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?i(e.nextSibling):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&i(e.parentNode)))}function a(e){return!!e&&(!!u.node.isBlock(e)||(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?a(e.previousSibling):!e.previousSibling&&(!(e.previousSibling||!u.node.hasClass(e.parentNode,"fr-inner"))||a(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=u.opts.tabSpaces)0===r.substr(r.length-u.opts.tabSpaces,r.length-1).replace(/ /g,"").replace(new RegExp(V.UNICODE_NBSP,"g"),"").length&&(o=r.length-u.opts.tabSpaces+1);n.textContent=r.substring(0,o-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)+V.UNICODE_NBSP);var i=r.length!==n.textContent.length;if(0===n.textContent.length)if(i&&u.opts.keepFormatOnDelete)h(n).after(V.INVISIBLE_SPACE+V.MARKERS);else if(0!==r.length&&u.node.isBlock(n.parentNode))h(n).after(V.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)&&V.NO_DELETE_TAGS.indexOf(n.parentNode.tagName)<0;){var a=n;n=n.parentNode,a.parentNode.removeChild(a)}h(n).after(V.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(V.MARKERS),h(n.parentNode).remove();else h(n).after(V.MARKERS)}else u.node.isDeletable(n)?(h(n).after(V.MARKERS),h(n).remove()):e.nextSibling&&"BR"===e.nextSibling.tagName&&u.node.isVoid(n)&&"BR"!==n.tagName?(h(e.nextSibling).remove(),h(e).replaceWith(V.MARKERS)):!1!==u.events.trigger("node.remove",[h(n)])&&(h(n).after(V.MARKERS),h(n).remove())}else if(V.NO_DELETE_TAGS.indexOf(n.tagName)<0&&(u.node.isEditable(n)||u.node.isDeletable(n)))if(u.node.isDeletable(n))h(e).replaceWith(V.MARKERS),h(n).remove();else if(u.node.isEmpty(n)&&!u.node.isList(n))h(n).remove(),h(e).replaceWith(V.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(V.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(n).append(u.node.contents(a.get(0))),a.remove(),0===h(i).find("li").length&&h(i).remove())}else{if((o=u.node.contents(i)).length&&"BR"===o[0].tagName&&h(o[0]).remove(),"BLOCKQUOTE"!==i.tagName&&"BLOCKQUOTE"===n.tagName)for(o=u.node.contents(n);o.length&&u.node.isBlock(o[o.length-1]);)n=o[o.length-1],o=u.node.contents(n);else if("BLOCKQUOTE"===i.tagName&&"BLOCKQUOTE"!==n.tagName)for(o=u.node.contents(i);o.length&&u.node.isBlock(o[0]);)i=o[0],o=u.node.contents(i);h(e).replaceWith(V.MARKERS),h(n).append(i.innerHTML),h(i).remove()}else{for(h(e).replaceWith(V.MARKERS);i&&"BR"!==i.tagName&&!u.node.isBlock(i)&&u.node.isEditable(i);){var s=i;i=i.nextSibling,h(n).append(s)}i&&"BR"===i.tagName&&u.node.isEditable(i)&&h(i).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(!(V.NO_DELETE_TAGS.indexOf(n.nextSibling.tagName)<0))return void h(n).remove();n=n.nextSibling,h(n.previousSibling).remove()}}else if(i(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&&V.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(V.MARKERS),n.textContent.length&&(n.textContent=n.textContent.substring(d(n.textContent,!0),n.textContent.length))):u.node.isDeletable(n)?(h(n).before(V.MARKERS),h(n).remove()):!1!==u.events.trigger("node.remove",[h(n)])&&(h(n).before(V.MARKERS),h(n).remove()),h(e).remove()}else if(V.NO_DELETE_TAGS.indexOf(n.tagName)<0&&(u.node.isEditable(n)||u.node.isDeletable(n)))if(u.node.isDeletable(n))h(e).replaceWith(V.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(V.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(V.MARKERS);r&&"BR"!==r.tagName;){var o=r;r=r.nextSibling,h(e).before(o)}r&&"BR"===r.tagName&&h(r).remove()}else h(e).after(h(n).html()).after(V.MARKERS),h(n).remove()}function p(){for(var e=u.el.querySelectorAll("blockquote:empty"),t=0;t"+V.MARKERS):r?h(o).after("<".concat(r,">").concat(V.MARKERS,"
    ")):h(o).after("".concat(V.MARKERS,"
    ")),h(e).remove()):v(e,t,n),!1;if(null===o)(r=u.html.defaultTag())&&u.node.isElement(e.parentNode)?h(e).replaceWith("<".concat(r,">").concat(V.MARKERS,"
    ")):!e.previousSibling||h(e.previousSibling).is("br")||e.nextSibling?h(e).replaceWith("
    ".concat(V.MARKERS)):h(e).replaceWith("
    ".concat(V.MARKERS,"
    "));else{var i=e,a="";"PRE"!=o.tagName||e.nextSibling||(t=!0),u.node.isBlock(o)&&!t||(a="
    ");var s,l="",c="",d="",f="";(r=u.html.defaultTag())&&u.node.isBlock(o)&&(d="<".concat(r,">"),f=""),o.tagName===r.toUpperCase()&&(d=u.node.openTagString(h(o).clone().removeAttr("id").get(0))));do{if(i=i.parentNode,!t||i!==o||t&&!u.node.isBlock(o))if(l+=u.node.closeTagString(i),i===o&&u.node.isBlock(o))c=d+c;else{var p=("A"===i.tagName||u.node.hasClass(i,"fa"))&&m(e,i)?"fr-to-remove":"";c=u.node.openTagString(h(i).clone().addClass(p).get(0))+c}}while(i!==o);a=l+a+c+(e.parentNode===o&&u.node.isBlock(o)?"":V.INVISIBLE_SPACE)+V.MARKERS,u.node.isBlock(o)&&!h(o).find("*").last().is("br")&&h(o).append("
    "),h(e).after(''),h(e).remove(),o.nextSibling&&!u.node.isBlock(o.nextSibling)||u.node.isBlock(o)||h(o).after("
    "),s=(s=!t&&u.node.isBlock(o)?u.node.openTagString(o)+h(o).html()+f:u.node.openTagString(o)+h(o).html()+u.node.closeTagString(o)).replace(/<\/span>/g,a),h(o).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(V.MARKERS,"
    ")):(e.nextSibling&&!u.node.isBlock(e.nextSibling)||h(e).after("
    "),h(e).replaceWith("
    ".concat(V.MARKERS)));else if(e.previousSibling&&"IMG"==e.previousSibling.tagName||e.nextSibling&&"IMG"==e.nextSibling.tagName)h(e).replaceWith("<"+u.html.defaultTag()+">"+V.MARKERS+"
    ");else{var o=e,i="";"PRE"===r.tagName&&(t=!0),u.node.isBlock(r)&&!t||(i="
    ");var a="",s="";do{var l=o;if(o=o.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,o)&&!g(e,o))if(!t||o!==r||t&&!u.node.isBlock(r)){a+=u.node.closeTagString(o);var c="A"==o.tagName&&m(e,o)||u.node.hasClass(o,"fa")?"fr-to-remove":"";s=u.node.openTagString(h(o).clone().addClass(c).removeAttr("id").get(0))+s}else"BLOCKQUOTE"==r.tagName&&t&&(s=a="")}while(o!==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)i=a+i+V.MARKERS+s;else{var f=u.html.defaultTag();i="".concat(a+i+(f?"<".concat(f,">"):"")+V.MARKERS,"
    ").concat(f?""):"").concat(s)}else i=a+i+s+(d?"":V.INVISIBLE_SPACE)+V.MARKERS;h(e).replaceWith('');var p=u.node.openTagString(r)+h(r).html()+u.node.closeTagString(r);p=p.replace(/<\/span>/g,i),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(V.MARKERS),u.selection.restore(),!1;if("true"===n.getAttribute("contenteditable"))break;n=n.parentNode}u.el.normalize();var r=!1;0").concat(V.MARKERS,"
    ")):h(o).before("".concat(V.MARKERS,"
    ")),h(e).remove(),!1}else m(e,o)?l(e,t,!0):v(e,t,!0);if(null===o)(r=u.html.defaultTag())&&u.node.isElement(e.parentNode)?h(e).replaceWith("<".concat(r,">").concat(V.MARKERS,"
    ")):h(e).replaceWith("
    ".concat(V.MARKERS));else{if(u.node.isBlock(o))if("PRE"===o.tagName&&(t=!0),t)h(e).remove(),h(o).prepend("
    ".concat(V.MARKERS));else if(e.nextSibling&&"IMG"==e.nextSibling.tagName||e.nextSibling&&e.nextSibling.nextElementSibling&&"IMG"==e.nextSibling.nextElementSibling)h(e).replaceWith("<"+u.html.defaultTag()+">"+V.MARKERS+"
    ");else{if(u.node.isEmpty(o,!0))return l(e,t,n);if(u.opts.keepFormatOnDelete){for(var i=e,a=V.INVISIBLE_SPACE;i!==o&&!u.node.isElement(i);)i=i.parentNode,a=u.node.openTagString(i)+a+u.node.closeTagString(i);h(o).before(a)}else h(o).before("".concat(u.node.openTagString(h(o).clone().removeAttr("id").get(0)),"
    ").concat(u.node.closeTagString(o)))}else h(o).before("
    ");h(e).remove()}}(t,e,r):u.cursorLists._startEnter(t):!c(t)||e||r?v(t,e,r):u.cursorLists._middleEnter(t),function o(){u.$el.find(".fr-to-remove").each(function(){for(var e=u.node.contents(this),t=0;t div").first(),E=b.find("> a"),"rtl"===f.opts.direction&&b.css("left","auto").css("right",0).attr("direction","rtl"),e++}function m(e){for(var t=[M("9qqG-7amjlwq=="),M("KA3B3C2A6D1D5H5H1A3=="),M("3B9B3B5F3C4G3E3=="),M("QzbzvxyB2yA-9m=="),M("ji1kacwmgG5bc=="),M("nmA-13aogi1A3c1jd=="),M("BA9ggq=="),M("emznbjbH3fij=="),M("tkC-22d1qC-13sD1wzF-7=="),M("tA3jjf=="),M("1D1brkm==")],n=0;nthis.length)&&(t=this.length),this.substring(t-e.length,t)===e}),e.endsWith(t[n]))return!0;return!1}function v(){var e=M(p(n)),t=M(p("tzgatD-13eD1dtdrvmF3c1nrC-7saQcdav==")).split(".");return window.parent.document.querySelector(e)&&window[t[1]][t[2]]}var b,E,S=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==",y="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==",n="MekC-11nB-8tIzpD7pewxvzC6mD-16xerg1==",C="AA15A8B6C4B5A2E2B3B1A7==",N="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==",A=function(){for(var e=0,t=document.domain,n=t.split("."),r="_gd".concat((new Date).getTime());e")}(e)),b.selection.restore()}else{var r;b.selection.save(),m(b.$el.find('.fr-marker[data-type="true"]').length&&b.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling,e,t);do{for(r=b.$el.find("".concat(S(e,t)," > ").concat(S(e,t))),n=0;n
    '),i=l.html().replace(/<\/span>/,a+b.node.closeTagString(l.get(0))+s+c+a+b.node.openTagString(l.get(0))+s),l.replaceWith(b.node.openTagString(l.get(0))+i+b.node.closeTagString(l.get(0))),!0}return!1}function r(e,t){void 0===t&&(t={}),t.style&&delete t.style;var n=b.selection.isCollapsed();b.selection.save();for(var r=!0;r;){r=!1;for(var o=b.$el.find(".fr-marker"),i=0;i')){if(b.node.isEmpty(l.get(0)))s=E(b.doc.createElement("span")).attr("style","".concat(e,": ").concat(t,";")).html("".concat(V.INVISIBLE_SPACE).concat(V.MARKERS)),l.replaceWith(s);else{var c={};c["style*"]="".concat(e,":"),y(r,"span",c,!0),r=b.$el.find(".fr-marker"),t?(s=E(b.doc.createElement("span")).attr("style","".concat(e,": ").concat(t,";")).html("".concat(V.INVISIBLE_SPACE).concat(V.MARKERS)),r.replaceWith(s)):r.replaceWith(V.INVISIBLE_SPACE+V.MARKERS)}b.html.cleanEmptyTags()}else b.node.isEmpty(l.get(0))&&l.is("span")?(r.replaceWith(V.MARKERS),l.css(e,t)):(s=E('').concat(V.INVISIBLE_SPACE).concat(V.MARKERS,"")),r.replaceWith(s));s&&v(s,e,t)}else{if(b.selection.save(),null===t||"color"===e&&0").concat(c);e.replaceWith('');var h=a.get(0).outerHTML;E(a.get(0)).replaceWith(h.replace(/<\/span>/g,function(){return u}))}}function o(e,t){void 0===t&&(t={}),t.style&&delete t.style;var n=b.selection.ranges(0),r=n.startContainer;if(r.nodeType===Node.ELEMENT_NODE&&0"),V.END_MARKER='"),V.MARKERS=V.START_MARKER+V.END_MARKER,V.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 o=f(d.doc.createElement("SPAN")).addClass("fr-marker").attr("style","display: none; line-height: 0;").html(V.INVISIBLE_SPACE).get(0);if(n.insertNode(o),o=d.$el.find("span.fr-marker").get(0)){for(var i=o.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)f(i).remove(),i=d.$el.find("span.fr-marker").get(0).nextSibling;return d.selection.clear(),d.selection.get().addRange(r),o}return null}catch(a){}}function c(){d.$el.find(".fr-marker").remove()}return{place:function p(e,t,n){var r,o,i;try{var a=e.cloneRange();if(a.collapse(t),a.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(V.INVISIBLE_SPACE),n.get(0)}(t,n)),!0===t)for(i=(r=d.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(n,'"]')).get(0)).nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)f(i).remove(),i=r.nextSibling;if(!0===t&&!e.collapsed){for(;!d.node.isElement(r.parentNode)&&!i;)f(r.parentNode).after(r),i=r.nextSibling;if(i&&i.nodeType===Node.ELEMENT_NODE&&d.node.isBlock(i)&&"HR"!==i.tagName){for(o=[i];i=o[0],(o=d.node.contents(i))[0]&&d.node.isBlock(o[0]););f(i).prepend(f(r))}}if(!1===t&&!e.collapsed){if((i=(r=d.$el.find('span.fr-marker[data-type="false"][data-id="'.concat(n,'"]')).get(0)).previousSibling)&&i.nodeType===Node.ELEMENT_NODE&&d.node.isBlock(i)&&"HR"!==i.tagName){for(o=[i];i=o[o.length-1],(o=d.node.contents(i))[o.length-1]&&d.node.isBlock(o[o.length-1]););f(i).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 a(){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="",o="";n=n.parentNode,r+=d.node.closeTagString(n),o=d.node.openTagString(n)+o,n!==t;);f(e).replaceWith('');var i=d.node.openTagString(t)+f(t).html()+d.node.closeTagString(t);i=i.replace(/<\/span>/g,"".concat(r,'').concat(o)),f(t).replaceWith(i)}return d.$el.find(".fr-marker").get(0)},insertAtPoint:function u(e){var t,n=e.clientX,r=e.clientY;c();var o=null;if("undefined"!=typeof d.doc.caretPositionFromPoint?(t=d.doc.caretPositionFromPoint(n,r),(o=d.doc.createRange()).setStart(t.offsetNode,t.offset),o.setEnd(t.offsetNode,t.offset)):"undefined"!=typeof d.doc.caretRangeFromPoint&&(t=d.doc.caretRangeFromPoint(n,r),(o=d.doc.createRange()).setStart(t.startContainer,t.startOffset),o.setEnd(t.startContainer,t.startOffset)),null!==o&&"undefined"!=typeof d.win.getSelection){var i=d.win.getSelection();i.removeAllRanges(),i.addRange(o)}else if("undefined"!=typeof d.doc.body.createTextRange)try{(o=d.doc.body.createTextRange()).moveToPoint(n,r);var a=o.duplicate();a.moveToPoint(n,r),o.setEndPoint("EndToEnd",a),o.select()}catch(s){return!1}l()},remove:c}},V.MODULES.selection=function(T){var y=T.$;function s(){var e="";return T.win.getSelection?e=T.win.getSelection():T.doc.getSelection?e=T.doc.getSelection():T.doc.selection&&(e=T.doc.selection.createRange().text),e.toString()}function S(){return T.win.getSelection?T.win.getSelection():T.doc.getSelection?T.doc.getSelection():T.doc.selection.createRange()}function d(e){var t=S(),n=[];if(t&&t.getRangeAt&&t.rangeCount){n=[];for(var r=0;r'.concat(V.INVISIBLE_SPACE,"").concat(t[e].innerHTML));var n=!1,r=o(T.el);for(r.atStart&&r.atEnd&&(n=!0),t=T.el.querySelectorAll(".fr-mk"),e=0;e"):y(o).find(".fr-inner").filter(w).html("
    "):(y(o).empty(),y(o).attr("data-del-cell",!0)):0"),T.spaces.normalize());var v=T.$el.find(".fr-marker").last().get(0),b=T.$el.find(".fr-marker").first().get(0);void 0!==v&&void 0!==b&&!v.nextSibling&&b.previousSibling&&"BR"===b.previousSibling.tagName&&T.node.isElement(v.parentNode)&&T.node.isElement(b.parentNode)&&T.$el.append("
    "),A()},blocks:function h(){var e,t,n=[],r=S();if(p()&&r.rangeCount){var o=d();for(e=0;e"))}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 o(){return!f.$wp||f.node.hasClass(f.$wp.get(0),"show-placeholder")}}},V.UNICODE_NBSP=String.fromCharCode(160),V.VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],V.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(V.DEFAULTS,{htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script",".fa",".fr-emoticon",".fr-inner","path","line","hr"],htmlDoNotWrapTags:["script","style"],htmlSimpleAmpersand:!1,htmlIgnoreCSSProperties:[],htmlExecuteScripts:!0}),V.MODULES.html=function(w){var p=w.$;function d(){return w.opts.enter===V.ENTER_P?"p":w.opts.enter===V.ENTER_DIV?"div":w.opts.enter===V.ENTER_BR?null:void 0}function s(e,t){return!(!e||e===w.el)&&(t?-1!=["PRE","SCRIPT","STYLE"].indexOf(e.tagName)||s(e.parentNode,t):-1!==["PRE","SCRIPT","STYLE"].indexOf(e.tagName))}function i(e){var t,n=[],r=[];if(e){var o=w.el.querySelectorAll(".fr-marker");for(t=0;t";return t&&(n="")),n}function c(e){var t=e.parentNode;if(t&&(w.node.isBlock(t)||w.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||w.node.hasClass(n,"fr-tmp"));)n=n.previousSibling;if(r)return!1;n&&t&&"BR"!==n.tagName&&!w.node.isBlock(n)&&!r&&0").concat(V.MARKERS,"
    ")),w.selection.restore()):w.$el.html("<".concat(d(),">
    "))):w.el.querySelector("*:not(.fr-marker):not(br)")||(w.core.hasFocus()?(w.$el.html("".concat(V.MARKERS,"
    ")),w.selection.restore()):w.$el.html("
    ")))}function g(e,t){return r(e,"<".concat(t,"[^>]*?>([\\w\\W]*)"),1)}function m(e,t){var n=p("
    ]*?)>"),1)||"",">"));return w.node.rawAttributes(n.get(0))}function v(e){return(r(e,"]*?)>",0)||"").replace(/\n/g," ").replace(/ {2,}/g," ")}function b(e,t){w.opts.htmlExecuteScripts?e.html(t):e.get(0).innerHTML=t}function L(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 D(e){if(w.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")}},cleanEmptyTags:e,cleanWhiteTags:E,cleanBlankSpaces:n,blocks:function C(){return w.$el.get(0).querySelectorAll(u())},getDoctype:$,set:function N(e){var t=w.clean.html((e||"").trim(),[],[],w.opts.fullPage);if(w.opts.fullPage){var n=g(t,"body")||(0<=t.indexOf("",i=m(t,"head"),a=p("
    ");a.append(o).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=a.html().trim();o=p("
    ").append(o).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(w.$el,"".concat(s,"\n").concat(n)),w.node.clearAttributes(w.el),w.$el.attr(r),w.$el.addClass("fr-view"),w.$el.attr("spellcheck",w.opts.spellcheck),w.$el.attr("dir",w.opts.direction),b(w.$head,o),w.node.clearAttributes(w.$head.get(0)),w.$head.attr(i),w.node.clearAttributes(w.$html.get(0)),w.$html.attr(c),w.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,w.iframe_document),w.iframe_document.doctype)}else b(w.$el,t);var d=w.edit.isDisabled();w.edit.on(),w.core.injectStyle(w.opts.iframeDefaultStyle+w.opts.iframeStyle),h(),w.opts.useClasses||(w.$el.find("[fr-original-class]").each(function(){this.setAttribute("class",this.getAttribute("fr-original-class")),this.removeAttribute("fr-original-class")}),w.$el.find("[fr-original-style]").each(function(){this.setAttribute("style",this.getAttribute("fr-original-style")),this.removeAttribute("fr-original-style")})),d&&w.edit.off(),w.events.trigger("html.set"),w.events.trigger("charCounter.update")},syncInputs:B,get:function _(e,t){if(!w.$wp)return w.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;var n="";w.events.trigger("html.beforeGet");var r,o,i=[],a={},s=[];if(B(),!w.opts.useClasses&&!t){var l=new RegExp("^".concat(w.opts.htmlIgnoreCSSProperties.join("$|^"),"$"),"gi");for(r=0;r=a[h[o]][b]&&(a[h[o]][b]=g,m[v].trim().length))){var E=m[v].trim().split(":");E.splice(0,1),s.push([h[o],b.trim(),E.join(":").trim(),g])}}}}}for(s.sort(k),r=0;r").concat(w.$html.find("head").get(0).outerHTML,""));else if(void 0===e&&(e=!1),w.opts.fullPage){n=$(w.iframe_document),w.$el.removeClass("fr-view");var N=w.opts.heightMin,A=w.opts.height,M=w.opts.heightMax;w.opts.heightMin=null,w.opts.height=null,w.opts.heightMax=null,w.size.refresh(),n+="").concat(w.$html.html(),""),w.opts.heightMin=N,w.opts.height=A,w.opts.heightMax=M,w.size.refresh(),w.$el.addClass("fr-view")}else n=w.$el.html();if(!w.opts.useClasses&&!t)for(r=0;r(?:[\w\W]*?)<\/style>/g,"")).replace(/]*)data-fr-style="true"([^>]*)>/g,"")).replace(/(?:[\w\W]*?)<\/style>/g,"")).replace(/((?:[\w\W]*?))<\/body>/g,"$3")).replace(/((?:[\w\W]*?))<\/body>/g,"$4")).replace(/((?:[\w\W]*?))<\/body>/g,"$4")).replace(/((?:[\w\W]*?))<\/body>/g,'$6')).replace(/((?:[\w\W]*?))<\/body>/g,"$3")),w.opts.htmlSimpleAmpersand&&(n=n.replace(/&/gi,"&")),w.events.trigger("html.afterGet"),e||(n=n.replace(/]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,"")),n=w.clean.invisibleSpaces(n),n=w.clean.exec(n,D);var O=w.events.chainTrigger("html.get",n);return"string"==typeof O&&(n=O),n=(n=n.replace(/(?:[\w\W]*?)<\/pre>/g,function(e){return e.replace(/
    /g,"\n")})).replace(/ ".concat(w.html.defaultTag())),r=n.length-1;0<=r;r--){var o=n[r];w.node.isBlock(o.previousSibling)||(o.previousSibling&&!w.node.isEmpty(o)&&p("
    ").insertAfter(o.previousSibling),o.outerHTML=o.innerHTML)}return t.innerHTML}(r)),!(o=w.markers.split()))return!1;o.outerHTML=r}else o.outerHTML=r}else w.el.innerHTML+=r}h(),w.keys.positionCaret(),w.events.trigger("html.inserted")},wrap:t,unwrap:function O(){w.$el.find("div.fr-temp-div").each(function(){this.previousSibling&&this.previousSibling.nodeType===Node.TEXT_NODE&&p(this).before("
    "),p(this).attr("data-empty")||!this.nextSibling||w.node.isBlock(this.nextSibling)&&!p(this.nextSibling).hasClass("fr-temp-div")?p(this).replaceWith(p(this).html()):p(this).replaceWith("".concat(p(this).html(),"
    "))}),w.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter(function(){return""===p(this).attr("class")}).removeAttr("class")},escapeEntities:function x(e){return e.replace(//gi,">").replace(/"/gi,""").replace(/'/gi,"'")},checkIfEmpty:o,extractNode:g,extractNodeAttrs:m,extractDoctype:v,cleanBRs:function R(){for(var e=w.el.getElementsByTagName("br"),t=0;t").concat(V.MARKERS,"
    ")):d.$el.html("".concat(V.MARKERS,"
    ")),d.selection.restore(),d.placeholder.refresh(),d.button.bulkRefresh(),d.undo.saveStep()},0)}function i(){p=!1}function a(){p=!1}function g(){var e=d.html.defaultTag();e?d.$el.html("<".concat(e,">").concat(V.MARKERS,"
    ")):d.$el.html("".concat(V.MARKERS,"
    ")),d.selection.restore()}function m(e,t){if((-1/g,"")).length<1?e.parentElement.insertAdjacentHTML("afterbegin"," "):" "!=n&&" "!=n&&"Backspace"==t.key?u(t):" "!=n&&" "!=n&&"Delete"==t.key&&h(t),!0}if(o(e).is("p")){var r=e.innerHTML.replace(/
    /g,"");return r.length<1?e.insertAdjacentHTML("afterbegin"," "):" "!=r&&" "!=r&&"Backspace"==t.key?u(t):" "!=r&&" "!=r&&"Delete"==t.key&&h(t),!0}}return!1}function s(e){var t=d.selection.element();if(t&&0<=["INPUT","TEXTAREA"].indexOf(t.tagName))return!0;if(e&&b(e.which))return!0;d.events.disableBlur();var n=e.which;if(16===n)return!0;if((f=n)===V.KEYCODE.IME)return p=!0;p=!1;var r=E(n)&&!v(e)&&!e.altKey,o=n===V.KEYCODE.BACKSPACE||n===V.KEYCODE.DELETE;if((d.selection.isFull()&&!d.opts.keepFormatOnDelete&&!d.placeholder.isVisible()||o&&d.placeholder.isVisible()&&d.opts.keepFormatOnDelete)&&(r||o)&&(g(),!E(n)))return e.preventDefault(),!0;if(n===V.KEYCODE.ENTER)e.shiftKey||t.classList.contains("fr-inner")||t.parentElement.classList.contains("fr-inner")?function i(e){e.preventDefault(),e.stopPropagation(),d.opts.multiLine&&(d.selection.isCollapsed()||d.selection.remove(),d.cursor.enter(!0))}(e):function a(e){d.opts.multiLine?(d.helpers.isIOS()||(e.preventDefault(),e.stopPropagation()),d.selection.isCollapsed()||d.selection.remove(),d.cursor.enter()):(e.preventDefault(),e.stopPropagation())}(e);else if(n===V.KEYCODE.BACKSPACE&&(e.metaKey||e.ctrlKey))!function s(){setTimeout(function(){d.events.disableBlur(),d.events.focus()},0)}();else if(n!==V.KEYCODE.BACKSPACE||v(e)||e.altKey)if(n!==V.KEYCODE.DELETE||v(e)||e.altKey||e.shiftKey)n===V.KEYCODE.SPACE?function l(e){var t=d.selection.element();if(!d.helpers.isMobile()&&t&&"A"===t.tagName){e.preventDefault(),e.stopPropagation(),d.selection.isCollapsed()||d.selection.remove();var n=d.markers.insert();if(n){var r=n.previousSibling;!n.nextSibling&&n.parentNode&&"A"===n.parentNode.tagName?(n.parentNode.insertAdjacentHTML("afterend"," ".concat(V.MARKERS)),n.parentNode.removeChild(n)):(r&&r.nodeType===Node.TEXT_NODE&&1===r.textContent.length&&160===r.textContent.charCodeAt(0)?r.textContent+=" ":n.insertAdjacentHTML("beforebegin"," "),n.outerHTML=V.MARKERS),d.selection.restore()}}}(e):n===V.KEYCODE.TAB?function c(e){if(0d.$wp.offset().top-d.helpers.scrollTop()+d.$wp.height()-20&&d.$wp.scrollTop(e+d.$wp.scrollTop()-(d.$wp.height()+d.$wp.offset().top)+d.helpers.scrollTop()+20)):(e=d.position.getBoundingRect().top,d.opts.toolbarBottom&&(e+=d.opts.toolbarStickyOffset),(d.helpers.isIOS()||d.helpers.isAndroid())&&(e-=d.helpers.scrollTop()),d.opts.iframe&&(e+=d.$iframe.offset().top,e-=d.helpers.scrollTop()),(e+=d.opts.toolbarStickyOffset)>d.o_win.innerHeight-20&&o(d.o_win).scrollTop(e+d.helpers.scrollTop()-d.o_win.innerHeight+20),e=d.position.getBoundingRect().top,d.opts.toolbarBottom||(e-=d.opts.toolbarStickyOffset),(d.helpers.isIOS()||d.helpers.isAndroid())&&(e-=d.helpers.scrollTop()),d.opts.iframe&&(e+=d.$iframe.offset().top,e-=d.helpers.scrollTop()),e<100&&o(d.o_win).scrollTop(e+d.helpers.scrollTop()-100))}function c(e){var t=d.selection.element();if(t&&0<=["INPUT","TEXTAREA"].indexOf(t.tagName))return!0;if(e&&0===e.which&&f&&(e.which=f),d.helpers.isAndroid()&&d.browser.mozilla)return!0;if(p)return!1;if(e&&d.helpers.isIOS()&&e.which===V.KEYCODE.ENTER&&d.doc.execCommand("undo"),!d.selection.isCollapsed())return!0;if(e&&(e.which===V.KEYCODE.META||e.which===V.KEYCODE.CTRL))return!0;if(e&&b(e.which))return!0;if(e&&!d.helpers.isIOS()&&(e.which===V.KEYCODE.ENTER||e.which===V.KEYCODE.BACKSPACE||37<=e.which&&e.which<=40&&!d.browser.msie))try{l()}catch(r){}var n=d.selection.element();(function o(e){if(!e)return!1;var t=e.innerHTML;return!!((t=t.replace(/]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,""))&&/\u200B/.test(t)&&0=V.KEYCODE.ARROW_LEFT&&e<=V.KEYCODE.ARROW_DOWN)return!0}function E(e){if(e>=V.KEYCODE.ZERO&&e<=V.KEYCODE.NINE)return!0;if(e>=V.KEYCODE.NUM_ZERO&&e<=V.KEYCODE.NUM_MULTIPLY)return!0;if(e>=V.KEYCODE.A&&e<=V.KEYCODE.Z)return!0;if(d.browser.webkit&&0===e)return!0;switch(e){case V.KEYCODE.SPACE:case V.KEYCODE.QUESTION_MARK:case V.KEYCODE.NUM_PLUS:case V.KEYCODE.NUM_MINUS:case V.KEYCODE.NUM_PERIOD:case V.KEYCODE.NUM_DIVISION:case V.KEYCODE.SEMICOLON:case V.KEYCODE.FF_SEMICOLON:case V.KEYCODE.DASH:case V.KEYCODE.EQUALS:case V.KEYCODE.FF_EQUALS:case V.KEYCODE.COMMA:case V.KEYCODE.PERIOD:case V.KEYCODE.SLASH:case V.KEYCODE.APOSTROPHE:case V.KEYCODE.SINGLE_QUOTE:case V.KEYCODE.OPEN_SQUARE_BRACKET:case V.KEYCODE.BACKSLASH:case V.KEYCODE.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}function S(e){var t=e.which;if(v(e)||37<=t&&t<=40||!E(t)&&t!==V.KEYCODE.DELETE&&t!==V.KEYCODE.BACKSPACE&&t!==V.KEYCODE.ENTER&&t!==V.KEYCODE.IME)return!0;n||(r=d.snapshot.get(),d.undo.canDo()||d.undo.saveStep()),clearTimeout(n),n=setTimeout(function(){n=null,d.undo.saveStep()},Math.max(250,d.opts.typingTimer))}function T(e){var t=e.which;if(v(e)||37<=t&&t<=40)return!0;r&&n?(d.undo.saveStep(r),r=null):void 0!==t&&0!==t||r||n||d.undo.saveStep()}function y(e){if(e&&"BR"===e.tagName)return!1;try{return 0===(e.textContent||"").length&&e.querySelector&&!e.querySelector(":scope > br")||e.childNodes&&1===e.childNodes.length&&e.childNodes[0].getAttribute&&("false"===e.childNodes[0].getAttribute("contenteditable")||d.node.hasClass(e.childNodes[0],"fr-img-caption"))}catch(t){return!1}}function C(e){var t=d.el.childNodes,n=d.html.defaultTag(),r=d.node.blockParent(d.selection.blocks()[0]);return r&&"TR"==r.tagName&&r.getAttribute("contenteditable")==undefined&&(r=r.closest("table")),!d.node.isEditable(e.target)||r&&"false"===r.getAttribute("contenteditable")?d.toolbar.disable():d.toolbar.enable(),!(!e.target||e.target===d.el)||(0===t.length||void(t[0].offsetHeight+t[0].offsetTop<=e.offsetY?y(t[t.length-1])&&(n?d.$el.append("<".concat(n,">").concat(V.MARKERS,"
    ")):d.$el.append("".concat(V.MARKERS,"
    ")),d.selection.restore(),l()):e.offsetY<=10&&y(t[0])&&(n?d.$el.prepend("<".concat(n,">").concat(V.MARKERS,"
    ")):d.$el.prepend("".concat(V.MARKERS,"
    ")),d.selection.restore(),l())))}function N(){n&&clearTimeout(n)}return{_init:function A(){d.events.on("keydown",S),d.events.on("input",e),d.events.on("mousedown",a),d.events.on("keyup input",T),d.events.on("keypress",i),d.events.on("keydown",s),d.events.on("keyup",c),d.events.on("destroy",N),d.events.on("html.inserted",c),d.events.on("cut",t),d.opts.multiLine&&d.events.on("click",C)},ctrlKey:v,isCharacter:E,isArrow:b,forceUndo:function M(){n&&(clearTimeout(n),d.undo.saveStep(),r=null)},isIME:function O(){return p},isBrowserAction:function x(e){var t=e.which;return v(e)||t===V.KEYCODE.F5},positionCaret:l}},Object.assign(V.DEFAULTS,{pastePlain:!1,pasteDeniedTags:["colgroup","col","meta"],pasteDeniedAttrs:["class","id"],pasteAllowedStyleProps:[".*"],pasteAllowLocalImages:!1}),V.MODULES.paste=function(M){var a,s,i,O,x=M.$;function n(e,t){try{M.win.localStorage.setItem("fr-copied-html",e),M.win.localStorage.setItem("fr-copied-text",t)}catch(n){}}function e(e){var t=M.html.getSelected();n(t,x(M.doc.createElement("div")).html(t).text()),"cut"===e.type&&(M.undo.saveStep(),setTimeout(function(){M.selection.save(),M.html.wrap(),M.selection.restore(),M.events.focus(),M.undo.saveStep()},0))}var l=!1;function t(e){if("INPUT"===e.target.nodeName&&"text"===e.target.type)return!0;if(M.edit.isDisabled())return!1;if(c(e.target))return!1;if(l)return!1;if(e.originalEvent&&(e=e.originalEvent),!1===M.events.trigger("paste.before",[e]))return e.preventDefault(),!1;if(e&&e.clipboardData&&e.clipboardData.getData){var t="",n=e.clipboardData.types;if(M.helpers.isArray(n))for(var r=0;r
    '),M.browser.webkit||M.browser.mozilla?(i.css("top",M.$sc.scrollTop()),M.$el.after(i)):M.browser.edge&&M.opts.iframe?M.$el.append(i):M.$box.after(i),M.events.on("destroy",function(){i.remove()}));var e;M.helpers.isIOS()&&M.$sc&&(e=M.$sc.scrollTop());M.opts.iframe&&M.$el.attr("contenteditable","false");i.focus(),M.helpers.isIOS()&&M.$sc&&M.$sc.scrollTop(e);M.win.setTimeout(d,1)}(),!1}function c(e){return e&&"false"===e.contentEditable}function r(e){if(e.originalEvent&&(e=e.originalEvent),c(e.target))return!1;if(e&&e.dataTransfer&&e.dataTransfer.getData){var t="",n=e.dataTransfer.types;if(M.helpers.isArray(n))for(var r=0;r")),""!==a){M.keys.forceUndo(),O=M.snapshot.get(),M.selection.save(),M.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");var o=M.markers.insertAtPoint(e);if(M.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"),M.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"),M.selection.restore(),M.selection.remove(),M.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"),!1!==o){var i=M.el.querySelector(".fr-marker");return x(i).replaceWith(V.MARKERS),M.selection.restore(),d(),e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!1}}else a=null}}function d(){M.opts.iframe&&M.$el.attr("contenteditable","true"),M.browser.edge&&M.opts.iframe&&M.$box.after(i),O||(M.keys.forceUndo(),O=M.snapshot.get()),a||(a=i.get(0).innerHTML,M.selection.restore(),M.events.enableBlur());var e=a.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi),t=M.events.chainTrigger("paste.beforeCleanup",a);t&&"string"==typeof t&&(a=t),(!e||e&&!1!==M.events.trigger("paste.wordPaste",[a]))&&o(a,e)}function w(e){for(var t="",n=0;n++]*(]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi,"$1")),e=(e=a+e.replace(/[.\s\S\w\W<>]*]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi,"$1")).replace(/ \n/g," ").replace(/\n /g," ").replace(/([^>])\n([^<])/g,"$1 $2")}var s=!1;0<=e.indexOf('id="docs-internal-guid')&&(e=e.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g,"$1"),s=!0),0<=e.indexOf('content="Sheets"')&&(e=e.replace(/width:0px;/g,""));var l=!1;if(!t)if((l=function T(e){var t=null;try{t=M.win.localStorage.getItem("fr-copied-text")}catch(n){}return!(!t||x("
    ").html(e).text().replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")!==t.replace(/\u00A0/gi," ").replace(/\r|\n/gi,""))}(e))&&(e=M.win.localStorage.getItem("fr-copied-html")),l)e=M.clean.html(e,M.opts.pasteDeniedTags,M.opts.pasteDeniedAttrs);else{var c=M.opts.htmlAllowedStyleProps;M.opts.htmlAllowedStyleProps=M.opts.pasteAllowedStyleProps,M.opts.htmlAllowComments=!1,e=(e=(e=e.replace(/\s*<\/span>/g,w(M.opts.tabSpaces||4))).replace(/(\t*)<\/span>/g,function(e,t){return w(t.length*(M.opts.tabSpaces||4))})).replace(/\t/g,w(M.opts.tabSpaces||4)),e=M.clean.html(e,M.opts.pasteDeniedTags,M.opts.pasteDeniedAttrs),M.opts.htmlAllowedStyleProps=c,M.opts.htmlAllowComments=!0,e=(e=(e=$(e)).replace(/\r/g,"")).replace(/^ */g,"").replace(/ *$/g,"")}!t||M.wordPaste&&n||(0===(e=e.replace(/^\n*/g,"").replace(/^ /g,"")).indexOf("")&&(e="".concat(e,"
    ")),e=$(e=function y(e){var t;e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/([\s\S]*?)<\/p>/gi,"
    • $3
    ")).replace(/([\s\S]*?)<\/p>/gi,"
    1. $3
    ")).replace(/([\s\S]*?)<\/p>/gi,"
      $5")).replace(/([\s\S]*?)<\/p>/gi,"
        $5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5
    ")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)([\s\S]*?)/gi,"")).replace(/([\s\S]*?)/gi,"")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi," ")).replace(//gi,"")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi,"");var n,r=["style","script","applet","embed","noframes","noscript"];for(t=0;t"),"gi");e=e.replace(o,"")}for(e=(e=(e=e.replace(/ /gi," ")).replace(/]*)><\/td>/g,"
    ")).replace(/]*)><\/th>/g,"
    ");(e=(n=e).replace(/<[^/>][^>]*><\/[^>]+>/gi,""))!==n;);e=(e=e.replace(/]*)>/gi,'
  • ')).replace(/]*)>/gi,""),e=(e=(e=M.clean.html(e,M.opts.pasteDeniedTags,M.opts.pasteDeniedAttrs)).replace(/(.[^<]+)<\/a>/gi,"$1")).replace(/
    */g,"
    ");var i=M.o_doc.createElement("div");i.innerHTML=e;var a=i.querySelectorAll("li[data-indent]");for(t=0;t ul, :scope > ol");c||(c=document.createElement("ul"),l.appendChild(c)),c.appendChild(s)}else s.removeAttribute("data-indent")}return M.html.cleanBlankSpaces(i),e=i.innerHTML}(e))),M.opts.pastePlain&&!l&&(e=function C(e){var t,n=null,r=M.doc.createElement("div");r.innerHTML=e;var o=r.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");for(t=0;t").concat(n.innerHTML,"");for(t=(o=r.querySelectorAll("*:not(".concat("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not("),")"))).length-1;0<=t;t--)(n=o[t]).outerHTML=n.innerHTML;return function i(e){for(var t=M.node.contents(e),n=0;n")?(M.html.cleanBlankSpaces(f),M.spaces.normalize(f,!0)):M.spaces.normalize(f);var p=f.getElementsByTagName("span");for(r=p.length-1;0<=r;r--){var u=p[r];0===u.attributes.length&&(u.outerHTML=u.innerHTML)}if(!0===M.opts.linkAlwaysBlank){var h=f.getElementsByTagName("a");for(r=h.length-1;0<=r;r--){var g=h[r];g.getAttribute("target")||g.setAttribute("target","_blank")}}var m=M.selection.element(),v=!1;if(m&&x(m).parentsUntil(M.el,"ul, ol").length&&(v=!0),v){var b=f.children;1===b.length&&0<=["OL","UL"].indexOf(b[0].tagName)&&(b[0].outerHTML=b[0].innerHTML)}if(!s){var E=f.getElementsByTagName("br");for(r=E.length-1;0<=r;r--){var S=E[r];M.node.isBlock(S.previousSibling)&&S.parentNode.removeChild(S)}}if(M.opts.enter===V.ENTER_BR)for(r=(o=f.querySelectorAll("p, div")).length-1;0<=r;r--)0===(i=o[r]).attributes.length&&(i.outerHTML=i.innerHTML+(i.nextSibling&&!M.node.isEmpty(i)?"
    ":""));else if(M.opts.enter===V.ENTER_DIV)for(r=(o=f.getElementsByTagName("p")).length-1;0<=r;r--)0===(i=o[r]).attributes.length&&(i.outerHTML="
    ".concat(i.innerHTML,"
    "));else M.opts.enter===V.ENTER_P&&1===f.childNodes.length&&"P"===f.childNodes[0].tagName&&0===f.childNodes[0].attributes.length&&(f.childNodes[0].outerHTML=f.childNodes[0].innerHTML);e=f.innerHTML,l&&(e=function N(e){var t,n=M.o_doc.createElement("div");n.innerHTML=e;var r=n.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat(V.VOID_ELEMENTS.join("):not("),"):not(").concat(M.opts.htmlAllowedEmptyTags.join("):not("),")"));for(;r.length;){for(t=0;t div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")));r.length;){var o=r[r.length-1];if(M.html.defaultTag()&&"div"!==M.html.defaultTag())o.querySelector(M.html.blockTagsQuery())?o.outerHTML=o.innerHTML:o.outerHTML="<".concat(M.html.defaultTag(),">").concat(o.innerHTML,"");else{var i=o.querySelectorAll("*");!i.length||"BR"!==i[i.length-1].tagName&&0===o.innerText.length?o.outerHTML=o.innerHTML+(o.nextSibling?"
    ":""):!i.length||"BR"!==i[i.length-1].tagName||i[i.length-1].nextSibling?o.outerHTML=o.innerHTML+(o.nextSibling?"
    ":""):o.outerHTML=o.innerHTML}r=f(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))}for(r=f(Array.prototype.slice.call(n.querySelectorAll("div:not([style])")));r.length;){for(t=0;tn.undo_index;)n.undo_stack.pop()}function o(){n.undo_index=0,n.undo_stack=[]}function i(){n.undo_stack=[]}return{_init:function a(){o(),n.events.on("initialized",function(){t=(n.$wp?n.$el.html():n.$oel.get(0).outerHTML).replace(/ style=""/g,"")}),n.events.on("blur",function(){n.el.querySelector(".fr-dragging")||n.undo.saveStep()}),n.events.on("keydown",e),n.events.on("destroy",i)},run:function s(){if(1'.concat(e,""));for(var t=0;t'));n.get(0).addEventListener("load",a.size.syncIframe),a.$head.append(n)}}},hasFocus:function l(){return a.browser.mozilla&&a.helpers.isMobile()?a.selection.inEditor():a.node.hasFocus(a.el)||0 span").css("width")),s=f.helpers.getPX(i.css("paddingLeft")),l=f.helpers.getPX(i.css("paddingRight"));i.css("width",a*f.opts.colorsStep+s+l)}return f.button.bindCommands(o,!1),o}function E(r){var o=u[r];return{_windowResize:function(){var e=o.data("instance")||f;!e.helpers.isMobile()&&o.isVisible()&&(e.events.disableBlur(),e.popups.hide(r),e.events.enableBlur())},_inputFocus:function(e){var t=o.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=o.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=o.data("instance")||f;t.keys.ctrlKey(e)||e.which===V.KEYCODE.ALT||e.which===V.KEYCODE.ESC||(g(r)&&o.findVisible(".fr-back").length?t.button.exec(o.findVisible(".fr-back").first()):e.which!==V.KEYCODE.ALT&&t.popups.hide(r))},_preventFocus:function(e){var t=o.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').concat(r.attr("placeholder"),"")),r.attr("placeholder",""))}}(o),f.events.$on(o,"focus",a),f.events.$on(o,"blur change",s),f.events.$on(n,"click",".fr-checkbox + label",S),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 o(e){var t=u[e];return t&&!t.data("inst".concat(f.id))&&c(E(e),e),t},show:function y(e,t,n,r,o){if(g(e)||(m()&&0 .fr-dropdown-wrapper").css("height",""),i.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 a=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&&!a){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())),o&&(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 button.fr-command").first());if(0a(i.o_win).width()&&(n=a(i.o_win).width()-i.$tooltip.outerWidth()),void 0===t&&(t=i.opts.toolbarBottom),e.offset().top-a(window).scrollTop()+e.outerHeight()+10>=a(window).height()&&(t=!0);var r=t?e.offset().top-i.$tooltip.height():e.offset().top+e.outerHeight();i.$tooltip.css("position",""),i.$tooltip.css("left",n),i.$tooltip.css("top",Math.ceil(r)),"static"!==a(i.o_doc).find("body").first().css("position")?(i.$tooltip.css("margin-left",-a(i.o_doc).find("body").first().offset().left),i.$tooltip.css("margin-top",-a(i.o_doc).find("body").first().offset().top)):(i.$tooltip.css("margin-left",""),i.$tooltip.css("margin-top",""))}}return{hide:r,to:o,bind:function s(e,t,n){i.opts.tooltips&&!i.helpers.isMobile()&&(i.events.$on(e,"mouseover",t,function(e){i.node.hasClass(e.currentTarget,"fr-disabled")||i.edit.isDisabled()||o(a(e.currentTarget),n)},!0),i.events.$on(e,"mouseout ".concat(i._mousedown," ").concat(i._mouseup),t,function(){r()},!0))}}},V.TOOLBAR_VISIBLE_BUTTONS=3,V.MODULES.button=function(g){var h=g.$,a=[];(g.opts.toolbarInline||g.opts.toolbarContainer)&&(g.shared.buttons||(g.shared.buttons=[]),a=g.shared.buttons);var s=[];function l(e,t,n){for(var r=h(),o=0;o .fr-dropdown-wrapper");if(!n){var l=e.data("cmd");t.find(".fr-command").removeClass("fr-active").attr("aria-selected",!1),V.COMMANDS[l]&&V.COMMANDS[l].refreshOnShow&&V.COMMANDS[l].refreshOnShow.apply(o,[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"),i=t.outerHeight(),a=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()+ig.$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 .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 i(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 .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').concat(g.language.translate(i||t.title),"")}else o=g.icon.create(t.icon||e),o+=''.concat(g.language.translate(t.title)||"","");var a=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(o){var i=g.$tb&&g.$tb.data("instance")||g;if(!1===g.events.trigger("buttons.refresh"))return!0;setTimeout(function(){for(var e=i.selection.inEditor()&&i.core.hasFocus(),t=0;t
  • ':"-"===o&&(n+=''))}return n},buildGroup:function T(e){var t="",n="";for(var r in e){var o=e[r];if(o.buttons){for(var i="",a="",s=0,l="left",c=V.TOOLBAR_VISIBLE_BUTTONS,d=0;d
    ':"-"==f&&(i+='')),!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?a+=v(f,p,!0):i+=v(f,p,!0),s++)}if(e.showMoreButtons&&c').concat(i,"
    "),e.showMoreButtons&&0').concat(a,""))}}return g.opts.toolbarBottom?"".concat(n,'
    ').concat(t):"".concat(t,'
    ').concat(n)},bindCommands:function y(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 o(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===V.KEYCODE.ESC))&&d(t)}g.events.$on(h(r),"".concat(g._mouseup," resize keydown"),o,!0),g.opts.iframe&&g.events.$on(g.$win,g._mouseup,o,!0),g.node.hasClass(t.get(0),"fr-popup")?h.merge(s,t.find(".fr-btn").toArray()):h.merge(a,t.find(".fr-btn").toArray()),g.tooltip.bind(t,".fr-btn, .fr-title",e)},refresh:function C(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)),V.COMMANDS[r]&&V.COMMANDS[r].refresh?V.COMMANDS[r].refresh.apply(n,[e,t]):g.refresh[r]&&n.refresh[r](e,t)},bulkRefresh:n,exec:i,click:t,hideActiveDropdowns:d,addButtons:function N(e){for(var t=0;t