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