wysiwyg-rails 4.0.8 → 4.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/froala_editor.min.js +3 -3
  3. data/app/assets/javascripts/froala_editor.pkgd.min.js +3 -3
  4. data/app/assets/javascripts/languages/ar.js +2 -2
  5. data/app/assets/javascripts/languages/bs.js +2 -2
  6. data/app/assets/javascripts/languages/cs.js +2 -2
  7. data/app/assets/javascripts/languages/da.js +2 -2
  8. data/app/assets/javascripts/languages/de.js +2 -2
  9. data/app/assets/javascripts/languages/el.js +2 -2
  10. data/app/assets/javascripts/languages/en_ca.js +2 -2
  11. data/app/assets/javascripts/languages/en_gb.js +2 -2
  12. data/app/assets/javascripts/languages/es.js +2 -2
  13. data/app/assets/javascripts/languages/et.js +2 -2
  14. data/app/assets/javascripts/languages/fa.js +2 -2
  15. data/app/assets/javascripts/languages/fi.js +2 -2
  16. data/app/assets/javascripts/languages/fr.js +2 -2
  17. data/app/assets/javascripts/languages/he.js +2 -2
  18. data/app/assets/javascripts/languages/hr.js +2 -2
  19. data/app/assets/javascripts/languages/hu.js +2 -2
  20. data/app/assets/javascripts/languages/id.js +2 -2
  21. data/app/assets/javascripts/languages/it.js +2 -2
  22. data/app/assets/javascripts/languages/ja.js +2 -2
  23. data/app/assets/javascripts/languages/ko.js +2 -2
  24. data/app/assets/javascripts/languages/ku.js +2 -2
  25. data/app/assets/javascripts/languages/me.js +2 -2
  26. data/app/assets/javascripts/languages/nb.js +2 -2
  27. data/app/assets/javascripts/languages/nl.js +2 -2
  28. data/app/assets/javascripts/languages/pl.js +2 -2
  29. data/app/assets/javascripts/languages/pt_br.js +2 -2
  30. data/app/assets/javascripts/languages/pt_pt.js +2 -2
  31. data/app/assets/javascripts/languages/ro.js +2 -2
  32. data/app/assets/javascripts/languages/ru.js +2 -2
  33. data/app/assets/javascripts/languages/sk.js +2 -2
  34. data/app/assets/javascripts/languages/sl.js +2 -2
  35. data/app/assets/javascripts/languages/sr.js +2 -2
  36. data/app/assets/javascripts/languages/sv.js +2 -2
  37. data/app/assets/javascripts/languages/th.js +2 -2
  38. data/app/assets/javascripts/languages/tr.js +2 -2
  39. data/app/assets/javascripts/languages/uk.js +2 -2
  40. data/app/assets/javascripts/languages/vi.js +2 -2
  41. data/app/assets/javascripts/languages/zh_cn.js +2 -2
  42. data/app/assets/javascripts/languages/zh_tw.js +2 -2
  43. data/app/assets/javascripts/plugins/align.min.js +2 -2
  44. data/app/assets/javascripts/plugins/char_counter.min.js +2 -2
  45. data/app/assets/javascripts/plugins/code_beautifier.min.js +2 -2
  46. data/app/assets/javascripts/plugins/code_view.min.js +2 -2
  47. data/app/assets/javascripts/plugins/colors.min.js +2 -2
  48. data/app/assets/javascripts/plugins/cryptojs.min.js +2 -2
  49. data/app/assets/javascripts/plugins/draggable.min.js +2 -2
  50. data/app/assets/javascripts/plugins/edit_in_popup.min.js +2 -2
  51. data/app/assets/javascripts/plugins/emoticons.min.js +2 -2
  52. data/app/assets/javascripts/plugins/entities.min.js +2 -2
  53. data/app/assets/javascripts/plugins/file.min.js +2 -2
  54. data/app/assets/javascripts/plugins/files_manager.min.js +3 -3
  55. data/app/assets/javascripts/plugins/font_family.min.js +2 -2
  56. data/app/assets/javascripts/plugins/font_size.min.js +2 -2
  57. data/app/assets/javascripts/plugins/forms.min.js +2 -2
  58. data/app/assets/javascripts/plugins/fullscreen.min.js +2 -2
  59. data/app/assets/javascripts/plugins/help.min.js +2 -2
  60. data/app/assets/javascripts/plugins/image.min.js +3 -3
  61. data/app/assets/javascripts/plugins/image_manager.min.js +2 -2
  62. data/app/assets/javascripts/plugins/inline_class.min.js +2 -2
  63. data/app/assets/javascripts/plugins/inline_style.min.js +2 -2
  64. data/app/assets/javascripts/plugins/line_breaker.min.js +2 -2
  65. data/app/assets/javascripts/plugins/line_height.min.js +2 -2
  66. data/app/assets/javascripts/plugins/link.min.js +2 -2
  67. data/app/assets/javascripts/plugins/lists.min.js +2 -2
  68. data/app/assets/javascripts/plugins/markdown.min.js +3 -3
  69. data/app/assets/javascripts/plugins/paragraph_format.min.js +2 -2
  70. data/app/assets/javascripts/plugins/paragraph_style.min.js +2 -2
  71. data/app/assets/javascripts/plugins/print.min.js +2 -2
  72. data/app/assets/javascripts/plugins/quick_insert.min.js +2 -2
  73. data/app/assets/javascripts/plugins/quote.min.js +3 -3
  74. data/app/assets/javascripts/plugins/save.min.js +2 -2
  75. data/app/assets/javascripts/plugins/special_characters.min.js +2 -2
  76. data/app/assets/javascripts/plugins/table.min.js +2 -2
  77. data/app/assets/javascripts/plugins/track_changes.min.js +3 -3
  78. data/app/assets/javascripts/plugins/trim_video.min.js +2 -2
  79. data/app/assets/javascripts/plugins/url.min.js +2 -2
  80. data/app/assets/javascripts/plugins/video.min.js +2 -2
  81. data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
  82. data/app/assets/javascripts/plugins.pkgd.min.js +3 -3
  83. data/app/assets/javascripts/third_party/embedly.min.js +2 -2
  84. data/app/assets/javascripts/third_party/font_awesome.min.js +2 -2
  85. data/app/assets/javascripts/third_party/image_tui.min.js +2 -2
  86. data/app/assets/javascripts/third_party/showdown.min.js +3 -3
  87. data/app/assets/javascripts/third_party/spell_checker.min.js +2 -2
  88. data/app/assets/stylesheets/froala_editor.css +2 -3
  89. data/app/assets/stylesheets/froala_editor.min.css +3 -3
  90. data/app/assets/stylesheets/froala_editor.pkgd.css +2 -3
  91. data/app/assets/stylesheets/froala_editor.pkgd.min.css +3 -3
  92. data/app/assets/stylesheets/froala_style.css +2 -2
  93. data/app/assets/stylesheets/froala_style.min.css +2 -2
  94. data/app/assets/stylesheets/plugins/char_counter.css +2 -2
  95. data/app/assets/stylesheets/plugins/char_counter.min.css +2 -2
  96. data/app/assets/stylesheets/plugins/code_view.css +2 -2
  97. data/app/assets/stylesheets/plugins/code_view.min.css +2 -2
  98. data/app/assets/stylesheets/plugins/colors.css +2 -2
  99. data/app/assets/stylesheets/plugins/colors.min.css +2 -2
  100. data/app/assets/stylesheets/plugins/draggable.css +2 -2
  101. data/app/assets/stylesheets/plugins/draggable.min.css +2 -2
  102. data/app/assets/stylesheets/plugins/emoticons.css +2 -2
  103. data/app/assets/stylesheets/plugins/emoticons.min.css +2 -2
  104. data/app/assets/stylesheets/plugins/file.css +2 -2
  105. data/app/assets/stylesheets/plugins/file.min.css +2 -2
  106. data/app/assets/stylesheets/plugins/files_manager.css +2 -2
  107. data/app/assets/stylesheets/plugins/files_manager.min.css +2 -2
  108. data/app/assets/stylesheets/plugins/fullscreen.css +2 -2
  109. data/app/assets/stylesheets/plugins/fullscreen.min.css +2 -2
  110. data/app/assets/stylesheets/plugins/help.css +2 -2
  111. data/app/assets/stylesheets/plugins/help.min.css +2 -2
  112. data/app/assets/stylesheets/plugins/image.css +2 -2
  113. data/app/assets/stylesheets/plugins/image.min.css +2 -2
  114. data/app/assets/stylesheets/plugins/image_manager.css +2 -2
  115. data/app/assets/stylesheets/plugins/image_manager.min.css +2 -2
  116. data/app/assets/stylesheets/plugins/line_breaker.css +2 -2
  117. data/app/assets/stylesheets/plugins/line_breaker.min.css +2 -2
  118. data/app/assets/stylesheets/plugins/markdown.css +2 -2
  119. data/app/assets/stylesheets/plugins/markdown.min.css +2 -2
  120. data/app/assets/stylesheets/plugins/quick_insert.css +2 -2
  121. data/app/assets/stylesheets/plugins/quick_insert.min.css +2 -2
  122. data/app/assets/stylesheets/plugins/special_characters.css +2 -2
  123. data/app/assets/stylesheets/plugins/special_characters.min.css +2 -2
  124. data/app/assets/stylesheets/plugins/table.css +2 -2
  125. data/app/assets/stylesheets/plugins/table.min.css +2 -2
  126. data/app/assets/stylesheets/plugins/trim_video.css +2 -2
  127. data/app/assets/stylesheets/plugins/trim_video.min.css +2 -2
  128. data/app/assets/stylesheets/plugins/video.css +2 -2
  129. data/app/assets/stylesheets/plugins/video.min.css +2 -2
  130. data/app/assets/stylesheets/plugins.pkgd.css +2 -2
  131. data/app/assets/stylesheets/plugins.pkgd.min.css +2 -2
  132. data/app/assets/stylesheets/themes/dark.css +2 -3
  133. data/app/assets/stylesheets/themes/dark.min.css +3 -3
  134. data/app/assets/stylesheets/themes/gray.css +2 -3
  135. data/app/assets/stylesheets/themes/gray.min.css +3 -3
  136. data/app/assets/stylesheets/themes/royal.css +2 -3
  137. data/app/assets/stylesheets/themes/royal.min.css +3 -3
  138. data/app/assets/stylesheets/third_party/embedly.css +2 -2
  139. data/app/assets/stylesheets/third_party/embedly.min.css +2 -2
  140. data/app/assets/stylesheets/third_party/font_awesome.css +2 -2
  141. data/app/assets/stylesheets/third_party/font_awesome.min.css +2 -2
  142. data/app/assets/stylesheets/third_party/image_tui.css +2 -2
  143. data/app/assets/stylesheets/third_party/image_tui.min.css +2 -2
  144. data/app/assets/stylesheets/third_party/spell_checker.css +2 -2
  145. data/app/assets/stylesheets/third_party/spell_checker.min.css +2 -2
  146. data/lib/wysiwyg-rails/version.rb +1 -1
  147. metadata +2 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.0.8 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.0.9 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2021 Froala Labs
