/*! * froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2024 Froala Labs */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(M){"use strict";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r")&&(n=""+n+"
"),n=l(n=n.replace(/([\r\n\u00a0 ]*)<\/span>/g,function(t,e){for(var r="",i=0;i++').concat(s.get(0).innerHTML,"")):n+="
  • ".concat(s.get(0).innerHTML,"
  • ")}}else{var d,f=null===(d=P(t).find("p").get(0))||void 0===d?void 0:d.style.marginLeft;n=f?(f=parseFloat(parseFloat(f).toFixed(2))+f.match(/[a-zA-Z]+/g)[0],'
  • ').concat(n,"
  • ")):"
  • ".concat(n,"
  • ")}return n=n.replace(//gi,"")}function h(t){var e=1])*>"==r.children[a]&&(r.innerHTML+=r.children[a]);(l=r.getAttribute("width"))||(l=r.style.width),l||n||(n=!0),i+=parseInt(l,10),(!r.firstChild||r.firstChild&&r.firstChild.data===M.UNICODE_NBSP)&&(r.firstChild&&S(r.firstChild),r.innerHTML="
    ");for(var s=r.firstElementChild,o=1===r.children.length;s;)"P"!==s.tagName||$(s)||o&&T(s),s=s.nextElementSibling;if(e){var d=r.getAttribute("class");if(d){var f=(d=L(d)).match(/xl[0-9]+/gi);if(f){var u="."+f[0];e[u]&&w(r,e[u])}}e.td&&w(r,e.td)}var g=r.getAttribute("style");g&&(g=L(g))&&";"!==g.slice(-1)&&(g+=";");var c=r.getAttribute("valign");if(!c&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(c=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var m=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(m=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===m&&(m=null)}var v=null;if(g){var b=g.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var y=r.getAttribute("colspan"),x=r.getAttribute("rowspan");y&&r.setAttribute("colspan",y),x&&r.setAttribute("rowspan",x),c&&(r.style["vertical-align"]=c),m&&(r.style["text-align"]=m),v&&(r.style["background-color"]=v),l&&r.setAttribute("width",l),r=r.nextElementSibling}for(r=t.firstElementChild;r;)l=r.getAttribute("width"),n&&r.removeAttribute("width"),r=r.nextElementSibling;t.previousSibling?C!=i&&(E=!1):C=i,t.nextElementSibling||function N(t){var e=t.closest("table"),r=0,n=function n(){var i=0;Array.from(t.children).forEach(function(t){var e=parseInt(t.getAttribute("width"),10);isNaN(e)||(i+=e)}),r')).remove()}}}}function b(t,e){var r=t.tagName,i=r.toLowerCase();t.firstElementChild&&("I"===t.firstElementChild.tagName?y(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&y(t.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return S(t),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l"),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=L(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function l(t,e){0<=t.indexOf("]*(]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var o=t.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function u(t){for(var e=t.split("v:shape"),r=1;r ul, ul > ol, ol > ul, ol > ol"),a=l.length-1;0<=a;a--)l[a].previousElementSibling&&"LI"===l[a].previousElementSibling.tagName&&l[a].previousElementSibling.appendChild(l[a]);m(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/
    (\n|\r)/gi,"
    "),!1;if(t.nodeType===Node.ELEMENT_NODE){if($(t)){var e=t.parentNode,r=t.previousSibling,i=function I(t,e,r,i){var n,l,a,s,o,d,f,u=navigator.userAgent.toLowerCase();-1!=u.indexOf("safari")&&(u=-1",T=!0,a=null),p+=(o=I(t,e,L,t.style.marginLeft)).el.outerHTML,t=o.currentNode);var M=t&&t.nextElementSibling;if(M&&(a=M.previousElementSibling),t&&!$(t)){if(t.outerHTML&&0");var H=document.createElement("div");return H.innerHTML=p,{el:H,currentNode:t}}(t,d).el,n=null;return(n=r?r.nextSibling:e.firstChild)?e.insertBefore(i,n):e.appendChild(i),!1}return"FONT"===t.tagName&&(o&&"LibreOffice"===o[0]||d["."+t.getAttribute("class")])?t=y(t,"span"):o&&"\x3c!--StartFragment--\x3e"===o[0]&&"UL"===t.tagName&&(P(t).find("li span").each(function(){" "===P(this).html()&&(0",e=function n(){var t='
    ';return t+='

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

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