4
+ * Copyright 2014-2022 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.trimVideoPlugin=function(c){var o,d,s,l,u,m,f,v,r;function p(e){e.preventDefault(),null!=l&&l.abort(),l=null;var t=document.getElementById("videoTrimContainer");t.parentNode.removeChild(t),c.filesManager.setChildWindowState(!1)}function g(e){var t=parseInt(e,10),n=Math.floor(t/3600)?String(Math.floor(t/3600)):"00",a=Math.floor(t/60)%60?String(Math.floor(t/60)%60):"00",i=t%60?String(t%60):"00";return i=i.length<2?"0"+i:i,a=a.length<2?"0"+a:a,(n=n.length<2?"0"+n:n)+":"+a+":"+i}function y(e){e.preventDefault();var t=g(document.getElementById("startTime").value),n=g(document.getElementById("endTime").value);o.constructor===Blob&&(o=new File([o],o.name,{type:o.type||"",lastModified:o.lastModified}));var a=new FormData;a.append("startTime",t),a.append("endTime",n),a.append("file",o);var i=new XMLHttpRequest;document.getElementById("trim-file-loader").classList.add("fr-file-loader"),document.getElementsByClassName("fr-trim-button")[0].style.display="none",i.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=o.name,e.lastModified=o.lastModified,e.lastModifiedDate=o.lastModifiedDate,r.set(d,e),c.filesManager.upload(e,[],null,d),document.getElementById("trim-file-loader").classList.remove("fr-file-loader"),document.getElementsByClassName("fr-trim-button")[0].style.display="block";var t=document.getElementById("videoTrimContainer");t.parentNode.removeChild(t),c.filesManager.setChildWindowState(!1)}},i.open("POST","http://localhost:3000/convert",!0),i.responseType="blob",(l=i).send(a)}return{_init:function e(){},trimVideo:function i(e,t,n){o=e,d=t,r=n,function a(){var e=URL.createObjectURL(o),t=c.o_doc.body,n=c.o_doc.createElement("div");n.setAttribute("id","videoTrimContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;overflow-y:auto;width: 100%;height: 100%;background: rgba(0,0,0,0.4);z-index: 9998;display:block",t.appendChild(n);var r=document.createElement("div");r.setAttribute("id","fr-form-container"),r.innerHTML='\n <h3 class="fr-trim-video-name"> '.concat(o.name.replace(/\.[^.]*$/,""),"</h3>\n <div style='display:block;text-align: center; margin-left:50%;' id='trim-file-loader'></div>\n <video id='fr-video-edit' controls>\n <source src=").concat(e," >\n Your browser does not support the video tag.\n </video> \n "),document.getElementById("videoTrimContainer").appendChild(r),document.getElementById("fr-video-edit").addEventListener("loadedmetadata",function(){s=document.getElementById("fr-video-edit").duration,r.innerHTML+=' \n \n <form>\n <center>\n <section class="fr-range-slider ">\n <div id="startTimeValue" class=" fr-range-value-start"> </div>\n <input type="range" class="fr-slider" value=\'0\' min="0" max='.concat(s,' id=\'startTime\' >\n <div id="endTimeValue" class="fr-range-value-end" ></div>\n <input type="range"class="fr-slider" value=').concat(s," min='0' max=").concat(s," id='endTime'>\n <div id=\"selectedRange\"style=\" pointer-events: none; position: absolute;left: 0;top: 12px;width: 100%;\n outline: none;\n height: 6px;\n border-radius: 10px;\"></div>\n </section>\n </center>\n <div class=\"fr-video-trim-buttons\" >\n <button id='convert' class='fr-trim-button'>").concat(c.language.translate("Trim"),"</button> \n <button id='cancel' class='fr-trim-button' onsubmit='cancel()'>").concat(c.language.translate("Cancel"),"</button>\n </div>\n </form>\n ");var t=document.getElementById("startTime"),e=document.getElementById("startTimeValue"),n=function n(){u=Number(100*(t.value-t.min)/(t.max-t.min)),m=10-.2*u,f=Number(100*(a.value-a.min)/(a.max-a.min)),v=10-.2*f,e.innerHTML="<span>".concat(g(t.value),"</span>"),e.style.left="calc(".concat(u,"% + (").concat(m,"px))"),selectedRange.style.left=e.style.left,selectedRange.style.width="calc((".concat(f,"% + (").concat(v,"px)) - (").concat(u,"% + (").concat(m,"px)))"),selectedRange.style.backgroundColor="#03A9F4"};document.addEventListener("DOMContentLoaded",n);var a=document.getElementById("endTime"),i=document.getElementById("endTimeValue"),o=function o(){u=Number(100*(t.value-t.min)/(t.max-t.min)),m=10-.2*u,f=Number(100*(a.value-a.min)/(a.max-a.min)),v=10-.2*f,i.innerHTML="<span>".concat(g(a.value),"</span>"),i.style.left="calc(".concat(f,"% + (").concat(v,"px))");var e=document.getElementById("selectedRange");e.style.left="calc(".concat(u,"% + (").concat(m,"px))"),e.style.width="calc((".concat(f,"% + (").concat(v,"px)) - (").concat(u,"% + (").concat(m,"px)))"),e.style.backgroundColor="#03A9F4"};document.addEventListener("DOMContentLoaded",o),document.getElementById("convert").addEventListener("click",y),document.getElementById("cancel").addEventListener("click",p);var d=document.getElementById("startTime"),l=document.getElementById("endTime");d.oninput=function(e){if(Number(d.value)>=Number(l.value))return e.preventDefault(),d.value=String(Number(l.value)-1),!1;n()},l.oninput=function(e){if(Number(l.value)<=Number(d.value))return e.preventDefault(),l.value=String(Number(d.value)+1),!1;o()}})}()}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.0.8 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.0.9 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2021 Froala Labs
4
+ * Copyright 2014-2022 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)(".concat(r.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),r.PLUGINS.url=function(i){var l=i.$,a=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:".concat(o));else if(i.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//".concat(o)),(t||"")+"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(a?' rel="'.concat(a,'"'):"",' data-fr-linked="true" href="').concat(o,'">').concat(n.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(r)}var s=function s(){return new RegExp(r.URLRegEx,"gi")};function p(e){return i.opts.linkAlwaysNoFollow&&(a="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(a?a+=" noopener":a="noopener"),i.opts.linkNoReferrer&&(a?a+=" noreferrer":a="noreferrer")),e.replace(s(),t)}function c(e){var t=e.split(" ");return t[t.length-1]}function n(){var e=i.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function a(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==i.el)&&a(e.parentNode))}(t))return!1;if(s().test(c(t.textContent))){l(t).before(p(t.textContent));var n=l(t.parentNode).find("a[data-fr-linked]");n.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),i.events.trigger("url.linked",[n.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var r=t.previousSibling.innerText+t.textContent;if(s().test(c(r))){var o=(new DOMParser).parseFromString(p(r),"text/html").body.childNodes;t.parentNode.replaceChild(o[0],t.previousSibling),o.length&&l(t).before(o[0]),t.parentNode.removeChild(t)}}}return{_init:function e(){i.events.on("keypress",function(e){!i.selection.isCollapsed()||")"!=e.key&&"("!=e.key||n()},!0),i.events.on("keydown",function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),i.events.on("paste.beforeCleanup",function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}})}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.0.8 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.0.9 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2021 Froala Labs
4
+ * Copyright 2014-2022 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(we){"use strict";we=we&&we.hasOwnProperty("default")?we["default"]:we,Object.assign(we.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(we.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),we.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],we.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,we.PLUGINS.video=function(w){var s,p,f,E,i,o,A=w.$,C="https://i.froala.com/upload",c=2,v=3,u=4,S=5,U=6,r={};function g(){var e=w.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function a(){var e=w.popups.get("video.edit");if(e||(e=function n(){var e="";if(0<w.opts.videoEditButtons.length){w.opts.videoResponsive&&(-1<w.opts.videoEditButtons.indexOf("videoSize")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoSize"),1),-1<w.opts.videoEditButtons.indexOf("videoDisplay")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<w.opts.videoEditButtons.indexOf("videoAlign")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(w.button.buildList(w.opts.videoEditButtons)," \n </div>")},o=w.popups.create("video.edit",t);return w.events.$on(w.$wp,"scroll.video-edit",function(){E&&w.popups.isVisible("video.edit")&&(w.events.disableBlur(),y(E))}),o}return!1}()),e){w.popups.setContainer("video.edit",w.$sc),w.popups.refresh("video.edit");var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,a=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||a||E.find("audio").get(0)?(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display="none"),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="none")):(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display=""),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="")),w.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function n(e){if(e)return w.popups.onRefresh("video.insert",g),w.popups.onHide("video.insert",J),!0;var t="";w.opts.videoUpload||-1===w.opts.videoInsertButtons.indexOf("videoUpload")||w.opts.videoInsertButtons.splice(w.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=w.button.buildList(w.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",a=w.opts.videoInsertButtons.indexOf("videoUpload"),n=w.opts.videoInsertButtons.indexOf("videoByURL"),s=w.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=n){i=" fr-active",(a<n&&0<=a||s<n&&0<=s)&&(i="");r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(w.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>")}var d="";0<=s&&(i=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(w.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var l="";0<=a&&(i=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop video"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(w.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(w.id,'" role="button"></div></div>'));var p={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},f=w.popups.create("video.insert",p);return function c(i){w.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return A(this).addClass("fr-drop"),!1},!0),w.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return A(this).removeClass("fr-drop"),!1},!0),w.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||w;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0);w.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||w;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}A(this).val("")},!0)}(f),f}function d(e){w.events.focus(!0),w.selection.restore();var t=!1;if(E&&(q(),t=!0),w.opts.trackChangesEnabled){w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.markers.insert(),w.html.wrap();var o=w.$el.find(".fr-marker");w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>")),w.selection.clear()}else w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,w.opts.videoSplitHTML);w.popups.hide("video.insert");var i=w.$el.find(".fr-jiv");i.removeClass("fr-jiv"),i.toggleClass("fr-rv",w.opts.videoResponsive),Z(i,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),i.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(t?"video.replaced":"video.inserted",[i])}function h(){var e=A(this);w.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),y(e.parent()),w.events.trigger("video.loaded",[e.parent()])}function R(s,e,d,l,p){w.edit.off(),m("Loading video"),e&&(s=w.helpers.sanitizeURL(s));var f=function f(){var e,t;if(l){w.undo.canDo()||l.find("video").hasClass("fr-uploading")||w.undo.saveStep();var o=l.find("video").data("fr-old-src"),i=l.data("fr-replaced");if(l.data("fr-replaced",!1),0<l.find("iframe").length)l.remove(),e=I(s,d,h);else{w.$wp?((e=l.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&l.find("video").attr("src",o),l.replaceWith(e)):e=l;for(var r=e.find("video").get(0).attributes,a=0;a<r.length;a++){var n=r[a];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==d)for(t in d)d.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),d[t]);e.find("video").on("canplay",h),e.find("video").attr("src",s)}w.edit.on(),O(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(i?"video.replaced":"video.inserted",[e,p])}else e=I(s,d,h),O(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,p])};x("Loading video"),f()}function x(e){var t=w.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),E){var o=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));w.popups.setContainer("video.insert",w.$sc);var i=o.offset().left,r=o.offset().top+o.height();w.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&m(w.language.translate("Uploading"),0)}function l(e){var t=w.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("video.fr-error").length)){if(w.events.focus(),w.$el.find("video.fr-error").length&&(w.$el.find("video.fr-error").parent().remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&E){var o=E;V(!0),w.selection.setAfter(o.find("video").get(0)),w.selection.restore()}w.popups.hide("video.insert")}}function m(e,t){var o=w.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function b(e){x();var t=w.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),w.events.disableBlur(),o.focus()}function y(e){t.call(e.get(0))}function _(e,t,o){m("Loading video");var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(w.opts.videoUploadToS3||w.opts.videoUploadToAzure)if(201==i){var s;if(w.opts.videoUploadToAzure){if(!1===w.events.trigger("video.uploadedToAzure",[this.responseURL,o,r],!0))return w.edit.on(),!1;s=t}else s=function l(e){try{var t=A(e).find("Location").text(),o=A(e).find("Key").text();return!1===w.events.trigger("video.uploadedToS3",[t,o,e],!0)?(w.edit.on(),!1):t}catch(i){return F(u,e),!1}}(a);s&&R(s,!1,[],e,r||a)}else F(u,r||a);else if(200<=i&&i<300){var d=function p(e){try{if(!1===w.events.trigger("video.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(F(c,e),!1)}catch(o){return F(u,e),!1}}(n);d&&R(d.link,!1,d,e,r||n)}else F(v,r||n)}catch(f){F(u,r||n)}}function B(){F(u,this.response||this.responseText||this.responseXML)}function D(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;m(w.language.translate("Uploading"),t)}}function k(){w.edit.on(),l(!0)}function I(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var a=w.opts.videoDefaultWidth;a&&"auto"!=a&&(a="".concat(a,"px")),w.helpers.isMobile()&&w.browser.safari&&(r+=" autoplay playsinline");var n=A(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(a?' style="width: '+a+';" ':"")+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert(),w.html.wrap();var s=w.$el.find(".fr-marker");return w.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(n),w.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?o.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",o),n}function T(e){if(!w.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=w.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,a=!1;try{a=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}a&&r.frameElement&&(t+=w.helpers.getPX(A(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+w.helpers.getPX(A(r.frameElement).offset().top)+r.frameElement.clientTop)}w.undo.canDo()||w.undo.saveStep(),(p=A(this)).data("start-x",t),p.data("start-y",o),s.show(),w.popups.hideAll(),Y()}function z(e){if(!w.core.sameInstance(f))return!0;if(p){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=p.data("start-x"),r=p.data("start-y");p.data("start-x",t),p.data("start-y",o);var a=t-i,n=o-r,s=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),d=s.width(),l=s.height();(p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(a=0-a),(p.hasClass("fr-hnw")||p.hasClass("fr-hne"))&&(n=0-n),s.css("width",d+a),s.css("height",l+n),s.removeAttr("width"),s.removeAttr("height"),M()}}function P(e){if(!w.core.sameInstance(f))return!0;p&&E&&(e&&e.stopPropagation(),p=null,s.hide(),M(),a(),w.undo.saveStep())}function $(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function L(e,t,o,i){return e.pageX=t,e.pageY=t,T.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),z.call(this,e),P.call(this,e),++i}function O(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),A(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[A(i[e])]);i=t}function M(){f||function n(){var e;if(w.shared.$video_resizer?(f=w.shared.$video_resizer,s=w.shared.$vid_overlay,w.events.on("destroy",function(){A("body").first().append(f.removeClass("fr-active"))},!0)):(w.shared.$video_resizer=A(document.createElement("div")).attr("class","fr-video-resizer"),f=w.shared.$video_resizer,w.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),w.opts.videoResize&&(f.append($("nw")+$("ne")+$("sw")+$("se")),w.shared.$vid_overlay=A(document.createElement("div")).attr("class","fr-video-overlay"),s=w.shared.$vid_overlay,e=f.get(0).ownerDocument,A(e).find("body").first().append(s))),w.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,w.opts.videoResize&&(s.remove(),s=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize.video",function(){V(!0)}),w.opts.videoResize){e=f.get(0).ownerDocument,w.events.$on(f,w._mousedown,".fr-handler",T),w.events.$on(A(e),w._mousemove,z),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,P),w.events.$on(s,"mouseleave",P);var i=1,r=null,a=0;w.events.on("keydown",function(e){if(E){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-a)&&(i=1),(o==we.KEYCODE.EQUALS||w.browser.mozilla&&o==we.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=L.call(this,e,1,1,i):(o==we.KEYCODE.HYPHEN||w.browser.mozilla&&o==we.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=L.call(this,e,2,-1,i)),r=o,a=e.timeStamp}}),w.events.on("keyup",function(){i=1})}}(),(w.$wp||w.$sc).append(f),f.data("instance",w);var e=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,o=0;w.opts.iframe&&(o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),t=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(w.opts.iframe?e.offset().top+o-1:e.offset().top-w.$wp.offset().top-1)+w.$wp.scrollTop()).css("left",(w.opts.iframe?e.offset().left+t-1:e.offset().left-w.$wp.offset().left-1)+w.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(w.edit.isDisabled())return!1;for(var t=0;t<we.INSTANCES.length;t++)we.INSTANCES[t]!=w&&we.INSTANCES[t].events.trigger("video.hideResizer");w.toolbar.disable(),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.$el.find(".fr-video.fr-active").removeClass("fr-active"),(E=A(this)).addClass("fr-active"),w.opts.iframe&&w.size.syncIframe(),te(),M(),a(),w.selection.clear(),w.button.bulkRefresh(),w.events.trigger("image.hideResizer")}function V(e){E&&(function t(){return w.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),w.toolbar.enable(),E.removeClass("fr-active"),E=null,Y())}function N(){w.shared.vid_exit_flag=!0}function Y(){w.shared.vid_exit_flag=!1}function H(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!w.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(we.MARKERS),w.popups.hideAll();var i=w.popups.get("video.insert");return i||(i=n()),w.popups.setContainer("video.insert",w.$sc),w.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),x(),0<=w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?K(t.files):F(U),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==w.opts.videoUploadURL&&w.opts.videoUploadURL!=C||w.opts.videoUploadToS3||w.opts.videoUploadToAzure))return function y(i){E&&E.find("iframe")&&E.find("iframe").length&&q();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));R(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,E)},x(),r.readAsDataURL(i)}(o),!1;if(o.size>w.opts.videoMaxSize)return F(S),!1;if(w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return F(U),!1;if(w.drag_support.formdata&&(t=w.drag_support.formdata?new FormData:null),t){var i;if(!1!==w.opts.videoUploadToS3)for(i in t.append("key",w.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),w.opts.videoUploadToS3.params)w.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadToS3.params[i]);for(i in w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadParams[i]);t.append(w.opts.videoUploadParam,o);var r,a,n=w.opts.videoUploadURL;w.opts.videoUploadToS3&&(n=w.opts.videoUploadToS3.uploadURL?w.opts.videoUploadToS3.uploadURL:"https://".concat(w.opts.videoUploadToS3.region,".amazonaws.com/").concat(w.opts.videoUploadToS3.bucket));var s=w.opts.videoUploadMethod;w.opts.videoUploadToAzure&&(n=w.opts.videoUploadToAzure.uploadURL?"".concat(w.opts.videoUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(w.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.videoUploadToAzure.container,"/").concat(o.name)),r=n,w.opts.videoUploadToAzure.SASToken&&(n+=w.opts.videoUploadToAzure.SASToken),s="PUT");var d=w.core.getXHR(n,s);if(w.opts.videoUploadToAzure){var l=(new Date).toUTCString();if(!w.opts.videoUploadToAzure.SASToken&&w.opts.videoUploadToAzure.accessKey){var p=w.opts.videoUploadToAzure.account,f=w.opts.videoUploadToAzure.container;if(w.opts.videoUploadToAzure.uploadURL){var c=w.opts.videoUploadToAzure.uploadURL.split("/");f=c.pop(),p=c.pop().split(".")[0]}var v="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(l,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+p+"/"+f+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+v+"\n"+u,h=w.cryptoJSPlugin.cryptoJS.HmacSHA256(g,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.videoUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),m="SharedKey "+p+":"+h;a=h,d.setRequestHeader("Authorization",m)}for(i in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",l),d.setRequestHeader("Content-Type",o.type),d.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadParams[i]);for(i in w.opts.videoUploadToAzure.params)w.opts.videoUploadToAzure.params.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadToAzure.params[i])}d.onload=function(){_.call(d,E,r,a)},d.onerror=B,d.upload.onprogress=D,d.onabort=k,x(),w.events.disableBlur(),w.edit.off(),w.events.enableBlur();var b=w.popups.get("video.insert");b&&A(b.off("abortUpload")).on("abortUpload",function(){4!=d.readyState&&d.abort()}),d.send(w.opts.videoUploadToAzure?o:t)}}}function F(e,t){w.edit.on(),E&&E.find("video").addClass("fr-error"),b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.error",[{code:e,message:r[e]},t])}function X(){if(E){var e=w.popups.get("video.size"),t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function G(e){if(e)return w.popups.onRefresh("video.size",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(w.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(w.id,'" type="text" name="width" placeholder="').concat(w.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(w.id,'" type="text" name="height" placeholder="').concat(w.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},o=w.popups.create("video.size",t);return w.events.$on(w.$wp,"scroll",function(){E&&w.popups.isVisible("video.size")&&(w.events.disableBlur(),y(E))}),o}function j(e){if(void 0===e&&(e=E),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function W(e){void 0===e&&(e=E);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function q(){if(E&&!1!==w.events.trigger("video.beforeRemove",[E])){var e=E;if(w.popups.hideAll(),V(!0),w.opts.trackChangesEnabled&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return void w.track_changes.removeSpecialItem(e);w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0)),e.remove(),w.selection.restore(),w.html.fillEmptyBlocks()}}function J(){l()}function Z(e,t,o){!w.opts.htmlUntouched&&w.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Q(){var e=w.$el.find("video").filter(function(){return 0===A(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(A(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),w.$el.find("embed, iframe").filter(function(){if(w.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<A(this).parents("span.fr-video").length)return!1;for(var e=A(this).attr("src"),t=0;t<we.VIDEO_PROVIDERS.length;t++){var o=we.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===A(this).parents("object").length?this:A(this).parents("object").get(0)}).wrap(A(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,a=w.$el.find("span.fr-video, video"),n=0;n<a.length;n++){var s=A(a[n]);!w.opts.htmlUntouched&&w.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(j(r)[0])),r.addClass("fr-dv".concat(W(r)[0]))),w.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):w.opts.htmlUntouched||w.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":j(t),Z(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}a.toggleClass("fr-draggable",w.opts.videoMove)}}function ee(e){document.getElementById("autoplay-".concat(w.id)).style.cssText="background:".concat(e)}function te(){if(E){w.selection.clear();var e=w.doc.createRange();e.selectNode(E.get(0)),w.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[c]="No link in upload response.",r[v]="Error during file upload.",r[u]="Parsing response failed.",r[S]="File is too large.",r[U]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",w.shared.vid_exit_flag=!1,{_init:function oe(){w.opts.videoResponsive&&(w.opts.videoResize=!1),function e(){w.events.on("drop",H,!0),w.events.on("mousedown window.mousedown",N),w.events.on("window.touchmove",Y),w.events.on("mouseup window.mouseup",V),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&V()}),w.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){V(!0)})}(),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","span.fr-video",function(){o=!1}),w.events.$on(w.$el,"touchmove",function(){o=!0})),w.events.on("html.set",Q),Q(),w.events.$on(w.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(w.browser.msie||w.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),w.events.$on(w.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),w.events.on("keydown",function(e){var t=e.which;return!E||t!=we.KEYCODE.BACKSPACE&&t!=we.KEYCODE.DELETE?E&&t==we.KEYCODE.ESC?(V(!0),e.preventDefault(),!1):E&&t!=we.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),q(),w.undo.saveStep(),!1)},!0),w.events.on("toolbar.esc",function(){if(E)return w.events.disableBlur(),w.events.focus(),!1},!0),w.events.on("toolbar.focusEditor",function(){if(E)return!1},!0),w.events.on("keydown",function(){w.$el.find("span.fr-video:empty").remove()}),w.$wp&&(O(),w.events.on("contentChanged",O)),n(!0),G(!0)},showInsertPopup:function ie(){var e=w.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=w.popups.get("video.insert");if(t||(t=n()),l(),!t.hasClass("fr-active"))if(w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$tb),e.isVisible()){var o=w.button.getPosition(e),i=o.left,r=o.top;w.popups.show("video.insert",i,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("video.insert")},showLayer:function re(e){var t,o,i=w.popups.get("video.insert");if(!E&&!w.opts.toolbarInline){var r=w.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(w.opts.toolbarBottom?10:r.outerHeight()-10)}w.opts.toolbarInline&&(o=i.offset().top-w.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("video.insert",t,o,0),w.accessibility.focusPopup(i)},refreshByURLButton:function ae(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function ne(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function se(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function de(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(w.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(e)||(e="https://".concat(e)),w.helpers.isURL(e))for(var i=0;i<we.VIDEO_PROVIDERS.length;i++){var r=we.VIDEO_PROVIDERS[i],a="autoplay=1&mute=1";if(r.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)r.html=r.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var n=r.html.indexOf("{url}")+5;r.html=[r.html.slice(0,n),a,r.html.slice(n)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(r=we.VIDEO_PROVIDERS[i]).html=r.html.replace(a,"");if(r.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(r.provider)){o=e.replace(r.url_regex,r.url_text),o=r.html.replace(/\{url\}/,o);break}}o?d(o):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.linkError",[e]))},insertEmbed:function le(e){void 0===e&&(e=w.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&we.VIDEO_EMBED_REGEX.test(e)?d(e):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.codeError",[e]))},insert:d,align:function pe(e){E.removeClass("fr-fvr fr-fvl"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?E.addClass("fr-fvl"):"right"==e&&E.addClass("fr-fvr"):Z(E,W(),e),te(),M(),a(),w.selection.clear()},refreshAlign:function fe(e){if(!E)return!1;e.find(">*").first().replaceWith(w.icon.create("video-align-".concat(j())))},refreshAlignOnShow:function ce(e,t){E&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){E.removeClass("fr-dvi fr-dvb"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?E.addClass("fr-dvi"):"block"==e&&E.addClass("fr-dvb"):Z(E,e,j()),te(),M(),a(),w.selection.clear()},refreshDisplayOnShow:function ue(e,t){E&&t.find('.fr-command[data-param1="'.concat(W(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:q,hideProgressBar:l,showSizePopup:function ge(){var e=w.popups.get("video.size");e||(e=G()),l(),w.popups.refresh("video.size"),w.popups.setContainer("video.size",w.$sc);var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();w.popups.show("video.size",o,i,t.height(),!0)},replace:function he(){var e=w.popups.get("video.insert");e||(e=n()),w.popups.isVisible("video.insert")||(l(),w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$sc));var t=E.offset().left+E.outerWidth()/2,o=E.offset().top+E.height();w.popups.show("video.insert",t,o,E.outerHeight(),!0)},back:function e(){E?(w.events.disableBlur(),E[0].click()):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("video.insert"),w.toolbar.showInline())},setSize:function me(e,t){if(E){var o=w.popups.get("video.size"),i=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){E.trigger("click")},w.helpers.isAndroid()?50:0)}},get:function be(){return E},showProgressBar:x,_editVideo:y,setAutoplay:function ye(){var e;if(E.find("iframe, embed, audio").get(0))(e=E.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(ee("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(ee("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=E.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))ee("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{ee("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},we.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),we.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),we.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),we.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),we.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),we.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),we.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),we.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),we.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),we.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),we.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),we.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),we.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),we.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),we.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),we.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),we.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),we.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=we.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),we.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),we.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),we.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),we.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),we.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),we.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),we.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),we.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),we.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),we.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),we.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),we.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.0.8 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.0.9 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2021 Froala Labs
4
+ * Copyright 2014-2022 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(N){var l,n,d=N.$,s="word_paste",u={};function t(e){var t=N.opts.wordAllowedStyleProps;e||(N.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+="&nbsp;";return r}),N.paste.getRtfClipboard());var r=N.doc.createElement("DIV");r.innerHTML=n,N.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=N.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){N.modals.hide(s)}(),N.paste.clean(n,!0,!0),N.opts.wordAllowedStyleProps=t}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(N.browser.msie||N.browser.safari||N.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&N.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return C(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),C(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}A(e)}if("TR"===r&&function x(e,t){N.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&C(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(C(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var N=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+N+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var C=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+C+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling&&e.nextSibling.innerText!=undefined&&e.nextSibling.innerText!=undefined&&!m.includes('class="decimal_type"')&&(isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length))),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&C(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return C(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(C(e),!(e=r).innerHTML)&&"TD"!==e.parentNode.tagName;)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=N.opts.htmlAllowedStyleProps;return N.opts.htmlAllowedStyleProps=N.opts.wordAllowedStyleProps,o=N.clean.html(o,N.opts.wordDeniedTags,N.opts.wordDeniedAttrs,!1),N.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){N.events.on("paste.wordPaste",function(e){return n=e,N.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+N.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+N.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+N.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+N.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=N.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),N.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||N;e.wordPaste.clean()}),N.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||N;e.wordPaste.clean(!0)}),N.events.$on(d(N.o_win),"resize",function(){N.modals.resize(s)})}N.modals.show(s),N.modals.resize(s)}():t(N.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});