wysiwyg-rails 4.2.1 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/froala_editor.min.js +2 -2
  3. data/app/assets/javascripts/froala_editor.pkgd.min.js +2 -2
  4. data/app/assets/javascripts/languages/ar.js +1 -1
  5. data/app/assets/javascripts/languages/bs.js +1 -1
  6. data/app/assets/javascripts/languages/cs.js +1 -1
  7. data/app/assets/javascripts/languages/da.js +1 -1
  8. data/app/assets/javascripts/languages/de.js +1 -1
  9. data/app/assets/javascripts/languages/el.js +1 -1
  10. data/app/assets/javascripts/languages/en_ca.js +1 -1
  11. data/app/assets/javascripts/languages/en_gb.js +1 -1
  12. data/app/assets/javascripts/languages/es.js +1 -1
  13. data/app/assets/javascripts/languages/et.js +1 -1
  14. data/app/assets/javascripts/languages/fa.js +1 -1
  15. data/app/assets/javascripts/languages/fi.js +1 -1
  16. data/app/assets/javascripts/languages/fr.js +1 -1
  17. data/app/assets/javascripts/languages/he.js +1 -1
  18. data/app/assets/javascripts/languages/hr.js +1 -1
  19. data/app/assets/javascripts/languages/hu.js +1 -1
  20. data/app/assets/javascripts/languages/id.js +1 -1
  21. data/app/assets/javascripts/languages/it.js +1 -1
  22. data/app/assets/javascripts/languages/ja.js +1 -1
  23. data/app/assets/javascripts/languages/ko.js +18 -24
  24. data/app/assets/javascripts/languages/ku.js +1 -1
  25. data/app/assets/javascripts/languages/me.js +1 -1
  26. data/app/assets/javascripts/languages/nb.js +1 -1
  27. data/app/assets/javascripts/languages/nl.js +1 -1
  28. data/app/assets/javascripts/languages/pl.js +1 -1
  29. data/app/assets/javascripts/languages/pt_br.js +1 -1
  30. data/app/assets/javascripts/languages/pt_pt.js +1 -1
  31. data/app/assets/javascripts/languages/ro.js +1 -1
  32. data/app/assets/javascripts/languages/ru.js +1 -1
  33. data/app/assets/javascripts/languages/sk.js +1 -1
  34. data/app/assets/javascripts/languages/sl.js +1 -1
  35. data/app/assets/javascripts/languages/sr.js +1 -1
  36. data/app/assets/javascripts/languages/sv.js +1 -1
  37. data/app/assets/javascripts/languages/th.js +1 -1
  38. data/app/assets/javascripts/languages/tr.js +1 -1
  39. data/app/assets/javascripts/languages/uk.js +1 -1
  40. data/app/assets/javascripts/languages/vi.js +1 -1
  41. data/app/assets/javascripts/languages/zh_cn.js +1 -1
  42. data/app/assets/javascripts/languages/zh_tw.js +1 -1
  43. data/app/assets/javascripts/plugins/align.min.js +1 -1
  44. data/app/assets/javascripts/plugins/char_counter.min.js +2 -2
  45. data/app/assets/javascripts/plugins/code_beautifier.min.js +1 -1
  46. data/app/assets/javascripts/plugins/code_view.min.js +1 -1
  47. data/app/assets/javascripts/plugins/colors.min.js +1 -1
  48. data/app/assets/javascripts/plugins/cryptojs.min.js +1 -1
  49. data/app/assets/javascripts/plugins/draggable.min.js +1 -1
  50. data/app/assets/javascripts/plugins/edit_in_popup.min.js +1 -1
  51. data/app/assets/javascripts/plugins/emoticons.min.js +2 -2
  52. data/app/assets/javascripts/plugins/entities.min.js +1 -1
  53. data/app/assets/javascripts/plugins/file.min.js +1 -1
  54. data/app/assets/javascripts/plugins/files_manager.min.js +2 -2
  55. data/app/assets/javascripts/plugins/filestack.min.js +7 -0
  56. data/app/assets/javascripts/plugins/font_family.min.js +1 -1
  57. data/app/assets/javascripts/plugins/font_size.min.js +1 -1
  58. data/app/assets/javascripts/plugins/forms.min.js +1 -1
  59. data/app/assets/javascripts/plugins/fullscreen.min.js +1 -1
  60. data/app/assets/javascripts/plugins/help.min.js +1 -1
  61. data/app/assets/javascripts/plugins/image.min.js +2 -2
  62. data/app/assets/javascripts/plugins/image_manager.min.js +1 -1
  63. data/app/assets/javascripts/plugins/inline_class.min.js +1 -1
  64. data/app/assets/javascripts/plugins/inline_style.min.js +1 -1
  65. data/app/assets/javascripts/plugins/line_breaker.min.js +1 -1
  66. data/app/assets/javascripts/plugins/line_height.min.js +1 -1
  67. data/app/assets/javascripts/plugins/link.min.js +1 -1
  68. data/app/assets/javascripts/plugins/lists.min.js +1 -1
  69. data/app/assets/javascripts/plugins/markdown.min.js +1 -1
  70. data/app/assets/javascripts/plugins/paragraph_format.min.js +1 -1
  71. data/app/assets/javascripts/plugins/paragraph_style.min.js +1 -1
  72. data/app/assets/javascripts/plugins/print.min.js +1 -1
  73. data/app/assets/javascripts/plugins/quick_insert.min.js +1 -1
  74. data/app/assets/javascripts/plugins/quote.min.js +1 -1
  75. data/app/assets/javascripts/plugins/save.min.js +1 -1
  76. data/app/assets/javascripts/plugins/special_characters.min.js +1 -1
  77. data/app/assets/javascripts/plugins/table.min.js +2 -2
  78. data/app/assets/javascripts/plugins/track_changes.min.js +2 -2
  79. data/app/assets/javascripts/plugins/trim_video.min.js +1 -1
  80. data/app/assets/javascripts/plugins/url.min.js +1 -1
  81. data/app/assets/javascripts/plugins/video.min.js +2 -2
  82. data/app/assets/javascripts/plugins/word_counter.min.js +1 -1
  83. data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
  84. data/app/assets/javascripts/plugins.pkgd.min.js +2 -2
  85. data/app/assets/javascripts/third_party/embedly.min.js +1 -1
  86. data/app/assets/javascripts/third_party/font_awesome.min.js +1 -1
  87. data/app/assets/javascripts/third_party/image_tui.min.js +1 -1
  88. data/app/assets/javascripts/third_party/showdown.min.js +1 -1
  89. data/app/assets/javascripts/third_party/spell_checker.min.js +1 -1
  90. data/app/assets/stylesheets/froala_editor.css +1 -1
  91. data/app/assets/stylesheets/froala_editor.min.css +1 -1
  92. data/app/assets/stylesheets/froala_editor.pkgd.css +37 -1
  93. data/app/assets/stylesheets/froala_editor.pkgd.min.css +2 -2
  94. data/app/assets/stylesheets/froala_style.css +1 -1
  95. data/app/assets/stylesheets/froala_style.min.css +1 -1
  96. data/app/assets/stylesheets/plugins/char_counter.css +1 -1
  97. data/app/assets/stylesheets/plugins/char_counter.min.css +1 -1
  98. data/app/assets/stylesheets/plugins/code_view.css +1 -1
  99. data/app/assets/stylesheets/plugins/code_view.min.css +1 -1
  100. data/app/assets/stylesheets/plugins/colors.css +1 -1
  101. data/app/assets/stylesheets/plugins/colors.min.css +1 -1
  102. data/app/assets/stylesheets/plugins/draggable.css +1 -1
  103. data/app/assets/stylesheets/plugins/draggable.min.css +1 -1
  104. data/app/assets/stylesheets/plugins/emoticons.css +1 -1
  105. data/app/assets/stylesheets/plugins/emoticons.min.css +1 -1
  106. data/app/assets/stylesheets/plugins/file.css +1 -1
  107. data/app/assets/stylesheets/plugins/file.min.css +1 -1
  108. data/app/assets/stylesheets/plugins/files_manager.css +1 -1
  109. data/app/assets/stylesheets/plugins/files_manager.min.css +1 -1
  110. data/app/assets/stylesheets/plugins/filestack.css +41 -0
  111. data/app/assets/stylesheets/plugins/filestack.min.css +7 -0
  112. data/app/assets/stylesheets/plugins/fullscreen.css +1 -1
  113. data/app/assets/stylesheets/plugins/fullscreen.min.css +1 -1
  114. data/app/assets/stylesheets/plugins/help.css +1 -1
  115. data/app/assets/stylesheets/plugins/help.min.css +1 -1
  116. data/app/assets/stylesheets/plugins/image.css +1 -1
  117. data/app/assets/stylesheets/plugins/image.min.css +1 -1
  118. data/app/assets/stylesheets/plugins/image_manager.css +1 -1
  119. data/app/assets/stylesheets/plugins/image_manager.min.css +1 -1
  120. data/app/assets/stylesheets/plugins/line_breaker.css +1 -1
  121. data/app/assets/stylesheets/plugins/line_breaker.min.css +1 -1
  122. data/app/assets/stylesheets/plugins/markdown.css +1 -1
  123. data/app/assets/stylesheets/plugins/markdown.min.css +1 -1
  124. data/app/assets/stylesheets/plugins/quick_insert.css +1 -1
  125. data/app/assets/stylesheets/plugins/quick_insert.min.css +1 -1
  126. data/app/assets/stylesheets/plugins/special_characters.css +1 -1
  127. data/app/assets/stylesheets/plugins/special_characters.min.css +1 -1
  128. data/app/assets/stylesheets/plugins/table.css +1 -1
  129. data/app/assets/stylesheets/plugins/table.min.css +1 -1
  130. data/app/assets/stylesheets/plugins/trim_video.css +1 -1
  131. data/app/assets/stylesheets/plugins/trim_video.min.css +1 -1
  132. data/app/assets/stylesheets/plugins/video.css +1 -1
  133. data/app/assets/stylesheets/plugins/video.min.css +1 -1
  134. data/app/assets/stylesheets/plugins.pkgd.css +37 -1
  135. data/app/assets/stylesheets/plugins.pkgd.min.css +2 -2
  136. data/app/assets/stylesheets/themes/dark.css +3 -1
  137. data/app/assets/stylesheets/themes/dark.min.css +2 -2
  138. data/app/assets/stylesheets/themes/gray.css +3 -1
  139. data/app/assets/stylesheets/themes/gray.min.css +2 -2
  140. data/app/assets/stylesheets/themes/royal.css +3 -1
  141. data/app/assets/stylesheets/themes/royal.min.css +2 -2
  142. data/app/assets/stylesheets/third_party/embedly.css +1 -1
  143. data/app/assets/stylesheets/third_party/embedly.min.css +1 -1
  144. data/app/assets/stylesheets/third_party/font_awesome.css +1 -1
  145. data/app/assets/stylesheets/third_party/font_awesome.min.css +1 -1
  146. data/app/assets/stylesheets/third_party/image_tui.css +1 -1
  147. data/app/assets/stylesheets/third_party/image_tui.min.css +1 -1
  148. data/app/assets/stylesheets/third_party/spell_checker.css +1 -1
  149. data/app/assets/stylesheets/third_party/spell_checker.min.css +1 -1
  150. data/lib/wysiwyg-rails/version.rb +1 -1
  151. metadata +5 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.2.1 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
4
  * Copyright 2014-2024 Froala Labs
5
5
  */
6
6
 
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(Rt){"use strict";function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e){return function t(e){if(Array.isArray(e))return i(e)}(e)||function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function n(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(e,t)}(e)||function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}if((Rt=Rt&&Rt.hasOwnProperty("default")?Rt["default"]:Rt).PLUGINS.align=function(r){var i=r.$;return{apply:function o(e){var t=r.selection.element();if(i(t).parents(".fr-img-caption").length)i(t).css("text-align",e);else{r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore();for(var a=r.selection.blocks(),n=0;n<a.length;n++)i(a[n]).css("text-align",e).removeClass("fr-temp-div"),""===i(a[n]).attr("class")&&i(a[n]).removeAttr("class"),""===i(a[n]).attr("style")&&i(a[n]).removeAttr("style");r.selection.save(),r.html.unwrap(),r.selection.restore()}},refresh:function n(e){var t=r.selection.blocks();if(t.length){var a=r.helpers.getAlignment(i(t[0]));e.find("> *").first().replaceWith(r.icon.create("align-".concat(a)))}},refreshOnShow:function s(e,t){var a=r.selection.blocks();if(a.length){var n=r.helpers.getAlignment(i(a[0]));t.find('a.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function l(e){var t=r.selection.blocks();if(t.length){var a=r.helpers.getAlignment(i(t[0]));a=a.charAt(0).toUpperCase()+a.slice(1),"align".concat(a)===e.attr("data-cmd")&&e.addClass("fr-active")}}}},Rt.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Rt.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),Rt.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Rt.RegisterCommand("align",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.align.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align"data-param1="\n '.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">\n ').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.align.apply(t)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,t){this.align.refreshOnShow(e,t)},plugin:"align"}),Rt.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Rt.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Rt.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Rt.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Object.assign(Rt.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),Rt.PLUGINS.charCounter=function(a){var n,t=a.$,r=function r(){return(a.opts.iframe&&a.markdown&&a.markdown.isEnabled()?a.$el.text()||"":a.el.textContent||"").replace(/\u200B/g,"").length};function e(e){if(a.opts.charCounterMax<0)return!0;if(r()<a.opts.charCounterMax)return!0;var t=e.which;return!(!a.keys.ctrlKey(e)&&a.keys.isCharacter(t)||t===Rt.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),a.events.trigger("charCounter.exceeded"),!1)}function i(e){return a.opts.charCounterMax<0?e:t("<div>").html(e).text().length+r()<=a.opts.charCounterMax?e:(a.events.trigger("charCounter.exceeded"),"")}function o(){if(a.opts.charCounterCount){var e=r()+(0<a.opts.charCounterMax?"/"+a.opts.charCounterMax:"");n.text("".concat(a.language.translate("Characters")," : ").concat(e)),a.opts.toolbarBottom&&n.css("margin-bottom",a.$tb.outerHeight(!0));var t=a.$wp.get(0).offsetWidth-a.$wp.get(0).clientWidth;0<=t&&("rtl"==a.opts.direction?n.css("margin-left",t):n.css("margin-right",t))}}return{_init:function s(){return!!a.$wp&&!!a.opts.charCounterCount&&((n=t(document.createElement("span")).attr("class","fr-counter")).css("bottom",a.$wp.css("border-bottom-width")),a.$second_tb?a.$second_tb.append(n):a.$wp.append(n),a.events.on("keydown",e,!0),a.events.on("paste.afterCleanup",i),a.events.on("keyup contentChanged input",function(){a.events.trigger("charCounter.update")}),a.events.on("charCounter.update",o),a.events.trigger("charCounter.update"),void a.events.on("destroy",function(){t(a.o_win).off("resize.char".concat(a.id)),n.removeData().remove(),n=null}))},count:r}},Rt.PLUGINS.codeBeautifier=function(){var e,t,a,n,j={};function L(n,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},a={"@media":!0,"@supports":!0,"@document":!0};e=e||{},n=(n=n||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,i=e.indent_char||" ",o=e.selector_separator_newline===undefined||e.selector_separator_newline,s=e.end_with_newline!==undefined&&e.end_with_newline,l=e.newline_between_rules===undefined||e.newline_between_rules,c=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(i="\t",r=1),c=c.replace(/\\r/,"\r").replace(/\\n/,"\n");var d,f=/^\s+$/,p=-1,u=0;function g(){return(d=n.charAt(++p))||""}function h(e){var t,a=p;return e&&v(),t=n.charAt(p+1)||"",p=a-1,g(),t}function m(e){for(var t=p;g();)if("\\"===d)g();else{if(-1!==e.indexOf(d))break;if("\n"===d)break}return n.substring(t,p+1)}function v(){for(var e="";f.test(h());)g(),e+=d;return e}function b(){var e="";for(d&&f.test(d)&&(e=d);f.test(g());)e+=d;return e}function _(e){var t=p;for(e="/"===h(),g();g();){if(!e&&"*"===d&&"/"===h()){g();break}if(e&&"\n"===d)return n.substring(t,p)}return n.substring(t,p)+d}function E(e){return n.substring(p-e.length,p).toLowerCase()===e}function w(){for(var e=0,t=p+1;t<n.length;t++){var a=n.charAt(t);if("{"===a)return!0;if("("===a)e+=1;else if(")"===a){if(0===e)return!1;e-=1}else if(" "===a||"}"===a)return!1}return!1}var y=n.match(/^[\t ]*/)[0],A=new Array(r+1).join(i),C=0,T=0;for(var S,R,k,L={"{":function(e){L.singleSpace(),x.push(e),L.newLine()},"}":function(e){L.newLine(),x.push(e),L.newLine()},_lastCharWhitespace:function(){return f.test(x[x.length-1])},newLine:function(e){x.length&&(e||"\n"===x[x.length-1]||L.trim(),x.push("\n"),y&&x.push(y))},singleSpace:function(){x.length&&!L._lastCharWhitespace()&&x.push(" ")},preserveSingleSpace:function(){S&&L.singleSpace()},trim:function(){for(;L._lastCharWhitespace();)x.pop()}},x=[],I=!1,O=!1,M=!1,F="",D="";;){var N=b();S=""!==N;var B=-1!==N.indexOf("\n");if(D=F,!(F=d))break;if("/"===d&&"*"===h()){var P=0===C;(B||P)&&L.newLine(),x.push(_()),L.newLine(),P&&L.newLine(!0)}else if("/"===d&&"/"===h())B||"{"===D||L.trim(),L.singleSpace(),x.push(_()),L.newLine();else if("@"===d){L.preserveSingleSpace(),x.push(d);var U=(void 0,R=p,k=m(": , {}()[]/='\""),p=R-1,g(),k);U.match(/[ :]$/)&&(g(),U=m(": ").replace(/\s$/,""),x.push(U),L.singleSpace()),(U=U.replace(/\s$/,""))in t&&(T+=1,U in a&&(M=!0))}else"#"===d&&"{"===h()?(L.preserveSingleSpace(),x.push(m("}"))):"{"===d?"}"===h(!0)?(v(),g(),L.singleSpace(),x.push("{}"),L.newLine(),l&&0===C&&L.newLine(!0)):(C++,y+=A,L["{"](d),I=M?(M=!1,T<C):T<=C):"}"===d?(C--,y=y.slice(0,-r),L["}"](d),O=I=!1,T&&T--,l&&0===C&&L.newLine(!0)):":"===d?(v(),!I&&!M||E("&")||w()?":"===h()?(g(),x.push("::")):x.push(":"):(O=!0,x.push(":"),L.singleSpace())):'"'===d||"'"===d?(L.preserveSingleSpace(),x.push(m(d))):" "===d?(O=!1,x.push(d),L.newLine()):"("===d?E("url")?(x.push(d),v(),g()&&(")"!==d&&'"'!==d&&"'"!==d?x.push(m(")")):p--)):(u++,L.preserveSingleSpace(),x.push(d),v()):")"===d?(x.push(d),u--):","===d?(x.push(d),v(),o&&!O&&u<1?L.newLine():L.singleSpace()):("]"===d||("["===d?L.preserveSingleSpace():"="===d?(v(),d="="):L.preserveSingleSpace()),x.push(d))}var H="";return y&&(H+=y),H+=x.join("").replace(/[\r\n\t ]+$/,""),s&&(H+="\n"),"\n"!=c&&(H=H.replace(/[\n]/g,c)),H}function q(e,t){for(var a=0;a<t.length;a+=1)if(t[a]===e)return!0;return!1}function X(e){return e.replace(/^\s+|\s+$/g,"")}function x(e,t){return new r(e,t).beautify()}e=j,t="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",a=new RegExp("[".concat(t,"]")),n=new RegExp("[".concat(t," ").concat("\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f","]")),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|".concat(e.newline.source)),e.allLineBreaks=new RegExp(e.lineBreak.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||170<=e&&a.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||170<=e&&n.test(String.fromCharCode(e))))};var Q={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(n,e){var c,r,i,d,o,s,l,f,p,t,a,u,g,h=[],m="";function v(e,t){var a=0;return e&&(a=e.indentation_level,!c.just_added_newline()&&e.line_indent_level>a&&(a=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:a,line_indent_level:e?e.line_indent_level:a,start_line_index:c.get_line_number(),ternary_depth:0}}for(u={TK_START_EXPR:function F(){x();var e=Q.Expression;if("["===d.text){if("TK_WORD"===o||")"===f.last_text)return"TK_RESERVED"===o&&q(f.last_text,i.line_starters)&&(c.space_before_token=!0),T(e),A(),C(),void(g.space_in_paren&&(c.space_before_token=!0));e=Q.ArrayLiteral,S(f.mode)&&("["!==f.last_text&&(","!==f.last_text||"]"!==s&&"}"!==s)||g.keep_array_indentation||w())}else"TK_RESERVED"===o&&"for"===f.last_text?e=Q.ForInitializer:"TK_RESERVED"===o&&q(f.last_text,["if","while"])&&(e=Q.Conditional);" "===f.last_text||"TK_START_BLOCK"===o?w():"TK_END_EXPR"===o||"TK_START_EXPR"===o||"TK_END_BLOCK"===o||"."===f.last_text?E(d.wanted_newline):"TK_RESERVED"===o&&"("===d.text||"TK_WORD"===o||"TK_OPERATOR"===o?"TK_RESERVED"===o&&("function"===f.last_word||"typeof"===f.last_word)||"*"===f.last_text&&"function"===s?g.space_after_anon_function&&(c.space_before_token=!0):"TK_RESERVED"!==o||!q(f.last_text,i.line_starters)&&"catch"!==f.last_text||g.space_before_conditional&&(c.space_before_token=!0):c.space_before_token=!0;"("===d.text&&"TK_RESERVED"===o&&"await"===f.last_word&&(c.space_before_token=!0);"("===d.text&&("TK_EQUALS"!==o&&"TK_OPERATOR"!==o||L()||E());T(e),A(),g.space_in_paren&&(c.space_before_token=!0);C()},TK_END_EXPR:function D(){for(;f.mode===Q.Statement;)k();f.multiline_frame&&E("]"===d.text&&S(f.mode)&&!g.keep_array_indentation);g.space_in_paren&&("TK_START_EXPR"!==o||g.space_in_empty_paren?c.space_before_token=!0:(c.trim(),c.space_before_token=!1));"]"===d.text&&g.keep_array_indentation?(A(),k()):(k(),A());c.remove_redundant_indentation(p),f.do_while&&p.mode===Q.Conditional&&(p.mode=Q.Expression,f.do_block=!1,f.do_while=!1)},TK_START_BLOCK:function N(){var e=O(1),t=O(2);t&&(":"===t.text&&q(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||q(e.text,["get","set"])&&q(t.type,["TK_WORD","TK_RESERVED"]))?q(s,["class","interface"])?T(Q.BlockStatement):T(Q.ObjectLiteral):T(Q.BlockStatement);var a=!e.comments_before.length&&"}"===e.text&&"function"===f.last_word&&"TK_END_EXPR"===o;"expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?"TK_OPERATOR"!==o&&(a||"TK_EQUALS"===o||"TK_RESERVED"===o&&I(f.last_text)&&"else"!==f.last_text)?c.space_before_token=!0:w(!1,!0):"TK_OPERATOR"!==o&&"TK_START_EXPR"!==o?"TK_START_BLOCK"===o?w():c.space_before_token=!0:S(p.mode)&&","===f.last_text&&("}"===s?c.space_before_token=!0:w());A(),C()},TK_END_BLOCK:function B(){for(;f.mode===Q.Statement;)k();var e="TK_START_BLOCK"===o;"expand"===g.brace_style?e||w():e||(S(f.mode)&&g.keep_array_indentation?(g.keep_array_indentation=!1,w(),g.keep_array_indentation=!0):w());k(),A()},TK_WORD:M,TK_RESERVED:M,TK_SEMICOLON:function P(){x()&&(c.space_before_token=!1);for(;f.mode===Q.Statement&&!f.if_block&&!f.do_block;)k();A()},TK_STRING:function U(){x()?c.space_before_token=!0:"TK_RESERVED"===o||"TK_WORD"===o?c.space_before_token=!0:"TK_COMMA"===o||"TK_START_EXPR"===o||"TK_EQUALS"===o||"TK_OPERATOR"===o?L()||E():w();A()},TK_EQUALS:function H(){x();f.declaration_statement&&(f.declaration_assignment=!0);c.space_before_token=!0,A(),c.space_before_token=!0},TK_OPERATOR:function $(){x();if("TK_RESERVED"===o&&I(f.last_text))return c.space_before_token=!0,void A();if("*"===d.text&&"TK_DOT"===o)return void A();if(":"===d.text&&f.in_case)return f.case_body=!0,C(),A(),w(),void(f.in_case=!1);if("::"===d.text)return void A();"TK_OPERATOR"===o&&E();var e=!0,t=!0;q(d.text,["--","++","!","~"])||q(d.text,["-","+"])&&(q(o,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||q(f.last_text,i.line_starters)||","===f.last_text)?(t=e=!1,!d.wanted_newline||"--"!==d.text&&"++"!==d.text||w(!1,!0)," "===f.last_text&&R(f.mode)&&(e=!0),"TK_RESERVED"===o?e=!0:"TK_END_EXPR"===o?e=!("]"===f.last_text&&("--"===d.text||"++"===d.text)):"TK_OPERATOR"===o&&(e=q(d.text,["--","-","++","+"])&&q(f.last_text,["--","-","++","+"]),q(d.text,["+","-"])&&q(f.last_text,["--","++"])&&(t=!0)),f.mode!==Q.BlockStatement&&f.mode!==Q.Statement||"{"!==f.last_text&&" "!==f.last_text||w()):":"===d.text?0===f.ternary_depth?e=!1:f.ternary_depth-=1:"?"===d.text?f.ternary_depth+=1:"*"===d.text&&"TK_RESERVED"===o&&"function"===f.last_text&&(t=e=!1);c.space_before_token=c.space_before_token||e,A(),c.space_before_token=t},TK_COMMA:function z(){if(f.declaration_statement)return R(f.parent.mode)&&(f.declaration_assignment=!1),A(),void(f.declaration_assignment?w(f.declaration_assignment=!1,!0):(c.space_before_token=!0,g.comma_first&&E()));A(),f.mode===Q.ObjectLiteral||f.mode===Q.Statement&&f.parent.mode===Q.ObjectLiteral?(f.mode===Q.Statement&&k(),w()):(c.space_before_token=!0,g.comma_first&&E())},TK_BLOCK_COMMENT:function W(){if(c.raw)return c.add_raw_token(d),void(d.directives&&"end"===d.directives.preserve&&(g.test_output_raw||(c.raw=!1)));if(d.directives)return w(!1,!0),A(),"start"===d.directives.preserve&&(c.raw=!0),void w(!1,!0);if(!j.newline.test(d.text)&&!d.wanted_newline)return c.space_before_token=!0,A(),void(c.space_before_token=!0);var e,t=function o(e){var t;e=e.replace(/\x0d/g,"");var a=[];t=e.indexOf("\n");for(;-1!==t;)a.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&a.push(e);return a}(d.text),a=!1,n=!1,r=d.whitespace_before,i=r.length;w(!1,!0),1<t.length&&(!function s(e,t){for(var a=0;a<e.length;a++){var n=X(e[a]);if(n.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function l(e,t){for(var a,n=0,r=e.length;n<r;n++)if((a=e[n])&&0!==a.indexOf(t))return!1;return!0}(t.slice(1),r)&&(n=!0):a=!0);for(A(t[0]),e=1;e<t.length;e++)w(!1,!0),a?A(" ".concat(t[e].replace(/^\s+/g,""))):n&&t[e].length>i?A(t[e].substring(i)):c.add_token(t[e]);w(!1,!0)},TK_COMMENT:function K(){d.wanted_newline?w(!1,!0):c.trim(!0);c.space_before_token=!0,A(),w(!1,!0)},TK_DOT:function G(){x();"TK_RESERVED"===o&&I(f.last_text)?c.space_before_token=!0:E(")"===f.last_text&&g.break_chained_methods);A()},TK_UNKNOWN:function Y(){A(),"\n"===d.text[d.text.length-1]&&w()},TK_EOF:function V(){for(;f.mode===Q.Statement;)k()}},g={},(e=e||{}).braces_on_own_line!==undefined&&(g.brace_style=e.braces_on_own_line?"expand":"collapse"),g.brace_style=e.brace_style?e.brace_style:g.brace_style?g.brace_style:"collapse","expand-strict"===g.brace_style&&(g.brace_style="expand"),g.indent_size=e.indent_size?parseInt(e.indent_size,10):4,g.indent_char=e.indent_char?e.indent_char:" ",g.eol=e.eol?e.eol:"\n",g.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,g.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,g.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),g.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,g.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,g.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,g.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,g.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,g.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,g.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,g.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),g.e4x=e.e4x!==undefined&&e.e4x,g.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,g.comma_first=e.comma_first!==undefined&&e.comma_first,g.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,g.jslint_happy&&(g.space_after_anon_function=!0),e.indent_with_tabs&&(g.indent_char="\t",g.indent_size=1),g.eol=g.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),l="";0<g.indent_size;)l+=g.indent_char,g.indent_size-=1;var b=0;if(n&&n.length){for(;" "===n.charAt(b)||"\t"===n.charAt(b);)m+=n.charAt(b),b+=1;n=n.substring(b)}function _(e){var t=e.newlines;if(g.keep_array_indentation&&S(f.mode))for(var a=0;a<t;a+=1)w(0<a);else if(g.max_preserve_newlines&&t>g.max_preserve_newlines&&(t=g.max_preserve_newlines),g.preserve_newlines&&1<e.newlines){w();for(var n=1;n<t;n+=1)w(!0)}u[(d=e).type]()}function E(e){if(e=e!==undefined&&e,!c.just_added_newline())if(g.preserve_newlines&&d.wanted_newline||e)w(!1,!0);else if(g.wrap_line_length){c.current_line.get_character_count()+d.text.length+(c.space_before_token?1:0)>=g.wrap_line_length&&w(!1,!0)}}function w(e,t){if(!t&&" "!==f.last_text&&","!==f.last_text&&"="!==f.last_text&&"TK_OPERATOR"!==o)for(;f.mode===Q.Statement&&!f.if_block&&!f.do_block;)k();c.add_new_line(e)&&(f.multiline_frame=!0)}function y(){c.just_added_newline()&&(g.keep_array_indentation&&S(f.mode)&&d.wanted_newline?(c.current_line.push(d.whitespace_before),c.space_before_token=!1):c.set_indent(f.indentation_level)&&(f.line_indent_level=f.indentation_level))}function A(e){c.raw?c.add_raw_token(d):(g.comma_first&&"TK_COMMA"===o&&c.just_added_newline()&&","===c.previous_line.last()&&(c.previous_line.pop(),y(),c.add_token(","),c.space_before_token=!0),e=e||d.text,y(),c.add_token(e))}function C(){f.indentation_level+=1}function T(e){p=f?(t.push(f),f):v(null,e),f=v(p,e)}function S(e){return e===Q.ArrayLiteral}function R(e){return q(e,[Q.Expression,Q.ForInitializer,Q.Conditional])}function k(){0<t.length&&(p=f,f=t.pop(),p.mode===Q.Statement&&c.remove_redundant_indentation(p))}function L(){return f.parent.mode===Q.ObjectLiteral&&f.mode===Q.Statement&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===o&&q(f.last_text,["get","set"]))}function x(){return!!("TK_RESERVED"===o&&q(f.last_text,["const","let","const"])&&"TK_WORD"===d.type||"TK_RESERVED"===o&&"do"===f.last_text||"TK_RESERVED"===o&&"return"===f.last_text&&!d.wanted_newline||"TK_RESERVED"===o&&"else"===f.last_text&&("TK_RESERVED"!==d.type||"if"!==d.text)||"TK_END_EXPR"===o&&(p.mode===Q.ForInitializer||p.mode===Q.Conditional)||"TK_WORD"===o&&f.mode===Q.BlockStatement&&!f.in_case&&"--"!==d.text&&"++"!==d.text&&"function"!==s&&"TK_WORD"!==d.type&&"TK_RESERVED"!==d.type||f.mode===Q.ObjectLiteral&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===o&&q(f.last_text,["get","set"])))&&(T(Q.Statement),C(),"TK_RESERVED"===o&&q(f.last_text,["const","let","const"])&&"TK_WORD"===d.type&&(f.declaration_statement=!0),L()||E("TK_RESERVED"===d.type&&q(d.text,["do","for","if","while"])),!0)}function I(e){return q(e,["case","return","do","if","throw","else"])}function O(e){var t=r+(e||0);return t<0||t>=h.length?null:h[t]}function M(){("TK_RESERVED"===d.type&&f.mode!==Q.ObjectLiteral&&q(d.text,["set","get"])&&(d.type="TK_WORD"),"TK_RESERVED"===d.type&&f.mode===Q.ObjectLiteral)&&(":"===O(1).text&&(d.type="TK_WORD"));if(x()||!d.wanted_newline||R(f.mode)||"TK_OPERATOR"===o&&"--"!==f.last_text&&"++"!==f.last_text||"TK_EQUALS"===o||!g.preserve_newlines&&"TK_RESERVED"===o&&q(f.last_text,["const","let","const","set","get"])||w(),f.do_block&&!f.do_while){if("TK_RESERVED"===d.type&&"while"===d.text)return c.space_before_token=!0,A(),c.space_before_token=!0,void(f.do_while=!0);w(),f.do_block=!1}if(f.if_block)if(f.else_block||"TK_RESERVED"!==d.type||"else"!==d.text){for(;f.mode===Q.Statement;)k();f.if_block=!1,f.else_block=!1}else f.else_block=!0;if("TK_RESERVED"===d.type&&("case"===d.text||"default"===d.text&&f.in_case_statement))return w(),(f.case_body||g.jslint_happy)&&(!function e(){0<f.indentation_level&&(!f.parent||f.indentation_level>f.parent.indentation_level)&&(f.indentation_level-=1)}(),f.case_body=!1),A(),f.in_case=!0,void(f.in_case_statement=!0);if("TK_RESERVED"===d.type&&"function"===d.text&&((q(f.last_text,["}"," "])||c.just_added_newline()&&!q(f.last_text,["[","{",":","=",","]))&&(c.just_added_blankline()||d.comments_before.length||(w(),w(!0))),"TK_RESERVED"===o||"TK_WORD"===o?"TK_RESERVED"===o&&q(f.last_text,["get","set","new","return","export","async"])?c.space_before_token=!0:"TK_RESERVED"===o&&"default"===f.last_text&&"export"===s?c.space_before_token=!0:w():"TK_OPERATOR"===o||"="===f.last_text?c.space_before_token=!0:(f.multiline_frame||!R(f.mode)&&!S(f.mode))&&w()),"TK_COMMA"!==o&&"TK_START_EXPR"!==o&&"TK_EQUALS"!==o&&"TK_OPERATOR"!==o||L()||E(),"TK_RESERVED"===d.type&&q(d.text,["function","get","set"]))return A(),void(f.last_word=d.text);(a="NONE","TK_END_BLOCK"===o?"TK_RESERVED"===d.type&&q(d.text,["else","catch","finally"])?"expand"===g.brace_style||"end-expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?a="NEWLINE":(a="SPACE",c.space_before_token=!0):a="NEWLINE":"TK_SEMICOLON"===o&&f.mode===Q.BlockStatement?a="NEWLINE":"TK_SEMICOLON"===o&&R(f.mode)?a="SPACE":"TK_STRING"===o?a="NEWLINE":"TK_RESERVED"===o||"TK_WORD"===o||"*"===f.last_text&&"function"===s?a="SPACE":"TK_START_BLOCK"===o?a="NEWLINE":"TK_END_EXPR"===o&&(c.space_before_token=!0,a="NEWLINE"),"TK_RESERVED"===d.type&&q(d.text,i.line_starters)&&")"!==f.last_text&&(a="else"===f.last_text||"export"===f.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===d.type&&q(d.text,["else","catch","finally"]))?"TK_END_BLOCK"!==o||"expand"===g.brace_style||"end-expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?w():(c.trim(!0),"}"!==c.current_line.last()&&w(),c.space_before_token=!0):"NEWLINE"===a?"TK_RESERVED"===o&&I(f.last_text)?c.space_before_token=!0:"TK_END_EXPR"!==o?"TK_START_EXPR"===o&&"TK_RESERVED"===d.type&&q(d.text,["const","let","const"])||":"===f.last_text||("TK_RESERVED"===d.type&&"if"===d.text&&"else"===f.last_text?c.space_before_token=!0:w()):"TK_RESERVED"===d.type&&q(d.text,i.line_starters)&&")"!==f.last_text&&w():f.multiline_frame&&S(f.mode)&&","===f.last_text&&"}"===s?w():"SPACE"===a&&(c.space_before_token=!0);A(),f.last_word=d.text,"TK_RESERVED"===d.type&&"do"===d.text&&(f.do_block=!0),"TK_RESERVED"===d.type&&"if"===d.text&&(f.if_block=!0)}o="TK_START_BLOCK",s="",(c=new Z(l,m)).raw=g.test_output_raw,t=[],T(Q.BlockStatement),this.beautify=function(){var e,t;for(i=new ee(n,g,l),h=i.tokenize(),r=0;e=O();){for(var a=0;a<e.comments_before.length;a++)_(e.comments_before[a]);_(e),s=f.last_text,o=e.type,f.last_text=e.text,r+=1}return t=c.get_code(),g.end_with_newline&&(t+="\n"),"\n"!=g.eol&&(t=t.replace(/[\n]/g,g.eol)),t}}function i(t){var a=0,n=-1,r=[],i=!0;this.set_indent=function(e){a=t.baseIndentLength+e*t.indent_length,n=e},this.get_character_count=function(){return a},this.is_empty=function(){return i},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),a+=e.length,i=!1},this.pop=function(){var e=null;return i||(e=r.pop(),a-=e.length,i=0===r.length),e},this.remove_indent=function(){0<n&&(n-=1,a-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),a-=1;i=0===r.length},this.toString=function(){var e="";return this._empty||(0<=n&&(e=t.indent_cache[n]),e+=r.join("")),e}}function Z(t,a){a=a||"",this.indent_cache=[a],this.baseIndentLength=a.length,this.indent_length=t.length,this.raw=!1;var n=[];this.baseIndentString=a,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new i(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return n.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<n.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==Q.ForInitializer&&e.mode!==Q.Conditional)for(var t=e.start_line_index,a=n.length;t<a;)n[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,a);e&&1<n.length&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=1<n.length?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===n.length||n[n.length-2].is_empty())}}var J=function J(e,t,a,n,r,i){this.type=e,this.text=t,this.comments_before=[],this.newlines=a||0,this.wanted_newline=0<a,this.whitespace_before=n||"",this.parent=null,this.directives=null};function ee(k,L,e){var x="\n\r\t ".split(""),I=/[0-9]/,O=/[01234567]/,M=/[0123456789abcdefABCDEF]/,F="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var D,N,B,P,U,H,$=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),z=/([\s\S]*?)((?:\*\/)|$)/g,W=/([^\n\r\u2028\u2029]*)/g,K=/\/\* beautify( \w+[:]\w+)+ \*\//g,G=/ (\w+)[:](\w+)/g,Y=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,V=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function o(){var e,t,a=[];if(D=0,N="",H<=U)return["","TK_EOF"];t=P.length?P[P.length-1]:new J("TK_START_BLOCK","{");var n=k.charAt(U);for(U+=1;q(n,x);){if(j.newline.test(n)?"\n"===n&&"\r"===k.charAt(U-2)||(D+=1,a=[]):a.push(n),H<=U)return["","TK_EOF"];n=k.charAt(U),U+=1}if(a.length&&(N=a.join("")),I.test(n)){var r=!0,i=!0,o=I;for("0"===n&&U<H&&/[Xxo]/.test(k.charAt(U))?(i=r=!1,n+=k.charAt(U),U+=1,o=/[o]/.test(k.charAt(U))?O:M):(n="",U-=1);U<H&&o.test(k.charAt(U));)n+=k.charAt(U),U+=1,r&&U<H&&"."===k.charAt(U)&&(n+=k.charAt(U),U+=1,r=!1),i&&U<H&&/[Ee]/.test(k.charAt(U))&&(n+=k.charAt(U),(U+=1)<H&&/[+-]/.test(k.charAt(U))&&(n+=k.charAt(U),U+=1),r=i=!1);return[n,"TK_WORD"]}if(j.isIdentifierStart(k.charCodeAt(U-1))){if(U<H)for(;j.isIdentifierChar(k.charCodeAt(U))&&(n+=k.charAt(U),(U+=1)!==H););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&q(t.text,["set","get"])||!q(n,$)?[n,"TK_WORD"]:"in"===n?[n,"TK_OPERATOR"]:[n,"TK_RESERVED"]}if("("===n||"["===n)return[n,"TK_START_EXPR"];if(")"===n||"]"===n)return[n,"TK_END_EXPR"];if("{"===n)return[n,"TK_START_BLOCK"];if("}"===n)return[n,"TK_END_BLOCK"];if(" "===n)return[n,"TK_SEMICOLON"];if("/"===n){var s="";if("*"===k.charAt(U)){U+=1,z.lastIndex=U;var l=z.exec(k);s="/*".concat(l[0]),U+=l[0].length;var c=function S(e){if(!e.match(K))return null;var t={};G.lastIndex=0;for(var a=G.exec(e);a;)t[a[1]]=a[2],a=G.exec(e);return t}(s);return c&&"start"===c.ignore&&(Y.lastIndex=U,s+=(l=Y.exec(k))[0],U+=l[0].length),[s=s.replace(j.lineBreak,"\n"),"TK_BLOCK_COMMENT",c]}if("/"===k.charAt(U)){U+=1,W.lastIndex=U;var d=W.exec(k);return s="//".concat(d[0]),U+=d[0].length,[s,"TK_COMMENT"]}}if("`"===n||"'"===n||'"'===n||("/"===n||L.e4x&&"<"===n&&k.slice(U-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&q(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&q(t.parent.text,["if","while","for"])||q(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var f=n,p=!1,u=!1;if(e=n,"/"===f)for(var g=!1;U<H&&(p||g||k.charAt(U)!==f)&&!j.newline.test(k.charAt(U));)e+=k.charAt(U),p?p=!1:(p="\\"===k.charAt(U),"["===k.charAt(U)?g=!0:"]"===k.charAt(U)&&(g=!1)),U+=1;else if(L.e4x&&"<"===f){var h=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,m=k.slice(U-1),v=h.exec(m);if(v&&0===v.index){for(var b=v[2],_=0;v;){var E=!!v[1],w=v[2],y=!!v[v.length-1]||"![CDATA["===w.slice(0,8);if(w!==b||y||(E?--_:++_),_<=0)break;v=h.exec(m)}var A=v?v.index+v[0].length:m.length;return m=m.slice(0,A),U+=A-1,[m=m.replace(j.lineBreak,"\n"),"TK_STRING"]}}else for(;U<H&&(p||k.charAt(U)!==f&&("`"===f||!j.newline.test(k.charAt(U))));)(p||"`"===f)&&j.newline.test(k.charAt(U))?("\r"===k.charAt(U)&&"\n"===k.charAt(U+1)&&(U+=1),e+="\n"):e+=k.charAt(U),p=p?("x"!==k.charAt(U)&&"u"!==k.charAt(U)||(u=!0),!1):"\\"===k.charAt(U),U+=1;if(u&&L.unescape_strings&&(e=function R(e){var t,a=!1,n="",r=0,i="",o=0;for(;a||r<e.length;)if(t=e.charAt(r),r++,a){if(a=!1,"x"===t)i=e.substr(r,2),r+=2;else{if("u"!==t){n+="\\".concat(t);continue}i=e.substr(r,4),r+=4}if(!i.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(o=parseInt(i,16))&&o<32){n+="x"===t?"\\x".concat(i):"\\u".concat(i);continue}if(34===o||39===o||92===o)n+="\\".concat(String.fromCharCode(o));else{if("x"===t&&126<o&&o<=255)return e;n+=String.fromCharCode(o)}}else"\\"===t?a=!0:n+=t;return n}(e)),U<H&&k.charAt(U)===f&&(e+=f,U+=1,"/"===f))for(;U<H&&j.isIdentifierStart(k.charCodeAt(U));)e+=k.charAt(U),U+=1;return[e,"TK_STRING"]}if("#"===n){if(0===P.length&&"!"===k.charAt(U)){for(e=n;U<H&&"\n"!==n;)e+=n=k.charAt(U),U+=1;return["".concat(X(e),"\n"),"TK_UNKNOWN"]}var C="#";if(U<H&&I.test(k.charAt(U))){for(;C+=n=k.charAt(U),(U+=1)<H&&"#"!==n&&"="!==n;);return"#"===n||("["===k.charAt(U)&&"]"===k.charAt(U+1)?(C+="[]",U+=2):"{"===k.charAt(U)&&"}"===k.charAt(U+1)&&(C+="{}",U+=2)),[C,"TK_WORD"]}}if("<"===n&&("?"===k.charAt(U)||"%"===k.charAt(U))){V.lastIndex=U-1;var T=V.exec(k);if(T)return n=T[0],U+=n.length-1,[n=n.replace(j.lineBreak,"\n"),"TK_STRING"]}if("<"===n&&"\x3c!--"===k.substring(U-1,U+3)){for(U+=3,n="\x3c!--";!j.newline.test(k.charAt(U))&&U<H;)n+=k.charAt(U),U++;return B=!0,[n,"TK_COMMENT"]}if("-"===n&&B&&"--\x3e"===k.substring(U-1,U+2))return B=!1,U+=2,["--\x3e","TK_COMMENT"];if("."===n)return[n,"TK_DOT"];if(q(n,F)){for(;U<H&&q(n+k.charAt(U),F)&&(n+=k.charAt(U),!(H<=(U+=1))););return","===n?[n,"TK_COMMA"]:"="===n?[n,"TK_EQUALS"]:[n,"TK_OPERATOR"]}return[n,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,a;H=k.length,U=0,B=!1,P=[];for(var n=null,r=[],i=[];!t||"TK_EOF"!==t.type;){for(a=o(),e=new J(a[1],a[0],D,N);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=a[2]),i.push(e),a=o(),e=new J(a[1],a[0],D,N);i.length&&(e.comments_before=i,i=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(n),n=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&n&&("]"===e.text&&"["===n.text||")"===e.text&&"("===n.text||"}"===e.text&&"{"===n.text)&&(e.parent=n.parent,n=r.pop()),P.push(e),t=e}return P}}return{run:function I(e,t){function o(e){return e.replace(/\s+$/g,"")}var a,n,r,m,i,s,v,l,c,b,_,E,d,f;for((t=t||{}).wrap_line_length!==undefined&&0!==parseInt(t.wrap_line_length,10)||t.max_char===undefined||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),n=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),m=t.indent_char===undefined?" ":t.indent_char,s=t.brace_style===undefined?"collapse":t.brace_style,i=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),v=t.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],l=t.preserve_newlines===undefined||t.preserve_newlines,c=l?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,b=t.indent_handlebars!==undefined&&t.indent_handlebars,_=t.wrap_attributes===undefined?"auto":t.wrap_attributes,E=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,d=t.end_with_newline!==undefined&&t.end_with_newline,f=Array.isArray(t.extra_liners)?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),t.indent_with_tabs&&(m="\t",r=1),(a=new function k(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=n,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:f,in_array:function(e,t){for(var a=0;a<t.length;a++)if(e===t[a])return!0;return!1}},this.is_whitespace=function(e){for(;0<e.length;e++)if(!this.Utils.in_array(e.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)l&&"\n"===e&&this.newlines<=c&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(b){var a=this.input.substr(this.pos,3);if("{{#"===a||"{{/"===a)break;if("{{!"===a)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",a=new RegExp("</".concat(e,"\\s*>"),"igm");a.lastIndex=this.pos;var n=a.exec(this.input),r=n?n.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags["".concat(e,"count")]?this.tags["".concat(e,"count")]++:this.tags["".concat(e,"count")]=1,this.tags[e+this.tags["".concat(e,"count")]]=this.indent_level,this.tags[e+this.tags["".concat(e,"count")]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags["".concat(e,"count")]},this.retrieve_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags["".concat(e,"count")]+"parent"],delete this.tags[e+this.tags["".concat(e,"count")]],1===this.tags["".concat(e,"count")]?delete this.tags["".concat(e,"count")]:this.tags["".concat(e,"count")]--}},this.indent_to_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]])}},this.get_tag=function(e){var t,a,n="",r=[],i="",o=!1,s=!0,l=this.pos,c=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=l,this.line_char_count=c),r.length?r.join(""):["","TK_EOF"];if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace))o=!0;else{if("'"!==n&&'"'!==n||(n+=this.get_unformatted(n),o=!0),"="===n&&(o=!1),r.length&&"="!=r[r.length-1]&&">"!=n&&o){if(this.space_or_wrap(r),o=!1,!s&&"force"===_&&"/"!=n){this.print_newline(!0,r),this.print_indentation(r);for(var d=0;d<E;d++)r.push(m)}for(var f=0;f<r.length;f++)if(" "===r[f]){s=!1;break}}if(b&&"<"===a&&n+this.input.charAt(this.pos)==="{{"&&(n+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(n=" ".concat(n)),o=!0),"<"!==n||a||(t=this.pos-1,a="<"),b&&!a&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===n||"/"===n||"!"===n?this.pos-3:this.pos-2,a="{"),this.line_char_count++,r.push(n),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(b&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(b&&"{"===a&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=n);var p,u,g=r.join("");p=-1!=g.indexOf(" ")?g.indexOf(" "):"{"===g[0]?g.indexOf("}"):g.indexOf(">"),u="<"!==g[0]&&b?"#"===g[2]?3:2:1;var h=g.substring(u,p).toLowerCase();return"/"===g.charAt(g.length-2)||this.Utils.in_array(h,this.Utils.single_token)?e||(this.tag_type="SINGLE"):b&&"{"===g[0]&&"else"===h?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(h,v)?(i=this.get_unformatted("</".concat(h,">"),g),r.push(i),this.pos,this.tag_type="SINGLE"):"script"===h&&(-1===g.search("type")||-1<g.search("type")&&-1<g.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(h),this.tag_type="SCRIPT"):"style"===h&&(-1===g.search("type")||-1<g.search("type")&&-1<g.search("text/css"))?e||(this.record_tag(h),this.tag_type="STYLE"):"!"===h.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===h.charAt(0)?(this.retrieve_tag(h.substring(1)),this.tag_type="END"):(this.record_tag(h),"html"!=h.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(h,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=l,this.line_char_count=c),r.join("")},this.get_comment=function(e){var t="",a=">",n=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==a[a.length-1]||-1==t.indexOf(a));)!n&&t.length<10&&(0===t.indexOf("<![if")?(a="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(a="]]>",n=!0):0===t.indexOf("<![")?(a="]>",n=!0):0===t.indexOf("\x3c!--")?(a="--\x3e",n=!0):0===t.indexOf("{{!")?(a="}}",n=!0):0===t.indexOf("<?")?(a="?>",n=!0):0===t.indexOf("<%")&&(a="%>",n=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var a="",n="",r=0,i=!0;do{if(this.pos>=this.input.length)return n;if(a=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(a,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===a||"\r"===a){n+="\n",this.line_char_count=0;continue}}n+=a,this.line_char_count++,i=!0,b&&"{"===a&&n.length&&"{"===n[n.length-2]&&(r=(n+=this.get_unformatted("}}")).length)}while(-1===n.toLowerCase().indexOf(e,r));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_".concat(this.tag_type)]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_".concat(t)]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var a=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(a&&!this.Utils.in_array(a,t))},this.printer=function(e,t,a,n,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=a,this.brace_style=r,this.indent_level=0,this.wrap_line_length=n;for(var i=this.line_char_count=0;i<this.indent_size;i++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!=t[t.length-1])&&("\n"!=t[t.length-1]&&(t[t.length-1]=o(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=function t(e){return e.replace(/^\s+/g,"")}(e)),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=o(e)),e&&""!==e&&(1<e.length&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(0<t,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,m,r,i,s);;){var p=a.get_token();if(a.token_text=p[0],a.token_type=p[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case"TK_TAG_START":a.print_newline(!1,a.output),a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===a.last_token&&""===a.last_text){var u=a.token_text.match(/\w+/)[0],g=null;a.output.length&&(g=a.output[a.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===g||g[1]!=u&&!a.Utils.in_array(g[1],v))&&a.print_newline(!1,a.output)}a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var h=a.token_text.match(/^\s*<([a-z-]+)/i);h&&a.Utils.in_array(h[1],v)||a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var w=a.token_text,y=void 0,A=1;"TK_SCRIPT"===a.token_type?y=x:"TK_STYLE"===a.token_type&&(y=L),"keep"===t.indent_scripts?A=0:"separate"===t.indent_scripts&&(A=-a.indent_level);var C=a.get_full_indent(A);if(y)w=y(w.replace(/^\s*/,C),t);else{var T=w.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,S=a.get_full_indent(A-T);w=w.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}w&&(a.print_token_raw(w),a.print_newline(!0,a.output))}a.current_mode="TAG";break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type,a.last_text=a.token_text}var R=a.output.join("").replace(/[\r\n\t ]+$/,"");return d&&(R+="\n"),R}}},Object.assign(Rt.DEFAULTS,{codeMirror:window.CodeMirror,codeMirrorOptions:{lineNumbers:!0,tabMode:"indent",indentWithTabs:!0,lineWrapping:!0,mode:"text/html",tabSize:2},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","ol","table","dl"],brace_style:"expand",indent_char:"\t",indent_size:1,wrap_line_length:0},codeViewKeepActiveButtons:["fullscreen"]}),Rt.PLUGINS.codeView=function(c){var d,f,p=c.$,u=function u(){return c.$box.hasClass("fr-code-view")};function g(){return f?f.getValue():d.val()}function h(){u()&&(f&&f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin||c.opts.height?(c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",c.opts.heightMin||c.opts.height),d.css("height",c.opts.height)):c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var m,v=!1;function b(){u()&&c.events.trigger("blur")}function _(){u()&&v&&c.events.trigger("focus")}function n(e){d||(!function l(){d=p('<textarea class="fr-code" tabIndex="-1">'),c.$wp.append(d),d.attr("dir",c.opts.direction),c.$box.hasClass("fr-basic")||(m=p('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'.concat(c.helpers.isMobile()?"":" fr-desktop",'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>')),c.$box.append(m),c.events.bindClick(c.$box,"a.html-switch",function(){c.events.trigger("commands.before",["html"]),E(!1),c.events.trigger("commands.after",["html"])}));var e=function e(){return!u()};c.events.on("buttons.refresh",e),c.events.on("copy",e,!0),c.events.on("cut",e,!0),c.events.on("paste",e,!0),c.events.on("destroy",w,!0),c.events.on("html.set",function(){u()&&E(!0)}),c.events.on("codeView.update",h),c.events.on("codeView.toggle",function(){c.$box.hasClass("fr-code-view")&&E()}),c.events.on("form.submit",function(){u()&&(c.html.set(g()),c.events.trigger("contentChanged",[],!0))},!0)}(),!f&&c.opts.codeMirror?((f=c.opts.codeMirror.fromTextArea(d.get(0),c.opts.codeMirrorOptions)).on("blur",b),f.on("focus",_)):(c.events.$on(d,"keydown keyup change input",function(){c.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height="".concat(this.scrollHeight,"px"))}),c.events.$on(d,"blur",b),c.events.$on(d,"focus",_))),c.undo.saveStep(),c.html.cleanEmptyTags(),c.html.cleanWhiteTags(!0),c.core.hasFocus()&&(c.core.isEmpty()||(c.selection.save(),c.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),c.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=c.html.get(!1,!0);c.$el.find("span.fr-tmp").remove(),c.$box.toggleClass("fr-code-view",!0);var a,n,r=!1;if(c.core.hasFocus()&&(r=!0,c.events.disableBlur(),c.$el.blur()),t=(t=t.replace(/<span class="fr-tmp fr-sm">F<\/span>/,"FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/,"FROALA-EM"),c.codeBeautifier&&!t.includes("fr-embedly")&&(t=c.codeBeautifier.run(t,c.opts.codeBeautifierOptions)),f){a=t.indexOf("FROALA-SM"),(n=t.indexOf("FROALA-EM"))<a?a=n:n-=9;var i=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,a).length-t.substring(0,a).replace(/\n/g,"").length,o=t.substring(0,n).length-t.substring(0,n).replace(/\n/g,"").length;a=t.substring(0,a).length-t.substring(0,t.substring(0,a).lastIndexOf("\n")+1).length,n=t.substring(0,n).length-t.substring(0,t.substring(0,n).lastIndexOf("\n")+1).length,f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin&&c.$box.find(".CodeMirror-scroll").css("min-height",c.opts.heightMin),f.setValue(t),v=!r,f.focus(),v=!0,f.setSelection({line:i,ch:a},{line:o,ch:n}),f.refresh(),f.clearHistory()}else{a=t.indexOf("FROALA-SM"),n=t.indexOf("FROALA-EM")-9,c.opts.heightMin&&d.css("min-height",c.opts.heightMin),c.opts.height&&d.css("height",c.opts.height),c.opts.heightMax&&d.css("max-height",c.opts.height||c.opts.heightMax),d.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var s=p(c.o_doc).scrollTop();v=!r,d.focus(),v=!0,d.get(0).setSelectionRange(a,n),p(c.o_doc).scrollTop(s)}c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!c.helpers.isMobile()&&c.opts.toolbarInline&&c.toolbar.hide()}function E(e){void 0===e&&(e=!u());var t=c.$tb.find('.fr-command[data-cmd="html"]');e?(c.popups.hideAll(),n(t)):(c.$box.toggleClass("fr-code-view",!1),function a(e){var t=g();c.html.set(t),c.$el.blur(),c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1),c.selection.setAtStart(c.el),c.selection.restore(),c.placeholder.refresh(),c.undo.saveStep()}(t),c.events.trigger("codeView.update"))}function w(){u()&&E(!1),f&&f.toTextArea(),d.val("").removeData().remove(),d=null,m&&(m.remove(),m=null)}return{_init:function e(){if(c.events.on("focus",function(){c.opts.toolbarContainer&&function t(){var e=c.$tb.find('.fr-command[data-cmd="html"]');u()?(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1))}()}),!c.$wp)return!1},toggle:E,isActive:u,get:g}},Rt.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),Rt.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"}),Object.assign(Rt.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(Rt.DEFAULTS,{colorsText:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsBackground:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsStep:7,colorsHEXInput:!0,colorsButtons:["colorsBack","|","-"]}),Rt.PLUGINS.colors=function(m){var v=m.$,s='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(m.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(m.language.translate("HEX Color"),'" \n tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n ').concat(m.language.translate("OK"),"</button></div></div>");function l(e){for(var t="text"===e?m.opts.colorsText:m.opts.colorsBackground,a='<div class="fr-color-set fr-'.concat(e,'-color fr-selected-set">'),n=0;n<t.length;n++)0!==n&&n%m.opts.colorsStep==0&&(a+="<br>"),"REMOVE"!==t[n]?a+='<span class="fr-command fr-select-color" style="background:'.concat(t[n],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(e,'Color" \n data-param1="').concat(t[n],'"><span class="fr-sr-only"> ').concat(m.language.translate("Color")).concat(t[n]," \n &nbsp;&nbsp;&nbsp;</span></span>"):a+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(e,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(m.language.translate("Clear Formatting"),'">').concat(m.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(m.language.translate("Clear Formatting")," </span></span>");return"".concat(a,"</div>")}function c(e){var t,a=m.popups.get("".concat(e,"Color.picker")),n=v(m.selection.element());t="background"===e?"background-color":"color";var r=a.find(".fr-".concat(e,"-color .fr-select-color"));for(r.find(".fr-selected-color").remove(),r.removeClass("fr-active-item"),r.not('[data-param1="REMOVE"]').attr("aria-selected",!1);n.get(0)!==m.el;){if("transparent"!==n.css(t)&&"rgba(0, 0, 0, 0)"!==n.css(t)){var i=a.find(".fr-".concat(e,'-color .fr-select-color[data-param1="').concat(m.helpers.RGBToHex(n.css(t)),'"]'));i.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),i.addClass("fr-active-item").attr("aria-selected",!0);break}n=n.parent()}!function o(e){var t=m.popups.get("".concat(e,"Color.picker")),a=t.find(".fr-".concat(e,"-color .fr-active-item")).attr("data-param1"),n=t.find(".fr-color-hex-layer input");a||(a="");n.length&&v(n.val(a).input).trigger("change")}(e)}function n(e){"REMOVE"!==e?m.format.applyStyle("background-color",m.helpers.HEXtoRGB(e)):m.format.removeStyle("background-color"),m.popups.hide("backgroundColor.picker")}function r(e){"REMOVE"!==e?m.format.applyStyle("color",m.helpers.HEXtoRGB(e)):m.format.removeStyle("color"),m.popups.hide("textColor.picker")}return{showColorsPopup:function d(e){var t=m.$tb.find('.fr-command[data-cmd="'.concat(e,'"]')),a=m.popups.get("".concat(e,".picker"));if(a||(a=function o(e){var t="";m.opts.toolbarInline&&0<m.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(m.button.buildList(m.opts.colorsButtons),"\n </div>"));var a,n="";a="textColor"===e?(m.opts.colorsHEXInput&&(n=s.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(m.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:t,text_colors:l("text"),custom_color:n}):(m.opts.colorsHEXInput&&(n=s.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(m.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:t,background_colors:l("background"),custom_color:n});var r=m.popups.create("".concat(e,".picker"),a);return function i(g,h){m.events.on("popup.tab",function(e){var t=v(e.currentTarget);if(!m.popups.isVisible(h)||!t.is("span"))return!0;var a=e.which,n=!0;if(Rt.KEYCODE.TAB===a){var r=g.find(".fr-buttons");n=!m.accessibility.focusToolbar(r,!!e.shiftKey)}else if(Rt.KEYCODE.ARROW_UP===a||Rt.KEYCODE.ARROW_DOWN===a||Rt.KEYCODE.ARROW_LEFT===a||Rt.KEYCODE.ARROW_RIGHT===a){if(t.is("span.fr-select-color")){var i=t.parent().find("span.fr-select-color"),o=i.index(t),s=m.opts.colorsStep,l=Math.floor(i.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;Rt.KEYCODE.ARROW_UP===a?f=((f-s)%p+p)%p:Rt.KEYCODE.ARROW_DOWN===a?f=(f+s)%p:Rt.KEYCODE.ARROW_LEFT===a?f=((f-1)%p+p)%p:Rt.KEYCODE.ARROW_RIGHT===a&&(f=(f+1)%p);var u=v(i.get(f));m.events.disableBlur(),u.focus(),n=!1}}else Rt.KEYCODE.ENTER===a&&(m.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(r,"".concat(e,".picker")),r}(e)),!a.hasClass("fr-active"))if(m.popups.setContainer("".concat(e,".picker"),m.$tb),c("textColor"===e?"text":"background"),t.isVisible()){var n=m.button.getPosition(t),r=n.left,i=n.top;m.popups.show("".concat(e,".picker"),r,i,t.outerHeight())}else m.position.forSelection(a),m.popups.show("".concat(e,".picker"))},background:n,customColor:function i(e){var t=m.popups.get("".concat(e,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var a=t.val();"background"===e?n(a):r(a)}},text:r,back:function e(){m.popups.hide("textColor.picker"),m.popups.hide("backgroundColor.picker"),m.toolbar.showInline()}}},Rt.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),Rt.RegisterCommand("textColor",{title:"Text Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("textColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("textColor.picker")):this.colors.showColorsPopup("textColor")}}),Rt.RegisterCommand("applytextColor",{undo:!0,callback:function(e,t){this.colors.text(t)}}),Rt.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),Rt.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),Rt.RegisterCommand("backgroundColor",{title:"Background Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("backgroundColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("backgroundColor.picker")):this.colors.showColorsPopup("backgroundColor")}}),Rt.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(e,t){this.colors.background(t)}}),Rt.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),Rt.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),Rt.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"}),Object.assign(Rt.DEFAULTS,{dragInline:!0}),Rt.PLUGINS.draggable=function(d){var f=d.$;function e(e){return!(!e.originalEvent||!e.originalEvent.target||e.originalEvent.target.nodeType!==Node.TEXT_NODE)||(e.target&&"A"===e.target.tagName&&1===e.target.childNodes.length&&"IMG"===e.target.childNodes[0].tagName&&(e.target=e.target.childNodes[0]),f(e.target).hasClass("fr-draggable")?(d.undo.canDo()||d.undo.saveStep(),d.opts.dragInline?d.$el.attr("contenteditable",!0):d.$el.attr("contenteditable",!1),d.opts.toolbarInline&&d.toolbar.hide(),f(e.target).addClass("fr-dragging"),d.browser.msie||d.browser.edge||d.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}var p,u=function u(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||d.node.isElement(e)))};function g(e,t,a){if(d.opts.iframe){var n=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-top")),r=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-left"));e+=d.$iframe.offset().top+n,t+=d.$iframe.offset().left+r}p.offset().top!==e&&p.css("top",e),p.offset().left!==t&&p.css("left",t),p.width()!==a&&p.css("width",a)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",d.opts.dragInline?(!function a(){for(var e=null,t=0;t<Rt.INSTANCES.length;t++)if((e=Rt.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||d.browser.msie||d.browser.edge)&&e.preventDefault():(e.preventDefault(),function c(e){var t=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset);if(!u(t)){for(var a=0,n=t;!u(n)&&n===t&&0<e.originalEvent.pageY-d.win.pageYOffset-a;)a++,n=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset-a);(!u(n)||p&&0===d.$el.find(n).length&&n!==p.get(0))&&(n=null);for(var r=0,i=t;!u(i)&&i===t&&e.originalEvent.pageY-d.win.pageYOffset+r<f(d.doc).height();)r++,i=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset+r);(!u(i)||p&&0===d.$el.find(i).length&&i!==p.get(0))&&(i=null),t=null===i&&n?n:i&&null===n?i:i&&n?a<r?n:i:null}if(f(t).hasClass("fr-drag-helper"))return!1;if(t&&!d.node.isBlock(t)&&(t=d.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=f(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=f(t).parents("UL, OL").get(0)),t&&!f(t).hasClass("fr-drag-helper")){var o;p||(Rt.$draggable_helper||(Rt.$draggable_helper=f(document.createElement("div")).attr("class","fr-drag-helper")),p=Rt.$draggable_helper,d.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null},!0)),o=e.originalEvent.pageY<f(t).offset().top+f(t).outerHeight()/2;var s=f(t),l=0;o||0!==s.next().length?(o||(s=s.next()),"before"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(0<s.prev().length&&(l=parseFloat(s.prev().css("margin-bottom"))||0),l=Math.max(l,parseFloat(s.css("margin-top"))||0),g(s.offset().top-l/2-d.$box.offset().top,s.offset().left-d.win.pageXOffset-d.$box.offset().left,s.width()),p.data("fr-position","before"))):"after"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(l=parseFloat(s.css("margin-bottom"))||0,g(s.offset().top+f(t).height()+l/2-d.$box.offset().top,s.offset().left-d.win.pageXOffset-d.$box.offset().left,s.width()),p.data("fr-position","after")),p.data("fr-tag",s),p.addClass("fr-visible"),d.$box.append(p)}else p&&0<d.$box.find(p).length&&p.removeClass("fr-visible")}(e))}function a(e){e.originalEvent.dataTransfer.dropEffect="move",d.opts.dragInline||e.preventDefault()}function n(e){d.$el.attr("contenteditable",!0);var t=d.$el.find(".fr-dragging");p&&p.hasClass("fr-visible")&&d.$box.find(p).length?r(e):t.length&&(e.preventDefault(),e.stopPropagation()),p&&d.$box.find(p).length&&p.removeClass("fr-visible"),t.removeClass("fr-dragging")}function r(e){var t,a;d.$el.attr("contenteditable",!0);for(var n=0;n<Rt.INSTANCES.length;n++)if((t=Rt.INSTANCES[n].$el.find(".fr-dragging")).length){a=Rt.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),p&&p.hasClass("fr-visible")&&d.$box.find(p).length)p.data("fr-tag")[p.data("fr-position")]('<span class="fr-marker"></span>'),p.removeClass("fr-visible");else if(!1===d.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=d.events.chainTrigger("element.beforeDrop",t)))return!1;var r=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(r=t.parent()),d.core.isEmpty())d.events.focus();else d.$el.find(".fr-marker").replaceWith(Rt.MARKERS),d.selection.restore();if(a===d||d.undo.canDo()||d.undo.saveStep(),d.core.isEmpty())d.$el.html(r);else{var i=d.markers.insert();(d||"").selection&&r.contains(i)&&r.before(i),0===r.find(i).length?f(i).replaceWith(r):0===t.find(i).length&&f(i).replaceWith(t),t.after(Rt.MARKERS),d.selection.restore()}return d.popups.hideAll(),d.selection.save(),d.$el.find(d.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(d.opts.htmlAllowedEmptyTags.join(",")).remove(),d.html.wrap(),d.html.fillEmptyBlocks(),d.selection.restore(),d.undo.saveStep(),d.opts.iframe&&d.size.syncIframe(),a!==d&&(a.popups.hideAll(),a.$el.find(a.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),a.html.wrap(),a.html.fillEmptyBlocks(),a.undo.saveStep(),a.events.trigger("element.dropped"),a.opts.iframe&&a.size.syncIframe()),d.events.trigger("element.dropped",[r]),!1}p&&p.removeClass("fr-visible"),d.undo.canDo()||d.undo.saveStep(),setTimeout(function(){d.undo.saveStep()},0)}function i(e){if(e&&"DIV"===e.tagName&&d.node.hasClass(e,"fr-drag-helper"))e.parentNode.removeChild(e);else if(e&&e.nodeType===Node.ELEMENT_NODE)for(var t=e.querySelectorAll("div.fr-drag-helper"),a=0;a<t.length;a++)t[a].parentNode.removeChild(t[a])}return{_init:function o(){d.opts.enter===Rt.ENTER_BR&&(d.opts.dragInline=!0),d.events.on("dragstart",e,!0),d.events.on("dragover",t,!0),d.events.on("dragenter",a,!0),d.events.on("document.dragend",n,!0),d.events.on("document.drop",n,!0),d.events.on("drop",r,!0),d.events.on("html.processGet",i)}}},Object.assign(Rt.DEFAULTS,{editInPopup:!1}),Rt.MODULES.editInPopup=function(n){function e(){n.events.$on(n.$el,n._mouseup,function(){setTimeout(function(){!function a(){var e,t=n.popups.get("text.edit");e="INPUT"===n.el.tagName?n.$el.attr("placeholder"):n.$el.text(),t.find("input").val(e).trigger("change"),n.popups.setContainer("text.edit",n.$sc),n.popups.show("text.edit",n.$el.offset().left+n.$el.outerWidth()/2,n.$el.offset().top+n.$el.outerHeight(),n.$el.outerHeight())}()},10)})}return{_init:function a(){n.opts.editInPopup&&(!function t(){var e={edit:'<div id="fr-text-edit-'.concat(n.id,'" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(n.language.translate("Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">').concat(n.language.translate("Update"),"</button></div></div>")};n.popups.create("text.edit",e)}(),e())},update:function t(){var e=n.popups.get("text.edit").find("input").val();0===e.length&&(e=n.opts.placeholderText),"INPUT"===n.el.tagName?n.$el.attr("placeholder",e):n.$el.text(e),n.events.trigger("contentChanged"),n.popups.hide("text.edit")}}},Rt.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}}),Object.assign(Rt.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(Rt.DEFAULTS,{emoticonsSet:[{id:"people",name:"Smileys & People",code:"1f600",emoticons:[{code:"1f600",desc:"Grinning face"},{code:"1f601",desc:"Grinning Face with Smiling Eyes"},{code:"1f602",desc:"Face with Tears of Joy"},{code:"1f603",desc:"Smiling Face with Open Mouth"},{code:"1f604",desc:"Smiling Face with Open Mouth and Smiling Eyes"},{code:"1f605",desc:"Smiling Face with Open Mouth and Cold Sweat"},{code:"1f606",desc:"Smiling Face with Open Mouth and Tightly-Closed Eyes"},{code:"1f609",desc:"Winking Face"},{code:"1f60a",desc:"Smiling Face with Smiling Eyes"},{code:"1f608",desc:"Face Savouring Delicious Food"},{code:"1f60e",desc:"Smiling Face with Sunglasses"},{code:"1f60d",desc:"Smiling Face with Heart-Shaped Eyes"},{code:"1f618",desc:"Face Throwing a Kiss"},{code:"1f617",desc:"Kissing Face"},{code:"1f619",desc:"Kissing Face with Smiling Eyes"},{code:"1f61a",desc:"Kissing Face with Closed Eyes"},{code:"263a",desc:"White Smiling Face"},{code:"1f642",desc:"Slightly Smiling Face"},{code:"1f610",desc:"Neutral Face"},{code:"1f611",desc:"Expressionless Face"},{code:"1f636",desc:"Face Without Mouth"},{code:"1f60f",desc:"Smirking Face"},{code:"1f623",desc:"Persevering Face"},{code:"1f625",desc:"Disappointed but Relieved Face"},{code:"1f62e",desc:"Face with Open Mouth"},{code:"1f62f",desc:"Hushed Face"},{code:"1f62a",desc:"Sleepy Face"},{code:"1f62b",desc:"Tired Face"},{code:"1f634",desc:"Sleeping Face"},{code:"1f60c",desc:"Relieved Face"},{code:"1f61b",desc:"Face with Stuck-out Tongue"},{code:"1f61c",desc:"Face with Stuck-out Tongue and Winking Eye"},{code:"1f61d",desc:"Face with Stuck-out Tongue and Tightly-Closed Eyes"},{code:"1f612",desc:"Unamused Face"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f614",desc:"Pensive Face"},{code:"1f615",desc:"Confused Face"},{code:"1f632",desc:"Astonished Face"},{code:"1f616",desc:"Confounded Face"},{code:"1f61e",desc:"Disappointed Face"},{code:"1f61f",desc:"Worried Face"},{code:"1f624",desc:"Face with Look of Triumph"},{code:"1f622",desc:"Crying Face"},{code:"1f62d",desc:"Loudly Crying Face"},{code:"1f626",desc:"Frowning Face with Open Mouth"},{code:"1f627",desc:"Anguished Face"},{code:"1f628",desc:"Fearful Face"},{code:"1f629",desc:"Weary Face"},{code:"1f62c",desc:"Grimacing Face"},{code:"1f630",desc:"Face with Open Mouth and Cold Sweat"},{code:"1f631",desc:"Face Screaming in Fear"},{code:"1f633",desc:"Flushed Face"},{code:"1f635",desc:"Dizzy Face"},{code:"1f621",desc:"Pouting Face"},{code:"1f620",desc:"Angry Face"},{code:"1f637",desc:"Face with Medical Mask"},{code:"1f607",desc:"Smiling Face with Halo"},{code:"1f608",desc:"Smiling Face with Horns"},{code:"1f47f",desc:"Imp"},{code:"1f479",desc:"Japanese Ogre"},{code:"1f47a",desc:"Japanese Goblin"},{code:"1f480",desc:"Skull"},{code:"1f47b",desc:"Ghost"},{code:"1f47d",desc:"Extraterrestrial Alien"},{code:"1f47e",desc:"Alien Monster"},{code:"1f4a9",desc:"Pile of Poo"},{code:"1f63a",desc:"Smiling Cat Face with Open Mouth"},{code:"1f638",desc:"Grinning Cat Face with Smiling Eyes"},{code:"1f639",desc:"Cat Face with Tears of Joy"},{code:"1f63b",desc:"Smiling Cat Face with Heart-Shaped Eyes"},{code:"1f63c",desc:"Cat Face with Wry Smile"},{code:"1f63d",desc:"Kissing Cat Face with Closed Eyes"},{code:"1f640",desc:"Weary Cat Face"},{code:"1f63f",desc:"Crying Cat Face"},{code:"1f63e",desc:"Pouting Cat Face"},{code:"1f648",desc:"See-No-Evil Monkey"},{code:"1f649",desc:"Hear-No-Evil Monkey"},{code:"1f64a",desc:"Speak-No-Evil Monkey"},{code:"1f476",desc:"Baby"},{code:"1f466",desc:"Boy"},{code:"1f467",desc:"Girl"},{code:"1f468",desc:"Man"},{code:"1f469",desc:"Woman"},{code:"1f474",desc:"Older Man"},{code:"1f475",desc:"Older Woman"},{code:"1f46e",desc:"Police Officer"},{code:"1f482",desc:" Guardsman"},{code:"1f477",desc:" Construction Worker"},{code:"1f478",desc:"Princess"},{code:"1f473",desc:"Man with Turban"},{code:"1f472",desc:"Man with Gua Pi Mao"},{code:"1f471",desc:"Person with Blond Hair"},{code:"1f470",desc:"Bride with Veil"},{code:"1f47c",desc:"Baby Angel"},{code:"1f385",desc:"Father Christmas"},{code:"1f64e",desc:"Person with Pouting Face"},{code:"1f645",desc:"Face with No Good Gesture"},{code:"1f646",desc:"Face with Ok Gesture"},{code:"1f481",desc:"Information Desk Person"},{code:"1f64b",desc:"Happy Person Raising One Hand"},{code:"1f647",desc:"Person Bowing Deeply"},{code:"1f486",desc:"Face Massage"},{code:"1f487",desc:"Haircut"},{code:"1f6b6",desc:"Pedestrian"},{code:"1f3c3",desc:"Runner"},{code:"1f483",desc:"Dancer"},{code:"1f46f",desc:"Woman with Bunny Ears"},{code:"1f6c0",desc:"Bath"},{code:"1f464",desc:"Bust in Silhouette"},{code:"1f465",desc:"Busts in Silhouette"},{code:"1f3c7",desc:"Horse Racing"},{code:"1f3c2",desc:" Snowboarder"},{code:"1f3c4",desc:" Surfer"},{code:"1f6a3",desc:" Rowboat"},{code:"1f3ca",desc:" Swimmer"},{code:"1f6b4",desc:" Bicyclist"},{code:"1f6b5",desc:"Mountain Bicyclist"},{code:"1f46b",desc:" Man and Woman Holding Hands"},{code:"1f46c",desc:"Two Men Holding Hands"},{code:"1f46d",desc:"Two Women Holding Hands"},{code:"1f48f",desc:"Kiss"},{code:"1f468-2764-1f48b-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",desc:"Man Kiss Man"},{code:"1f469-2764-1f48b-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Kiss Woman"},{code:"1f491",desc:"Couple with Heart"},{code:"1f468-2764-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",desc:"Man Heart Man"},{code:"1f469-2764-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Heart Woman"},{code:"1f46a",desc:"Family"},{code:"1f468",desc:"Man Woman Boy"},{code:"1f468-1f469-1f467",desc:"Man Woman Girl"},{code:"1f468-1f469-1f467-1f466",desc:"Man Woman Girl Boy"},{code:"1f468-1f469-1f466-1f466",desc:"Man Woman Boy Boy"},{code:"1f468-1f469-1f467-1f467",desc:"Man Woman Girl Girl"},{code:"1f468-1f468-1f466",desc:"Man Man Boy"},{code:"1f468-1f468-1f467",desc:"Man Man Girl"},{code:"1f468-1f468-1f467-1f466",desc:"Man Man Girl Boy"},{code:"1f468-1f468-1f466-1f466",desc:"Man Man Boy Boy"},{code:"1f469-1f469-1f466",desc:"Woman Woman Boy"},{code:"1f469-1f469-1f467",desc:"Woman Woman Girl"},{code:"1f469-1f469-1f467-1f466",desc:"Woman Woman Girl Boy"},{code:"1f469-1f469-1f467-1f467",desc:"Woman Woman Girl Girl"},{code:"1f4aa",desc:"Flexed Biceps"},{code:"1f448",desc:"White Left Pointing Backhand Index"},{code:"1f449",desc:"White Right Pointing Backhand Index"},{code:"1f446",desc:"White Up Pointing Backhand Index"},{code:"1f447",desc:"White Down Pointing Backhand Index"},{code:"270c",desc:"Victory Hand"},{code:"270b",desc:"Raised Hand"},{code:"1f44c",desc:"Ok Hand Sign"},{code:"1f44d",desc:"Thumbs Up Sign"},{code:"1f44e",desc:"Thumbs Down Sign"},{code:"270a",desc:"Raised Fist"},{code:"1f44a",desc:"Fisted Hand Sign"},{code:"1f44b",desc:"Waving Hand Sign"},{code:"1f44f",desc:"Clapping Hands Sign"},{code:"1f450",desc:"Open Hands Sign"},{code:"1f64c",desc:"Person Raising Both Hands in Celebration"},{code:"1f64f",desc:"Person with Folded Hands"},{code:"1f485",desc:"Nail Polish"},{code:"1f442",desc:"Ear"},{code:"1f443",desc:"Nose"},{code:"1f463",desc:"Footprints"},{code:"1f440",desc:"Eyes"},{code:"1f445",desc:"Tongue"},{code:"1f444",desc:"Mouth"},{code:"1f48b",desc:"Kiss Mark"},{code:"1f498",desc:"Heart with Arrow"},{code:"2764",desc:"Heavy Black Heart"},{code:"1f493",desc:"Heavy Black Heart"},{code:"1f494",desc:"Broken Heart"},{code:"1f495",desc:"Two Hearts"},{code:"1f496",desc:"Sparkling Hearts"},{code:"1f497",desc:"Growing Hearts"},{code:"1f499",desc:"Blue Heart"},{code:"1f49a",desc:"Green Heart"},{code:"1f49b",desc:"Yellow Heart"},{code:"1f49c",desc:"Purple Heart"},{code:"1f49d",desc:"Heart with Ribbon"},{code:"1f49e",desc:"Revolving Hearts"},{code:"1f49f",desc:"Heart Decoration"},{code:"1f48c",desc:"Love Letter"},{code:"1f4a4",desc:"Sleeping Symbol"},{code:"1f4a2",desc:"Anger Symbol"},{code:"1f4a3",desc:"Bomb"},{code:"1f4a5",desc:"Collision Symbol"},{code:"1f4a6",desc:"Splashing Sweat Symbol"},{code:"1f4a8",desc:"Dash Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ac",desc:"Speech Balloon"},{code:"1f4ad",desc:"Thought Balloon"},{code:"1f453",desc:"Eyeglasses"},{code:"1f454",desc:"Necktie"},{code:"1f455",desc:"T-Shirt"},{code:"1f456",desc:"Jeans"},{code:"1f457",desc:"Dress"},{code:"1f458",desc:"Kimono"},{code:"1f459",desc:"Bikini"},{code:"1f45a",desc:"Womans Clothes"},{code:"1f45b",desc:"Purse"},{code:"1f45c",desc:"Handbag"},{code:"1f45d",desc:"Pouch"},{code:"1f392",desc:"School Satchel"},{code:"1f45e",desc:"Mans Shoe"},{code:"1f45f",desc:"Athletic Shoe"},{code:"1f460",desc:"High-Heeled Shoe"},{code:"1f461",desc:"Womans Sandal"},{code:"1f462",desc:"Womans Boots"},{code:"1f451",desc:"Crown"},{code:"1f452",desc:"Womans Hat"},{code:"1f462",desc:"Top Hat"},{code:"1f393",desc:"Graduation Cap"},{code:"1f484",desc:"Lipstick"},{code:"1f48d",desc:"Ring"},{code:"1f48e",desc:"Gem Stone"}]},{id:"nature",name:"Animals & Nature",code:"1F435",emoticons:[{code:"1F435",desc:"Monkey Face"},{code:"1F412",desc:"Monkey"},{code:"1F436",desc:"Dog Face"},{code:"1F415",desc:"Dog"},{code:"1F429",desc:"Poodle"},{code:"1F43A",desc:"Wolf Face"},{code:"1F431",desc:"Cat Face"},{code:"1F408",desc:"Cat"},{code:"1F42F",desc:"Tiger Face"},{code:"1F405",desc:"Tiger"},{code:"1F406",desc:"Leopard"},{code:"1F434",desc:"Horse Face"},{code:"1F40E",desc:"Horse"},{code:"1F42E",desc:"Cow Face"},{code:"1F402",desc:"Ox"},{code:"1F403",desc:"Water Buffalo"},{code:"1F404",desc:"Cow"},{code:"1F437",desc:"Pig Face"},{code:"1F416",desc:"Pig"},{code:"1F417",desc:"Boar"},{code:"1F43D",desc:"Pig Nose"},{code:"1F40F",desc:"Ram"},{code:"1F411",desc:"Sheep"},{code:"1F410",desc:"Goat"},{code:"1F42A",desc:"Dromedary Camel"},{code:"1F42B",desc:"Bactrian Camel"},{code:"1F418",desc:"Elephant"},{code:"1F42D",desc:"Mouse Face"},{code:"1F401",desc:"Mouse"},{code:"1F400",desc:"Rat"},{code:"1F439",desc:"Hamster Face"},{code:"1F430",desc:"Rabbit Face"},{code:"1F407",desc:"Rabbit"},{code:"1F43B",desc:"Bear Face"},{code:"1F428",desc:"Koala"},{code:"1F43C",desc:"Panda Face"},{code:"1F43E",desc:"Paw Prints"},{code:"1F414",desc:"Chicken"},{code:"1F413",desc:"Rooster"},{code:"1F423",desc:"Hatching Chick"},{code:"1F424",desc:"Baby Chick"},{code:"1F425",desc:"Front-Facing Baby Chick"},{code:"1F426",desc:"Bird"},{code:"1F427",desc:"Penguin"},{code:"1F438",desc:"Frog Face"},{code:"1F40A",desc:"Crocodile"},{code:"1F422",desc:"Turtle"},{code:"1F40D",desc:"Snake"},{code:"1F432",desc:"Dragon Face"},{code:"1F409",desc:"Dragon"},{code:"1F433",desc:"Spouting Whale"},{code:"1F40B",desc:"Whale"},{code:"1F42C",desc:"Dolphin"},{code:"1F41F",desc:"Fish"},{code:"1F420",desc:"Tropical Fish"},{code:"1F421",desc:"Blowfish"},{code:"1F419",desc:"Octopus"},{code:"1F41A",desc:"Spiral Shell"},{code:"1F40C",desc:"Snail"},{code:"1F41B",desc:"Bug"},{code:"1F41C",desc:"Ant"},{code:"1F41D",desc:"Honeybee"},{code:"1F41E",desc:"Lady Beetle"},{code:"1F490",desc:"Bouquet"},{code:"1F338",desc:"Cherry Blossom"},{code:"1F4AE",desc:"White Flower"},{code:"1F339",desc:"Rose"},{code:"1F33A",desc:"Hibiscus"},{code:"1F33B",desc:"Sunflower"},{code:"1F33C",desc:"Blossom"},{code:"1F337",desc:"Tulip"},{code:"1F331",desc:"Seedling"},{code:"1F332",desc:"Evergreen Tree"},{code:"1F333",desc:"Deciduous Tree"},{code:"1F334",desc:"Palm Tree"},{code:"1F335",desc:"Cactus"},{code:"1F33E",desc:"Ear of Rice"},{code:"1F33F",desc:"Herb"},{code:"2618",desc:"Four Leaf Clover"},{code:"1F341",desc:"Maple Leaf"},{code:"1F342",desc:"Fallen Leaf"},{code:"1F343",desc:"Leaf Fluttering in Wind"}]},{id:"foods",name:"Food & Drink",code:"1F347",emoticons:[{code:"1F347",desc:"Grapes"},{code:"1F348",desc:"Melon"},{code:"1F349",desc:"Watermelon"},{code:"1F34A",desc:"Tangerine"},{code:"1F34B",desc:"Lemon"},{code:"1F34C",desc:"Banana"},{code:"1F34D",desc:"Pineapple"},{code:"1F34E",desc:"Red Apple"},{code:"1F34F",desc:"Green Apple"},{code:"1F350",desc:"Pear"},{code:"1F351",desc:"Peach"},{code:"1F352",desc:"Cherries"},{code:"1F353",desc:"Strawberry"},{code:"1F345",desc:"Tomato"},{code:"1F346",desc:"Aubergine"},{code:"1F33D",desc:"Ear of Maize"},{code:"1F344",desc:"Mushroom"},{code:"1F330",desc:"Chestnut"},{code:"1F35E",desc:"Bread"},{code:"1F356",desc:"Meat on Bone"},{code:"1F357",desc:"Poultry Leg"},{code:"1F354",desc:"Hamburger"},{code:"1F35F",desc:"French Fries"},{code:"1F355",desc:"Slice of Pizza"},{code:"1F373",desc:"Cooking"},{code:"1F372",desc:"Pot of Food"},{code:"1F371",desc:"Bento Box"},{code:"1F358",desc:"Rice Cracker"},{code:"1F359",desc:"Rice Ball"},{code:"1F35A",desc:"Cooked Rice"},{code:"1F35B",desc:"Curry and Rice"},{code:"1F35C",desc:"Steaming Bowl"},{code:"1F35D",desc:"Spaghetti"},{code:"1F360",desc:"Roasted Sweet Potato"},{code:"1F362",desc:"Oden"},{code:"1F363",desc:"Sushi"},{code:"1F364",desc:"Fried Shrimp"},{code:"1F365",desc:"Fish Cake with Swirl Design"},{code:"1F361",desc:"Dango"},{code:"1F366",desc:"Soft Ice Cream"},{code:"1F367",desc:"Shaved Ice"},{code:"1F368",desc:"Ice Cream"},{code:"1F369",desc:"Doughnut"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday Cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate Bar"},{code:"1F36C",desc:"Candy"},{code:"1F36D",desc:"Lollipop"},{code:"1F36E",desc:"Custard"},{code:"1F36F",desc:"Honey Pot"},{code:"1F37C",desc:"Baby Bottle"},{code:"2615",desc:"Hot Beverage"},{code:"1F375",desc:"Teacup Without Handle"},{code:"1F376",desc:"Sake Bottle and Cup"},{code:"1F377",desc:"Wine Glass"},{code:"1F378",desc:"Cocktail Glass"},{code:"1F379",desc:"Tropical Drink"},{code:"1F37A",desc:"Beer Mug"},{code:"1F37B",desc:"Clinking Beer Mugs"},{code:"1F374",desc:"Fork and Knife"},{code:"1F52A",desc:"Hocho"}]},{id:"activity",name:"Activities",code:"1f383",emoticons:[{code:"1f383",desc:" Jack-O-Lantern"},{code:"1f384",desc:"Christmas Tree"},{code:"1f386",desc:" Fireworks"},{code:"1f387",desc:"Firework Sparkler"},{code:"2728",desc:" Sparkles"},{code:"1f388",desc:"Balloon"},{code:"1f389",desc:"Party Popper"},{code:"1f38a",desc:"Confetti Ball"},{code:"1f38b",desc:"Tanabata Tree"},{code:"1f38d",desc:"Pine Decoration"},{code:"1f38e",desc:"Japanese Dolls"},{code:"1f38f",desc:"Carp Streamer"},{code:"1f390",desc:"Wind Chime"},{code:"1f391",desc:"Moon Viewing Ceremony"},{code:"1f380",desc:"Ribbon"},{code:"1f381",desc:"Wrapped Present"},{code:"1f3ab",desc:"Ticket"},{code:"1f3c6",desc:"Trophy"},{code:"1f388",desc:"Balloon"},{code:"26bd",desc:"Soccer Ball"},{code:"26be",desc:"Baseball"},{code:"1f3c0",desc:"Basketball and Hoop"},{code:"1f3c8",desc:"American Football"},{code:"1f3c9",desc:"Rugby Football"},{code:"1f3be",desc:"Tennis Racquet and Ball"},{code:"1f3b1",desc:"Billiards"},{code:"1f3b3",desc:"Bowling"},{code:"1f3af",desc:"Direct Hit"},{code:"26f3",desc:"Flag in Hole"},{code:"1f3a3",desc:"Fishing Pole and Fish"},{code:"1f3bd",desc:"Running Shirt with Sash"},{code:"1f3bf",desc:"Ski and Ski Boot"},{code:"1f3ae",desc:"Video Game"},{code:"1f3b2",desc:"Game Die"},{code:"2660",desc:"Black Spade Suit"},{code:"2665",desc:"Black Heart SuiT"},{code:"2666",desc:"Black Diamond Suit"},{code:"2663",desc:"Black Club Suit"},{code:"1f0cf",desc:"Playing Card Black Joker"},{code:"1f004",desc:"Mahjong Tile Red Dragon"},{code:"1f3b4",desc:"Flower Playing Cards"}]},{id:"places",name:"Travel & Places",code:"1f30d",emoticons:[{code:"1f30d",desc:"Earth Globe Europe-Africa"},{code:"1f30e",desc:"Earth Globe Americas"},{code:"1f30f",desc:"Earth Globe Asia-Australia"},{code:"1f310",desc:"Globe with Meridians"},{code:"1f5fe",desc:"Silhouette of Japan"},{code:"1f30b",desc:"Volcano"},{code:"1f5fb",desc:"Mount Fuji"},{code:"1f3e0",desc:"House Building"},{code:"1f3e1",desc:"House with Garden"},{code:"1f3e2",desc:"Office Building"},{code:"1f3e3",desc:"Japanese Post Office"},{code:"1f3e4",desc:"European Post Office"},{code:"1f3e5",desc:"Hospital"},{code:"1f3e6",desc:"Bank"},{code:"1f3e8",desc:"Hotel"},{code:"1f3e9",desc:"Love Hotel"},{code:"1f3ea",desc:"Convenience Store"},{code:"1f3eb",desc:"School"},{code:"1f3ec",desc:"Department Store"},{code:"1f3ed",desc:"Factory"},{code:"1f3ef",desc:"Japanese Castle"},{code:"1f3f0",desc:"European Castle"},{code:"1f492",desc:"Wedding"},{code:"1f5fc",desc:"Tokyo Tower"},{code:"1f5fd",desc:"Statue of Liberty"},{code:"26ea",desc:"Church"},{code:"26f2",desc:"Fountain"},{code:"26fa",desc:"Tent"},{code:"1f301",desc:"Foggy"},{code:"1f303",desc:"Night with Stars"},{code:"1f304",desc:"Sunrise over Mountains"},{code:"1f305",desc:"Sunrise"},{code:"1f306",desc:"Cityscape at Dusk"},{code:"1f307",desc:"Sunset over Buildings"},{code:"1f309",desc:"Bridge at Night"},{code:"2668",desc:"Hot Springs"},{code:"1f30c",desc:"Milky Way"},{code:"1f3a0",desc:"Carousel Horse"},{code:"1f3a1",desc:"Ferris Wheel"},{code:"1f3a2",desc:"Roller Coaster"},{code:"1f488",desc:"Barber Pole"},{code:"1f3aa",desc:"Circus Tent"},{code:"1f3ad",desc:"Performing Arts"},{code:"1f3a8",desc:"Artist Palette"},{code:"1f3b0",desc:"Slot Machine"},{code:"1f682",desc:"Steam Locomotive"},{code:"1f683",desc:"Railway Car"},{code:"1f684",desc:"High-Speed Train"},{code:"1f685",desc:"High-Speed Train with Bullet Nose"},{code:"1f686",desc:"Train"},{code:"1f687",desc:"Metro"},{code:"1f688",desc:"Light Rail"},{code:"1f689",desc:"Station"},{code:"1f68a",desc:"Tram"},{code:"1f69d",desc:"Monorail"},{code:"1f69e",desc:"Mountain Railway"},{code:"1f68b",desc:"Tram Car"},{code:"1f68c",desc:"Bus"},{code:"1f68d",desc:"Oncoming Bus"},{code:"1f68e",desc:"Trolleybus"},{code:"1f690",desc:"Minibus"},{code:"1f691",desc:"Ambulance"},{code:"1f692",desc:"Fire Engine"},{code:"1f693",desc:"Police Car"},{code:"1f694",desc:"Oncoming Police Car"},{code:"1f695",desc:"Taxi"},{code:"1f695",desc:"Oncoming Taxi"},{code:"1f697",desc:"Automobile"},{code:"1f698",desc:"Oncoming Automobile"},{code:"1f699",desc:"Recreational Vehicle"},{code:"1f69a",desc:"Delivery Truck"},{code:"1f69b",desc:"Articulated Lorry"},{code:"1f69c",desc:"Tractor"},{code:"1f6b2",desc:"Bicycle"},{code:"1f68f",desc:"Bus Stop"},{code:"26fd",desc:"Fuel Pump"},{code:"1f6a8",desc:"Police Cars Revolving Light"},{code:"1f6a5",desc:"Horizontal Traffic Light"},{code:"1f6a6",desc:"Vertical Traffic Light"},{code:"1f6a7",desc:"Construction Sign"},{code:"2693",desc:"Anchor"},{code:"26f5",desc:"Sailboat"},{code:"1f6a4",desc:"Speedboat"},{code:"1f6a2",desc:"Ship"},{code:"2708",desc:"Airplane"},{code:"1f4ba",desc:"Seat"},{code:"1f681",desc:"Helicopter"},{code:"1f69f",desc:"Suspension Railway"},{code:"1f6a0",desc:"Mountain Cableway"},{code:"1f6a1",desc:"Aerial Tramway"},{code:"1f680",desc:"Rocket"},{code:"1f6aa",desc:"Door"},{code:"1f6bd",desc:"Toilet"},{code:"1f6bf",desc:"Shower"},{code:"1f6c1",desc:"Bathtub"},{code:"231b",desc:"Hourglass"},{code:"23f3",desc:"Hourglass with Flowing Sand"},{code:"231a",desc:"Watch"},{code:"23f0",desc:"Alarm Clock"},{code:"1f55b",desc:"Clock Face Twelve Oclock"},{code:"1f567",desc:"Clock Face Twelve-Thirty"},{code:"1f550",desc:"Clock Face One Oclock"},{code:"1f55c",desc:"Clock Face One-thirty"},{code:"1f551",desc:"Clock Face Two Oclock"},{code:"1f55d",desc:"Clock Face Two-thirty"},{code:"1f552",desc:"Clock Face Three Oclock"},{code:"1f55e",desc:"Clock Face Three-thirty"},{code:"1f553",desc:"Clock Face Four Oclock"},{code:"1f55f",desc:"Clock Face Four-thirty"},{code:"1f554",desc:"Clock Face Five Oclock"},{code:"1f560",desc:"Clock Face Five-thirty"},{code:"1f555",desc:"Clock Face Six Oclock"},{code:"1f561",desc:"Clock Face Six-thirty"},{code:"1f556",desc:"Clock Face Seven Oclock"},{code:"1f562",desc:"Clock Face Seven-thirty"},{code:"1f557",desc:"Clock Face Eight Oclock"},{code:"1f563",desc:"Clock Face Eight-thirty"},{code:"1f558",desc:"Clock Face Nine Oclock"},{code:"1f564",desc:"Clock Face Nine-thirty"},{code:"1f559",desc:"Clock Face Ten Oclock"},{code:"1f565",desc:"Clock Face Ten-thirty"},{code:"1f55a",desc:"Clock Face Eleven Oclock"},{code:"1f566",desc:"Clock Face Eleven-thirty"},{code:"1f311",desc:"New Moon Symbol"},{code:"1f312",desc:"Waxing Crescent Moon Symbol"},{code:"1f313",desc:"First Quarter Moon Symbol"},{code:"1f314",desc:"Waxing Gibbous Moon Symbol"},{code:"1f315",desc:"Full Moon Symbol"},{code:"1f316",desc:"Waning Gibbous Moon Symbol"},{code:"1f317",desc:"Last Quarter Moon Symbol"},{code:"1f318",desc:"Waning Crescent Moon Symbol"},{code:"1f319",desc:"Crescent Moon"},{code:"1f31a",desc:"New Moon with Face"},{code:"1f31b",desc:"First Quarter Moon with Face"},{code:"1f31c",desc:"Last Quarter Moon with Face"},{code:"2600",desc:"Black Sun with Rays"},{code:"1f31d",desc:"Full Moon with Face"},{code:"1f31e",desc:"Sun with Face"},{code:"2b50",desc:"White Medium Star"},{code:"1f31f",desc:"Glowing Star"},{code:"1f320",desc:"Shooting Star"},{code:"2601",desc:"Cloud"},{code:"26c5",desc:"Sun Behind Cloud"},{code:"1f300",desc:"Cyclone"},{code:"1f308",desc:"Rainbow"},{code:"1f302",desc:"Closed Umbrella"},{code:"2614",desc:"Umbrella with Rain Drops"},{code:"26a1",desc:"High Voltage Sign"},{code:"2744",desc:"Snowflake"},{code:"2603",desc:"Snowman Without Snow"},{code:"1f525",desc:"Fire"},{code:"1f4a7",desc:"Droplet"},{code:"1F30A",desc:"Water Wave"}]},{id:"objects",name:"Objects",code:"1F507",emoticons:[{code:"1F507",desc:"Speaker with Cancellation Stroke"},{code:"1F508",desc:"Speaker"},{code:"1F509",desc:"Speaker with One Sound Wave"},{code:"1F50A",desc:"Speaker with Three Sound Wave"},{code:"1F4E2",desc:"Public Address Loudspeaker"},{code:"1F4E3",desc:"Cheering Megaphone"},{code:"1F4EF",desc:"Postal Horn"},{code:"1F514",desc:"Bell"},{code:"1F515",desc:"Bell with Cancellation Stroke"},{code:"1F3BC",desc:"Musical Score"},{code:"1F3B5",desc:"Musical Note"},{code:"1F3B6",desc:"Multiple Musical Notes"},{code:"1F3A4",desc:"Microphone"},{code:"1F3A7",desc:"Headphone"},{code:"1F4FB",desc:"Radio"},{code:"1F3B7",desc:"Saxophone"},{code:"1F3B8",desc:"Guitar"},{code:"1F3B9",desc:"Musical Keyboard"},{code:"1F3BA",desc:"Trumpet"},{code:"1F3BB",desc:"Violin"},{code:"1F4F1",desc:"Mobile Phone"},{code:"1F4F2",desc:"Mobile Phone with Rightwards Arrow at Left"},{code:"260E",desc:"Black Telephone"},{code:"1F4DE",desc:"Telephone Receiver"},{code:"1F4DF",desc:"Pager"},{code:"1F4E0",desc:"Fax Machine"},{code:"1F50B",desc:"Battery"},{code:"1F50C",desc:"Electric Plug"},{code:"1F4BB",desc:"Personal Computer"},{code:"1F4BD",desc:"Minidisc"},{code:"1F4BE",desc:"Floppy Disk"},{code:"1F4BF",desc:"Optical Disk"},{code:"1F4C0",desc:"Dvd"},{code:"1F3A5",desc:"Movie Camera"},{code:"1F3AC",desc:"Clapper Board"},{code:"1F4FA",desc:"Television"},{code:"1F4F7",desc:"Camera"},{code:"1F4F9",desc:"Video Camera"},{code:"1F4FC",desc:"Videocassette"},{code:"1F50D",desc:"Left-Pointing Magnifying Glass"},{code:"1F50E",desc:"Right-Pointing Magnifying Glass"},{code:"1F52C",desc:"Microscope"},{code:"1F52D",desc:"Telelscope"},{code:"1F4E1",desc:"Satellite Antenna"},{code:"1F4A1",desc:"Electric Light Bulb"},{code:"1F526",desc:"Electric Torch"},{code:"1F3EE",desc:"Izakaya Lantern"},{code:"1F4D4",desc:"Notebook with Decorative Cover"},{code:"1F4D5",desc:"Closed Book"},{code:"1F4D6",desc:"Open Book"},{code:"1F4D7",desc:"Green Book"},{code:"1F4D8",desc:"Blue Book"},{code:"1F4D9",desc:"Orange Book"},{code:"1F4DA",desc:"Books"},{code:"1F4D3",desc:"Notebook"},{code:"1F4D2",desc:"Ledger"},{code:"1F4C3",desc:"Curl"},{code:"1F4DC",desc:"Scroll"},{code:"1F4C4",desc:"Page Facing Up"},{code:"1F4F0",desc:"Newspaper"},{code:"1F4D1",desc:"Bookmark Tabs"},{code:"1F516",desc:"Bookmark"},{code:"1F4B0",desc:"Money Bag"},{code:"1F4B4",desc:"Banknote with Yen Sign"},{code:"1F4B5",desc:"Banknote with Dollar Sign"},{code:"1F4B6",desc:"Banknote with Euro Sign"},{code:"1F4B7",desc:"Banknote with Pound Sign"},{code:"1F4B8",desc:"Money with Wings"},{code:"1F4B3",desc:"Credit Card"},{code:"1F4B9",desc:"Chart with Upwards Trend and Yen Sign"},{code:"1F4B1",desc:"Currency Exchange"},{code:"1F4B2",desc:"Heavy Dollar Sign"},{code:"2709",desc:"Envelope"},{code:"1F4E7",desc:"E-Mail Symbol"},{code:"1F4E8",desc:"Incoming Envelope"},{code:"1F4E9",desc:"Envelope with Downwards Arrow Above"},{code:"1F4E4",desc:"Outbox Tray"},{code:"1F4E5",desc:"Inbox Tray"},{code:"1F4E6",desc:"Package"},{code:"1F4BE",desc:"Closed Mailbox with Raised Flag"},{code:"1F4EA",desc:"Closed Mailbox with Lowered Flag"},{code:"1F4EC",desc:"Open Mailbox with Raised Flag"},{code:"1F4ED",desc:"Open Mailbox with Lowered Flag"},{code:"1F5F3",desc:"Postbox"},{code:"270F",desc:"Pencil"},{code:"2712",desc:"Black Nib"},{code:"1F4DD",desc:"Memo"},{code:"1F4BC",desc:"Briefcase"},{code:"1F4C1",desc:"File Folder"},{code:"1F4C2",desc:"Open File Folder"},{code:"1F4C5",desc:"Calender"},{code:"1F4C6",desc:"Tear-off Calender"},{code:"1F4C7",desc:"Card Index"},{code:"1F4C8",desc:"Chart with Upwards Trend"},{code:"1F4C9",desc:"Chart with Downwards Trend"},{code:"1F4CA",desc:"Bar Chart"},{code:"1F4CB",desc:"Clipboard"},{code:"1F4CC",desc:"Pushpin"},{code:"1F4CD",desc:"Round Pushpin"},{code:"1F4CE",desc:"Paperclip"},{code:"1F4CF",desc:"Straight Ruler"},{code:"1F4D0",desc:"Triangular Ruler"},{code:"2702",desc:"Black Scissors"},{code:"1F512",desc:"Lock"},{code:"1F513",desc:"Open Lock"},{code:"1F50F",desc:"Lock with Ink Pen"},{code:"1F510",desc:"Closed Lock with Key"},{code:"1F511",desc:"Key"},{code:"1F528",desc:"Hammer"},{code:"1F52B",desc:"Pistol"},{code:"1F527",desc:"Wrench"},{code:"1F529",desc:"Nut and Bolt"},{code:"1F517",desc:"Link Symbol"},{code:"1F489",desc:"Syringe"},{code:"1F48A",desc:"Pill"},{code:"1F6AC",desc:"Smoking Symbol"},{code:"1F5FF",desc:"Moyai"},{code:"1F52E",desc:"Crystal Ball"}]},{id:"symbols",name:"Symbols",code:"1F3E7",emoticons:[{code:"1F3E7",desc:"Automated Teller Machine"},{code:"1F6AE",desc:"Put Litter in Its Place Symbol"},{code:"1F6B0",desc:"Potable Water Symbol"},{code:"267F",desc:"Wheelchair Symbol"},{code:"1F6B9",desc:"Mens Symbol"},{code:"1F6BA",desc:"Womens Symbol"},{code:"1F6BB",desc:"Restroom"},{code:"1F6BC",desc:"Baby Symbol"},{code:"1F6BE",desc:"Water Closet"},{code:"1F6C2",desc:"Passport Control"},{code:"1F6C3",desc:"Customs"},{code:"1F6C4",desc:"Baggage Claim"},{code:"1F6C5",desc:"Left Luggage"},{code:"26A0",desc:"Warning Sign"},{code:"1F6B8",desc:"Children Crossing"},{code:"26D4",desc:"No Entry"},{code:"1F6AB",desc:"No Entry Sign"},{code:"1F6B3",desc:"No Bicycles"},{code:"1F6AD",desc:"No Smoking Symbol"},{code:"1F6AF",desc:"Do Not Litter Symbol"},{code:"1F6B1",desc:"Non-Potable Water Symbol"},{code:"1F6B7",desc:"No Pedestrians"},{code:"1F4F5",desc:"No Mobile Phones"},{code:"1F51E",desc:"No One Under Eighteen Symbol"},{code:"2B06",desc:"Upwards Black Arrow"},{code:"2197",desc:"North East Arrow"},{code:"27A1",desc:"Black Rightwards Arrow"},{code:"2198",desc:"South East Arrow"},{code:"2B07",desc:"Downwards Black Arrow"},{code:"2199",desc:"South West Arrow"},{code:"2B05",desc:"Leftwards Black Arrow"},{code:"2196",desc:"North West Arrow"},{code:"2195",desc:"Up Down Arrow"},{code:"2194",desc:"Left Right Arrow"},{code:"21A9",desc:"Leftwards Arrow with Hook"},{code:"21AA",desc:"Rightwards Arrow with Hook"},{code:"2934",desc:"Arrow Pointing Rightwards Then Curving Upwards"},{code:"2935",desc:"Arrow Pointing Rightwards Then Curving Downwards"},{code:"1F503",desc:"Clockwise Downwards and Upwards Open Circle Arrows"},{code:"1F504",desc:"Anticlockwise Downwards and Upwards Open Circle Arrows"},{code:"1F519",desc:"Back with Leftwards Arrow Above"},{code:"1F51A",desc:"End with Leftwards Arrow Above"},{code:"1F51B",desc:"On with Exclamation Mark with Left Right Arrow Above"},{code:"1F51C",desc:"Soon with Rightwards Arrow Above"},{code:"1F51D",desc:"Top with Upwards Arrow Above"},{code:"1F52F",desc:"Six Pointed Star with Middle Dot"},{code:"2648",desc:"Aries"},{code:"2649",desc:"Taurus"},{code:"264A",desc:"Gemini"},{code:"264B",desc:"Cancer"},{code:"264C",desc:"Leo"},{code:"264D",desc:"Virgo"},{code:"264E",desc:"Libra"},{code:"264F",desc:"Scorpius"},{code:"2650",desc:"Sagittarius"},{code:"2651",desc:"Capricorn"},{code:"2652",desc:"Aquarius"},{code:"2653",desc:"Pisces"},{code:"26CE",desc:"Ophiuchus"},{code:"1F500",desc:"Twisted Rightwards Arrows"},{code:"1F501",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows"},{code:"1F502",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows with Circled One Overlay"},{code:"25B6",desc:"Black Right-Pointing Triangle"},{code:"23E9",desc:"Black Right-Pointing Double Triangle"},{code:"25C0",desc:"Black Left-Pointing Triangle"},{code:"23EA",desc:"Black Left-Pointing Double Triangle"},{code:"1F53C",desc:"Up-Pointing Small Red Triangle"},{code:"23EB",desc:"Black Up-Pointing Double Triangle"},{code:"1F53D",desc:"Down-Pointing Small Red Triangle"},{code:"23EC",desc:"Black Down-Pointing Double Triangle"},{code:"1F3A6",desc:"Cinema"},{code:"1F505",desc:"Low Brightness Symbol"},{code:"1F506",desc:"High Brightness Symbol"},{code:"1F4F6",desc:"Antenna with Bars"},{code:"1F4F3",desc:"Vibration Mode"},{code:"1F4F4",desc:"Mobile Phone off"},{code:"267B",desc:"Black Universal Recycling Symbol"},{code:"1F531",desc:"Trident Emblem"},{code:"1F4DB",desc:"Name Badge"},{code:"1F530",desc:"Japanese Symbol for Beginner"},{code:"2B55",desc:"Heavy Large Circle"},{code:"2705",desc:"White Heavy Check Mark"},{code:"2611",desc:"Ballot Box with Check"},{code:"2714",desc:"Heavy Check Mark"},{code:"2716",desc:"Heavy Multiplication X"},{code:"274C",desc:"Cross Mark"},{code:"274E",desc:"Negative Squared Cross Mark"},{code:"2795",desc:"Heavy Plus Sign"},{code:"2796",desc:"Heavy Minus Sign"},{code:"2797",desc:"Heavy Division Sign"},{code:"27B0",desc:"Curly Loop"},{code:"27BF",desc:"Double Curly Loop"},{code:"303D",desc:"Part Alternation Mark"},{code:"2733",desc:"Eight Spoked Asterisk"},{code:"2734",desc:"Eight Pointed Black Star"},{code:"2747",desc:"Sparkle"},{code:"203C",desc:"Double Exclamation Mark"},{code:"2049",desc:"Exclamation Question Mark"},{code:"2753",desc:"Black Question Mark Ornament"},{code:"2754",desc:"White Question Mark Ornament"},{code:"2755",desc:"White Exclamation Mark Ornament"},{code:"2757",desc:"Heavy Exclamation Mark Symbol"},{code:"3030",desc:"Wavy Dash"},{code:"2122",desc:"Trade Mark Sign"},{code:"1F51F",desc:"Keycap Ten"},{code:"1F4AF",desc:"Hundred Points Symbol"},{code:"1F520",desc:"Input Symbol for Latin Capital Letters"},{code:"1F521",desc:"Input Symbol for Latin Small Letters"},{code:"1F522",desc:"Input Symbol for Numbers"},{code:"1F523",desc:"Input Symbol for Symbols"},{code:"1F524",desc:"Input Symbol for Latin Letters"},{code:"1F170",desc:"Negative Squared Latin Capital Letter a"},{code:"1F18E",desc:"Negative Squared Ab"},{code:"1F171",desc:"Negative Squared Latin Capital Letter B"},{code:"1F191",desc:"Squared Cl"},{code:"1F192",desc:"Squared Cool"},{code:"1F193",desc:"Squared Free"},{code:"2139",desc:"Information Source"},{code:"1F194",desc:"Squared Id"},{code:"24C2",desc:"Circled Latin Capital Letter M"},{code:"1F195",desc:"Squared New"},{code:"1F196",desc:"Squared Ng"},{code:"1F17E",desc:"Negative Squared Latin Capital Letter O"},{code:"1F197",desc:"Squared Ok"},{code:"1F17F",desc:"Negative Squared Latin Capital Letter P"},{code:"1F198",desc:"Squared Sos"},{code:"1F199",desc:"Squared Up with Exclamation Mark"},{code:"1F19A",desc:"Squared Vs"},{code:"1F201",desc:"Squared Katakana Koko"},{code:"1F202",desc:"Squared Katakana Sa"},{code:"1F237",desc:"Squared Cjk Unified Ideograph-6708"},{code:"1F236",desc:"Squared Cjk Unified Ideograph-6709"},{code:"1F22F",desc:"Squared Cjk Unified Ideograph-6307"},{code:"1F250",desc:"Circled Ideograph Advantage"},{code:"1F239",desc:"Squared Cjk Unified Ideograph-5272"},{code:"1F21A",desc:"Squared Cjk Unified Ideograph-7121"},{code:"1F232",desc:"Squared Cjk Unified Ideograph-7981"},{code:"1F251",desc:"Circled Ideograph Accept"},{code:"1F238",desc:"Squared Cjk Unified Ideograph-7533"},{code:"1F234",desc:"Squared Cjk Unified Ideograph-5408"},{code:"1F233",desc:"Squared Cjk Unified Ideograph-7a7a"},{code:"3297",desc:"Circled Ideograph Congratulation"},{code:"3299",desc:"Circled Ideograph Secret"},{code:"1F23A",desc:"Squared Cjk Unified Ideograph-55b6"},{code:"1F235",desc:"Squared Cjk Unified Ideograph-6e80"},{code:"25AA",desc:"Black Small Square"},{code:"25AB",desc:"White Small Square"},{code:"25FB",desc:"White Medium Square"},{code:"25FC",desc:"Black Medium Square"},{code:"25FD",desc:"White Medium Small Square"},{code:"25FE",desc:"Black Medium Small Square"},{code:"2B1B",desc:"Black Large Square"},{code:"2B1C",desc:"White Large Square"},{code:"1F536",desc:"Large Orange Diamond"},{code:"1F537",desc:"Large Blue Diamond"},{code:"1F538",desc:"Small Orange Diamond"},{code:"1F539",desc:"Small Blue Diamond"},{code:"1F53A",desc:"Up-Pointing Red Triangle"},{code:"1F53B",desc:"Down-Pointing Red Triangle"},{code:"1F4A0",desc:"Diamond Shape with a Dot Inside"},{code:"1F518",desc:"Radio Button"},{code:"1F532",desc:"Black Square Button"},{code:"1F533",desc:"White Square Button"},{code:"26AA",desc:"Medium White Circle"},{code:"26AB",desc:"Medium Black Circle"},{code:"1F534",desc:"Large Red Circle"},{code:"1F535",desc:"Large Blue Circle"}]},{id:"flags",name:"Flags",code:"1F3C1",emoticons:[{code:"1f3c1",desc:"Chequered Flag"},{code:"1f1e8-1f1f3",desc:"China Flag"},{code:"1f38c",desc:"Crossed Flags"},{code:"1f1e9-1f1ea",desc:"Germany Flag"},{code:"1f1ea-1f1f8",desc:"Spain Flag"},{code:"1f1e6-1f1e8",desc:"Ascension Island Flag"},{code:"1f1e6-1f1e9",desc:"Andorra Flag"},{code:"1f1e6-1f1ea",desc:"United Arab Emirates Flag"},{code:"1f1e6-1f1eb",desc:"Afghanistan Flag"},{code:"1f1e6-1f1ec",desc:"Antigua & Barbuda Flag"},{code:"1f1e6-1f1ee",desc:"Anguilla Flag"},{code:"1f1e6-1f1f1",desc:"Albania Flag"},{code:"1f1e6-1f1f2",desc:"Armenia Flag"},{code:"1f1e6-1f1f4",desc:"Angola Flag"},{code:"1f1e6-1f1f6",desc:"Antarctica Flag"},{code:"1f1e6-1f1f7",desc:"Argentina Flag"},{code:"1f1e6-1f1f8",desc:"American Samoa Flag"},{code:"1f1e6-1f1f9",desc:"Austria Flag"},{code:"1f1e6-1f1fa",desc:"Australia Flag"},{code:"1f1e6-1f1fc",desc:"Aruba Flag"},{code:"1f1e6-1f1fd",desc:"\xc5land Islands Flag"},{code:"1f1e6-1f1ff",desc:"Azerbaijan Flag"},{code:"1f1e7-1f1e7",desc:"Barbados Flag"},{code:"1f1e7-1f1e9",desc:"Bangladesh Flag"},{code:"1f1e7-1f1ea",desc:"Belgium Flag"},{code:"1f1e7-1f1eb",desc:"Burkina Faso Flag"},{code:"1f1e7-1f1ec",desc:"Bulgaria Flag"},{code:"1f1e7-1f1ed",desc:"Bahrain Flag"},{code:"1f1e7-1f1ee",desc:"Burundi Flag"},{code:"1f1e7-1f1ef",desc:"Benin Flag"},{code:"1f1e7-1f1f1",desc:"St. Barth\xe9lemy Flag"},{code:"1f1e7-1f1f2",desc:"Bermuda Flag"},{code:"1f1e7-1f1f4",desc:"Bolivia Flag"},{code:"1f1e7-1f1f6",desc:"Caribbean Netherlands Flag"},{code:"1f1e7-1f1f7",desc:"Brazil Flag"},{code:"1f1e7-1f1f8",desc:"Bahamas Flag"},{code:"1f1e7-1f1f9",desc:"Bhutan Flag"},{code:"1f1e7-1f1fb",desc:"Bouvet Island Flag"},{code:"1f1e7-1f1fc",desc:"Botswana Flag"},{code:"1f1e7-1f1fe",desc:"Belarus Flag"},{code:"1f1e7-1f1ff",desc:"Belize Flag"},{code:"1f1e8-1f1e6",desc:"Canada Flag"},{code:"1f1e8-1f1e8",desc:"Cocos (keeling) Islands Flag"},{code:"1f1e8-1f1e9",desc:"Congo - Kinshasa Flag"},{code:"1f1e8-1f1eb",desc:"Central African Republic Flag"},{code:"1f1e8-1f1ec",desc:"Congo - Brazzaville Flag"},{code:"1f1e8-1f1ed",desc:"Switzerland Flag"},{code:"1f1e8-1f1ee",desc:"C\xf4te D\u2019ivoire Flag"},{code:"1f1e8-1f1f0",desc:"Cook Islands Flag"},{code:"1f1e8-1f1f1",desc:"Chile Flag"},{code:"1f1e8-1f1f2",desc:"Cameroon Flag"},{code:"1f1e8-1f1f4",desc:"Colombia Flag"},{code:"1f1e8-1f1f7",desc:"Costa Rica Flag"},{code:"1f1e8-1f1fa",desc:"Cuba Flag"},{code:"1f1e8-1f1fb",desc:"Cape Verde Flag"},{code:"1f1e8-1f1fc",desc:"Cura\xe7ao Flag"},{code:"1f1e8-1f1fd",desc:"Christmas Island Flag"},{code:"1f1e8-1f1fe",desc:"Cyprus Flag"},{code:"1f1e8-1f1ff",desc:'Czechia Flag"'},{code:"1f1e9-1f1ec",desc:"Diego Garcia Flag"},{code:"1f1e9-1f1ef",desc:"Djibouti Flag"},{code:"1f1e9-1f1f0",desc:"Denmark Flag"},{code:"1f1e9-1f1f2",desc:"Dominica Flag"},{code:"1f1e9-1f1f4",desc:"Dominican Republic Flag"},{code:"1f1e9-1f1ff",desc:"Algeria Flag"},{code:"1f1ea-1f1e6",desc:"Ceuta & Melilla Flag"},{code:"1f1ea-1f1e8",desc:"Ecuador Flag"},{code:"1f1ea-1f1ea",desc:"Estonia Flag"},{code:"1f1ea-1f1ec",desc:"Egypt Flag"},{code:"1f1ea-1f1ed",desc:"Western Sahara Flag"},{code:"1f1ea-1f1f7",desc:"Eritrea Flag"},{code:"1f1ea-1f1f9",desc:"Ethiopia Flag"},{code:"1f1ea-1f1fa",desc:"European Union Flag"},{code:"1f1eb-1f1ee",desc:"Finland Flag"},{code:"1f1eb-1f1ef",desc:"Fiji Flag"},{code:"1f1eb-1f1f0",desc:"Falkland Islands Flag"},{code:"1f1eb-1f1f2",desc:"Micronesia Flag"},{code:"1f1eb-1f1f4",desc:"Faroe Islands Flag"},{code:"1f1ec-1f1e6",desc:"Gabon Flag"},{code:"1f1ec-1f1e9",desc:"Grenada Flag"},{code:"1f1ec-1f1ea",desc:"Georgia Flag"},{code:"1f1ec-1f1eb",desc:"French Guiana Flag"},{code:"1f1ec-1f1ec",desc:"Guernsey Flag"},{code:"1f1ec-1f1ed",desc:"Ghana Flag"},{code:"1f1ec-1f1ee",desc:"Gibraltar Flag"},{code:"1f1ec-1f1f1",desc:"Greenland Flag"},{code:"1f1ec-1f1f2",desc:"Gambia Flag"},{code:"1f1ec-1f1f3",desc:"Guinea Flag"},{code:"1f1ec-1f1f5",desc:"Guadeloupe Flag"},{code:"1f1ec-1f1f6",desc:"Equatorial Guinea Flag"},{code:"1f1ec-1f1f7",desc:"Greece Flag"},{code:"1f1ec-1f1f8",desc:"South Georgia & South Sandwich Islands Flag"},{code:"1f1ec-1f1f9",desc:"Guatemala Flag"},{code:"1f1ec-1f1fa",desc:"Guam Flag"},{code:"1f1ec-1f1fc",desc:"Guinea-Bissau Flag"},{code:"1f1ec-1f1fe",desc:"Guyana Flag"},{code:"1f1ed-1f1f0",desc:"Hong Kong Sar China Flag"},{code:"1f1ed-1f1f2",desc:"Heard & Mcdonald Islands Flag"},{code:"1f1ed-1f1f3",desc:"Honduras Flag"},{code:"1f1ed-1f1f7",desc:"Croatia Flag"},{code:"1f1ed-1f1f9",desc:"Haiti Flag"},{code:"1f1ed-1f1fa",desc:"Hungary Flag"},{code:"1f1ee-1f1e8",desc:"Canary Islands Flag"},{code:"1f1ee-1f1e9",desc:"Indonesia Flag"},{code:"1f1ee-1f1ea",desc:"Ireland Flag"},{code:"1f1ee-1f1f1",desc:"Israel Flag"},{code:"1f1ee-1f1f2",desc:"Isle of Man Flag"},{code:"1f1ee-1f1f3",desc:"India Flag"},{code:"1f1ee-1f1f4",desc:"British Indian Ocean Territory Flag"},{code:"1f1ee-1f1f6",desc:"Iraq Flag"},{code:"1f1ee-1f1f7",desc:"Iran Flag"},{code:"1f1ee-1f1f8",desc:"Iceland Flag"},{code:"1f1ef-1f1ea",desc:"Jersey Flag"},{code:"1f1ef-1f1f2",desc:"Jamaica Flag"},{code:"1f1ef-1f1f4",desc:"Jordan Flag"},{code:"1f1f0-1f1ea",desc:"Kenya Flag"},{code:"1f1f0-1f1ec",desc:"Kyrgyzstan Flag"},{code:"1f1f0-1f1ed",desc:"Cambodia Flag"},{code:"1f1f0-1f1ee",desc:"Kiribati Flag"},{code:"1f1f0-1f1f2",desc:"Comoros Flag"},{code:"1f1f0-1f1f3",desc:"St. Kitts & Nevis Flag"},{code:"1f1f0-1f1f5",desc:"North Korea Flag"},{code:"1f1f0-1f1fc",desc:"Kuwait Flag"},{code:"1f1f0-1f1fe",desc:"Cayman Islands Flag"},{code:"1f1f0-1f1ff",desc:"Kazakhstan Flag"},{code:"1f1f1-1f1e6",desc:"Laos Flag"},{code:"1f1f1-1f1e7",desc:"Lebanon Flag"},{code:"1f1f1-1f1e8",desc:"St. Lucia Flag"},{code:"1f1f1-1f1ee",desc:"Liechtenstein Flag"},{code:"1f1f1-1f1f0",desc:"Sri Lanka Flag"},{code:"1f1f1-1f1f7",desc:"Liberia Flag"},{code:"1f1f1-1f1f8",desc:"Lesotho Flag"},{code:"1f1f1-1f1f9",desc:"Lithuania Flag"},{code:"1f1f1-1f1fa",desc:"Luxembourg Flag"},{code:"1f1f1-1f1fb",desc:"Latvia Flag"},{code:"1f1f1-1f1fe",desc:"Libya Flag"},{code:"1f1f2-1f1e6",desc:"Morocco Flag"},{code:"1f1f2-1f1e8",desc:"Monaco Flag"},{code:"1f1f2-1f1e9",desc:"Moldova Flag"},{code:"1f1f2-1f1ea",desc:"Montenegro Flag"},{code:"1f1f2-1f1eb",desc:"St. Martin Flag"},{code:"1f1f2-1f1ec",desc:"Madagascar Flag"},{code:"1f1f2-1f1ed",desc:"Marshall Islands Flag"},{code:"1f1f2-1f1f0",desc:"Macedonia Flag"},{code:"1f1f2-1f1f1",desc:"Mali Flag"},{code:"1f1f2-1f1f2",desc:"Myanmar (burma) Flag"},{code:"1f1f2-1f1f3",desc:"Mongolia Flag"},{code:"1f1f2-1f1f4",desc:"Macau Sar China Flag"},{code:"1f1f2-1f1f5",desc:"Northern Mariana Islands Flag"},{code:"1f1f2-1f1f6",desc:"Martinique Flag"},{code:"1f1f2-1f1f7",desc:"Mauritania Flag"},{code:"1f1f2-1f1f8",desc:"Montserrat Flag"},{code:"1f1f2-1f1f9",desc:"Malta Flag"},{code:"1f1f2-1f1fa",desc:"Mauritius Flag"},{code:"1f1f2-1f1fb",desc:"Maldives Flag"},{code:"1f1f2-1f1fc",desc:"Malawi Flag"},{code:"1f1f2-1f1fd",desc:"Mexico Flag"},{code:"1f1f2-1f1fe",desc:"Malaysia Flag"},{code:"1f1f2-1f1ff",desc:"Mozambique Flag"},{code:"1f1f3-1f1e6",desc:"Namibia Flag"},{code:"1f1f3-1f1e8",desc:"New Caledonia Flag"},{code:"1f1f3-1f1ea",desc:"Niger Flag"},{code:"1f1f3-1f1eb",desc:"Norfolk Island Flag"},{code:"1f1f3-1f1ec",desc:"Nigeria Flag"},{code:"1f1f3-1f1ee",desc:"Nicaragua Flag"},{code:"1f1f3-1f1f1",desc:"Netherlands Flag"},{code:"1f1f3-1f1f4",desc:"Norway Flag"},{code:"1f1f3-1f1f5",desc:"Nepal Flag"},{code:"1f1f3-1f1f7",desc:"Nauru Flag"},{code:"1f1f3-1f1fa",desc:"Niue Flag"},{code:"1f1f3-1f1ff",desc:"New Zealand Flag"},{code:"1f1f4-1f1f2",desc:"Oman Flag"},{code:"1f1f8-1f1ff",desc:"Swaziland Flag"},{code:"1f1f5-1f1e6",desc:"Panama Flag"},{code:"1f1f5-1f1ea",desc:"Peru Flag"},{code:"1f1f5-1f1eb",desc:"French Polynesia Flag"},{code:"1f1f5-1f1ec",desc:"Papua New Guinea Flag"},{code:"1f1f5-1f1ed",desc:"Philippines Flag"},{code:"1f1f5-1f1f0",desc:"Pakistan Flag"},{code:"1f1f5-1f1f1",desc:"Poland Flag"},{code:"1f1f5-1f1f2",desc:"St. Pierre & Miquelon Flag"},{code:"1f1f5-1f1f3",desc:"Pitcairn Islands Flag"},{code:"1f1f5-1f1f7",desc:"Puerto Rico Flag"},{code:"1f1f5-1f1f8",desc:"Palestinian Territories Flag"},{code:"1f1f5-1f1f9",desc:"Portugal Flag"},{code:"1f1f5-1f1fc",desc:"Palau Flag"},{code:"1f1f5-1f1fe",desc:"Paraguay Flag"},{code:"1f1f6-1f1e6",desc:"Qatar Flag"},{code:"1f1f7-1f1ea",desc:"R\xe9union Flag"},{code:"1f1f7-1f1f4",desc:"Romania Flag"},{code:"1f1f7-1f1f8",desc:"Serbia Flag"},{code:"1f1f7-1f1fc",desc:"Rwanda Flag"},{code:"1f1f8-1f1e6",desc:"Saudi Arabia Flag"},{code:"1f1f8-1f1e7",desc:"Solomon Islands Flag"},{code:"1f1f8-1f1e8",desc:"Seychelles Flag"},{code:"1f1f8-1f1e9",desc:"Sudan Flag"},{code:"1f1f8-1f1ea",desc:"Sweden Flag"},{code:"1f1f8-1f1ec",desc:"Singapore Flag"},{code:"1f1f8-1f1ee",desc:"Slovenia Flag"},{code:"1f1f8-1f1ed",desc:"St. Helena Flag"},{code:"1f1f8-1f1ef",desc:"Svalbard & Jan Mayen Flag"},{code:"1f1f8-1f1f1",desc:"Sierra Leone Flag"},{code:"1f1f8-1f1f2",desc:"San Marino Flag"},{code:"1f1f8-1f1f3",desc:"Senegal Flag"},{code:"1f1f8-1f1f4",desc:"Somalia Flag"},{code:"1f1f8-1f1f7",desc:"Suriname Flag"},{code:"1f1f8-1f1f8",desc:"South Sudan Flag"},{code:"1f1f8-1f1f9",desc:"S\xe3o Tom\xe9 & Pr\xedncipe Flag"},{code:"1f1f8-1f1fb",desc:"El Salvador Flag"},{code:"1f1f8-1f1fd",desc:"Sint Maarten Flag"},{code:"1f1f8-1f1fe",desc:"Syria Flag"},{code:"1f1f9-1f1e6",desc:"Tristan Da Cunha Flag"},{code:"1f1f9-1f1e8",desc:"Turks & Caicos Islands Flag"},{code:"1f1f9-1f1eb",desc:"French Southern Territories Flag"},{code:"1f1f9-1f1ec",desc:"Togo Flag"},{code:"1f1f9-1f1ed",desc:"Thailand Flag"},{code:"1f1f9-1f1ef",desc:"Tajikistan Flag"},{code:"1f1f9-1f1f0",desc:"Tokelau Flag"},{code:"1f1f9-1f1f1",desc:"Timor-Leste Flag"},{code:"1f1f9-1f1f2",desc:"Turkmenistan Flag"},{code:"1f1f9-1f1f3",desc:"Tunisia Flag"},{code:"1f1f9-1f1f4",desc:"Tonga Flag"},{code:"1f1f9-1f1f7",desc:"Turkey Flag"},{code:"1f1f9-1f1f9",desc:"Trinidad & Tobago Flag"},{code:"1f1f9-1f1fb",desc:"Tuvalu Flag"},{code:"1f1f9-1f1fc",desc:"Taiwan Flag"},{code:"1f1f9-1f1ff",desc:"Tanzania Flag"},{code:"1f1fa-1f1e6",desc:"Ukraine City Flag"},{code:"1f1fa-1f1ec",desc:"Uganda Flag"},{code:"1f1fa-1f1f2",desc:"U.s. Outlying Islands Flag"},{code:"1f1fa-1f1fe",desc:"Uruguay Flag"},{code:"1f1fa-1f1ff",desc:"Uzbekistan Flag"},{code:"1f1fb-1f1e6",desc:"Vatican City Flag"},{code:"1f1fb-1f1e8",desc:"St. Vincent & Grenadines Flag"},{code:"1f1fb-1f1ea",desc:"Venezuela Flag"},{code:"1f1fb-1f1ec",desc:"British Virgin Islands Flag"},{code:"1f1fb-1f1ee",desc:"U.s. Virgin Islands Flag"},{code:"1f1fb-1f1f3",desc:"Vietnam Flag"},{code:"1f1fc-1f1f8",desc:"Samoa Flag"},{code:"1f1fb-1f1fa",desc:"Vanuatu Flag"},{code:"1f1fc-1f1eb",desc:'"Wallis & Futuna Flag'},{code:"1f1fd-1f1f0",desc:"Kosovo Flag"},{code:"1f1fe-1f1ea",desc:"Yemen Flag"},{code:"1f1fe-1f1f9",desc:"Mayotte Flag"},{code:"1f1ff-1f1e6",desc:"South Africa Flag"},{code:"1f1ff-1f1f2",desc:"Zambia Flag"},{code:"1f1ff-1f1fc",desc:"Zimbabwe Flag"},{code:"1f1eb-1f1f7",desc:"France Flag"},{code:"1f1ec-1f1e7",desc:"United Kingdom Flag"},{code:"1f1ee-1f1f9",desc:"Italy Flag"},{code:"1f1ef-1f1f5",desc:"Japan Flag"},{code:"1f1f0-1f1f7",desc:"South Korea Flag"},{code:"1f1f7-1f1fa",desc:"Russia Flag"},{code:"1F6A9",desc:"Triangular Flag on Post"},{code:"1f1fa-1f1f8",desc:"United States Flag"}]}],emoticonsButtons:["emoticonsBack","|"],emoticonsUseImage:!0}),Rt.PLUGINS.emoticons=function(_){var E=_.$,r=_.opts.emoticonsSet,i=r&&r[0],o="";function s(){if(!_.selection.isCollapsed())return!1;var e=_.selection.element(),t=_.selection.endElement();if(e&&_.node.hasClass(e,"fr-emoticon"))return e;if(t&&_.node.hasClass(t,"fr-emoticon"))return t;var a=_.selection.ranges(0),n=a.startContainer;if(n.nodeType==Node.ELEMENT_NODE&&0<n.childNodes.length&&0<a.startOffset){var r=n.childNodes[a.startOffset-1];if(_.node.hasClass(r,"fr-emoticon"))return r}return!1}function l(){return"".concat(function n(e,t){return'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function a(e,n){var r="";return e.forEach(function(e){var t={image:e.code.toLowerCase()},a={elementClass:e.id===n.id?"fr-active fr-active-tab":"",emoticonsUnicodeClass:_.opts.emoticonsUseImage?"":"fr-tabs-unicode",title:_.language.translate(e.name),dataCmd:"setEmoticonCategory",dataParam1:e.id,image:_.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(t.image,'.svg"/>'):"&#x".concat(t.image,";")};r+='<button class="fr-command fr-btn '.concat(a.elementClass," ").concat(a.emoticonsUnicodeClass,'" \n title="').concat(a.title,'" data-cmd="').concat(a.dataCmd,'" data-param1="').concat(a.dataParam1,'">\n ').concat(a.image," </button>")}),r}(e,t),"\n </div>")}(r,i),"\n ").concat(function a(e){return'\n <div class="fr-icon-container fr-emoticon-container">\n '.concat(function t(e){var r="";return e.emoticons.forEach(function(e){var t=e.code.split("-").reduce(function(e,t){return e?"".concat(e,"&zwj;&#x").concat(t.toLowerCase(),";"):"&#x".concat(t.toLowerCase(),";")},""),a={image:e.code.toLowerCase(),compiledCode:e.uCode?e.uCode:t},n={dataParam1:e.code.toLowerCase(),dataParam2:a.compiledCode,title:_.language.translate(e.desc),image:_.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(a.image,'.svg"/>'):"".concat(a.compiledCode),desc:_.language.translate(e.desc)};r+='<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(n.dataParam1,'" tabindex="0"\n data-param2="').concat(n.dataParam2,'" title="').concat(n.title,'" >\n ').concat(n.image,'<span class="fr-sr-only">').concat(n.desc,"&nbsp;&nbsp;&nbsp;</span></span>")}),r}(e),"\n </div>\n ")}(i),"\n ").concat(function e(){return _.opts.emoticonsUseImage?'<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>':""}())}return{_init:function e(){var a=function a(){for(var e=_.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),t=0;t<e.length;t++)e[t].className+=" fr-deletable"};a(),_.events.on("html.set",a),_.events.on("keydown",function(e){if(_.keys.isCharacter(e.which)&&_.selection.inEditor()){var t=_.selection.ranges(0),a=s();_.node.hasClass(a,"fr-emoticon-img")&&a&&(0===t.startOffset&&_.selection.element()===a?E(a).before(Rt.MARKERS+Rt.INVISIBLE_SPACE):E(a).after(Rt.INVISIBLE_SPACE+Rt.MARKERS),_.selection.restore())}}),_.events.on("keyup",function(e){for(var t=_.el.querySelectorAll(".fr-emoticon"),a=0;a<t.length;a++)"undefined"!=typeof t[a].textContent&&0===t[a].textContent.replace(/\u200B/gi,"").length&&E(t[a]).remove();if(!(e.which>=Rt.KEYCODE.ARROW_LEFT&&e.which<=Rt.KEYCODE.ARROW_DOWN)){var n=s();_.node.hasClass(n,"fr-emoticon-img")&&(E(n).append(Rt.MARKERS),_.selection.restore())}})},insert:function c(e,t){var a=s(),n=_.selection.ranges(0);a?(0===n.startOffset&&_.selection.element()===a?E(a).before(Rt.MARKERS+Rt.INVISIBLE_SPACE):0<n.startOffset&&_.selection.element()===a&&n.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&E(a).after(Rt.INVISIBLE_SPACE+Rt.MARKERS),_.selection.restore(),_.html.insert('<span class="fr-emoticon fr-deletable'.concat(t?" fr-emoticon-img":"",'"').concat(t?' style="background: url('.concat(t,');"'):"",">").concat(t?"&nbsp;":e,"</span>&nbsp;").concat(Rt.MARKERS),!0)):_.html.insert('<span class="fr-emoticon fr-deletable'.concat(t?" fr-emoticon-img":"",'"').concat(t?' style="background: url('.concat(t,');"'):"",">").concat(t?"&nbsp;":e,"</span>").concat(Rt.INVISIBLE_SPACE),!0)},setEmoticonCategory:function n(t){i=r.filter(function(e){return e.id===t})[0],function a(){_.popups.get("emoticons").html(o+l());var e=_.popups.get("emoticons").children().not(".fr-buttons");_.accessibility.registerPopup("emoticons"),_.accessibility.focusContent(e)}()},showEmoticonsPopup:function d(){var e=_.popups.get("emoticons");if(e||(e=function i(){_.opts.toolbarInline&&0<_.opts.emoticonsButtons.length&&(o='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(_.button.buildList(_.opts.emoticonsButtons),"</div>"));var e={buttons:o,custom_layer:l()},t=_.popups.create("emoticons",e);return function a(b){_.events.on("popup.tab",function(e){var t=E(e.currentTarget);if(!_.popups.isVisible("emoticons")||!t.is("span, a"))return!0;var a,n,r,i=e.which,o=window.getComputedStyle(b.find(".fr-icon-container")[0]),s=o.getPropertyValue("grid-template-columns").split(" ").length;if(Rt.KEYCODE.TAB==i){var l=b.find("span.fr-emoticon");if(t.is(l.first())&&e.shiftKey||t.is("a")&&!e.shiftKey){var c=b.find(".fr-buttons");a=!_.accessibility.focusToolbar(c,!!e.shiftKey)}if(!1!==a){var d=b.find("span.fr-emoticon");d.add(b.find("a.fr-link")),d.add(b.find("button.fr-btn")),n=d.index(t),n=e.shiftKey?((n-1)%d.length+d.length)%d.length:(n+1)%d.length,r=d.get(n),_.events.disableBlur(),r.focus(),a=!1}}else if(Rt.KEYCODE.ARROW_UP==i||Rt.KEYCODE.ARROW_DOWN==i||Rt.KEYCODE.ARROW_LEFT==i||Rt.KEYCODE.ARROW_RIGHT==i){if(t.is("span.fr-emoticon")){var f=t.parent().find("span.fr-emoticon");n=f.index(t);var p=s,u=Math.ceil(f.length/p),g=n%p,h=Math.floor(n/p),m=h*p+g,v=u*p;Rt.KEYCODE.ARROW_UP==i?m=((m-p)%v+v)%v:Rt.KEYCODE.ARROW_DOWN==i?m=(m+p)%v:Rt.KEYCODE.ARROW_LEFT==i?m=((m-1)%v+v)%v:Rt.KEYCODE.ARROW_RIGHT==i&&(m=(m+1)%v),r=E(f.get(m)),_.events.disableBlur(),r.focus(),a=!1}}else Rt.KEYCODE.ENTER==i&&(t.is("a")?t[0].click():_.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){_.popups.refresh("emoticons"),_.popups.setContainer("emoticons",_.$tb);var t=_.$tb.find('.fr-command[data-cmd="emoticons"]'),a=_.button.getPosition(t),n=a.left,r=a.top;_.popups.show("emoticons",n,r,t.outerHeight())}},back:function t(){_.popups.hide("emoticons"),_.toolbar.showInline()}}},Rt.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),Rt.RegisterCommand("emoticons",{title:"Emoticons",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("emoticons")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("emoticons")):this.emoticons.showEmoticonsPopup()},plugin:"emoticons"}),Rt.RegisterCommand("insertEmoticon",{callback:function(e,t,a){this.emoticons.insert(a,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(t,".svg"):null),this.popups.hide("emoticons")}}),Rt.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,t){this.emoticons.setEmoticonCategory(t)}}),Rt.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}}),Object.assign(Rt.DEFAULTS,{entities:"&quot;&#39;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&OElig;&oelig;&Scaron;&scaron;&Yuml;&fnof;&circ;&tilde;&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&Omega;&alpha;&beta;&gamma;&delta;&epsilon;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsilon;&phi;&chi;&psi;&omega;&thetasym;&upsih;&piv;&ensp;&emsp;&thinsp;&zwnj;&zwj;&lrm;&rlm;&ndash;&mdash;&lsquo;&rsquo;&sbquo;&ldquo;&rdquo;&bdquo;&dagger;&Dagger;&bull;&hellip;&permil;&prime;&Prime;&lsaquo;&rsaquo;&oline;&frasl;&euro;&image;&weierp;&real;&trade;&alefsym;&larr;&uarr;&rarr;&darr;&harr;&crarr;&lArr;&uArr;&rArr;&dArr;&hArr;&forall;&part;&exist;&empty;&nabla;&isin;&notin;&ni;&prod;&sum;&minus;&lowast;&radic;&prop;&infin;&ang;&and;&or;&cap;&cup;&int;&there4;&sim;&cong;&asymp;&ne;&equiv;&le;&ge;&sub;&sup;&nsub;&sube;&supe;&oplus;&otimes;&perp;&sdot;&lceil;&rceil;&lfloor;&rfloor;&lang;&rang;&loz;&spades;&clubs;&hearts;&diams;"}),Rt.PLUGINS.entities=function(r){var i,o,s=r.$;function n(e){var t=e.textContent;if(t.match(i)){for(var a="",n=0;n<t.length;n++)o[t[n]]?a+=o[t[n]]:a+=t[n];e.textContent=a}}function l(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var t=r.node.contents(e),a=0;a<t.length;a++)t[a].nodeType===Node.TEXT_NODE?n(t[a]):l(t[a]);return e.nodeType===Node.TEXT_NODE&&n(e),!1}var c=function c(e){return 0===e.length?"":r.clean.exec(e,l).replace(/\&amp;/g,"&")};return{_init:function d(){r.opts.htmlSimpleAmpersand||(r.opts.entities="".concat(r.opts.entities,"&amp;"));var e=s(document.createElement("div")).html(r.opts.entities).text(),t=r.opts.entities.split(";");o={},i="";for(var a=0;a<e.length;a++){var n=e.charAt(a);o[n]="".concat(t[a],";"),i+="\\".concat(n+(a<e.length-1?"|":""))}i=new RegExp("(".concat(i,")"),"g"),r.events.on("html.get",c,!0)}}},Object.assign(Rt.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(Rt.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadToAzure:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),Rt.PLUGINS.file=function(w){var n,p=w.$,y="https://i.froala.com/upload",u=2,g=3,h=4,A=5,C=6,a={};function T(){var e=w.popups.get("file.insert");e||(e=l()),e.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),e.find(".fr-file-progress-bar-layer").addClass("fr-active"),e.find(".fr-buttons").hide(),r(w.language.translate("Uploading"),0)}function i(e){var t=w.popups.get("file.insert");t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-file-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e&&(w.events.focus(),w.popups.hide("file.insert")))}function r(e,t){var a=w.popups.get("file.insert");if(a){var n=a.find(".fr-file-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function m(e,t,a,n){var r;w.edit.on(),w.events.focus(!0),w.selection.restore(),w.opts.fileUseSelectedText&&w.selection.text().length&&(t=w.selection.text());var i='<a href="'.concat(e,'" id="fr-inserted-file" ');if(void 0!==n)for(r in n)n.hasOwnProperty(r)&&"link"!=r&&(i+="".concat(r,'="').concat(n[r],'" '));-1==i.indexOf(' class="')&&(i+='class="fr-file" '),i+=">".concat(t,"</a>"),w.html.insert(i);var o=w.$el.find("#fr-inserted-file");o.removeAttr("id"),w.popups.hide("file.insert"),w.undo.saveStep(),d(),w.events.trigger("file.inserted",[o,a])}function S(e,t,a){var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(w.opts.fileUploadToS3||w.opts.fileUploadToAzure)if(201===n){var s;if(w.opts.fileUploadToAzure){if(!1===w.events.trigger("file.uploadedToAzure",[this.responseURL,a,r],!0))return w.edit.on(),!1;s=t}else s=function c(e){try{var t=p(e).find("Location").text(),a=p(e).find("Key").text();return!1===w.events.trigger("file.uploadedToS3",[t,a,e],!0)?(w.edit.on(),!1):t}catch(n){return L(h,e),!1}}(i);s&&m(s,e,r||i)}else L(h,r||i);else if(200<=n&&n<300){var l=function d(e){try{if(!1===w.events.trigger("file.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(L(u,e),!1)}catch(a){return L(h,e),!1}}(o);l&&m(l.link,e,r||o,l)}else L(g,r||o)}catch(f){L(h,r||o)}}function R(){L(h,this.response||this.responseText||this.responseXML)}function k(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;r(w.language.translate("Uploading"),t)}}function L(e,t){w.edit.on(),function n(e){T();var t=w.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),w.events.disableBlur(),a.focus()}(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("file.error",[{code:e,message:a[e]},t])}function x(){w.edit.on(),i(!0)}function o(e){if(void 0!==e&&0<e.length){var t=e[0].type;if(e[0].name&&e[0].name.endsWith(".msg")&&(t="application/vnd.ms-outlook"),!1===w.events.trigger("file.beforeUpload",[e]))return!1;var a,n=e[0];if(!(null!==w.opts.fileUploadURL&&w.opts.fileUploadURL!==y||w.opts.fileUploadToS3||w.opts.fileUploadToAzure))return function E(i){var o=new FileReader;o.onload=function(){for(var e=o.result,t=atob(o.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));var r=i.type;i.name&&i.name.endsWith(".msg")&&(r="application/vnd.ms-outlook"),e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r})),w.file.insert(e,i.name,null)},T(),o.readAsDataURL(i)}(n),!1;if(n.size>w.opts.fileMaxSize)return L(A),!1;if(w.opts.fileAllowedTypes.indexOf("*")<0&&w.opts.fileAllowedTypes.indexOf(t.replace(/file\//g,""))<0)return L(C),!1;if(w.drag_support.formdata&&(a=w.drag_support.formdata?new FormData:null),a){var r;if(!1!==w.opts.fileUploadToS3)for(r in a.append("key",w.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(n.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",t),w.opts.fileUploadToS3.params)w.opts.fileUploadToS3.params.hasOwnProperty(r)&&a.append(r,w.opts.fileUploadToS3.params[r]);for(r in w.opts.fileUploadParams)w.opts.fileUploadParams.hasOwnProperty(r)&&a.append(r,w.opts.fileUploadParams[r]);a.append(w.opts.fileUploadParam,n);var i,o,s=w.opts.fileUploadURL;w.opts.fileUploadToS3&&(s=w.opts.fileUploadToS3.uploadURL?w.opts.fileUploadToS3.uploadURL:"https://".concat(w.opts.fileUploadToS3.region,".amazonaws.com/").concat(w.opts.fileUploadToS3.bucket));var l=w.opts.fileUploadMethod;w.opts.fileUploadToAzure&&(s=w.opts.fileUploadToAzure.uploadURL?"".concat(w.opts.fileUploadToAzure.uploadURL,"/").concat(n.name):encodeURI("https://".concat(w.opts.fileUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.fileUploadToAzure.container,"/").concat(n.name)),i=s,w.opts.fileUploadToAzure.SASToken&&(s+=w.opts.fileUploadToAzure.SASToken),l="PUT");var c=w.core.getXHR(s,l);if(w.opts.fileUploadToAzure){var d=(new Date).toUTCString();if(!w.opts.fileUploadToAzure.SASToken&&w.opts.fileUploadToAzure.accessKey){var f=w.opts.fileUploadToAzure.account,p=w.opts.fileUploadToAzure.container;if(w.opts.fileUploadToAzure.uploadURL){var u=w.opts.fileUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+n.name),m=l+"\n\n\n"+n.size+"\n\n"+t+"\n\n\n\n\n\n\n"+g+"\n"+h,v=w.cryptoJSPlugin.cryptoJS.HmacSHA256(m,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.fileUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;o=v,c.setRequestHeader("Authorization",b)}for(r in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",t),c.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.fileUploadParams)w.opts.fileUploadParams.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.fileUploadParams[r]);for(r in w.opts.fileUploadToAzure.params)w.opts.fileUploadToAzure.params.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.fileUploadToAzure.params[r])}c.onload=function(){S.call(c,n.name,i,o)},c.onerror=R,c.upload.onprogress=k,c.onabort=x,T();var _=w.popups.get("file.insert");_&&(_.off("abortUpload"),_.on("abortUpload",function(){4!==c.readyState&&c.abort()})),c.send(w.opts.fileUploadToAzure?n:a)}}}function s(){i()}function l(e){if(e)return w.popups.onHide("file.insert",s),!0;var t;w.opts.fileUpload||w.opts.fileInsertButtons.splice(w.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.fileInsertButtons),"</div>");var a="";w.opts.fileUpload&&(a='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'.concat(w.id,'"><strong>').concat(w.language.translate("Drop file"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" name="').concat(w.opts.fileUploadParam,'" accept="').concat(0<=w.opts.fileAllowedTypes.indexOf("*")?"/":"").concat(w.opts.fileAllowedTypes.join(", ").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-').concat(w.id,'" role="button"></div></div>'));var n={buttons:t,upload_layer:a,progress_bar:'<div class="fr-file-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="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'},r=w.popups.create("file.insert",n);return function i(a){w.events.$on(a,"dragover dragenter",".fr-file-upload-layer",function(){return p(this).addClass("fr-drop"),!1},!0),w.events.$on(a,"dragleave dragend",".fr-file-upload-layer",function(){return p(this).removeClass("fr-drop"),!1},!0),w.events.$on(a,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),p(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(a.data("instance")||w).file.upload(t.files)},!0),w.helpers.isIOS()&&w.events.$on(a,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){p(this).trigger("click")}),w.events.$on(a,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=a.data("instance")||w;e.events.disableBlur(),a.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}p(this).val("")},!0)}(r),r}function t(e){w.node.hasClass(e,"fr-file")}function c(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&"undefined"!=typeof a.type){if(a.type.indexOf("image")<0){if(!w.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(Rt.MARKERS),w.popups.hideAll();var n=w.popups.get("file.insert");return n||(n=l()),w.popups.setContainer("file.insert",w.$sc),w.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),T(),o(t.files),e.preventDefault(),e.stopPropagation(),!1}}else a.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function d(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("a.fr-file")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("href"));if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("href"))<0&&w.events.trigger("file.unlink",[n[e]]);n=t}return a[1]="File cannot be loaded from the passed link.",a[u]="No link in upload response.",a[g]="Error during file upload.",a[h]="Parsing response failed.",a[A]="File is too large.",a[C]="File file type is invalid.",a[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function f(){!function e(){w.events.on("drop",c),w.events.$on(w.$win,"keydown",function(e){var t=e.which,a=w.popups.get("file.insert");a&&t===Rt.KEYCODE.ESC&&a.trigger("abortUpload")}),w.events.on("destroy",function(){var e=w.popups.get("file.insert");e&&e.trigger("abortUpload")})}(),w.events.on("link.beforeRemove",t),w.$wp&&(d(),w.events.on("contentChanged",d)),l(!0)},showInsertPopup:function v(){var e=w.$tb.find('.fr-command[data-cmd="insertFile"]'),t=w.popups.get("file.insert");if(t||(t=l()),i(),!t.hasClass("fr-active"))if(w.popups.refresh("file.insert"),w.popups.setContainer("file.insert",w.$tb),e.isVisible){var a=w.button.getPosition(e),n=a.left,r=a.top;w.popups.show("file.insert",n,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("file.insert")},upload:o,insert:m,back:function e(){w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("file.insert"),w.toolbar.showInline()},hideProgressBar:i}},Rt.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),Rt.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()},plugin:"file"}),Rt.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(e){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"))}}),Rt.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}}),Object.assign(Rt.POPUP_TEMPLATES,{"filesManager.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_PROGRESS_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Rt.DEFAULTS,{filesInsertButtons:["imageBack","|","filesUpload","filesByURL","filesEmbed"],filesInsertButtons2:["deleteAll","insertAll","cancel","minimize"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,filesManagerUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,filesManagerUploadParam:"file",filesManagerUploadParams:{},googleOptions:{},filesManagerUploadToS3:!1,filesManagerUploadToAzure:!1,filesManagerUploadMethod:"POST",filesManagerMaxSize:10485760,filesManagerAllowedTypes:["*"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Rt.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" 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"}],Rt.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,Rt.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,Rt.IMAGE_TYPE="image/png",Rt.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,Rt.PLUGINS.filesManager=function(k){var w,o,L,l,c,d,s,f,x=k.$,y="https://i.froala.com/upload",p=!1,t=!1,I=new Map,O=new Map,A=new Map,C=new Map,M=new Map,T=new Map,i=0,r=[],u=-1,F=[],g=0,h=["file","image","imageTUI","video"],D=1,m=2,S=3,R=4,N=5,B=6,P=10,U=["video/avi","video/mpeg","video/x-ms-wmv"],v={};function b(){var e=k.popups.get("filesManager.insert"),t=e.find(".fr-files-by-url-layer input");t.val(""),e.find(".fr-files-embed-layer textarea").val("").trigger("change"),t.trigger("change")}function _(e){var t;k.hasOwnProperty("imageTUI")||(s="fr-disabled"),T.forEach(function(e,t){X(t)}),E()?(t=k.popups.get("filesManager.insert"))||(t=He()):(t=k.popups.get("filesManager.insert"))||(t=function o(){var e='<div class="fr-buttons fr-tabs">'.concat(k.button.buildList(k.opts.fileInsertButtons),"</div>"),t="<div style= 'padding:10px'>\n <div class = 'fr-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>".concat(k.language.translate(function r(){var e="",t=function a(){var t=[];return h.forEach(function(e){k.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();e=t.join(", "),1<t.length?e+=" plugin are":e+=" plugin is";return e}()+" not enabled. Do you want to enable?"),"</h3></div>\n <div style='text-align:right;'>\n <button class='fr-trim-button fr-plugins-enable'>").concat(k.language.translate("Enable"),"</button> \n <button class='fr-trim-button fr-plugins-cancel'>").concat(k.language.translate("Cancel"),"</button>\n </div>"),a={buttons:e,upload_layer:t,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},n=k.popups.create("filesManager.insert",a);return Me(n),n}());var a=k.$tb.find('.fr-command[data-cmd="insertFiles"]');if(J(),e||!t.hasClass("fr-active"))if(e||Q(),k.popups.refresh("filesManager.insert"),k.popups.setContainer("filesManager.insert",k.$tb),a.isVisible()){var n=k.button.getPosition(a,I.size),r=n.left,i=n.top;k.popups.show("filesManager.insert",r,i,a.outerHeight())}else k.position.forSelection(t),k.popups.show("filesManager.insert");k.popups.setPopupDimensions(t),E()&&k.popups.setFileListHeight(t),t.find(".fr-upload-progress")&&0==I.size&&t.find(".fr-upload-progress").addClass("fr-none")}function E(){var t=!0;return h.forEach(function(e){k.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}function H(){J()}function $(){if(l||function o(){var e;k.shared.$image_resizer?(l=k.shared.$image_resizer,d=k.shared.$img_overlay,k.events.on("destroy",function(){x("body").first().append(l.removeClass("fr-active"))},!0)):(k.shared.$image_resizer=x(document.createElement("div")).attr("class","fr-image-resizer"),l=k.shared.$image_resizer,k.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),k.opts.imageResize&&(l.append(z("nw")+z("ne")+z("sw")+z("se")),k.shared.$img_overlay=x(document.createElement("div")).attr("class","fr-image-overlay"),d=k.shared.$img_overlay,e=l.get(0).ownerDocument,x(e).find("body").first().append(d)));k.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,k.opts.imageResize&&(d.remove(),d=null)},!0),k.helpers.isMobile()||k.events.$on(x(k.o_win),"resize",function(){w&&!w.hasClass("fr-uploading")?at(!0):w&&($(),replace(),Z(!1))});if(k.opts.imageResize){e=l.get(0).ownerDocument,k.events.$on(l,k._mousedown,".fr-handler",K),k.events.$on(x(e),k._mousemove,G),k.events.$on(x(e.defaultView||e.parentWindow),k._mouseup,Y),k.events.$on(d,"mouseleave",Y);var n=1,r=null,i=0;k.events.on("keydown",function(e){if(w){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==Rt.KEYCODE.EQUALS||k.browser.mozilla&&a==Rt.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=je.call(this,e,1,1,n):(a==Rt.KEYCODE.HYPHEN||k.browser.mozilla&&a==Rt.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=je.call(this,e,2,-1,n):k.keys.ctrlKey(e)||a!=Rt.KEYCODE.ENTER||(w.before("<br>"),Ae(w)),r=a,i=e.timeStamp}},!0),k.events.on("keyup",function(){n=1})}}(),!w)return!1;var e=k.$wp||k.$sc;e.append(l),l.data("instance",k);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=k.helpers.getPX(e.css("border-left-width")),t-=k.helpers.getPX(e.css("border-top-width")),k.$el.is("img")&&k.$sc.is("body")&&(a=t=0);var n=lt();ct()&&(n=n.find(".fr-img-wrap"));var r=0,i=0;k.opts.iframe&&(r=k.helpers.getPX(k.$wp.find(".fr-iframe").css("padding-top")),i=k.helpers.getPX(k.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(k.opts.iframe?n.offset().top+r:n.offset().top+t)-1).css("left",(k.opts.iframe?n.offset().left+i:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function z(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function W(e){ct()?w.parents(".fr-img-caption").css("width",e):w.css("width",e)}function K(e){if(!k.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),k.$el.find("img.fr-error").left)return!1;k.undo.canDo()||k.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=k.$oel.get(0).ownerDocument,n=a.defaultView||a.parentWindow,r=!1;try{r=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(s){}r&&n.frameElement&&(t+=k.helpers.getPX(x(n.frameElement).offset().left)+n.frameElement.clientLeft)}(c=x(this)).data("start-x",t),c.data("start-width",w.width()),c.data("start-height",w.height());var i=w.width();if(k.opts.imageResizeWithPercent){var o=w.parentsUntil(k.$el,k.html.blockTagsQuery()).get(0)||k.el;i=(i/x(o).outerWidth()*100).toFixed(2)+"%"}W(i),d.show(),k.popups.hideAll(),it()}function G(e){if(!k.core.sameInstance(l))return!0;var t;if(c&&w){if(e.preventDefault(),k.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var n=a-c.data("start-x"),r=c.data("start-width");if((c.hasClass("fr-hnw")||c.hasClass("fr-hsw"))&&(n=0-n),k.opts.imageResizeWithPercent){var i=w.parentsUntil(k.$el,k.html.blockTagsQuery()).get(0)||k.el;r=((r+n)/x(i).outerWidth()*100).toFixed(2),k.opts.imageRoundPercent&&(r=Math.round(r)),W("".concat(r,"%")),(t=ct()?(k.helpers.getPX(w.parents(".fr-img-caption").css("width"))/x(i).outerWidth()*100).toFixed(2):(k.helpers.getPX(w.css("width"))/x(i).outerWidth()*100).toFixed(2))===r||k.opts.imageRoundPercent||W("".concat(t,"%")),w.css("height","").removeAttr("height")}else r+n>=k.opts.imageMinWidth&&(W(r+n),t=ct()?k.helpers.getPX(w.parents(".fr-img-caption").css("width")):k.helpers.getPX(w.css("width"))),t!==r+n&&W(t),((w.attr("style")||"").match(/(^height:)|(; *height:)/)||w.attr("height"))&&(w.css("height",c.data("start-height")*w.width()/c.data("start-width")),w.removeAttr("height"));$(),k.events.trigger("image.resize",[st()])}}function Y(e){if(!k.core.sameInstance(l))return!0;if(c&&w){if(e&&e.stopPropagation(),k.$el.find("img.fr-error").left)return!1;c=null,d.hide(),$(),k.undo.saveStep(),k.events.trigger("image.resizeEnd",[st()])}else l.removeClass("fr-active")}function V(){T.forEach(function(e,t){var a=k.popups.get("filesManager.insert");a.find(".fr-checkbox-file-"+t).get(0).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t)&&(document.getElementById("fr-file-autoplay-button-"+t).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.add("fr-checkbox-disabled"),document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.remove("fr-files-checkbox")),a.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),a.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled")})}function j(e,t,a,n){k.edit.on(),w&&w.addClass("fr-error"),v[e]?(e!=S&&e!=m&&e!=R||Ee(100,n,!0),T.set(n,v[e]),V(),function r(){T.forEach(function(e,t){k.popups.get("filesManager.insert"),document.getElementById("fr-file-edit-button-".concat(t))&&(document.getElementById("fr-file-edit-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-view-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-insert-button-".concat(t)).classList.add("fr-disabled"))})}(),ae(k.language.translate(v[e]),n)):ae(k.language.translate("Something went wrong. Please try again."),n),!w&&a&&qe(a),k.events.trigger("filesManager.error",[{code:e,message:v[e]},t,a])}function q(){var e=k.popups.get("filesManager.insert"),t=e.find('.fr-command[data-cmd="insertAll"]'),a=e.find('.fr-command[data-cmd="deleteAll"]'),n=!0;M.forEach(function r(e,t,a){M.get(t)&&(n=!1)}),n?t.addClass("fr-disabled"):t.removeClass("fr-disabled"),n?a.addClass("fr-disabled"):a.removeClass("fr-disabled")}function X(e){O.get(e)&&O.get(e).link&&k.events.trigger("filesManager.removed",[O.get(e).link]);var t=k.popups.get("filesManager.insert");t.find(".fr-file-"+e).get(0)!==undefined&&(t.find(".fr-file-"+e).get(0).outerHTML=""),O["delete"](e),I["delete"](e),M["delete"](e),q(),0==I.size&&(g=0),T["delete"](e),k.popups.setPopupDimensions(t,!0),k.opts.toolbarBottom?_(!0):k.popups.setPopupDimensions(t),t.find(".fr-upload-progress")&&0==I.size&&t.find(".fr-upload-progress").addClass("fr-none")}function Q(){for(var e=k.popups.get("filesManager.insert"),t=e.find(".fr-insert-checkbox"),a=0;a<t.length;a++)t.get(a).children.target.checked=!1,e.find(".fr-file-"+t.get(a).id.split("-").pop()).get(0).classList.add("fr-unchecked");if(L)document.getElementById("fr-file-autoplay-button-".concat(L))&&(document.getElementById("fr-file-autoplay-button-".concat(L)).checked=!1),F=F.filter(function(e){return e!=L});else{for(var n=e.find(".fr-file-autoplay-button"),r=0;r<n.length;r++)n.get(r).checked=!1;F=[]}M=new Map,q()}function Z(e){var t=k.popups.get("filesManager.insert");if(t||(t=He()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),w){var a=lt();k.popups.setContainer("filesManager.insert",k.$sc);var n=a.offset().left,r=a.offset().top+a.height();k.popups.show("filesManager.insert",n,r,a.outerHeight())}void 0===e&&ee(k.language.translate("Uploading"),0)}function J(e){var t=k.popups.get("filesManager.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||k.$el.find("img.fr-error").length)){if(k.events.focus(),k.$el.find("img.fr-error").length&&(k.$el.find("img.fr-error").remove(),k.undo.saveStep(),k.undo.run(),k.undo.dropRedo()),!k.$wp&&w){var a=w;at(!0),k.selection.setAfter(a.get(0)),k.selection.restore()}k.popups.hide("filesManager.insert")}}function ee(e,t){var a=k.popups.get("filesManager.insert");if(a){var n=a.find(".fr-files-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function te(e){Z();var t=k.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),k.events.disableBlur(),a.focus()}function ae(e,t){var a=k.popups.get("filesManager.insert"),n=a.find(".fr-upload-progress-layer"),r=a.find(".fr-file-".concat(t));n.addClass("fr-error"),r.find("h5").text(e)}v[D]="File cannot be loaded from the passed link.",v[m]="No link in upload response.",v[S]="Error during file upload.",v[R]="Parsing response failed.",v[N]="File is too large.",v[B]="File type is invalid.",v[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",v[8]="File is corrupted.",v[9]="Error during file loading.",v[P]="File upload cancelled";var a,ne,re,ie,oe,se,n,le,ce,de,fe="";function pe(e){fe=e,a=document.getElementsByClassName(e),Array.prototype.map.call(a,function(e){!function n(e){if(e.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),ne=e.pageX,re=e.pageY;var t=document.getElementById("filesList");re+20>t.getBoundingClientRect().bottom&&ue(t,0,10),re-20<t.getBoundingClientRect().top&&ue(t,0,-10)},!1),k.helpers.isMobile()){var t=e.getElementsByClassName("dot");t[0].addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;t&&!t.classList.contains(fe);)t=t.parentElement;for(var a=document.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);a&&!a.classList.contains(fe);)a=a.parentElement;var n=document.getElementsByClassName("fr-hovered-over-file");Array.prototype.forEach.call(n,function(e){e.classList.remove("fr-hovered-over-file")}),a&&!t.classList.contains("fr-unchecked")&&a.classList.add("fr-hovered-over-file");var r=document.getElementById("filesList");e.targetTouches[0].clientY+5>r.getBoundingClientRect().bottom&&ue(r,0,5),e.targetTouches[0].clientY-5<r.getBoundingClientRect().top&&ue(r,0,-5)},!1)}if(e.ondrag=ge,e.ondragend=he,k.helpers.isMobile()){var a=e.getElementsByClassName("dot");a[0].addEventListener("touchmove",ge,!1),a[0].addEventListener("touchend",he,!1)}}(e)})}function ue(e,t,a){e.scrollLeft+=t,e.scrollTop+=a}function ge(e){for(k.helpers.isMobile()&&(oe=event.touches[0].clientX,se=event.touches[0].clientY),ie=e.target;!ie.classList.contains(fe);)ie=ie.parentElement;ie.classList.contains(fe)&&!ie.classList.contains("fr-unchecked")?k.helpers.isMobile()&&ie.classList.add("drag-sort-active"):ie=undefined}function he(e){var t;if(ie!==undefined){var a,n;if(k.helpers.isMobile())for(a=oe,n=se,t=event.target;!t.classList.contains(fe);)t=t.parentElement;else a=event.clientX,n=event.clientY;k.helpers.isMobile()||!k.browser.safari&&!k.browser.mozilla||(a=ne,n=re);for(var r=document.elementFromPoint(a,n);r&&!r.classList.contains(fe);)r=r.parentElement;r&&!r.classList.contains(fe)?r=undefined:r&&ie!==r&&function s(e,t){var a,n,r=e.parentNode,i=t.parentNode;if(!r||!i||r.isEqualNode(t)||i.isEqualNode(e))return;for(var o=0;o<r.children.length;o++)r.children[o].isEqualNode(e)&&(a=o);for(var o=0;o<i.children.length;o++)i.children[o].isEqualNode(t)&&(n=o);r.isEqualNode(i)&&a<n&&n++;r.insertBefore(t,r.children[a]),i.insertBefore(e,i.children[n])}(ie,r),k.helpers.isMobile()&&(t.classList.remove("fr-hovered-over-file"),r.classList.remove("fr-hovered-over-file"))}}function me(e){var n=k.popups.get("filesManager.insert");n.find(".fr-upload-progress-layer").hasClass("fr-active")||n.find(".fr-upload-progress-layer").addClass("fr-active"),n.find(".fr-upload-progress").removeClass("fr-none");var t=I.get(e),a=function o(e){var t,a={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{t=e.toLocaleDateString(k.opts.language?k.opts.language:undefined,a)}catch(n){t=e.toLocaleDateString(undefined,a)}return t+""}(new Date),r=M.get(e)?"":"fr-unchecked ",i="\n <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(r,"' draggable = \"").concat(!r,'" >\n <div class=\'fr-file-item-left\' >\n\n \n <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n ').concat(k.helpers.isMobile()?"<div id='fr-pick-".concat(e,"}' class='dot'>\n </div>"):"",'\n <div id="checkbox-key-').concat(e,'" class="fr-files-checkbox fr-insert-checkbox fr-checkbox-').concat(e,'">\n <input name="target" class="fr-insert-attr fr-checkbox-file-').concat(e,' fr-file-insert-check" data-cmd="fileInsertCheckbox"\n data-checked="_blank" type="checkbox" id="fr-link-target-').concat(k.id,'" tabIndex="0" />\n <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>','\n </span>\n </div>\n <label id="fr-label-target-').concat(k.id,"\"></label>\n </div>\n \n <div class='fr-file-item-icon fr-file-item-icon-").concat(e,"' >\n <img src='https://secure.webtoolhub.com/static/resources/icons/set112/f2afb6f7.png' alt='Image preview' class='fr-thumbnail-padding' height='36px' width='36px' />\n </div>\n\n <div class='fr-file-item-description' >\n <div class='fr-file-name fr-files-manager-tooltip'>\n ").concat(function s(e,t,a){null==t&&(t=100);null==a&&(a="...");return e.length>t?e.substring(0,t-a.length)+a:e}(t.name,20),'\n <span class="').concat(20<t.name.length?"tooltiptext":"fr-none",'">').concat(t.name,"\n </span>\n </div>\n <div class='fr-file-details'>\n <div class='fr-file-date'>").concat(a,"\n </div>\n \n <div class='fr-file-size'>\n ").concat(function l(e){if(0==e)return"0 Bytes";var t=Math.floor(Math.log(e)/Math.log(1024));return" | "+1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][t]}(t.size),"\n </div>\n </div>\n\n <div class='fr-file-error'>\n <h5 class='fr-file-error-h5'></h5>\n </div>\n </div>\n \n </div>\n\n <div class='fr-file-item-right fr-file-item-right-").concat(e,"'>")+_e(e)+"</div>\n </div>";n.find(".fr-upload-progress-layer")[0].innerHTML=i+n.find(".fr-upload-progress-layer")[0].innerHTML,I.forEach(function c(e,t,a){M.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)}),F.forEach(function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0}),be(e,t),J(),k.opts.toolbarBottom?_(!0):k.popups.setPopupDimensions(n),pe("fr-file-list-item")}function ve(e){switch(e){case"application/msword":return k.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return k.icon.getFileIcon("docxIcon");case"image/gif":return k.icon.getFileIcon("gifIcon");case"image/jpeg":return k.icon.getFileIcon("jpegIcon");case"image/jpeg":return k.icon.getFileIcon("jpgIcon");case"type/text":return k.icon.getFileIcon("logIcon");case"video/quicktime":return k.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return k.icon.getFileIcon("mp3Icon");case"video/mp4":return k.icon.getFileIcon("mp4Icon");case"audio/ogg":return k.icon.getFileIcon("oggIcon");case"video/ogg":return k.icon.getFileIcon("ogvIcon");case"application/pdf":return k.icon.getFileIcon("pdfIcon");case"image/png":return k.icon.getFileIcon("pngIcon");case"text/plain":return k.icon.getFileIcon("txtIcon");case"video/webm":return k.icon.getFileIcon("webmIcon");case"image/webp":return k.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return k.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return k.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return k.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return k.icon.getFileIcon("zipIcon");default:return k.icon.getFileIcon("defaultIcon")}}function be(n,r,e){var i=k.popups.get("filesManager.insert"),t=i.find(".fr-file-item-icon-"+n).get(0);if(De(ke(r))&&"image/gif"!=ke(r)&&"image/webp"!=ke(r)){"a"!=t.children[0].localName&&(t.innerHTML="<a target='_blank' href=''>"+t.innerHTML+"</a>");i.find(".fr-file-item-icon-"+n).get(0).children[0].children[0];var o=new FileReader;if(null!=e&&e){var a=I.get(n);r.name=a.name,I.set(n,r)}if(o.onloadend=function(){i.find(".fr-file-item-icon-"+n).get(0).children[0].children[0].src=o.result;for(var e=atob(o.result.split(",")[1]),t=[],a=0;a<e.length;a++)t.push(e.charCodeAt(a));i.find(".fr-file-item-icon-"+n).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:ke(r)})),i.find(".fr-file-item-icon-"+n).get(0).classList.add("fr-file-item-thumbnail-hover")},r)o.readAsDataURL(r);else{var s=ve(ke(r));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(s.path,"\n </svg>")}}else{var l=ve(ke(r));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(l.path,"\n </svg>")}}function _e(e){var t="";if(Be(ke(I.get(e)))){var a="fr-files-checkbox",n="";Ue(ke(I.get(e)))||(a="fr-checkbox-disabled",n="disabled");t='\n <div class="fr-files-checkbox-line align-autoplay">\n <div id="checkbox-key-'.concat(e,'" class="').concat(a," fr-autoplay-checkbox fr-checkbox-").concat(e,'"> \n \n <input type="checkbox" id="fr-file-autoplay-button-').concat(e,'" class="fr-file-button-').concat(e,' fr-file-autoplay-button" data-title="Edit" data-param1="').concat(e,'" role="button" ').concat(n,"/>\n\n <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>\n </div> \n <label class='fr-autoplay-checkbox-label'>Autoplay </label>\n </div>")}var r="application/msword",i="application/vnd.openxmlformats-officedocument.wordprocessingml.document",o="";return!Pe(ke(I.get(e)))&&Ue(ke(I.get(e)))||(s="fr-disabled"),Be(ke(I.get(e)))&&(s="fr-disabled"),Ne(ke(I.get(e)))&&(s="fr-disabled",ke(I.get(e))!=r&&ke(I.get(e))!=i||k.opts.googleOptions&&!k.helpers.isMobile()&&k.opts.googleOptions.API_KEY&&k.opts.googleOptions.CLIENT_ID&&(s=""),"text/plain"!=ke(I.get(e))&&ke(I.get(e))!=r&&"application/pdf"!=ke(I.get(e))&&ke(I.get(e))!=i&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=ke(I.get(e))&&"application/vnd.ms-excel"!=ke(I.get(e))&&"type/text"!=ke(I.get(e))||(o="")),"video/url"===ke(I.get(e))&&(s="fr-disabled"),t+='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-insert-button-'.concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-").concat(e," fr-file-insert-button-").concat(e,' fr-file-insert-button" data-cmd="imageInsertByUpload" data-title="Insert" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-5 0 28 28" xlmns = "http://w3.org/200/svg"><path d = \'M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 \'></path></svg>\n </button>\n\n <button type="button" id="fr-file-edit-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(s," fr-img-icon fr-btn fr-command fr-submit \n fr-file-action-icons fr-file-edit-button-").concat(e," fr-file-button-").concat(e,' fr-file-edit-button" data-cmd="editImage" data-title="Edit" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "0 4 25 25" xlmns = "http://w3.org/200/svg"><path d = \'M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z\'></path></svg>\n </button>\n \n <span class="fr-file-view-').concat(e,'"><button type="button" id="fr-file-view-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(o," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-view-button-").concat(e,' fr-file-view-button" data-cmd="viewImage" data-title="View" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "15 19 21 21" xlmns = "http://w3.org/200/svg"> <path style="fill:none;stroke-width:0.9077;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 19.086094 16.541466 C 16.185625 16.541466 14.318281 19.447115 14.318281 19.447115 L 14.318281 19.555288 C 14.318281 19.555288 16.176719 22.475962 19.077187 22.475962 C 21.977656 22.475962 23.847969 19.576322 23.847969 19.576322 L 23.847969 19.465144 C 23.847969 19.465144 21.989531 16.541466 19.086094 16.541466 Z M 19.07125 21.024639 C 18.248906 21.024639 17.583906 20.357572 17.583906 19.53726 C 17.583906 18.716947 18.248906 18.04988 19.07125 18.04988 C 19.890625 18.04988 20.555625 18.716947 20.555625 19.53726 C 20.555625 20.357572 19.890625 21.024639 19.07125 21.024639 Z M 19.07125 21.024639 " transform="matrix(1.315789,0,0,1.3,0,0)"/></svg></button></span>\n\n <button type="button" id="fr-file-delete-button-').concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons\n fr-file-button-").concat(e,' fr-file-delete-button" data-cmd="deleteImage" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n \n </div>\n <div id="user_area-').concat(e,"\" style=\"display: none;\">\n \n <div id=\"file_container\"></div>\n\n <div style='display:block;text-align: center; margin-left:50%; id='edit-file-loader' class='fr-file-loader'></div>\n\n </div> \n ")}function Ee(e,t,a){var n=k.popups.get("filesManager.insert");if(!a&&e<=100){n.find(".fr-checkbox-file-"+t).get(0).disabled=!0,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled");var r=n.find(".fr-file-progress-circle-"+t),i=n.find(".fr-file-upload-percent-"+t);return 50<e?r.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)+" over50"):r.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)),i.get(0).innerHTML=Math.floor(e)+"%",void we(t,e,a)}a&&(n.find(".fr-checkbox-file-"+t).get(0).disabled=!1,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-checkbox-disabled"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-files-checkbox"),n.find(".fr-file-item-right-"+t).get(0).innerHTML=_e(t),we(t,100,a))}function we(e,t,a){var n=k.popups.get("filesManager.insert");n.find(".fr-progress-bar").removeClass("fr-none").addClass("fr-display-block"),n.find(".fr-upload-progress").hasClass("fr-height-set")&&k.popups.setFileListHeight(n);var r=0;C.set(e,t),C.forEach(function(e,t){r+=e}),r/=C.size,100==t&&a&&i++,n.find('.fr-command[data-cmd="filesUpload"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').addClass("fr-disabled"),n.find(".fr-progress-bar").get(0).style.width=r+"%",i==C.size&&(n.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),C=new Map,i=0,n.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"))}function ye(a,n){J(),k.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),a.forEach(function(e,t){De(ke(e))&&k.opts.imageUploadRemoteUrls&&k.opts.imageCORSProxy&&k.opts.imageUpload?Oe(e,a,w,n[t]):O.set(n[t],e)})}function Ae(e){e&&e.get&&function a(e){if("false"==x(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&de)return!0;if(e&&k.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Rt.INSTANCES.length;t++)Rt.INSTANCES[t]!=k&&Rt.INSTANCES[t].events.trigger("image.hideResizer");k.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault());k.helpers.isMobile()&&(k.events.disableBlur(),k.$el.blur(),k.events.enableBlur());k.opts.iframe&&k.size.syncIframe();w=x(this),$(),k.browser.msie?(k.popups.areVisible()&&k.events.disableBlur(),k.win.getSelection&&(k.win.getSelection().removeAllRanges(),k.win.getSelection().addRange(k.doc.createRange()))):k.selection.clear();k.helpers.isIOS()&&(k.events.disableBlur(),k.$el.blur());k.button.bulkRefresh(),k.events.trigger("video.hideResizer")}.call(e.get(0))}function Ce(){var e=x(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==r.length||0<r.length&&r.length==u)&&(f=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?k.selection.setAfter(e.parent()):k.selection.setAfter(e),k.undo.saveStep(),k.events.trigger("filesManager.loaded",[e]),Se(r)}function Te(){var e,t=Array.prototype.slice.call(k.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),x(t[e]).toggleClass("fr-draggable",k.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("src"))<0&&k.events.trigger("video.removed",[x(n[e])]);n=t}function Se(e){if(null!=e){if(0==e.length)return void(null!=f&&("VIDEO"==f.get(0).tagName?k.video._editVideo(f.parent()):"IMG"==f.get(0).tagName?k.image.edit(f):f.trigger("click"),k.toolbar.disable()));Le(e.shift(),e)}}function Re(e){var t=!1;if(Be(ke(O.get(e))))k.trimVideoPlugin.trimVideo(I.get(e),e,I),t=!0;else if(De(ke(O.get(e)))){var a=O.get(e).link,n=k.o_doc.createElement("img");n.src=a,w=n,o=e,k.imageTUI.launch(k,!1,e),t=!0}else if(Ne(ke(O.get(e)))){var r={apiKey:k.opts.googleOptions.API_KEY,clientId:k.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:I.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};ce=function d(p){var i,e=["https://www.googleapis.com/discovery/v1/apis/drive/v2/rest"],u="id,title,mimeType,userPermission,editable,copyable,shared,fileSize",g="-------314159265358979323846",h="\r\n--"+g+"\r\n",m="\r\n--"+g+"--",t=(document.getElementById(p.authorizeButton),document.getElementById(p.userArea));p.events||(p.events={});function a(){gapi.client.init({apiKey:p.apiKey,clientId:p.clientId,discoveryDocs:e,scope:"https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata"}).then(function(){gapi.auth2.getAuthInstance().isSignedIn.listen(n),n(gapi.auth2.getAuthInstance().isSignedIn.get()),function t(e){!gapi.auth2.getAuthInstance().isSignedIn.get()||gapi.auth.getToken()!==undefined&&gapi.auth.getToken().access_token===undefined?Promise.resolve(gapi.auth2.getAuthInstance().signIn()).then(function(){o()}):o()}()},function(e){p.events.onError(e)})}function n(e){e&&(t.style.display="block")}function r(e){var t=gapi.auth.getToken().access_token,a=i,n="https://docs.google.com/feeds/download/documents/export/Export?id="+a+"&format=docx&access_token="+t,r=new XMLHttpRequest;r.open("get",n),r.responseType="arraybuffer",r.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),t=I.get(p.fileIndex);e.name=t.name,e.lastModified=t.lastModified,e.lastModifiedDate=t.lastModifiedDate,I.set(p.fileIndex,e),k.filesManager.upload(e,O,w,p.fileIndex),l()},r.send()}function o(e){!function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),a=0;a<t.length;a++)t[a].setAttribute("disabled",!0),t[a].classList.add("fr-disabled")}(p.fileIndex);var t=p.file;t?function a(c,d){var f=new FileReader;f.readAsArrayBuffer(c),f.onload=function(e){for(var t={title:c.name,mimeType:"application/vnd.google-apps.document"},a="",n=new Uint8Array(f.result),r=n.byteLength,i=0;i<r;i++)a+=String.fromCharCode(n[i]);var o=btoa(a),s=h+"Content-Type: application/json; charset=UTF-8\r\n\r\n"+JSON.stringify(t)+h+"Content-Type: application/octet-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+o+m,l=gapi.client.request({path:"/upload/drive/v2/files",method:"POST",params:{uploadType:"multipart",fields:u},headers:{"Content-Type":'multipart/related; boundary="'+g+'"',"Content-Length":s.Length},body:s});d||(d=function(e){}),l.execute(function(e,t){e.error?p.events.onError(e.error):d(e)})}}(t,s):p.events.onInvalidFile("File is not selected")}function s(e){i=e.id;var t="https://docs.google.com/document/d/"+e.id+"/edit",a=k.o_doc.body,n=k.o_doc.createElement("div");n.setAttribute("id","editDocContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;width: 100%;height: 100%;background: rgba(255,255,255,1);z-index: 9998;display:block",n.innerHTML='<div style="margin-top:25px; text-align:center"><label>Sign Out : </label><input type="checkbox" id ="markSignOut" role="button"/> <button id="signout_button" class="fr-trim-button" >Save </button> <button id="cancel_file_edit" class="fr-trim-button">Cancel</button></div> <iframe title="Edit your file" frameBorder="0" width="100%" height="700px" src="'+t+'"></iframe>',a.appendChild(n),document.getElementById("signout_button").onclick=r,document.getElementById("cancel_file_edit").onclick=l}function l(){document.getElementById("markSignOut").checked&&gapi.auth2.getAuthInstance().signOut().then(function(){gapi.auth.getToken()&&(gapi.auth.getToken().access_token=undefined)});var e=document.getElementById("editDocContainer");e.parentNode.removeChild(e),document.getElementById("user_area-".concat(p.fileIndex))&&(document.getElementById("user_area-".concat(p.fileIndex)).style.display="none"),function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),a=0;a<t.length;a++)t[a].removeAttribute("disabled"),t[a].classList.remove("fr-disabled")}(p.fileIndex)}p.events.onInvalidFile=p.events.onInvalidFile||function(e){},p.events.onError=p.events.onError||function(e){};var c={};return c.handleClientLoad=function(){gapi.load("client:auth2",a)},c}(r),function i(e,t){var n=function n(e,t){var a=document.createElement("script");a.src=e,a.onload=function(){this.onload=function(){},ce.handleClientLoad()},a.onreadystatechange=function(){"complete"===this.readyState&&this.onload()},(document.getElementsByTagName("head")[0]||document.body).appendChild(a)};!function a(){0!=e.length?n(e.shift(),a):t&&t()}()}(["https://apis.google.com/js/api.js"],function(){})}t&&(p=!0)}function ke(e){var a;if(""!=e.type)return e.type;if(e.name&&e.name.endsWith(".msg"))return a="application/vnd.ms-outlook";var n=/(?:\.([^.]+))?$/.exec(e.name)[1];return[[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".txt","text/plain"],[".log","type/text"],[".mov","video/quicktime"],[".mp3","audio/mpeg"],[".mp4","video/mp4"],[".ogg","audio/ogg"],[".ogv","video/ogg"],[".pdf","application/pdf"],[".png","image/png"],[".webm","video/webm"],[".webp","image/webp"],[".wmv","video/x-ms-wmv"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".zip","application/x-zip-compressed"]].forEach(function(e,t){e[0]==".".concat(n)&&(a=e[1])}),a}function Le(s,e){if(Ne(ke(O.get(s)))||!Ue(ke(O.get(s)))){var t,a=O.get(s).link,n=O.get(s).text,r=O.get(s).data;!n&&I.get(s)&&I.get(s).name&&(n=I.get(s).name);var i=O.get(s).response;k.edit.on(),k.events.focus(!0),k.selection.restore(),k.opts.fileUseSelectedText&&k.selection.text().length&&(n=k.selection.text());var o='<a href="'.concat(a,'" target="_blank" id="fr-inserted-file" ');if(void 0!==r)for(t in r)r.hasOwnProperty(t)&&"link"!=t&&(o+="".concat(t,'="').concat(r[t],'" '));-1==o.indexOf(' class="')&&(o+='class="fr-file" '),o+=">".concat(n,"</a>"),k.html.insert(o);var l=k.$el.find("#fr-inserted-file");l.removeAttr("id"),k.undo.saveStep(),function T(){var e,t=Array.prototype.slice.call(k.el.querySelectorAll("a.fr-file")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("href"));if(le)for(e=0;e<le.length;e++)a.indexOf(le[e].getAttribute("href"))<0&&k.events.trigger("file.unlink",[le[e]]);le=t}(),k.selection.clear(),k.selection.setAfter(l),k.events.trigger("file.inserted",[l,i]),Se(e)}if(De(ke(O.get(s)))&&Ue(ke(O.get(s)))){var c=O.get(s).link,d=O.get(s).sanitize,f=O.get(s).data,p=O.get(s).$existing_img,u=O.get(s).response;p&&"string"==typeof p&&(p=k.$(p)),k.edit.off(),ee(k.language.translate("Loading image")),d&&(c=k.helpers.sanitizeURL(c));var g=new Image;g.onload=function(){var e,t;if(p){k.undo.canDo()||p.hasClass("fr-uploading")||k.undo.saveStep();var a=p.data("fr-old-src");p.data("fr-image-pasted")&&(a=null),k.$wp?((e=p.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&p.attr("src",a),p.replaceWith(e)):e=p;for(var n=e.get(0).attributes,r=0;r<n.length;r++){var i=n[r];0===i.nodeName.indexOf("data-")&&e.removeAttr(i.nodeName)}if(void 0!==f)for(t in f)f.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),f[t]);e.on("load",Ce),e.attr("src",c),k.edit.on(),k.undo.saveStep(),k.events.disableBlur(),k.$el.blur(),k.events.trigger(a?"image.replaced":"image.inserted",[e,u])}else e=function s(e,t,a){var n,r=x(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),r.attr("data-".concat(n),t[n]));var i=k.opts.imageDefaultWidth;i&&"auto"!=i&&(i=k.opts.imageResizeWithPercent?"100%":"".concat(i,"px"));r.attr("style",i?"width: ".concat(i,";"):""),ot(r,k.opts.imageDefaultDisplay,k.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),k.edit.on(),k.events.focus(!0),k.selection.restore(),k.undo.saveStep(),k.opts.imageSplitHTML?k.markers.split():k.markers.insert();k.html.wrap();var o=k.$el.find(".fr-marker");o.length?(o.parent().is("hr")&&o.parent().after(o),k.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r)):k.$el.append(r);return r}(c,f,Ce),k.undo.saveStep(),k.events.disableBlur(),k.$el.blur(),k.events.trigger("image.inserted",[e,u])},g.onerror=function(){j(D,null,null,s),Se(e)},g.src=c}if((Be(ke(O.get(s)))||Pe(ke(O.get(s))))&&Ue(ke(O.get(s))))if(L=s,"video/url"==ke(O.get(s))){var h=!1;if(document.getElementById("fr-file-autoplay-button-"+s)!==undefined&&(h=document.getElementById("fr-file-autoplay-button-"+s).checked),h&&O.get(s)!==undefined&&-1<O.get(s).video.indexOf("iframe")&&O.get(s).video.indexOf("autoplay=1")<0){var m=O.get(s).video.substring(O.get(s).video.indexOf("src")+3),v="&";(m=(m=m.substring(m.indexOf('"')+1)).substring(0,m.indexOf('"'))).indexOf("?")<0&&(v="?"),O.get(s).video=O.get(s).video.replace(m,m+=v+"autoplay=1&mute=1")}else!h&&O.get(s).video.indexOf(!1)&&(-1<O.get(s).video.indexOf("&autoplay=1")&&(O.get(s).video=O.get(s).video.replace("&autoplay=1","")),-1<O.get(s).video.indexOf("?autoplay=1")&&(O.get(s).video=O.get(s).video.replace("?autoplay=1","")));k.events.focus(!0),k.selection.restore(),k.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(O.get(s).video,"</span>"),!1,k.opts.videoSplitHTML),k.popups.hide("filesManager.insert");var b=k.$el.find(".fr-jiv");b.removeClass("fr-jiv"),b.toggleClass("fr-rv",k.opts.videoResponsive),function S(e,t,a){!k.opts.htmlUntouched&&k.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(b,k.opts.videoDefaultDisplay,k.opts.videoDefaultAlign),b.toggleClass("fr-draggable",k.opts.videoMove),k.events.trigger("video.inserted",[b]),Ce.call(b)}else{var _=O.get(s).link,E=O.get(s).sanitize,w=O.get(s).data,y=O.get(s).$existing_img,A=O.get(s).response;k.edit.off(),E&&(_=k.helpers.sanitizeURL(_)),function R(){var e,t;if(y){k.undo.canDo()||y.find("video").hasClass("fr-uploading")||k.undo.saveStep();var a=y.find("video").data("fr-old-src"),n=y.data("fr-replaced");y.data("fr-replaced",!1),k.$wp?((e=y.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&y.find("video").attr("src",a),y.replaceWith(e)):e=y;for(var r=e.find("video").get(0).attributes,i=0;i<r.length;i++){var o=r[i];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==w)for(t in w)w.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),w[t]);e.find("video").on("canplay",Ce),e.find("video").attr("src",_),k.edit.on(),Te(),k.undo.saveStep(),k.$el.blur(),k.events.trigger(n?"video.replaced":"video.inserted",[e,A])}else e=function u(e,t,a,n,r){var i,o="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(o+=" data-".concat(i,'="').concat(t[i],'"'));var s,l=k.opts.videoDefaultWidth;l&&"auto"!=l&&(l="".concat(l,"px"));if(Pe(n))s=x(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+k.opts.videoDefaultDisplay[0]+("center"!=k.opts.videoDefaultAlign?" fr-fv"+k.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+o+" controls>"+k.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var c="",d=document.getElementById("fr-file-autoplay-button-"+r).checked;d&&(c="autoplay"),s=x(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+k.opts.videoDefaultDisplay[0]+("center"!=k.opts.videoDefaultAlign?" fr-fv"+k.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+o+(l?' style="width: '+l+';" ':"")+c+" controls>"+k.language.translate("Your browser does not support HTML5 video.")+"</video>")}s.toggleClass("fr-draggable",k.opts.videoMove),k.edit.on(),k.events.focus(!0),k.selection.restore(),k.undo.saveStep(),k.opts.videoSplitHTML?k.markers.split():k.markers.insert();k.html.wrap();var f=k.$el.find(".fr-marker");k.node.isLastSibling(f)&&f.parent().hasClass("fr-deletable")&&f.insertAfter(f.parent());f.replaceWith(s);var p="";p=Pe(n)?"audio":"video",s.find(p).get(0).readyState>s.find(p).get(0).HAVE_FUTURE_DATA||k.helpers.isIOS()?a.call(s.find(p).get(0)):(s.find(p).on("canplaythrough load",a),s.find(p).on("error",a));return s}(_,w,Ce,ke(O.get(s)),s),Te(),k.undo.saveStep(),k.events.trigger("video.inserted",[e,A])}()}k.popups.hide("filesManager.insert"),M["delete"](s);var C=k.popups.get("filesManager.insert");C.find("input.fr-insert-attr.fr-checkbox-file-".concat(s))[0].checked=!1,C.find(".fr-file-"+s).get(0).classList.add("fr-unchecked"),q(),document.getElementById("fr-file-autoplay-button-"+s)&&(document.getElementById("fr-file-autoplay-button-"+s).checked=!1),F=F.filter(function(e){return e!=s})}function xe(e,t){try{if(!1===k.events.trigger("filesManager.uploaded",[e],!0))return k.edit.on(),!1;var a=JSON.parse(e);return a.link?a:(j(m,e,null,t),!1)}catch(n){return j(R,e,null,t),!1}}function Ie(e,t){try{var a=x(e).find("Location").text(),n=x(e).find("Key").text();return!1===k.events.trigger("filesManager.uploadedToS3",[a,n,e],!0)?(k.edit.on(),!1):a}catch(r){return j(R,e,null,t),!1}}function Oe(e,t,a,n){if(-1<U.indexOf(ke(e))||!ke(e))return j(B,null,null,n),!1;if(!1===k.events.trigger("filesManager.beforeUpload",[t]))return!1;if(!(null!==k.opts.filesManagerUploadURL&&k.opts.filesManagerUploadURL!=y||k.opts.filesManagerUploadToS3||k.opts.filesManagerUploadToAzure))return function _(s,l,c){var d=new FileReader;d.onload=function(){var e=d.result;if(d.result.indexOf("svg+xml")<0){for(var t=atob(d.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));if(e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:ke(l)})),De(ke(l))){var r={link:e,sanitize:!1,data:null,$existing_img:c,response:null,type:ke(l)};O.set(s,r)}if(Ne(ke(l))){var i={link:e,text:l.name,response:null,type:ke(l)};O.set(s,i)}if(Be(ke(l))||Pe(ke(l))){var o={link:e,sanitize:!1,data:null,$existing_img:c,type:ke(l)};O.set(s,o)}}},d.readAsDataURL(l)}(n,e),!1;if(De(ke(e))&&(e.name||(e.name=(new Date).getTime()+"."+(ke(e)||"image/jpeg").replace(/image\//g,""))),e.size>k.opts.filesManagerMaxSize)return j(N,null,null,n),!1;if(k.opts.filesManagerAllowedTypes.indexOf("*")<0&&k.opts.filesManagerAllowedTypes.indexOf(ke(e))<0)return j(B,null,null,n),!1;var r;if(function E(e){isNaN(e)||(k.popups.get("filesManager.insert").find(".fr-file-item-right-"+e).get(0).innerHTML='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-cancel-upload-button-'.concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-file-cancel-upload-button" data-cmd="cancelUpload" data-title="Cancel" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z\'></path></svg>\n </button>\n\n <button type="button" id="fr-upload-delete-button-').concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-upload-delete-button" data-cmd="deleteUpload" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n\n <div class=\'progress-circle p0 fr-file-progress-circle-').concat(e,"'>\n <span class='fr-file-upload-percent-").concat(e," fr-file-upload-percent'>0%</span>\n <div class='left-half-clipper'>\n <div class='first50-bar'></div>\n <div class='value-bar'></div>\n </div>\n </div>\n </div>"),C.set(e,0))}(n),k.drag_support.formdata&&(r=k.drag_support.formdata?new FormData:null),r){var i;if(!1!==k.opts.filesManagerUploadToS3)for(i in r.append("key",k.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),r.append("success_action_status","201"),r.append("X-Requested-With","xhr"),r.append("Content-Type",ke(e)),k.opts.filesManagerUploadToS3.params)k.opts.filesManagerUploadToS3.params.hasOwnProperty(i)&&r.append(i,k.opts.filesManagerUploadToS3.params[i]);for(i in k.opts.filesManagerUploadParams)k.opts.filesManagerUploadParams.hasOwnProperty(i)&&r.append(i,k.opts.filesManagerUploadParams[i]);r.append(k.opts.filesManagerUploadParam,e,e.name);var o,s,l=k.opts.filesManagerUploadURL;k.opts.filesManagerUploadToS3&&(l=k.opts.filesManagerUploadToS3.uploadURL?k.opts.filesManagerUploadToS3.uploadURL:"https://".concat(k.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(k.opts.filesManagerUploadToS3.bucket)),k.opts.filesManagerUploadToAzure&&(l=k.opts.filesManagerUploadToAzure.uploadURL?"".concat(k.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(k.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(k.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),o=l,k.opts.filesManagerUploadToAzure.SASToken&&(l+=k.opts.filesManagerUploadToAzure.SASToken),k.opts.filesManagerUploadMethod="PUT");var c=k.core.getXHR(l,k.opts.filesManagerUploadMethod);if(k.opts.filesManagerUploadToAzure){var d=(new Date).toUTCString();if(!k.opts.filesManagerUploadToAzure.SASToken&&k.opts.filesManagerUploadToAzure.accessKey){var f=k.opts.filesManagerUploadToAzure.account,p=k.opts.filesManagerUploadToAzure.container;if(k.opts.filesManagerUploadToAzure.uploadURL){var u=k.opts.filesManagerUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+e.name),m=k.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+ke(e)+"\n\n\n\n\n\n\n"+g+"\n"+h,v=k.cryptoJSPlugin.cryptoJS.HmacSHA256(m,k.cryptoJSPlugin.cryptoJS.enc.Base64.parse(k.opts.filesManagerUploadToAzure.accessKey)).toString(k.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;s=v,c.setRequestHeader("Authorization",b)}for(i in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",ke(e)),c.setRequestHeader("x-ms-blob-type","BlockBlob"),k.opts.filesManagerUploadParams)k.opts.filesManagerUploadParams.hasOwnProperty(i)&&c.setRequestHeader(i,k.opts.filesManagerUploadParams[i]);for(i in k.opts.filesManagerUploadToAzure.params)k.opts.filesManagerUploadToAzure.params.hasOwnProperty(i)&&c.setRequestHeader(i,k.opts.filesManagerUploadToAzure.params[i])}c.onload=function(){Ne(ke(e))?function g(e,t,a,n,r){var i=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(k.opts.filesManagerUploadToS3||k.opts.filesManagerUploadToAzure)if(201===i){var c;if(k.opts.filesManagerUploadToAzure){if(!1===k.events.trigger("filesManager.uploadedToAzure",[this.responseURL,r,o],!0))return k.edit.on(),!1;c=n}else c=Ie(s,t);if(c){var d={link:c,text:e,response:o,type:a};O.set(t,d)}}else j(R,o||s,null,t);else if(200<=i&&i<300){var f=xe(l,t);if(f){var p={link:f.link,text:e,response:o,type:a,data:f};O.set(t,p)}}else j(S,o||l,null,t)}catch(u){j(R,o||l,null,t)}}.call(c,e.name,n,ke(e),o,s):function h(e,t,a,n,r){var i=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(k.opts.filesManagerUploadToS3||k.opts.filesManagerUploadToAzure)if(201==i){var c;if(k.opts.filesManagerUploadToAzure){if(!1===k.events.trigger("filesManager.uploadedToAzure",[this.responseURL,r,o],!0))return k.edit.on(),!1;c=n}else c=Ie(s,t);if(c){var d={link:c,sanitize:!1,data:[],$existing_img:e,response:o||s,type:a};O.set(t,d)}}else j(R,o||s,e,t);else if(200<=i&&i<300){var f=xe(l,t);if(f){var p={link:f.link,sanitize:!1,data:f,$existing_img:e,response:o||s,type:a};O.set(t,p)}}else j(S,o||l,e,t)}catch(u){j(R,o||l,e,t)}}.call(c,w,n,ke(e),o,s),T.has(n)||Ee(100,n,!0)},c.onerror=function(){j(R,this.response||this.responseText||this.responseXML,null,n)},c.upload.onprogress=function(e){!function a(e,t){e.lengthComputable&&Ee(e.loaded/e.total*100|0,t,!1)}(e,n)},c.onabort=function(e){!function a(e,t){j(P,t,w,e)}(n,e)},c.send(k.opts.filesManagerUploadToAzure?e:r),A.set(n,c)}}function Me(l){k.events.$on(l,"click",".fr-upload-progress-layer",function(e){if(k.helpers.isMobile())return e.stopPropagation(),!1},!0),k.events.$on(l,"dragover dragenter",".fr-upload-progress-layer",function(e){e.preventDefault();for(var t=0;t<e.originalEvent.dataTransfer.types.length;t++)"Files"==e.originalEvent.dataTransfer.types[t]&&(e.originalEvent.dataTransfer.dropEffect="none");return!1},!0),k.events.$on(l,"dragleave dragend",".fr-upload-progress-layer",function(e){return e.preventDefault(),!1},!0),k.events.$on(l,"dragover dragenter",".fr-files-upload-layer",function(e){return x(this).addClass("fr-drop"),(k.browser.msie||k.browser.edge)&&e.preventDefault(),!1},!0),k.events.$on(l,"dragleave dragend",".fr-files-upload-layer",function(e){return x(this).removeClass("fr-drop"),(k.browser.msie||k.browser.edge)&&e.preventDefault(),!1},!0),k.events.$on(l,"click",".fr-insert-checkbox",function(e){if(this.classList.contains("fr-checkbox-disabled"))return this.children.target.disabled=!0,void(this.children.target.checked=!1);var t=parseInt(this.id.split("-").pop());M.set(t,this.children.target.checked);for(var a=l.find('.fr-command[data-cmd="insertAll"]'),n=l.find('.fr-command[data-cmd="deleteAll"]'),r=l.find('input.fr-file-insert-check[type="checkbox"]'),i=r.length,o=!0,s=0;s<i;s++)1==r[s].checked&&(o=!1);if(o?a.addClass("fr-disabled"):a.removeClass("fr-disabled"),o?n.addClass("fr-disabled"):n.removeClass("fr-disabled"),this.children.target.checked)l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","true"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.remove("fr-unchecked");else{this.id.split("-").pop();l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","false"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.add("fr-unchecked")}}),k.events.$on(l,"click",".fr-file-insert-button",function(e){this.classList.contains("fr-disabled")||Le(parseInt(this.id.split("-").pop()))}),k.events.$on(l,"click",".fr-file-autoplay-button",function(e){if(this.parentNode.classList.contains("fr-checkbox-disabled"))return this.disabled=!0,void(this.checked=!1);Fe(parseInt(this.id.split("-").pop()))}),k.events.$on(l,"click",".fr-file-edit-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-edit-button-".concat(t)).hasClass("fr-disabled")||Re(t)}),k.events.$on(l,"click",".fr-file-view-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-view-button-".concat(t)).hasClass("fr-disabled")||function v(e){if(!Ue(ke(O.get(e)))){var t=O.get(e).link,a=O.get(e).link;if(I.get(e)&&I.get(e).name?a=I.get(e).name:O.get(e).text&&(a=O.get(e).text),0===t.indexOf("blob:")&&k.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(I.get(e),a);else{var n=document.createElement("a");n.href=t,n.download=a,n.click()}return!1}var r=k.popups.get("filesManager.insert");if(0<r.find(".fr-file-view-image-"+e).length)r.find(".fr-file-view-image-"+e)[0].remove();else{for(var i=r.find(".fr-file-view"),o=0;o<i.length;o++)i.get(o).remove();var s=r.find(".fr-file-view-"+e);if(De(ke(O.get(e)))){var l='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content">\n <div class="fr-file-view-close">&times;</div> \n <img src="'+O.get(e).link+"\" class ='fr-file-view-image'/>\n </div>\n </div>";s[0].innerHTML=l+s[0].innerHTML}else if(Be(ke(O.get(e)))){var c;if(O.get(e).hasOwnProperty("video")){var d=O.get(e).video.substring(O.get(e).video.indexOf("src")+3),f=d.substring(d.indexOf('"')+1);f=f.substring(0,f.indexOf('"')),c='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <iframe width="640" height="360" src="'.concat(f+"&autoplay=1&mute=1",'" allow="autoplay" frameborder="0" class = "fr-file-view-image"></iframe>\n </div>\n </div>')}else c='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <video controls src="'+O.get(e).link+"\" class ='fr-file-view-image' autoplay></video>\n </div>\n </div>";s[0].innerHTML=c+s[0].innerHTML}else if(Pe(ke(O.get(e)))){var p='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <audio controls="controls" class =\'fr-file-view-image\' autoplay>\n\n <source src="'.concat(O.get(e).link,'" type="').concat(ke(O.get(e)),'" />\n\n Your browser does not support the audio element.\n </audio>\n </div>\n </div>');s[0].innerHTML=p+s[0].innerHTML}else if(Ne(ke(O.get(e)))){var u=O.get(e).link,g=O.get(e).text;if(u.endsWith(".pdf")||u.endsWith(".txt")){var h='<div class="fr-file-view-modal">\t\n <div class="fr-file-view-modal-content " >\t\n <div class="fr-file-view-close">&times;</div> \t\n <iframe src="'.concat(u,"\" style='background-color: white;' height='50%' width='50%' title=\"").concat(g,'" class="fr-file fr-file-view-image"></iframe>\t\n </div>\t\n </div>');s[0].innerHTML=h+s[0].innerHTML}else if(0===u.indexOf("blob:")&&k.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(I.get(e),g);else{var m=document.createElement("a");m.href=u,m.download=g,m.click()}}}}(t)}),k.events.$on(l,"click",".fr-file-delete-button",function(e){X(parseInt(this.id.split("-").pop()))}),k.events.$on(l,"click",".fr-file-cancel-upload-button",function(e){!function a(e){var t=k.popups.get("filesManager.insert");t.find(".fr-file-item-right-"+e).get(0).innerHTML=_e(e),A.get(e).abort(),we(e,100,!0),t.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))}),k.events.$on(l,"click",".fr-upload-delete-button",function(e){!function t(e){0!=A.get(e).readyState&&(A.get(e).abort(),we(e,100,!0),A["delete"](e)),X(e)}(parseInt(this.id.split("-").pop()))}),k.events.$on(l,"click",".fr-file-view-close",function(e){l.find(".fr-file-view-modal").get(0).outerHTML=""}),k.events.$on(l,"click",".fr-plugins-enable",function(e){!function t(){h.forEach(function(e){k.opts.pluginsEnabled.indexOf(e)<0&&k.opts.pluginsEnabled.push(e)})}(),function a(e){for(var t in e)if(!k[t]){if(Rt.PLUGINS[t]&&k.opts.pluginsEnabled.indexOf(t)<0)continue;k[t]=new e[t](k),k[t]._init&&k[t]._init()}}(Rt.PLUGINS),k.popups.get("filesManager.insert").get(0).outerHTML="",He(),_(!0)}),k.events.$on(l,"click",".fr-plugins-cancel",function(e){k.popups.hide("filesManager.insert")}),k.events.$on(l,"drop",".fr-upload-progress",function(e){e.preventDefault(),e.stopPropagation()}),k.events.$on(l,"drop",".fr-files-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),x(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=l.data("instance")||k;a.events.disableBlur();for(var n=[],r=0;r<t.files.length;r++){var i=g;I.set(i,t.files[r]),me(i),M.set(i,!1),n.push(i),g++}for(var o=0;o<n.length;o++)a.filesManager.upload(I.get(n[o]),t.files,w,n[o]);a.events.enableBlur()}},!0),k.helpers.isIOS()&&k.events.$on(l,"touchstart",'.fr-files-upload-layer input[type="file"]',function(){x(this).trigger("click")},!0),k.events.$on(l,"change",'.fr-files-upload-layer input[type="file"]',function(){if(this.files){var e=l.data("instance")||k;e.events.disableBlur(),l.find("input:focus").blur(),e.events.enableBlur();var t=[];if("undefined"!=typeof this.files&&0<this.files.length){for(var a=0;a<this.files.length;a++){var n=g;I.set(n,this.files[a]),me(n),M.set(n,!1),++g,t.push(n)}for(var r=0;r<t.length;r++)e.filesManager.upload(I.get(t[r]),this.files,w,t[r])}}x(this).val("")},!0)}function Fe(t){document.getElementById("fr-file-autoplay-button-"+t).checked?F.push(t):F=F.filter(function(e){return e!=t})}function De(e){return e&&"image"===e.split("/")[0]}function Ne(e){return e&&"image"!=e.split("/")[0]&&e&&"video"!=e.split("/")[0]&&e&&"audio"!=e.split("/")[0]}function Be(e){return e&&"video"===e.split("/")[0]}function Pe(e){return e&&"audio"===e.split("/")[0]}function Ue(e){var t="audio/ogg",a="video/ogg";if(e==t||e==a||"image/webp"==e||"video/webm"==e){if(k.browser.msie||k.browser.edge||k.browser.safari)return!1;if(k.helpers.isMobile()){if(e==t||e==a)return!1;if(!k.helpers.isAndroid()&&!k.browser.chrome)return!1}}return!0}function He(e){if(e)return k.popups.onRefresh("filesManager.insert",b),k.popups.onHide("filesManager.insert",H),!0;var t,a,n="";k.opts.imageUpload||-1===k.opts.filesInsertButtons.indexOf("filesUpload")||k.opts.imageInsertButtons.splice(k.opts.filesInsertButtons.indexOf("filesUpload"),1);var r=k.button.buildList(k.opts.filesInsertButtons),i=k.button.buildList(k.opts.filesInsertButtons2);""!==r&&(n='<div class="fr-buttons fr-tabs">'.concat(r,'<span class="fr-align-right">').concat(i,"</span></div>"));var o=k.opts.filesInsertButtons.indexOf("filesUpload"),s=k.opts.filesInsertButtons.indexOf("filesByURL"),l=k.opts.filesInsertButtons.indexOf("filesEmbed"),c="";0<=o&&(t=" fr-active",0<=s&&s<o&&(t=""),c='<div class="fr-files-upload-layer'.concat(t,' fr-layer " id="fr-files-upload-layer-').concat(k.id,'"><div style="display:flex"><div class="fr-upload-section"><div class = \'fr-blue-decorator\'><div class = \'fr-cloud-icon\'><svg class = "fr-svg" focusable="false" width="26px" height="26px" viewBox = "0 0 24 24" xlmns = "http://w3.org/200/svg"><path d = \'M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z\'></path></svg></div>Drag & Drop One or More Files<br><div class="fr-decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(k.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(k.id,'"role="button" multiple></div> </div></div>'));var d="";0<=l&&(t=" fr-active",(o<l&&0<=o||s<l&&0<=s)&&(t=""),d='<div class="fr-files-embed-layer fr-layer'.concat(t,'" id="fr-files-embed-layer-').concat(k.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(k.id,'" type="text" placeholder="').concat(k.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="insertEmbed" tabIndex="2" role="button">').concat(k.language.translate("Insert"),"</button></div></div>"));var f="";0<=s&&(t=" fr-active",0<=o&&o<s&&(t=""),f='<div class="fr-files-by-url-layer'.concat(t,' fr-layer" id="fr-files-by-url-layer-').concat(k.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-by-url-layer-text-').concat(k.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="filesInsertByURL" tabIndex="2" role="button">').concat(k.language.translate("Add"),"</button></div></div>"));var p={buttons:n,upload_layer:c,by_url_layer:f,embed_layer:d,upload_progress_layer:"<div class = ' fr-margin-16 fr-upload-progress' id=\"fr-upload-progress-layer-".concat(k.id,"\" ><div class='fr-progress-bar-style'><div class='fr-progress-bar fr-none'></div></div><div id='filesList' class = 'fr-upload-progress-layer fr-layer'></div></div>"),progress_bar:'<div class="fr-files-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="filesDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=k.opts.imageInsertButtons.length&&(a=k.popups.create("filesManager.insert",p)),k.$wp&&k.events.$on(k.$wp,"scroll",function(){w&&k.popups.isVisible("filesManager.insert")&&replace()}),Me(a),k.popups.setPopupDimensions(a),a}function $e(e){var t=e.split("/").pop();if(t.split(".").length<2){var a=new Date;return t+"-"+a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear()}return t}function ze(){w&&k.popups.get("image.alt").find("input").val(w.attr("alt")||"").trigger("change")}function We(){var e=k.popups.get("image.alt");e||(e=Ke()),J(),k.popups.refresh("image.alt"),k.popups.setContainer("image.alt",k.$sc);var t=lt();ct()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();k.popups.show("image.alt",a,n,t.outerHeight(),!0)}function Ke(e){if(e)return k.popups.onRefresh("image.alt",ze),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(k.button.buildList(k.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(k.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(k.id,'" type="text" placeholder="').concat(k.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(k.language.translate("Update"),"</button></div></div>")},a=k.popups.create("image.alt",t);return k.$wp&&k.events.$on(k.$wp,"scroll.image-alt",function(){w&&k.popups.isVisible("image.alt")&&We()}),a}function Ge(){var e=k.popups.get("image.size");if(w)if(ct()){var t=w.parent();t.get(0).style.width||(t=w.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(w.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(w.get(0).style.height).trigger("change")}function Ye(){var e=k.popups.get("image.size");e||(e=Ve()),J(),k.popups.refresh("image.size"),k.popups.setContainer("image.size",k.$sc);var t=lt();ct()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();k.popups.show("image.size",a,n,t.outerHeight(),!0)}function Ve(e){if(e)return k.popups.onRefresh("image.size",Ge),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(k.button.buildList(k.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(k.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(k.id,'" type="text" name="width" placeholder="').concat(k.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(k.id,'" type="text" name="height" placeholder="').concat(k.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(k.language.translate("Update"),"</button></div></div>")},a=k.popups.create("image.size",t);return k.$wp&&k.events.$on(k.$wp,"scroll.image-size",function(){w&&k.popups.isVisible("image.size")&&Ye()}),a}function je(e,t,a,n){return e.pageX=t,K.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),G.call(this,e),Y.call(this,e),++n}function qe(e){(e=e||lt())&&!1!==k.events.trigger("image.beforeRemove",[e])&&(k.popups.hideAll(),at(!0),k.undo.canDo()||k.undo.saveStep(),e.get(0)==k.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(k.selection.setBefore(e.get(0).parentNode)||k.selection.setAfter(e.get(0).parentNode)||e.parent().after(Rt.MARKERS),x(e.get(0).parentNode).remove()):(k.selection.setBefore(e.get(0))||k.selection.setAfter(e.get(0))||e.after(Rt.MARKERS),e.remove()),k.html.fillEmptyBlocks(),k.selection.restore()),k.undo.saveStep())}function Xe(e){var t=e.which;if(w&&(t==Rt.KEYCODE.BACKSPACE||t==Rt.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),qe(),!1;if(w&&t==Rt.KEYCODE.ESC){var a=w;return at(!0),k.selection.setAfter(a.get(0)),k.selection.restore(),e.preventDefault(),!1}if(!w||t!=Rt.KEYCODE.ARROW_LEFT&&t!=Rt.KEYCODE.ARROW_RIGHT)return w&&t===Rt.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),at(!0),!1):w&&t!=Rt.KEYCODE.F10&&!k.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=w.get(0);return at(!0),t==Rt.KEYCODE.ARROW_LEFT?k.selection.setBefore(n):k.selection.setAfter(n),k.selection.restore(),e.preventDefault(),!1}function Qe(e){if(e&&"IMG"==e.tagName){var t;if(k.node.hasClass(e,"fr-uploading")||k.node.hasClass(e,"fr-error"))null===(t=e.parentNode)||void 0===t||t.removeChild(e);else k.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable");if(e.parentNode&&e.parentNode.parentNode&&k.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var a=e.parentNode.parentNode;a.removeAttribute("contenteditable"),a.removeAttribute("draggable"),a.classList.remove("fr-draggable");var n=e.nextSibling;n&&n.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var r=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),i=0;i<r.length;i++)Qe(r[i])}function Ze(e){var t=e.target.result,a=k.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=k.opts.imageResizeWithPercent?"%":"px"),k.undo.saveStep(),k.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var n=k.$el.find('img[data-fr-image-pasted="true"]');n&&ot(n,k.opts.imageDefaultDisplay,k.opts.imageDefaultAlign),k.events.trigger("paste.after")}function Je(e,t){var a=new FileReader;a.onload=function n(e){var t=k.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=k.opts.imageResizeWithPercent?"%":"px"),k.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=k.$el.find('img[data-fr-image-pasted="true"]');a&&ot(a,k.opts.imageDefaultDisplay,k.opts.imageDefaultAlign),k.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function et(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a&&!k.opts.imageUploadURL){if(!a)return!1;var n=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var i=0;i<e.clipboardData.items.length;i++)if(r=e.clipboardData.items[i].getAsFile()){Rt.IMAGE_TYPE=r.type;break}if(r)return Je(r,n),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=Ze,t.readAsDataURL(e)}(o),!1}}}function tt(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function at(e){w&&(function t(){return nt}()||!0===e)&&(k.toolbar.enable(),l&&l.removeClass("fr-active"),k.popups.hide("image.edit"),w=null,it(),c=null,d&&d.hide())}var nt=!1;function rt(){nt=!0}function it(){nt=!1}function ot(e,t,a){!k.opts.htmlUntouched&&k.opts.useClasses?(x(e).removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&x(e).addClass("fr-fi".concat(a[0])),t&&x(e).addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:k.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*k.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(k.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(k.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(k.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function st(){return w}function lt(){return ct()?w.parents(".fr-img-caption").first():w}function ct(){return!!w&&0<w.parents(".fr-img-caption").length}return{_init:function dt(){var i;(function e(){k.events.$on(k.$el,k._mousedown,"IMG"==k.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==x(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;k.helpers.isMobile()||k.selection.clear(),t=!0,k.popups.areVisible()&&k.events.disableBlur(),k.browser.msie&&(k.events.disableBlur(),k.$el.attr("contenteditable",!1)),k.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),k.events.$on(k.$el,k._mousedown,".fr-img-caption .fr-inner",function(e){k.core.hasFocus()||k.events.focus(),e.stopPropagation()}),k.events.$on(k.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===k.opts.toolbarInline&&(k.toolbar.hide(),e.stopPropagation())}),k.events.$on(k.$el,k._mouseup,"IMG"==k.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==x(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),k.browser.msie&&(k.$el.attr("contenteditable",!0),k.events.enableBlur()))}),k.events.on("keyup",function(e){if(e.shiftKey&&""===k.selection.text().replace(/\n/g,"")&&k.keys.isArrow(e.which)){var t=k.selection.element(),a=k.selection.endElement();t&&"IMG"==t.tagName?Ae(x(t)):a&&"IMG"==a.tagName&&Ae(x(a))}},!0),k.events.on("window.mousedown",rt),k.events.on("window.touchmove",it),k.events.on("mouseup window.mouseup",function(){if(w)return at(),!1;it()}),k.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&at()}),k.events.on("image.resizeEnd",function(){k.opts.iframe&&k.size.syncIframe()}),k.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){at(!(t=!1))}),k.events.on("modals.hide",function(){w&&k.selection.clear()}),k.events.on("image.resizeEnd",function(){k.win.getSelection&&Ae(w)}),k.opts.imageAddNewLine&&k.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!k.node.isElement(t);)t=k.node.isLastSibling(t)?t.parentNode:null;k.node.isElement(t)&&(k.opts.enter===Rt.ENTER_BR?e.after("<br>"):x(k.node.blockParent(e.get(0))).after("<".concat(k.html.defaultTag(),"><br></").concat(k.html.defaultTag(),">")))})})(),"IMG"==k.el.tagName&&k.$el.addClass("fr-view"),k.helpers.isMobile()&&(k.events.$on(k.$el,"touchstart","IMG"==k.el.tagName?null:'img:not([contenteditable="false"])',function(){de=!1}),k.events.$on(k.$el,"touchmove",function(){de=!0})),k.$wp?(k.events.on("window.keydown keydown",Xe,!0),k.events.on("keyup",function(e){if(w&&e.which==Rt.KEYCODE.ENTER)return!1},!0),k.events.$on(k.$el,"keydown",function(){var e=k.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&k.node.isLastSibling(e))&&(e=e.parentNode),k.node.hasClass(e,"fr-inner")||(k.node.hasClass(e,"fr-img-caption")||(e=x(e).parents(".fr-img-caption").get(0)),k.node.hasClass(e,"fr-img-caption")&&(k.opts.trackChangesEnabled||x(e).after(Rt.INVISIBLE_SPACE+Rt.MARKERS),k.selection.restore()))})):k.events.$on(k.$win,"keydown",Xe),k.events.on("toolbar.esc",function(){if(w){if(k.$wp)k.events.disableBlur(),k.events.focus();else{var e=w;at(!0),k.selection.setAfter(e.get(0)),k.selection.restore()}return!1}},!0),k.events.on("toolbar.focusEditor",function(){if(w)return!1},!0),k.events.on("window.cut window.copy",function(e){if(w&&k.popups.isVisible("image.edit")&&!k.popups.get("image.edit").find(":focus").length){var t=lt();ct()?(t.before(Rt.START_MARKER),t.after(Rt.END_MARKER),k.selection.restore(),k.paste.saveCopiedText(t.get(0).outerHTML,t.text())):k.paste.saveCopiedText(w.get(0).outerHTML,w.attr("alt")),"copy"==e.type?setTimeout(function(){Ae(w)}):(at(!0),k.undo.saveStep(),setTimeout(function(){k.undo.saveStep()},0))}},!0),k.browser.msie&&k.events.on("keydown",function(e){if(!k.selection.isCollapsed()||!w)return!0;var t=e.which;t==Rt.KEYCODE.C&&k.keys.ctrlKey(e)?k.events.trigger("window.copy"):t==Rt.KEYCODE.X&&k.keys.ctrlKey(e)&&k.events.trigger("window.cut")}),k.events.$on(x(k.o_win),"keydown",function(e){var t=e.which;if(w&&t==Rt.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),k.events.$on(k.$win,"keydown",function(e){var t=e.which;w&&w.hasClass("fr-uploading")&&t==Rt.KEYCODE.ESC&&w.trigger("abortUpload")}),k.events.on("destroy",function(){w&&w.hasClass("fr-uploading")&&w.trigger("abortUpload")}),k.events.on("paste.before",et),k.events.on("paste.beforeCleanup",tt),k.events.on("html.processGet",Qe),k.opts.imageOutputSize&&k.events.on("html.beforeGet",function(){i=k.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=parseFloat(x(i[e]).css("padding-left"))+parseFloat(x(i[e]).css("padding-right")),a=x(i[e]).width()-t,n=i[e].style.width||a,r=i[e].style.height||x(i[e]).height();n&&i[e].setAttribute("width","".concat(n).replace(/px/,"")),r&&i[e].setAttribute("height","".concat(r).replace(/px/,""))}}),k.opts.iframe&&k.events.on("image.loaded",k.size.syncIframe),k.events.$on(x(k.o_win),"orientationchange.image",function(){setTimeout(function(){w&&Ae(w)},100)}),function n(e){if(e)return k.$wp&&k.events.$on(k.$wp,"scroll.image-edit",function(){w&&k.popups.isVisible("image.edit")&&k.events.disableBlur()}),!0;var t="";if(0<k.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(k.button.buildList(k.opts.imageEditButtons),"\n </div>")};return k.popups.create("image.edit",a)}return!1}(!0),He(!0),Ve(!0),Ke(!0),k.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return qe(e),!1}),k.events.on("popups.hide.filesManager.insert",function(e){k.filesManager.minimizePopup(L)})},showInsertPopup:_,showLayer:function ft(e){var t,a,n=k.popups.get("filesManager.insert");if(w||k.opts.toolbarInline){if(w){var r=lt();ct()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var i=k.$tb.find('.fr-command[data-cmd="insertFiles"]');t=i.offset().left,a=i.offset().top+(k.opts.toolbarBottom?10:i.outerHeight()-10)}!w&&k.opts.toolbarInline&&(a=n.offset().top-k.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),n.find(".fr-upload-progress-layer").addClass("fr-active"),k.popups.show("filesManager.insert",t,a,w?w.outerHeight():0),k.accessibility.focusPopup(n)},refreshUploadButton:function pt(e){var t=k.popups.get("filesManager.insert");t&&t.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function ut(e){var t=k.popups.get("filesManager.insert");t&&t.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Oe,insertByURL:function gt(){for(var e,t=k.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),a=t.val().trim().split(/[ ,]+/),n=[],r=0,i=0;i<a.length;i++)e=a[i],new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)&&(n[r]=a[i],r++);if(0!=n.length){if(0<t.val().trim().length&&0<n.length){var s=[],l=[],c=g,d=n.length;n.forEach(function(e,a){if(0==e.trim().length)g==c+--d&&ye(s,l);else{J(),Z(),ee(k.language.translate("Loading file(s)"));var n=e.trim(),t=function o(e){if(void 0===e)return e;var t=null;if(/^http/.test(e)||(e="https://".concat(e)),k.helpers.isURL(e))for(var a=0;a<Rt.VIDEO_PROVIDERS.length;a++){var n=Rt.VIDEO_PROVIDERS[a];if(n.test_regex.test(e)&&new RegExp(k.opts.videoAllowedProviders.join("|")).test(n.provider)){t=e.replace(n.url_regex,n.url_text),t=n.html.replace(/\{url\}/,t);break}}return t}(n);if(t){var r={link:n,name:n,type:"video/url",size:2,video:t};I.set(c+a,r),me(c+a),J(),Z(),ee(k.language.translate("Loading file(s)")),O.set(c+a,r),++g==c+d&&ye(s,l)}else{var i=new XMLHttpRequest;i.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=$e(n),e.link=n,De(this.response.type)?(e.sanitize=!0,e.existing_image=w):Ne(this.response.type)&&(e.text=$e(n)),s.push(e),l.push(c+a),I.set(c+a,e),me(c+a),(-1<U.indexOf(ke(e))||!ke(e))&&j(B,null,null,c+a)}else{var t=new Blob([this.response],{type:this.response.type||" "});t.name=$e(n),t.link=n,I.set(c+a,t),me(c+a),j(D,this.response,w,c+a)}J(),Z(),ee(k.language.translate("Loading file(s)")),++g==c+d&&ye(s,l)},i.onerror=function(){var e={link:n,name:$e(n),size:0,type:""};j(9,this.response,w,c+a);var t=g;I.set(t,e),me(t),J(),Z(),ee(k.language.translate("Loading file(s)")),++g==c+d&&ye(s,l)},i.open("GET","".concat(k.opts.imageCORSProxy,"/").concat(n),!0),i.responseType="blob",i.send()}}}),t.val(""),t.blur()}}else te(k.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function ht(){r=[];var e=k.popups.get("filesManager.insert");u=-1,f=null,e.find(".fr-insert-checkbox").toArray().forEach(function n(e,t,a){e.children.target.checked&&(r.push(parseInt(e.id.split("-").pop())),De(O.get(parseInt(e.id.split("-").pop())).type)&&-1==u&&(u=t))}),Se(r),q()},deleteAllFiles:function e(){k.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach(function r(e,t,a){if(e.children.target.checked){var n=parseInt(e.id.split("-").pop());A.has(n)&&A["delete"](n),X(n)}}),q()},get:st,getEl:lt,insert:Le,showProgressBar:Z,remove:qe,hideProgressBar:J,applyStyle:function mt(e,t,a){if(void 0===t&&(t=k.opts.imageStyles),void 0===a&&(a=k.opts.imageMultipleStyles),!w)return!1;var n=lt();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),n.removeClass(r.join(" "))}"object"==kt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),Ae(w)},showAltPopup:We,showSizePopup:Ye,setAlt:function vt(e){if(w){var t=k.popups.get("image.alt");w.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),Ae(w)}},setSize:function bt(e,t){if(w){var a=k.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;w.removeAttr("width").removeAttr("height"),e.match(n)?w.css("width",e):w.css("width",""),t.match(n)?w.css("height",t):w.css("height",""),ct()&&(w.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?w.parents(".fr-img-caption").css("width",e):w.parents(".fr-img-caption").css("width",""),t.match(n)?w.parents(".fr-img-caption").css("height",t):w.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),Ae(w)}},toggleCaption:function _t(){var e;if(w&&!ct()){(e=w).parent().is("a")&&(e=w.parent());var t,a,n=w.parents("ul")&&0<w.parents("ul").length?w.parents("ul"):w.parents("ol")&&0<w.parents("ol").length?w.parents("ol"):[];if(0<n.length){var r=n.find("li").length,i=w.parents("li"),o=document.createElement("li");r-1===i.index()&&(n.append(o),o.innerHTML="&nbsp;")}e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var s=k.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":w.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(k.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+w.attr("class")+'" style="'+(k.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),w.after('<span class="fr-inner"'.concat(k.browser.mozilla?"":' contenteditable="true"',">").concat(Rt.START_MARKER).concat(k.language.translate("Image Caption")).concat(Rt.END_MARKER,"</span>")),w.removeAttr("class").removeAttr("style").removeAttr("width"),w.parents(".fr-img-caption").css("width",s),at(!0),k.selection.restore()}else e=lt(),w.insertAfter(e),w.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Ae(w)},refreshEmbedButton:function Et(e){var t=k.popups.get("filesManager.insert");t&&t.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function wt(e){void 0===e&&(e=k.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!Rt.VIDEO_EMBED_REGEX.test(e)&&!Rt.IMAGE_EMBED_REGEX.test(e)?(te(k.language.translate("Something went wrong. Please try again.")),Rt.VIDEO_EMBED_REGEX.test(e)&&k.events.trigger("video.codeError",[e])):function s(e,t){var a,n;Rt.VIDEO_EMBED_REGEX.test(e)?(a="video",n=k.opts.videoSplitHTML):Rt.IMAGE_EMBED_REGEX.test(e)&&(a="image",n=k.opts.imageSplitHTML),k.events.focus(!0),k.selection.restore();var r=!1;w&&(qe(),r=!0),k.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(a,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,n),k.popups.hide("filesManager.insert");var i=k.$el.find(".fr-jiv");i.removeClass("fr-jiv"),"video"==a&&(i.toggleClass("fr-rv",k.opts.videoResponsive),function o(e,t,a){!k.opts.htmlUntouched&&k.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(i,k.opts.videoDefaultDisplay,k.opts.videoDefaultAlign),i.toggleClass("fr-draggable",k.opts.videoMove),k.events.trigger(r?"video.replaced":"video.inserted",[i])),"image"==a&&(ot(i,k.opts.imageDefaultDisplay,k.opts.imageDefaultAlign),i.find("img").removeClass("fr-dii"),i.find("img").addClass("fr-dib"),i.toggleClass("fr-draggable",k.opts.imageMove),k.events.trigger(r?"image.replaced":"image.inserted",[i])),t&&(f=i,k.selection.clear(),k.toolbar.disable(),k.video._editVideo(f))}(e)},hasCaption:ct,exitEdit:at,edit:Ae,cancelFileInsert:function yt(){this.file_manager_dialog_open=!1,A.forEach(function(e,t){4!=e.readyState&&(e.abort(),X(t))});var e=k.popups.get("filesManager.insert");e.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),e.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"),i=0,A=new Map,C=new Map,Q(),k.popups.hide("filesManager.insert")},minimizePopup:function At(e){this.file_manager_dialog_open=!1,k.popups.hide("filesManager.insert"),Q()},editImage:Re,saveImage:function Ct(e){var t=O.get(o);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),O.set(o,t)},_showErrorMessage:te,_showFileErrorMessage:ae,getFileThumbnail:be,deleteFile:X,checkAutoplay:Fe,checkInsertAllState:q,_disableInsertCheckbox:V,_getFileType:ke,isChildWindowOpen:function Tt(){return p},setChildWindowState:function St(e){e!==undefined&&(p=e)},resetAllFilesCheckbox:Q}},Rt.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),Rt.RegisterShortcut(Rt.KEYCODE.P,"insertFiles",null,"P"),Rt.RegisterCommand("insertFiles",{title:"Insert Files",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("filesManager.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("filesManager.insert")):this.filesManager.showInsertPopup()},plugin:"filesManager"}),Rt.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),Rt.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),Rt.RegisterCommand("filesUpload",{title:"Upload Files",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-upload")},refresh:function(e){this.filesManager.refreshUploadButton(e)}}),Rt.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),Rt.RegisterCommand("filesByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-by-url")},refresh:function(e){this.filesManager.refreshByURLButton(e)}}),Rt.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),Rt.RegisterCommand("filesEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-embed")},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),Rt.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),Rt.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),Rt.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),Rt.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),Rt.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),Rt.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),Rt.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),Rt.RegisterCommand("minimize",{title:"Minimize",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.minimizePopup("image.insert",!0)},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),Rt.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),Rt.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),Rt.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),Rt.RegisterCommand("insertEmbed",{undo:!0,focus:!0,callback:function(){this.filesManager.insertEmbed(),this.popups.get("filesManager.insert").find("textarea")[0].value="",this.popups.get("filesManager.insert").find("textarea").removeClass("fr-not-empty")}}),Rt.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}}),Rt.PLUGINS.cryptoJSPlugin=function(e){var t,d,a,n,r,i,o,f,s,l,c,p,u,g,h,v,m,b,_,E,w,y,A,C,T,S,R,k,L,x,I,O,M,F,D,N,B,P,U,H,$,z,W,K,G,Y,V,j,q,X,Q,Z,J,ee,te,ae,ne,re,ie,oe,se,le,ce,de,fe,pe,ue,ge,he,me,ve=ve||function(d,e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&"undefined"!=typeof global&&global.crypto&&(t=global.crypto),!t&&"function"==typeof require)try{t=require("crypto")}catch(h){}var n=function n(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(h){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(h){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function a(){}return function(e){var t;return a.prototype=e,t=new a,a.prototype=null,t}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},f=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,a=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<r;i++){var o=a[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=o<<24-(n+i)%4*8}else for(i=0;i<r;i+=4)t[n+i>>>2]=a[i>>>2];return this.sigBytes+=r,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=d.ceil(t/4)},clone:function e(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],a=0;a<e;a+=4)t.push(n());return new f.init(t,e)}}),s=r.enc={},l=s.Hex={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n+=2)a[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new f.init(a,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new f.init(a,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,a=this._data,n=a.words,r=a.sigBytes,i=this.blockSize,o=r/(4*i),s=(o=e?d.ceil(o):d.max((0|o)-this._minBufferSize,0))*i,l=d.min(4*s,r);if(s){for(var c=0;c<s;c+=i)this._doProcessBlock(n,c);t=n.splice(0,s),a.sigBytes-=l}return new f.init(t,l)},clone:function e(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(i.Hasher=u.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(e,t){return new a.init(t).finalize(e)}},_createHmacHelper:function(a){return function(e,t){return new g.HMAC.init(a,t).finalize(e)}}}),r.algo={});return r}(Math);return d=(t=ve).lib.WordArray,t.enc.Base64={stringify:function(e){var t=e.words,a=e.sigBytes,n=this._map;e.clamp();for(var r=[],i=0;i<a;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<a;s++)r.push(n.charAt(o>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r<a.length;r++)n[a.charCodeAt(r)]=r}var i=a.charAt(64);if(i){var o=e.indexOf(i);-1!==o&&(t=o)}return function c(e,t,a){for(var n=[],r=0,i=0;i<t;i++)if(i%4){var o=a[e.charCodeAt(i-1)]<<i%4*2,s=a[e.charCodeAt(i)]>>>6-i%4*2,l=o|s;n[r>>>2]|=l<<24-r%4*8,r++}return d.create(n,r)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(d){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,r=e.algo,S=[];!function(){for(var e=0;e<64;e++)S[e]=4294967296*d.abs(d.sin(e+1))|0}();var i=r.MD5=n.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var n=t+a,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i=this._hash.words,o=e[t+0],s=e[t+1],l=e[t+2],c=e[t+3],d=e[t+4],f=e[t+5],p=e[t+6],u=e[t+7],g=e[t+8],h=e[t+9],m=e[t+10],v=e[t+11],b=e[t+12],_=e[t+13],E=e[t+14],w=e[t+15],y=i[0],A=i[1],C=i[2],T=i[3];A=x(A=x(A=x(A=x(A=L(A=L(A=L(A=L(A=k(A=k(A=k(A=k(A=R(A=R(A=R(A=R(A,C=R(C,T=R(T,y=R(y,A,C,T,o,7,S[0]),A,C,s,12,S[1]),y,A,l,17,S[2]),T,y,c,22,S[3]),C=R(C,T=R(T,y=R(y,A,C,T,d,7,S[4]),A,C,f,12,S[5]),y,A,p,17,S[6]),T,y,u,22,S[7]),C=R(C,T=R(T,y=R(y,A,C,T,g,7,S[8]),A,C,h,12,S[9]),y,A,m,17,S[10]),T,y,v,22,S[11]),C=R(C,T=R(T,y=R(y,A,C,T,b,7,S[12]),A,C,_,12,S[13]),y,A,E,17,S[14]),T,y,w,22,S[15]),C=k(C,T=k(T,y=k(y,A,C,T,s,5,S[16]),A,C,p,9,S[17]),y,A,v,14,S[18]),T,y,o,20,S[19]),C=k(C,T=k(T,y=k(y,A,C,T,f,5,S[20]),A,C,m,9,S[21]),y,A,w,14,S[22]),T,y,d,20,S[23]),C=k(C,T=k(T,y=k(y,A,C,T,h,5,S[24]),A,C,E,9,S[25]),y,A,c,14,S[26]),T,y,g,20,S[27]),C=k(C,T=k(T,y=k(y,A,C,T,_,5,S[28]),A,C,l,9,S[29]),y,A,u,14,S[30]),T,y,b,20,S[31]),C=L(C,T=L(T,y=L(y,A,C,T,f,4,S[32]),A,C,g,11,S[33]),y,A,v,16,S[34]),T,y,E,23,S[35]),C=L(C,T=L(T,y=L(y,A,C,T,s,4,S[36]),A,C,d,11,S[37]),y,A,u,16,S[38]),T,y,m,23,S[39]),C=L(C,T=L(T,y=L(y,A,C,T,_,4,S[40]),A,C,o,11,S[41]),y,A,c,16,S[42]),T,y,p,23,S[43]),C=L(C,T=L(T,y=L(y,A,C,T,h,4,S[44]),A,C,b,11,S[45]),y,A,w,16,S[46]),T,y,l,23,S[47]),C=x(C,T=x(T,y=x(y,A,C,T,o,6,S[48]),A,C,u,10,S[49]),y,A,E,15,S[50]),T,y,f,21,S[51]),C=x(C,T=x(T,y=x(y,A,C,T,b,6,S[52]),A,C,c,10,S[53]),y,A,m,15,S[54]),T,y,s,21,S[55]),C=x(C,T=x(T,y=x(y,A,C,T,g,6,S[56]),A,C,w,10,S[57]),y,A,p,15,S[58]),T,y,_,21,S[59]),C=x(C,T=x(T,y=x(y,A,C,T,d,6,S[60]),A,C,v,10,S[61]),y,A,l,15,S[62]),T,y,h,21,S[63]),i[0]=i[0]+y|0,i[1]=i[1]+A|0,i[2]=i[2]+C|0,i[3]=i[3]+T|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32;var r=d.floor(a/4294967296),i=a;t[15+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,s=o.words,l=0;l<4;l++){var c=s[l];s[l]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},clone:function e(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function R(e,t,a,n,r,i,o){var s=e+(t&a|~t&n)+r+o;return(s<<i|s>>>32-i)+t}function k(e,t,a,n,r,i,o){var s=e+(t&n|a&~n)+r+o;return(s<<i|s>>>32-i)+t}function L(e,t,a,n,r,i,o){var s=e+(t^a^n)+r+o;return(s<<i|s>>>32-i)+t}function x(e,t,a,n,r,i,o){var s=e+(a^(t|~n))+r+o;return(s<<i|s>>>32-i)+t}e.MD5=n._createHelper(i),e.HmacMD5=n._createHmacHelper(i)}(Math),n=(a=ve).lib,r=n.WordArray,i=n.Hasher,o=a.algo,f=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=0;l<80;l++){if(l<16)f[l]=0|e[t+l];else{var c=f[l-3]^f[l-8]^f[l-14]^f[l-16];f[l]=c<<1|c>>>31}var d=(n<<5|n>>>27)+s+f[l];d+=l<20?1518500249+(r&i|~r&o):l<40?1859775393+(r^i^o):l<60?(r&i|r&o|i&o)-1894007588:(r^i^o)-899497514,s=o,o=i,i=r<<30|r>>>2,r=n,n=d}a[0]=a[0]+n|0,a[1]=a[1]+r|0,a[2]=a[2]+i|0,a[3]=a[3]+o|0,a[4]=a[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(a/4294967296),t[15+(n+64>>>9<<4)]=a,e.sigBytes=4*t.length,this._process(),this._hash},clone:function e(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),a.SHA1=i._createHelper(s),a.HmacSHA1=i._createHmacHelper(s),function(r){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,i=e.algo,o=[],_=[];!function(){function e(e){for(var t=r.sqrt(e),a=2;a<=t;a++)if(!(e%a))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var a=2,n=0;n<64;)e(a)&&(n<8&&(o[n]=t(r.pow(a,.5))),_[n]=t(r.pow(a,1/3)),n++),a++}();var E=[],s=i.SHA256=n.extend({_doReset:function(){this._hash=new a.init(o.slice(0))},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=a[5],c=a[6],d=a[7],f=0;f<64;f++){if(f<16)E[f]=0|e[t+f];else{var p=E[f-15],u=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=E[f-2],h=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;E[f]=u+E[f-7]+h+E[f-16]}var m=n&r^n&i^r&i,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&c)+_[f]+E[f];d=c,c=l,l=s,s=o+b|0,o=i,i=r,r=n,n=b+(v+m)|0}a[0]=a[0]+n|0,a[1]=a[1]+r|0,a[2]=a[2]+i|0,a[3]=a[3]+o|0,a[4]=a[4]+s|0,a[5]=a[5]+l|0,a[6]=a[6]+c|0,a[7]=a[7]+d|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=r.floor(a/4294967296),t[15+(n+64>>>9<<4)]=a,e.sigBytes=4*t.length,this._process(),this._hash},clone:function e(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA256=n._createHelper(s),e.HmacSHA256=n._createHmacHelper(s)}(Math),function(){var e=ve,r=e.lib.WordArray,t=e.enc;t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r+=2){var i=t[r>>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>1]|=e.charCodeAt(n)<<16-n%2*16;return r.create(a,2*t)}};function o(e){return e<<8&4278255360|e>>>8&16711935}t.Utf16LE={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r+=2){var i=o(t[r>>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>1]|=o(e.charCodeAt(n)<<16-n%2*16);return r.create(a,2*t)}}}(),function(){if("function"==typeof ArrayBuffer){var e=ve.lib.WordArray,r=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,a=[],n=0;n<t;n++)a[n>>>2]|=e[n]<<24-n%4*8;r.call(this,a,t)}else r.apply(this,arguments)}).prototype=e}}(),function(e){var t=ve,a=t.lib,n=a.WordArray,r=a.Hasher,i=t.algo,A=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),C=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),T=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),S=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),R=n.create([0,1518500249,1859775393,2400959708,2840853838]),k=n.create([1352829926,1548603684,1836072691,2053994217,0]),o=i.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var n=t+a,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i,o,s,l,c,d,f,p,u,g,h,m=this._hash.words,v=R.words,b=k.words,_=A.words,E=C.words,w=T.words,y=S.words;d=i=m[0],f=o=m[1],p=s=m[2],u=l=m[3],g=c=m[4];for(a=0;a<80;a+=1)h=i+e[t+_[a]]|0,h+=a<16?L(o,s,l)+v[0]:a<32?x(o,s,l)+v[1]:a<48?I(o,s,l)+v[2]:a<64?O(o,s,l)+v[3]:M(o,s,l)+v[4],h=(h=F(h|=0,w[a]))+c|0,i=c,c=l,l=F(s,10),s=o,o=h,h=d+e[t+E[a]]|0,h+=a<16?M(f,p,u)+b[0]:a<32?O(f,p,u)+b[1]:a<48?I(f,p,u)+b[2]:a<64?x(f,p,u)+b[3]:L(f,p,u)+b[4],h=(h=F(h|=0,y[a]))+g|0,d=g,g=u,u=F(p,10),p=f,f=h;h=m[1]+s+u|0,m[1]=m[2]+l+g|0,m[2]=m[3]+c+d|0,m[3]=m[4]+i+f|0,m[4]=m[0]+o+p|0,m[0]=h},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,i=r.words,o=0;o<5;o++){var s=i[o];i[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function e(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function L(e,t,a){return e^t^a}function x(e,t,a){return e&t|~e&a}function I(e,t,a){return(e|~t)^a}function O(e,t,a){return e&a|t&~a}function M(e,t,a){return e^(t|~a)}function F(e,t){return e<<t|e>>>32-t}t.RIPEMD160=r._createHelper(o),t.HmacRIPEMD160=r._createHmacHelper(o)}(Math),c=(l=ve).lib.Base,p=l.enc.Utf8,l.algo.HMAC=c.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=p.parse(t));var a=e.blockSize,n=4*a;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),o=r.words,s=i.words,l=0;l<a;l++)o[l]^=1549556828,s[l]^=909522486;r.sigBytes=i.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,a=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(a))}}),g=(u=ve).lib,h=g.Base,v=g.WordArray,m=u.algo,b=m.SHA1,_=m.HMAC,E=m.PBKDF2=h.extend({cfg:h.extend({keySize:4,hasher:b,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var a=this.cfg,n=_.create(a.hasher,e),r=v.create(),i=v.create([1]),o=r.words,s=i.words,l=a.keySize,c=a.iterations;o.length<l;){var d=n.update(t).finalize(i);n.reset();for(var f=d.words,p=f.length,u=d,g=1;g<c;g++){u=n.finalize(u),n.reset();for(var h=u.words,m=0;m<p;m++)f[m]^=h[m]}r.concat(d),s[0]++}return r.sigBytes=4*l,r}}),u.PBKDF2=function(e,t,a){return E.create(a).compute(e,t)},y=(w=ve).lib,A=y.Base,C=y.WordArray,T=w.algo,S=T.MD5,R=T.EvpKDF=A.extend({cfg:A.extend({keySize:4,hasher:S,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var a,n=this.cfg,r=n.hasher.create(),i=C.create(),o=i.words,s=n.keySize,l=n.iterations;o.length<s;){a&&r.update(a),a=r.update(e).finalize(t),r.reset();for(var c=1;c<l;c++)a=r.finalize(a),r.reset();i.concat(a)}return i.sigBytes=4*s,i}}),w.EvpKDF=function(e,t,a){return R.create(a).compute(e,t)},L=(k=ve).lib.WordArray,x=k.algo,I=x.SHA256,O=x.SHA224=I.extend({_doReset:function(){this._hash=new L.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=I._doFinalize.call(this);return e.sigBytes-=4,e}}),k.SHA224=I._createHelper(O),k.HmacSHA224=I._createHmacHelper(O),F=(M=ve).lib,D=F.Base,N=F.WordArray,(B=M.x64={}).Word=D.extend({init:function(e,t){this.high=e,this.low=t}}),B.WordArray=D.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,a=[],n=0;n<t;n++){var r=e[n];a.push(r.high),a.push(r.low)}return N.create(a,this.sigBytes)},clone:function e(){for(var e=D.clone.call(this),t=e.words=this.words.slice(0),a=t.length,n=0;n<a;n++)t[n]=t[n].clone();return e}}),function(p){var e=ve,t=e.lib,u=t.WordArray,n=t.Hasher,d=e.x64.Word,a=e.algo,L=[],x=[],I=[];!function(){for(var e=1,t=0,a=0;a<24;a++){L[e+5*t]=(a+1)*(a+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)x[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,i=0;i<24;i++){for(var o=0,s=0,l=0;l<7;l++){if(1&r){var c=(1<<l)-1;c<32?s^=1<<c:o^=1<<c-32}128&r?r=r<<1^113:r<<=1}I[i]=d.create(o,s)}}();var O=[];!function(){for(var e=0;e<25;e++)O[e]=d.create()}();var r=a.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var a=this._state,n=this.blockSize/2,r=0;r<n;r++){var i=e[t+2*r],o=e[t+2*r+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(C=a[r]).high^=o,C.low^=i}for(var s=0;s<24;s++){for(var l=0;l<5;l++){for(var c=0,d=0,f=0;f<5;f++){c^=(C=a[l+5*f]).high,d^=C.low}var p=O[l];p.high=c,p.low=d}for(l=0;l<5;l++){var u=O[(l+4)%5],g=O[(l+1)%5],h=g.high,m=g.low;for(c=u.high^(h<<1|m>>>31),d=u.low^(m<<1|h>>>31),f=0;f<5;f++){(C=a[l+5*f]).high^=c,C.low^=d}}for(var v=1;v<25;v++){var b=(C=a[v]).high,_=C.low,E=L[v];d=E<32?(c=b<<E|_>>>32-E,_<<E|b>>>32-E):(c=_<<E-32|b>>>64-E,b<<E-32|_>>>64-E);var w=O[x[v]];w.high=c,w.low=d}var y=O[0],A=a[0];y.high=A.high,y.low=A.low;for(l=0;l<5;l++)for(f=0;f<5;f++){var C=a[v=l+5*f],T=O[v],S=O[(l+1)%5+5*f],R=O[(l+2)%5+5*f];C.high=T.high^~S.high&R.high,C.low=T.low^~S.low&R.low}C=a[0];var k=I[s];C.high^=k.high,C.low^=k.low}},_doFinalize:function(){var e=this._data,t=e.words,a=(this._nDataBytes,8*e.sigBytes),n=32*this.blockSize;t[a>>>5]|=1<<24-a%32,t[(p.ceil((a+1)/n)*n>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();for(var r=this._state,i=this.cfg.outputLength/8,o=i/8,s=[],l=0;l<o;l++){var c=r[l],d=c.high,f=c.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),s.push(f),s.push(d)}return new u.init(s,i)},clone:function e(){for(var e=n.clone.call(this),t=e._state=this._state.slice(0),a=0;a<25;a++)t[a]=t[a].clone();return e}});e.SHA3=n._createHelper(r),e.HmacSHA3=n._createHmacHelper(r)}(Math),function(){var e=ve,t=e.lib.Hasher,a=e.x64,n=a.Word,r=a.WordArray,i=e.algo;function o(){return n.create.apply(n,arguments)}var Ae=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],Ce=[];!function(){for(var e=0;e<80;e++)Ce[e]=o()}();var s=i.SHA512=t.extend({_doReset:function(){this._hash=new r.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=a[5],c=a[6],d=a[7],f=n.high,p=n.low,u=r.high,g=r.low,h=i.high,m=i.low,v=o.high,b=o.low,_=s.high,E=s.low,w=l.high,y=l.low,A=c.high,C=c.low,T=d.high,S=d.low,R=f,k=p,L=u,x=g,I=h,O=m,M=v,F=b,D=_,N=E,B=w,P=y,U=A,H=C,$=T,z=S,W=0;W<80;W++){var K,G,Y=Ce[W];if(W<16)G=Y.high=0|e[t+2*W],K=Y.low=0|e[t+2*W+1];else{var V=Ce[W-15],j=V.high,q=V.low,X=(j>>>1|q<<31)^(j>>>8|q<<24)^j>>>7,Q=(q>>>1|j<<31)^(q>>>8|j<<24)^(q>>>7|j<<25),Z=Ce[W-2],J=Z.high,ee=Z.low,te=(J>>>19|ee<<13)^(J<<3|ee>>>29)^J>>>6,ae=(ee>>>19|J<<13)^(ee<<3|J>>>29)^(ee>>>6|J<<26),ne=Ce[W-7],re=ne.high,ie=ne.low,oe=Ce[W-16],se=oe.high,le=oe.low;G=(G=(G=X+re+((K=Q+ie)>>>0<Q>>>0?1:0))+te+((K+=ae)>>>0<ae>>>0?1:0))+se+((K+=le)>>>0<le>>>0?1:0),Y.high=G,Y.low=K}var ce,de=D&B^~D&U,fe=N&P^~N&H,pe=R&L^R&I^L&I,ue=k&x^k&O^x&O,ge=(R>>>28|k<<4)^(R<<30|k>>>2)^(R<<25|k>>>7),he=(k>>>28|R<<4)^(k<<30|R>>>2)^(k<<25|R>>>7),me=(D>>>14|N<<18)^(D>>>18|N<<14)^(D<<23|N>>>9),ve=(N>>>14|D<<18)^(N>>>18|D<<14)^(N<<23|D>>>9),be=Ae[W],_e=be.high,Ee=be.low,we=$+me+((ce=z+ve)>>>0<z>>>0?1:0),ye=he+ue;$=U,z=H,U=B,H=P,B=D,P=N,D=M+(we=(we=(we=we+de+((ce=ce+fe)>>>0<fe>>>0?1:0))+_e+((ce=ce+Ee)>>>0<Ee>>>0?1:0))+G+((ce=ce+K)>>>0<K>>>0?1:0))+((N=F+ce|0)>>>0<F>>>0?1:0)|0,M=I,F=O,I=L,O=x,L=R,x=k,R=we+(ge+pe+(ye>>>0<he>>>0?1:0))+((k=ce+ye|0)>>>0<ce>>>0?1:0)|0}p=n.low=p+k,n.high=f+R+(p>>>0<k>>>0?1:0),g=r.low=g+x,r.high=u+L+(g>>>0<x>>>0?1:0),m=i.low=m+O,i.high=h+I+(m>>>0<O>>>0?1:0),b=o.low=b+F,o.high=v+M+(b>>>0<F>>>0?1:0),E=s.low=E+N,s.high=_+D+(E>>>0<N>>>0?1:0),y=l.low=y+P,l.high=w+B+(y>>>0<P>>>0?1:0),C=c.low=C+H,c.high=A+U+(C>>>0<H>>>0?1:0),S=d.low=S+z,d.high=T+$+(S>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(a/4294967296),t[31+(n+128>>>10<<5)]=a,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function e(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),U=(P=ve).x64,H=U.Word,$=U.WordArray,z=P.algo,W=z.SHA512,K=z.SHA384=W.extend({_doReset:function(){this._hash=new $.init([new H.init(3418070365,3238371032),new H.init(1654270250,914150663),new H.init(2438529370,812702999),new H.init(355462360,4144912697),new H.init(1731405415,4290775857),new H.init(2394180231,1750603025),new H.init(3675008525,1694076839),new H.init(1203062813,3204075428)])},_doFinalize:function(){var e=W._doFinalize.call(this);return e.sigBytes-=16,e}}),P.SHA384=W._createHelper(K),P.HmacSHA384=W._createHmacHelper(K),ve.lib.Cipher||(Y=(G=ve).lib,V=Y.Base,j=Y.WordArray,q=Y.BufferedBlockAlgorithm,(X=G.enc).Utf8,Q=X.Base64,Z=G.algo.EvpKDF,J=Y.Cipher=q.extend({cfg:V.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,a){this.cfg=this.cfg.extend(a),this._xformMode=e,this._key=t,this.reset()},reset:function(){q.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function r(e){return"string"==typeof e?le:oe}return function(n){return{encrypt:function(e,t,a){return r(t).encrypt(n,e,t,a)},decrypt:function(e,t,a){return r(t).decrypt(n,e,t,a)}}}}()}),Y.StreamCipher=J.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ee=G.mode={},te=Y.BlockCipherMode=V.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),ae=ee.CBC=function(){var e=te.extend();function i(e,t,a){var n,r=this._iv;r?(n=r,this._iv=void 0):n=this._prevBlock;for(var i=0;i<a;i++)e[t+i]^=n[i]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;i.call(this,e,t,n),a.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),e.Decryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=e.slice(t,t+n);a.decryptBlock(e,t),i.call(this,e,t,n),this._prevBlock=r}}),e}(),ne=(G.pad={}).Pkcs7={pad:function(e,t){for(var a=4*t,n=a-e.sigBytes%a,r=n<<24|n<<16|n<<8|n,i=[],o=0;o<n;o+=4)i.push(r);var s=j.create(i,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},Y.BlockCipher=J.extend({cfg:J.cfg.extend({mode:ae,padding:ne}),reset:function(){var e;J.reset.call(this);var t=this.cfg,a=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,a&&a.words):(this._mode=e.call(n,this,a&&a.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),re=Y.CipherParams=V.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),ie=(G.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,a=e.salt;return(a?j.create([1398893684,1701076831]).concat(a).concat(t):t).toString(Q)},parse:function(e){var t,a=Q.parse(e),n=a.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=j.create(n.slice(2,4)),n.splice(0,4),a.sigBytes-=16),re.create({ciphertext:a,salt:t})}},oe=Y.SerializableCipher=V.extend({cfg:V.extend({format:ie}),encrypt:function(e,t,a,n){n=this.cfg.extend(n);var r=e.createEncryptor(a,n),i=r.finalize(t),o=r.cfg;return re.create({ciphertext:i,key:a,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,a,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(a,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),se=(G.kdf={}).OpenSSL={execute:function(e,t,a,n){n||(n=j.random(8));var r=Z.create({keySize:t+a}).compute(e,n),i=j.create(r.words.slice(t),4*a);return r.sigBytes=4*t,re.create({key:r,iv:i,salt:n})}},le=Y.PasswordBasedCipher=oe.extend({cfg:oe.cfg.extend({kdf:se}),encrypt:function(e,t,a,n){var r=(n=this.cfg.extend(n)).kdf.execute(a,e.keySize,e.ivSize);n.iv=r.iv;var i=oe.encrypt.call(this,e,t,r.key,n);return i.mixIn(r),i},decrypt:function(e,t,a,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(a,e.keySize,e.ivSize,t.salt);return n.iv=r.iv,oe.decrypt.call(this,e,t,r.key,n)}})),ve.mode.CFB=function(){var e=ve.lib.BlockCipherMode.extend();function i(e,t,a,n){var r,i=this._iv;i?(r=i.slice(0),this._iv=undefined):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o<a;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;i.call(this,e,t,n,a),this._prevBlock=e.slice(t,t+n)}}),e.Decryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=e.slice(t,t+n);i.call(this,e,t,n,a),this._prevBlock=r}}),e}(),ve.mode.ECB=((ce=ve.lib.BlockCipherMode.extend()).Encryptor=ce.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),ce.Decryptor=ce.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),ce),ve.pad.AnsiX923={pad:function(e,t){var a=e.sigBytes,n=4*t,r=n-a%n,i=a+r-1;e.clamp(),e.words[i>>>2]|=r<<24-i%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso10126={pad:function(e,t){var a=4*t,n=a-e.sigBytes%a;e.concat(ve.lib.WordArray.random(n-1)).concat(ve.lib.WordArray.create([n<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso97971={pad:function(e,t){e.concat(ve.lib.WordArray.create([2147483648],1)),ve.pad.ZeroPadding.pad(e,t)},unpad:function(e){ve.pad.ZeroPadding.unpad(e),e.sigBytes--}},ve.mode.OFB=(de=ve.lib.BlockCipherMode.extend(),fe=de.Encryptor=de.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._keystream;r&&(i=this._keystream=r.slice(0),this._iv=undefined),a.encryptBlock(i,0);for(var o=0;o<n;o++)e[t+o]^=i[o]}}),de.Decryptor=fe,de),ve.pad.NoPadding={pad:function(){},unpad:function(){}},ue=(pe=ve).lib.CipherParams,ge=pe.enc.Hex,pe.format.Hex={stringify:function(e){return e.ciphertext.toString(ge)},parse:function(e){var t=ge.parse(e);return ue.create({ciphertext:t})}},function(){var e=ve,t=e.lib.BlockCipher,a=e.algo,c=[],d=[],f=[],p=[],u=[],g=[],h=[],m=[],v=[],b=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var a=0,n=0;for(t=0;t<256;t++){var r=n^n<<1^n<<2^n<<3^n<<4;r=r>>>8^255&r^99,c[a]=r;var i=e[d[r]=a],o=e[i],s=e[o],l=257*e[r]^16843008*r;f[a]=l<<24|l>>>8,p[a]=l<<16|l>>>16,u[a]=l<<8|l>>>24,g[a]=l;l=16843009*s^65537*o^257*i^16843008*a;h[r]=l<<24|l>>>8,m[r]=l<<16|l>>>16,v[r]=l<<8|l>>>24,b[r]=l,a?(a=i^e[e[e[s^i]]],n^=e[e[n]]):a=n=1}}();var _=[0,1,2,4,8,16,32,64,128,27,54],n=a.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,a=e.sigBytes/4,n=4*((this._nRounds=a+6)+1),r=this._keySchedule=[],i=0;i<n;i++)i<a?r[i]=t[i]:(l=r[i-1],i%a?6<a&&i%a==4&&(l=c[l>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l]):(l=c[(l=l<<8|l>>>24)>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l],l^=_[i/a|0]<<24),r[i]=r[i-a]^l);for(var o=this._invKeySchedule=[],s=0;s<n;s++){i=n-s;if(s%4)var l=r[i];else l=r[i-4];o[s]=s<4||i<=4?l:h[c[l>>>24]]^m[c[l>>>16&255]]^v[c[l>>>8&255]]^b[c[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,f,p,u,g,c)},decryptBlock:function(e,t){var a=e[t+1];e[t+1]=e[t+3],e[t+3]=a,this._doCryptBlock(e,t,this._invKeySchedule,h,m,v,b,d);a=e[t+1];e[t+1]=e[t+3],e[t+3]=a},_doCryptBlock:function(e,t,a,n,r,i,o,s){for(var l=this._nRounds,c=e[t]^a[0],d=e[t+1]^a[1],f=e[t+2]^a[2],p=e[t+3]^a[3],u=4,g=1;g<l;g++){var h=n[c>>>24]^r[d>>>16&255]^i[f>>>8&255]^o[255&p]^a[u++],m=n[d>>>24]^r[f>>>16&255]^i[p>>>8&255]^o[255&c]^a[u++],v=n[f>>>24]^r[p>>>16&255]^i[c>>>8&255]^o[255&d]^a[u++],b=n[p>>>24]^r[c>>>16&255]^i[d>>>8&255]^o[255&f]^a[u++];c=h,d=m,f=v,p=b}h=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^a[u++],m=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^a[u++],v=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^a[u++],b=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^a[u++];e[t]=h,e[t+1]=m,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(n)}(),function(){var e=ve,t=e.lib,r=t.WordArray,a=t.BlockCipher,n=e.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],i=n.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],a=0;a<56;a++){var n=c[a]-1;t[a]=e[n>>>5]>>>31-n%32&1}for(var r=this._subKeys=[],i=0;i<16;i++){var o=r[i]=[],s=f[i];for(a=0;a<24;a++)o[a/6|0]|=t[(d[a]-1+s)%28]<<31-a%6,o[4+(a/6|0)]|=t[28+(d[a+24]-1+s)%28]<<31-a%6;o[0]=o[0]<<1|o[0]>>>31;for(a=1;a<7;a++)o[a]=o[a]>>>4*(a-1)+3;o[7]=o[7]<<5|o[7]>>>27}var l=this._invSubKeys=[];for(a=0;a<16;a++)l[a]=r[15-a]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,a){this._lBlock=e[t],this._rBlock=e[t+1],g.call(this,4,252645135),g.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),g.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=a[n],i=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=p[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=i^s}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,g.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function g(e,t){var a=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=a,this._lBlock^=a<<e}function h(e,t){var a=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=a,this._rBlock^=a<<e}e.DES=a._createHelper(i);var o=n.TripleDES=a.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),a=e.length<4?e.slice(0,2):e.slice(2,4),n=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=i.createEncryptor(r.create(t)),this._des2=i.createEncryptor(r.create(a)),this._des3=i.createEncryptor(r.create(n))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=a._createHelper(o)}(),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,n=a.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,a=e.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var i=0;r<256;r++){var o=r%a,s=t[o>>>2]>>>24-o%4*8&255;i=(i+n[r]+s)%256;var l=n[r];n[r]=n[i],n[i]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0});function r(){for(var e=this._S,t=this._i,a=this._j,n=0,r=0;r<4;r++){a=(a+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[a],e[a]=i,n|=e[(e[t]+e[a])%256]<<24-8*r}return this._i=t,this._j=a,n}e.RC4=t._createHelper(n);var i=a.RC4Drop=n.extend({cfg:n.cfg.extend({drop:192}),_doReset:function(){n._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)r.call(this)}});e.RC4Drop=t._createHelper(i)}(),ve.mode.CTRGladman=function(){var e=ve.lib.BlockCipherMode.extend();function c(e){if(255==(e>>24&255)){var t=e>>16&255,a=e>>8&255,n=255&e;255===t?(t=0,255===a?(a=0,255===n?n=0:++n):++a):++t,e=0,e+=t<<16,e+=a<<8,e+=n}else e+=1<<24;return e}var t=e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=undefined),function l(e){return 0===(e[0]=c(e[0]))&&(e[1]=c(e[1])),e}(i);var o=i.slice(0);a.encryptBlock(o,0);for(var s=0;s<n;s++)e[t+s]^=o[s]}});return e.Decryptor=t,e}(),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,r=[],l=[],c=[],n=a.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,a=0;a<4;a++)e[a]=16711935&(e[a]<<8|e[a]>>>24)|4278255360&(e[a]<<24|e[a]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(a=this._b=0;a<4;a++)p.call(this);for(a=0;a<8;a++)r[a]^=n[a+4&7];if(t){var i=t.words,o=i[0],s=i[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=c,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=c,r[7]^=f;for(a=0;a<4;a++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),r[0]=a[0]^a[5]>>>16^a[3]<<16,r[1]=a[2]^a[7]>>>16^a[5]<<16,r[2]=a[4]^a[1]>>>16^a[7]<<16,r[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,a=0;a<8;a++)l[a]=t[a];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<l[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<l[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<l[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<l[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<l[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<l[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<l[6]>>>0?1:0)|0,this._b=t[7]>>>0<l[7]>>>0?1:0;for(a=0;a<8;a++){var n=e[a]+t[a],r=65535&n,i=n>>>16,o=((r*r>>>17)+r*i>>>15)+i*i,s=((4294901760&n)*n|0)+((65535&n)*n|0);c[a]=o^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.Rabbit=t._createHelper(n)}(),ve.mode.CTR=(he=ve.lib.BlockCipherMode.extend(),me=he.Encryptor=he.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=undefined);var o=i.slice(0);a.encryptBlock(o,0),i[n-1]=i[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=o[s]}}),he.Decryptor=me,he),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,r=[],l=[],c=[],n=a.RabbitLegacy=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,a=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],r=this._b=0;r<4;r++)p.call(this);for(r=0;r<8;r++)n[r]^=a[r+4&7];if(t){var i=t.words,o=i[0],s=i[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=c,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=c,n[7]^=f;for(r=0;r<4;r++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),r[0]=a[0]^a[5]>>>16^a[3]<<16,r[1]=a[2]^a[7]>>>16^a[5]<<16,r[2]=a[4]^a[1]>>>16^a[7]<<16,r[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,a=0;a<8;a++)l[a]=t[a];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<l[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<l[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<l[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<l[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<l[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<l[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<l[6]>>>0?1:0)|0,this._b=t[7]>>>0<l[7]>>>0?1:0;for(a=0;a<8;a++){var n=e[a]+t[a],r=65535&n,i=n>>>16,o=((r*r>>>17)+r*i>>>15)+i*i,s=((4294901760&n)*n|0)+((65535&n)*n|0);c[a]=o^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.RabbitLegacy=t._createHelper(n)}(),ve.pad.ZeroPadding={pad:function(e,t){var a=4*t;e.clamp(),e.sigBytes+=a-(e.sigBytes%a||a)},unpad:function(e){var t=e.words,a=e.sigBytes-1;for(a=e.sigBytes-1;0<=a;a--)if(t[a>>>2]>>>24-a%4*8&255){e.sigBytes=a+1;break}}},{init:function be(){},cryptoJS:ve}},Object.assign(Rt.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),Rt.PLUGINS.fontFamily=function(r){var i=r.$;function o(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return i(this).grep(t,function(e){return 0<e.length})}function s(e,t){for(var a=0;a<e.length;a++)for(var n=0;n<t.length;n++)if(e[a].toLowerCase()===t[n].toLowerCase())return[a,n];return null}function a(){var e=o(i(r.selection.element()).css("font-family")),t=[];for(var a in r.opts.fontFamily)if(r.opts.fontFamily.hasOwnProperty(a)){var n=s(e,o(a));n&&t.push([a,n])}return 0===t.length?null:(t.sort(function(e,t){var a=e[1][0]-t[1][0];return 0===a?e[1][1]-t[1][1]:a}),t[0][0])}return{apply:function t(e){r.format.applyStyle("font-family",e)},refreshOnShow:function n(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(a(),'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function l(e){if(r.opts.fontFamilySelection){var t=i(r.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(r.opts.fontFamily[a()]||t[0]||r.language.translate(r.opts.fontFamilyDefaultSelection))}}}},Rt.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'.concat(a,'" \n style="font-family: ').concat(a,'" title="').concat(t[a],'">').concat(t[a],"</a></li>"));return e+="</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),Rt.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"}),Object.assign(Rt.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"Font Size",fontSizeUnit:"px"}),Rt.PLUGINS.fontSize=function(n){var r=n.$;return{apply:function t(e){n.format.applyStyle("font-size",e)},refreshOnShow:function i(e,t){var a=r(n.selection.element()).css("font-size");"pt"===n.opts.fontSizeUnit&&(a="".concat(Math.round(72*parseFloat(a,10)/96),"pt")),t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(a,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function a(e){if(n.opts.fontSizeSelection){var t=n.helpers.getPX(r(n.selection.element()).css("font-size"));"pt"===n.opts.fontSizeUnit&&(t="".concat(Math.round(72*parseFloat(t,10)/96),"pt")),e.find("> span").text(t)}}}},Rt.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(e){return e.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(e){return e.opts.fontSizeDefaultSelection},html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontSize,a=0;a<t.length;a++){var n=t[a];e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'.concat(n).concat(this.opts.fontSizeUnit,'" title="').concat(n,'">').concat(n,"</a></li>")}return e+="</ul>"},callback:function(e,t){this.fontSize.apply(t)},refresh:function(e){this.fontSize.refresh(e)},refreshOnShow:function(e,t){this.fontSize.refreshOnShow(e,t)},plugin:"fontSize"}),Rt.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"}),Object.assign(Rt.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(Rt.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),Rt.PLUGINS.forms=function(o){var s,l=o.$;function t(e){o.selection.clear(),l(this).data("mousedown",!0)}function a(e){l(this).data("mousedown")&&(e.stopPropagation(),l(this).removeData("mousedown"),d(s=this)),e.preventDefault()}function n(){o.$el.find("input, textarea, button").removeData("mousedown")}function r(){l(this).removeData("mousedown")}function c(){return s||null}function d(e){if(-1==["checkbox","radio"].indexOf(e.type)){var t=o.popups.get("forms.edit");t||(t=function i(){var e="";0<o.opts.formEditButtons.length&&(e='<div class="fr-buttons">'.concat(o.button.buildList(o.opts.formEditButtons),"</div>"));var t={buttons:e},a=o.popups.create("forms.edit",t);return o.$wp&&o.events.$on(o.$wp,"scroll.link-edit",function(){c()&&o.popups.isVisible("forms.edit")&&d(c())}),a}());var a=l(s=e);o.popups.refresh("forms.edit"),o.popups.setContainer("forms.edit",o.$sc);var n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();o.popups.show("forms.edit",n,r,a.outerHeight())}}function i(){var e=o.popups.get("forms.update"),t=c();if(t){var a=l(t);a.is("button")?e.find('input[type="text"][name="text"]').val(a.text()):a.is("input[type=button]")||a.is("input[type=submit]")||a.is("input[type=reset]")?e.find('input[type="text"][name="text"]').val(a.val()):e.find('input[type="text"][name="text"]').val(a.attr("placeholder"))}e.find('input[type="text"][name="text"]').trigger("change")}function f(){s=null}function p(e){if(e)return o.popups.onRefresh("forms.update",i),o.popups.onHide("forms.update",f),!0;var t="";1<=o.opts.formUpdateButtons.length&&(t='<div class="fr-buttons">'.concat(o.button.buildList(o.opts.formUpdateButtons),"</div>"));var a=0,n={buttons:t,text_layer:'<div class="fr-forms-text-layer fr-layer fr-active"> \n <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++a,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(o.language.translate("Update"),"</button></div></div>")};return o.popups.create("forms.update",n)}return{_init:function u(){!function e(){o.events.$on(o.$el,o._mousedown,"input, textarea, button",t),o.events.$on(o.$el,o._mouseup,"input, textarea, button",a),o.events.$on(o.$el,"touchmove","input, textarea, button",r),o.events.$on(o.$el,o._mouseup,n),o.events.$on(o.$win,o._mouseup,n),p(!0)}(),o.events.$on(o.$el,"submit","form",function(e){return e.preventDefault(),!1})},updateInput:function g(){var e=o.popups.get("forms.update"),t=c();if(t){var a=l(t),n=e.find('input[type="text"][name="text"]').val()||"";a.is("button")?n.length?a.text(n):a.text("\u200b"):-1!=["button","submit","reset"].indexOf(t.type)?a.attr("value",n):a.attr("placeholder",n),o.popups.hide("forms.update"),d(t)}},getInput:c,applyStyle:function h(e,t,a){void 0===t&&(t=o.opts.formStyles),void 0===a&&(a=o.opts.formMultipleStyles);var n=c();if(!n)return!1;if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),l(n).removeClass(r.join(" "))}l(n).toggleClass(e)},showUpdatePopup:function m(){var e=c();if(e){var t=l(e),a=o.popups.get("forms.update");a||(a=p()),o.popups.isVisible("forms.update")||o.popups.refresh("forms.update"),o.popups.setContainer("forms.update",o.$sc);var n=t.offset().left+t.outerWidth()/2,r=t.offset().top+t.outerHeight();o.popups.show("forms.update",n,r,t.outerHeight())}},showEditPopup:d,back:function v(){o.events.disableBlur(),o.selection.restore(),o.events.enableBlur();var e=c();e&&o.$wp&&("BUTTON"===e.tagName&&o.selection.restore(),d(e))}}},Rt.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),Rt.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),Rt.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list">',t=this.opts.formStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(a,'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){var a=this.forms.getInput();a&&(this.forms.applyStyle(t),this.forms.showEditPopup(a))},refreshOnShow:function(e,t){var a=this.$,n=this.forms.getInput();if(n){var r=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1");a(this).toggleClass("fr-active",r.hasClass(e))})}}}),Rt.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),Rt.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),Rt.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),Rt.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),Rt.PLUGINS.fullscreen=function(r){var t,a,n,i,o=r.$,s=function s(){return r.$box.hasClass("fr-fullscreen")};function l(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(d,250),!1;t=r.helpers.scrollTop(),r.opts.iframe&&r.markdown&&r.markdown.isEnabled()&&(r.$box=r.$oel),r.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),r.helpers.isMobile()&&(r.opts.toolbarBottom?r.$tb[0].removeAttribute("style"):(r.$tb.data("parent",r.$tb.parent()),r.$box.prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")))),a=r.opts.height,n=r.opts.heightMax,i=r.opts.zIndex,r.opts.height=r.o_win.innerHeight-(r.opts.toolbarInline?0:r.$tb.outerHeight()+(r.$second_tb?r.$second_tb.outerHeight():0)),r.opts.zIndex=2147483641,r.opts.heightMax=null,r.size.refresh(),r.opts.toolbarInline&&r.toolbar.showInline();for(var e=r.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&r.$box.prepend(r.$tb),r.events.trigger("charCounter.update"),r.events.trigger("codeView.update"),r.$win.trigger("scroll")}function c(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(d,250),!1;r.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),r.$tb.data("parent")&&r.$tb.data("parent").prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")),r.opts.height=a,r.opts.heightMax=n,r.opts.zIndex=i,r.size.refresh(),r.o_win.scroll(0,t),r.opts.toolbarInline&&r.toolbar.showInline(),r.events.trigger("charCounter.update"),r.opts.toolbarSticky&&r.opts.toolbarStickyOffset&&(r.opts.toolbarBottom?r.$tb.css("bottom",r.opts.toolbarStickyOffset).data("bottom",r.opts.toolbarStickyOffset):r.$tb.css("top",r.opts.toolbarStickyOffset).data("top",r.opts.toolbarStickyOffset));for(var e=r.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&o(r.opts.toolbarContainer).append(r.$tb),o(r.o_win).trigger("scroll"),r.events.trigger("codeView.update")}function d(){s()?c():l(),f(r.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=r.$tb.find('.fr-command[data-cmd="moreText"]'),t=r.$tb.find('.fr-command[data-cmd="moreParagraph"]'),a=r.$tb.find('.fr-command[data-cmd="moreRich"]'),n=r.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&r.refresh.moreText(e),t.length&&r.refresh.moreParagraph(t),a.length&&r.refresh.moreRich(a),n.length&&r.refresh.moreMisc(n)}function f(e){var t=s();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?r.icon.create("fullscreenCompress"):r.icon.create("fullscreen"))}return{_init:function e(){if(!r.$wp)return!1;r.events.$on(o(r.o_win),"resize",function(){s()&&(c(),l())}),r.events.on("toolbar.hide",function(){if(s()&&r.helpers.isMobile())return!1}),r.events.on("position.refresh",function(){if(r.helpers.isIOS())return!s()}),r.events.on("destroy",function(){s()&&c()},!0)},toggle:d,refresh:f,isActive:s}},Rt.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),Rt.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),Rt.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"}),Object.assign(Rt.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),Rt.PLUGINS.help=function(s){var n,r=s.$,i="help";return{_init:function e(){},show:function l(){if(!n){var e="<h4>".concat(s.language.translate("Shortcuts"),"</h4>"),t=function o(){for(var e='<div class="fr-help-modal">',t=0;t<s.opts.helpSets.length;t++){var a=s.opts.helpSets[t],n="<table>";n+="<thead><tr><th>".concat(s.language.translate(a.title),"</th></tr></thead>"),n+="<tbody>";for(var r=0;r<a.commands.length;r++){var i=a.commands[r];n+="<tr>",n+="<td>".concat(s.language.translate(i.desc),"</td>"),n+="<td>".concat(i.val.replace("OSkey",s.helpers.isMac()?"&#8984;":"Ctrl+"),"</td>"),n+="</tr>"}e+=n+="</tbody></table>"}return e+="</div>"}(),a=s.modals.create(i,e,t);n=a.$modal,s.events.$on(r(s.o_win),"resize",function(){s.modals.resize(i)})}s.modals.show(i),s.modals.resize(i)},hide:function t(){s.modals.hide(i)}}},Rt.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),Rt.RegisterShortcut(Rt.KEYCODE.SLASH,"help",null,"/"),Rt.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1}),Object.assign(Rt.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Rt.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Rt.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,Rt.PLUGINS.image=function(w){var y,c,d,f,s,a,A=w.$,C="https://i.froala.com/upload",t=!1,n=1,p=2,u=3,g=4,T=5,S=6,r={};function h(){var e=w.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),y&&e.val(y.attr("src")),e.trigger("change")}function o(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function i(){var e=w.popups.get("image.edit");if(e||(e=O()),e){var t=y;w.popups.setContainer("image.edit",w.$sc),w.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,n=t&&o(t),r=w.$wp&&o(w.$wp);r||(r=n);var i=0;w.opts.iframe?((i=w.$wp.scrollTop()+e.outerHeight())<t.get(0).getBoundingClientRect().top&&(i=t.get(0).getBoundingClientRect().top),i>t.get(0).getBoundingClientRect().top+t.height()&&(i=t.get(0).getBoundingClientRect().top+t.height())):i=r<n?n:w.$wp&&n+t.height()<r+w.$wp.height()?n+t.height():r+e.outerHeight(),y.hasClass("fr-uploading")?M():w.popups.show("image.edit",a,i,1,!0)}}function m(){F()}function l(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ve(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function v(){for(var e,t="IMG"==w.el.tagName?[w.el]:w.el.querySelectorAll("img"),a=0;a<t.length;a++){var n=A(t[a]);!w.opts.htmlUntouched&&w.opts.useClasses?((w.opts.imageDefaultAlign||w.opts.imageDefaultDisplay)&&(0<(e=n).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ve(e)[0])),e.addClass("fr-di".concat(be(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),w.opts.imageTextNear||(0<n.parents(".fr-img-caption").length?n.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):n.removeClass("fr-dii").addClass("fr-dib"))):w.opts.htmlUntouched||w.opts.useClasses||(w.opts.imageDefaultAlign||w.opts.imageDefaultDisplay)&&l(n),w.opts.iframe&&n.on("load",w.size.syncIframe)}}function b(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(w.el.querySelectorAll("img")),n=[];for(t=0;t<a.length;t++)if(n.push(a[t].getAttribute("src")),A(a[t]).toggleClass("fr-draggable",w.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&w.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;w.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var i=a[t].nextSibling;i&&!w.browser.mozilla&&i.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)n.indexOf(s[t].getAttribute("src"))<0&&w.events.trigger("image.removed",[A(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&w.events.trigger("image.loaded",[A(a[t])])}s=a}function R(){if(c||function o(){var e;w.shared.$image_resizer?(c=w.shared.$image_resizer,f=w.shared.$img_overlay,w.events.on("destroy",function(){A("body").first().append(c.removeClass("fr-active"))},!0)):(w.shared.$image_resizer=A(document.createElement("div")).attr("class","fr-image-resizer"),c=w.shared.$image_resizer,w.events.$on(c,"mousedown",function(e){e.stopPropagation()},!0),w.opts.imageResize&&(c.append(_("nw")+_("ne")+_("sw")+_("se")),w.shared.$img_overlay=A(document.createElement("div")).attr("class","fr-image-overlay"),f=w.shared.$img_overlay,e=c.get(0).ownerDocument,A(e).find("body").first().append(f)));w.events.on("shared.destroy",function(){c.html("").removeData().remove(),c=null,w.opts.imageResize&&(f.remove(),f=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize",function(){y&&!y.hasClass("fr-uploading")?pe(!0):y&&(R(),_e(),M(!1))});if(w.opts.imageResize){e=c.get(0).ownerDocument,w.events.$on(c,w._mousedown,".fr-handler",k),w.events.$on(A(e),w._mousemove,L),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,x),w.events.$on(f,"mouseleave",x);var n=1,r=null,i=0;w.events.on("keydown",function(e){if(y){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==Rt.KEYCODE.EQUALS||w.browser.mozilla&&a==Rt.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=te.call(this,e,1,1,n):(a==Rt.KEYCODE.HYPHEN||w.browser.mozilla&&a==Rt.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=te.call(this,e,2,-1,n):w.keys.ctrlKey(e)||a!=Rt.KEYCODE.ENTER||(y.before("<br>"),B(y)),r=a,i=e.timeStamp}},!0),w.events.on("keyup",function(){n=1})}}(),!y)return!1;var e=w.$wp||w.$sc;e.append(c),c.data("instance",w);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=w.helpers.getPX(e.css("border-left-width")),t-=w.helpers.getPX(e.css("border-top-width")),w.$el.is("img")&&w.$sc.is("body")&&(a=t=0);var n=ye();Ae()&&(n=n.find(".fr-img-wrap"));var r=0,i=0;w.opts.iframe&&(r=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),i=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),c.css("top",(w.opts.iframe?n.offset().top+r:n.offset().top+t)-1).css("left",(w.opts.iframe?n.offset().left+i:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function _(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function E(e){Ae()&&y.parents(".fr-img-caption").css("width",e),y.css("width",e)}function k(e){if(!w.core.sameInstance(c))return!0;if(e.preventDefault(),e.stopPropagation(),w.$el.find("img.fr-error").left)return!1;w.undo.canDo()||w.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=w.$oel.get(0),n=a.ownerDocument,r=n.defaultView||n.parentWindow,i=!1;try{i=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(l){}i&&r.frameElement&&(t+=w.helpers.getPX(A(a).offset().left)+r.frameElement.clientLeft)}(d=A(this)).data("start-x",t),d.data("start-width",y.width()),d.data("start-height",y.height());var o=y.width();if(w.opts.imageResizeWithPercent){var s=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;o=(o/A(s).outerWidth()*100).toFixed(2)+"%"}E(o),f.show(),w.popups.hideAll(),he()}function L(e){if(!w.core.sameInstance(c))return!0;var t;if(d&&y){if(e.preventDefault(),w.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var n=a-d.data("start-x"),r=d.data("start-width");if((d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(n=0-n),w.opts.imageResizeWithPercent){var i=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;r=((r+n)/A(i).outerWidth()*100).toFixed(2),w.opts.imageRoundPercent&&(r=Math.round(r)),E("".concat(r,"%")),(t=Ae()?(w.helpers.getPX(y.parents(".fr-img-caption").css("width"))/A(i).outerWidth()*100).toFixed(2):(w.helpers.getPX(y.css("width"))/A(i).outerWidth()*100).toFixed(2))===r||w.opts.imageRoundPercent||E("".concat(t,"%")),y.css("height","").removeAttr("height")}else r+n>=w.opts.imageMinWidth&&(E(r+n),t=Ae()?w.helpers.getPX(y.parents(".fr-img-caption").css("width")):w.helpers.getPX(y.css("width"))),t!==r+n&&E(t),((y.attr("style")||"").match(/(^height:)|(; *height:)/)||y.attr("height"))&&(y.css("height",d.data("start-height")*y.width()/d.data("start-width")),y.removeAttr("height"));R(),w.events.trigger("image.resize",[we()])}}function x(e){if(!w.core.sameInstance(c))return!0;if(d&&y){if(e&&e.stopPropagation(),w.$el.find("img.fr-error").left)return!1;d=null,f.hide(),R(),i(),w.undo.saveStep(),w.events.trigger("image.resizeEnd",[we()])}else c.removeClass("fr-active")}function I(e,t,a){w.edit.on(),y&&y.addClass("fr-error"),r[e]?N(w.language.translate(r[e])):N(w.language.translate("Something went wrong. Please try again.")),!y&&a&&ae(a),w.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function O(e){if(e)return w.$wp&&w.events.$on(w.$wp,"scroll.image-edit",function(){y&&w.popups.isVisible("image.edit")&&(w.events.disableBlur(),i())}),!0;var t="";if(0<w.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(w.button.buildList(w.opts.imageEditButtons),"\n </div>")};return w.popups.create("image.edit",a)}return!1}function M(e){var t=w.popups.get("image.insert");if(t||(t=j()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),y){var a=ye();w.popups.setContainer("image.insert",w.$sc);var n=a.offset().left,r=a.offset().top+a.height();w.popups.show("image.insert",n,r,a.outerHeight())}void 0===e&&D(w.language.translate("Uploading"),0)}function F(e){var t=w.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("img.fr-error").length)){if(w.events.focus(),w.$el.find("img.fr-error").length&&(w.$el.find("img.fr-error").remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&y){var a=y;pe(!0),w.selection.setAfter(a.get(0)),w.selection.restore()}w.popups.hide("image.insert")}}function D(e,t){var a=w.popups.get("image.insert");if(a){var n=a.find(".fr-image-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function N(e){M();var t=w.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),w.events.disableBlur(),a.focus()}function B(e){fe.call(e.get(0))}function P(){var e=A(this);w.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),B(e),w.events.trigger("image.loaded",[e])}function U(o,e,s,l,c){l&&"string"==typeof l&&(l=w.$(l)),w.edit.off(),D(w.language.translate("Loading image")),e&&(o=w.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){w.undo.canDo()||l.hasClass("fr-uploading")||w.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),w.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!w.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||w.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var n=e.get(0).attributes,r=0;r<n.length;r++){var i=n[r];0===i.nodeName.indexOf("data-")?e.removeAttr(i.nodeName):s&&s.hasOwnProperty(i.nodeName)&&e.removeAttr(i.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",P),e.attr("src",o),w.edit.on(),b(!1),l[0].src!=o&&w.selection.restore(),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger(a?"image.replaced":"image.inserted",[e,c])}else(e=W(o,s,P))&&(b(!1),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger("image.inserted",[e,c]))},t.onerror=function(){I(n)},M(w.language.translate("Loading image")),t.src=o}function H(e,t,a){D(w.language.translate("Loading image"));var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(w.opts.imageUploadToS3||w.opts.imageUploadToAzure)if(201==n){var s;if(w.opts.imageUploadToAzure){if(!1===w.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return w.edit.on(),!1;s=t}else s=function c(e){try{var t=A(e).find("Location").text(),a=A(e).find("Key").text();return!1===w.events.trigger("image.uploadedToS3",[t,a,e],!0)?(w.edit.on(),!1):t}catch(n){return I(g,e),!1}}(i);s&&U(s,!1,[],e,r||i)}else I(g,r||i,e);else if(200<=n&&n<300){var l=function d(e){try{if(!1===w.events.trigger("image.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(p,e),!1)}catch(a){return I(g,e),!1}}(o);l&&U(l.link,!1,l,e,r||o)}else I(u,r||o,e)}catch(f){I(g,r||o,e)}}function $(){I(g,this.response||this.responseText||this.responseXML)}function z(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;D(w.language.translate("Uploading"),t)}}function W(e,t,a){var n,r=A(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),r.attr("".concat(n),t[n]));var i=w.opts.imageDefaultWidth;i&&"auto"!=i&&(i=w.opts.imageResizeWithPercent?"100%":"".concat(i,"px")),r.attr("style",i?"width: ".concat(i,";"):""),me(r,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.imageSplitHTML?w.markers.split():w.markers.insert(),w.html.wrap();var o=w.$el.find(".fr-marker");if(o.length)(o.parent().is("hr")||o.parent().is("IMG"))&&o.parent().after(o),w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(w.opts.trackChangesEnabled)return F(!0),!1;w.$el.append(r)}return w.selection.clear(),r}function K(){w.edit.on(),F(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("image.beforeUpload",[e,t]))return!1;var a,n=e[0];if(!(null!==w.opts.imageUploadURL&&w.opts.imageUploadURL!=C||w.opts.imageUploadToS3||w.opts.imageUploadToAzure))return function _(r,i){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),i&&i.data("fr-old-src",i.attr("src")),w.image.insert(e,!1,null,i)}else w.image.insert(e,null,null,w.image.get())},M(),o.readAsDataURL(r)}(n,t||y),!1;if(n.name||(n.name=(new Date).getTime()+"."+(n.type||"image/jpeg").replace(/image\//g,"")),n.size>w.opts.imageMaxSize)return I(T),!1;if(w.opts.imageAllowedTypes.indexOf(n.type.replace(/image\//g,""))<0)return I(S),!1;if(w.drag_support.formdata&&(a=w.drag_support.formdata?new FormData:null),a){var r;if(!1!==w.opts.imageUploadToS3)for(r in a.append("key",w.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(n.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",n.type),w.opts.imageUploadToS3.params)w.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,w.opts.imageUploadToS3.params[r]);for(r in w.opts.imageUploadParams)w.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,w.opts.imageUploadParams[r]);a.append(w.opts.imageUploadParam,n,n.name);var i,o,s=w.opts.imageUploadURL,l=w.opts.imageUploadMethod;w.opts.imageUploadToS3&&(s=w.opts.imageUploadToS3.uploadURL?w.opts.imageUploadToS3.uploadURL:"https://".concat(w.opts.imageUploadToS3.region,".amazonaws.com/").concat(w.opts.imageUploadToS3.bucket)),w.opts.imageUploadToAzure&&(i=s=w.opts.imageUploadToAzure.uploadURL?"".concat(w.opts.imageUploadToAzure.uploadURL,"/").concat(n.name):encodeURI("https://".concat(w.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.imageUploadToAzure.container,"/").concat(n.name)),w.opts.imageUploadToAzure.SASToken&&(s+=w.opts.imageUploadToAzure.SASToken),l="PUT");var c=w.core.getXHR(s,l);if(w.opts.imageUploadToAzure){var d=(new Date).toUTCString();if(!w.opts.imageUploadToAzure.SASToken&&w.opts.imageUploadToAzure.accessKey){var f=w.opts.imageUploadToAzure.account,p=w.opts.imageUploadToAzure.container;if(w.opts.imageUploadToAzure.uploadURL){var u=w.opts.imageUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+n.name),m=l+"\n\n\n"+n.size+"\n\n"+n.type+"\n\n\n\n\n\n\n"+g+"\n"+h,v=w.cryptoJSPlugin.cryptoJS.HmacSHA256(m,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.imageUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;o=v,c.setRequestHeader("Authorization",b)}for(r in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",n.type),c.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.imageUploadParams)w.opts.imageUploadParams.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.imageUploadParams[r]);for(r in w.opts.imageUploadToAzure.params)w.opts.imageUploadToAzure.params.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.imageUploadToAzure.params[r])}!function E(t,a,n,r,i,o){function s(){var e=A(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),w.placeholder.refresh(),B(e),R(),M(),w.edit.off(),t.onload=function(){H.call(t,e,i,o)},t.onerror=$,t.upload.onprogress=z,t.onabort=K,A(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(w.opts.imageUploadToAzure?n:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),A(this).off("error")}),w.edit.on(),w.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):W(e,null,s)},l.readAsDataURL(n)}(c,a,n,t||y,i,o)}}}function Y(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=w.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!w.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(Rt.MARKERS),0===w.$el.find(".fr-marker").length&&w.selection.setAtEnd(w.el),w.popups.hideAll();var n=w.popups.get("image.insert");n||(n=j()),w.popups.setContainer("image.insert",w.$sc);var r=e.originalEvent.pageX,i=e.originalEvent.pageY;if(w.opts.iframe){var o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),s=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"));i+=w.$iframe.offset().top+o,r+=w.$iframe.offset().left+s}return w.popups.show("image.insert",r,i),M(),0<=w.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(S),e.preventDefault(),e.stopPropagation(),!1}}}function j(e){if(e)return w.popups.onRefresh("image.insert",h),w.popups.onHide("image.insert",m),!0;var t,a,n="";w.opts.imageUpload||-1===w.opts.imageInsertButtons.indexOf("imageUpload")||w.opts.imageInsertButtons.splice(w.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=w.button.buildList(w.opts.imageInsertButtons);""!==r&&(n='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var i=w.opts.imageInsertButtons.indexOf("imageUpload"),o=w.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=i&&(t=" fr-active",0<=o&&o<i&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop image"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(w.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(w.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=i&&i<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(w.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var c={buttons:n,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-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="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=w.opts.imageInsertButtons.length&&(a=w.popups.create("image.insert",c)),w.$wp&&w.events.$on(w.$wp,"scroll",function(){y&&w.popups.isVisible("image.insert")&&_e()}),function d(n){w.events.$on(n,"dragover dragenter",".fr-image-upload-layer",function(e){return A(this).addClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.events.$on(n,"dragleave dragend",".fr-image-upload-layer",function(e){return A(this).removeClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.events.$on(n,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||w;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(n,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0),w.events.$on(n,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||w;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,y)}A(this).val("")},!0)}(a),a}function q(){y&&w.popups.get("image.alt").find("input").val(y.attr("alt")||"").trigger("change")}function X(){var e=w.popups.get("image.alt");e||(e=Q()),F(),w.popups.refresh("image.alt"),w.popups.setContainer("image.alt",w.$sc);var t=ye(),a=t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n=t.offset().left+a,r=t.offset().top+t.outerHeight(),i=t.outerHeight();w.opts.iframe&&Ae()&&(i=y?y.outerHeight():0),w.popups.show("image.alt",n,r,i,!0)}function Q(e){if(e)return w.popups.onRefresh("image.alt",q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(w.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},a=w.popups.create("image.alt",t);return w.$wp&&w.events.$on(w.$wp,"scroll.image-alt",function(){y&&w.popups.isVisible("image.alt")&&X()}),a}function Z(){var e=w.popups.get("image.size"),t=y.get(0).style.height?y.get(0).style.height:"auto",a=y.get(0).style.width?y.get(0).style.width:"auto";if(y)if(Ae()){var n=y.parent();n.get(0).style.width||(n=y.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function J(){var e=w.popups.get("image.size");e||(e=ee()),F(),w.popups.refresh("image.size"),w.popups.setContainer("image.size",w.$sc);var t=ye(),a=t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n=t.outerHeight();w.opts.iframe&&Ae()&&(n=y?y.outerHeight():0);var r=t.offset().left+a,i=t.offset().top+t.outerHeight();w.popups.show("image.size",r,i,n,!0)}function ee(e){if(e)return w.popups.onRefresh("image.size",Z),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(w.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-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-image-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="imageSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},a=w.popups.create("image.size",t);return w.$wp&&w.events.$on(w.$wp,"scroll.image-size",function(){y&&w.popups.isVisible("image.size")&&J()}),a}function te(e,t,a,n){return e.pageX=t,k.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),L.call(this,e),x.call(this,e),++n}function ae(e){if(e=e||ye(),w.opts.trackChangesEnabled&&!w.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return w.track_changes.removeSpecialItem(e),w.popups.hideAll(),void pe(!0);e&&!1!==w.events.trigger("image.beforeRemove",[e])&&(w.popups.hideAll(),Ee(),pe(!0),w.undo.canDo()||w.undo.saveStep(),e.get(0)==w.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(w.selection.setBefore(e.get(0).parentNode)||w.selection.setAfter(e.get(0).parentNode)||e.parent().after(Rt.MARKERS),A(e.get(0).parentNode).remove()):(w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0))||e.after(Rt.MARKERS),e.remove()),w.html.fillEmptyBlocks(),w.selection.restore()),w.undo.saveStep())}function ne(e){var t=e.which;if(y&&(t==Rt.KEYCODE.BACKSPACE||t==Rt.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ae(),!1;if(y&&t==Rt.KEYCODE.ESC){var a=y;return pe(!0),w.selection.setAfter(a.get(0)),w.selection.restore(),e.preventDefault(),!1}if(!y||t!=Rt.KEYCODE.ARROW_LEFT&&t!=Rt.KEYCODE.ARROW_RIGHT)return y&&t===Rt.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):y&&t!=Rt.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=y.get(0);return pe(!0),t==Rt.KEYCODE.ARROW_LEFT?w.selection.setBefore(n):w.selection.setAfter(n),w.selection.restore(),e.preventDefault(),!1}function re(e){if(e&&"IMG"==e.tagName){if(w.node.hasClass(e,"fr-uploading")||w.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):w.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&w.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<n.length;r++)re(n[r])}function ie(e){if(!1===w.events.trigger("image.beforePasteUpload",[e]))return A(e).removeAttr("data-fr-image-pasted"),!1;y=A(e),R(),i(),M(),y.on("load",function(){var t=[];R(),A(w.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&M(),A(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&A(this).off("load")});for(var t=A(e).attr("src").split(","),a=atob(t[1]),n=[],r=0;r<a.length;r++)n.push(a.charCodeAt(r));G([w.browser.safari&&!w.opts.imageUploadURL?new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"")}):new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],y)}function oe(){w.opts.imagePaste?w.$el.find("img[data-fr-image-pasted]").each(function(e,a){if(w.opts.imagePasteProcess){var t=w.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=w.opts.imageResizeWithPercent?"%":"px"),A(a).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(A(a),w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign)}if(0===a.src.indexOf("data:"))ie(a);else if(0===a.src.indexOf("blob:")||0===a.src.indexOf("http")&&w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var e=w.o_doc.createElement("CANVAS"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.drawImage(this,0,0),setTimeout(function(){ie(a)},0),a.src=e.toDataURL(Rt.IMAGE_TYPE)},w.browser.msie&&Rt.IMAGE_ALLOW_REGEX.test(a.src)&&(Rt.IMAGE_TYPE="image/"+a.src.split(Rt.IMAGE_ALLOW_REGEX)[1]),n.src=(0===a.src.indexOf("blob:")?"":"".concat(w.opts.imageCORSProxy,"/"))+a.src,0!==a.src.indexOf("blob:")&&w.undo.saveStep()}else 0!==a.src.indexOf("http")||0===a.src.indexOf("https://mail.google.com/mail")?(w.selection.save(),A(a).remove(),w.selection.restore()):A(a).removeAttr("data-fr-image-pasted")}):w.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=w.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=w.opts.imageResizeWithPercent?"%":"px"),w.undo.saveStep(),w.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var n=w.$el.find('img[data-fr-image-pasted="true"]');n&&me(n,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),w.events.trigger("paste.after")}function le(e,t){var a=new FileReader;a.onload=function n(e){var t=w.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=w.opts.imageResizeWithPercent?"%":"px"),w.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=w.$el.find('img[data-fr-image-pasted="true"]');a&&me(a,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),w.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function ce(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"";w.browser.mozilla&&(""===t||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(t))&&(t=w.win.localStorage.getItem("fr-copied-html"));var a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a&&!w.opts.imageUploadURL){if(!a)return!1;var n=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var i=0;i<e.clipboardData.items.length;i++)if(r=e.clipboardData.items[i].getAsFile()){Rt.IMAGE_TYPE=r.type;break}if(r)return le(r,n),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(o),!1}}}function de(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Rt.INSTANCES.length;t++)Rt.INSTANCES[t]!=w&&Rt.INSTANCES[t].events.trigger("image.hideResizer");w.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.opts.iframe&&w.size.syncIframe(),y=A(this),Ee(),R(),i(),w.browser.msie?(w.popups.areVisible()&&w.events.disableBlur(),w.win.getSelection&&(w.win.getSelection().removeAllRanges(),w.win.getSelection().addRange(w.doc.createRange()))):w.selection.clear(),w.helpers.isIOS()&&(w.events.disableBlur(),w.$el.blur()),w.button.bulkRefresh(),w.events.trigger("video.hideResizer")}function pe(e){y&&(function t(){return ue}()||!0===e)&&(w.toolbar.enable(),c.removeClass("fr-active"),w.popups.hideAll(),y=null,he(),d=null,f&&f.hide())}r[n]="Image cannot be loaded from the passed link.",r[p]="No link in upload response.",r[u]="Error during file upload.",r[g]="Parsing response failed.",r[T]="File is too large.",r[S]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ue=!(r[8]="Image file is corrupted.");function ge(){ue=!0}function he(){ue=!1}function me(e,t,a){if(!w.opts.htmlUntouched&&w.opts.useClasses)e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]));else if("inline"==t)if(e.css({display:"inline-block",verticalAlign:"bottom",margin:w.opts.imageDefaultMargin}),"center"==a)e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*w.opts.imageDefaultMargin,"px)"),textAlign:"center"});else if("left"==a){var n="0px",r=e.parent("span.fr-img-caption").get(0);r||(r=e.parent().get(0)),r&&"li"===r.tagName.toLowerCase()?n="20px":r&&"p"===r.tagName.toLowerCase()&&(n="15px"),e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"left",marginRight:n})}else e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"right"});else"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(w.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ve(e){if(void 0===e&&(e=ye()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function be(e){void 0===e&&(e=ye());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 _e(){var e=w.popups.get("image.insert");e||(e=j()),w.popups.isVisible("image.insert")||(F(),w.popups.refresh("image.insert"),w.popups.setContainer("image.insert",w.$sc));var t=ye(),a=t&&t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n,r=t.offset().left+a,i=t.outerHeight(!0);w.opts.iframe&&Ae()&&(i=y?y.outerHeight():0),n=0<w.$el.find("img[data-fr-image-pasted]").length?w.$wp.offset().top-w.helpers.scrollTop()+w.$wp.height():t.offset().top+t.outerHeight(),w.popups.show("image.insert",r,n,i,!0)}function Ee(){if(y){w.events.disableBlur(),w.selection.clear();var e=w.doc.createRange();e.selectNode(y.get(0)),w.browser.msie&&e.collapse(!0),w.selection.get().addRange(e),w.events.enableBlur()}}function we(){return y}function ye(){return Ae()?y.parents(".fr-img-caption").first():y}function Ae(){return!!y&&0<y.parents(".fr-img-caption").length}function Ce(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Te(){var i;(function e(){w.events.$on(w.$el,w._mousedown,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==A(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;w.helpers.isMobile()||w.selection.clear(),t=!0,w.popups.areVisible()&&w.events.disableBlur(),w.browser.msie&&(w.events.disableBlur(),w.$el.attr("contenteditable",!1)),w.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),w.events.$on(w.$el,w._mousedown,".fr-img-caption .fr-inner",function(e){w.core.hasFocus()||w.events.focus(),e.stopPropagation()}),w.events.$on(w.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===w.opts.toolbarInline&&(w.toolbar.hide(),e.stopPropagation())}),w.events.$on(w.$el,w._mousedown,'img:not([contenteditable="false"])',function(e){var t=this;w.browser.mozilla&&3==e.which&&(A(this).attr("contenteditable",!1),setTimeout(function(){A(t).removeAttr("contenteditable")},200))}),w.events.$on(w.$el,w._mouseup,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==A(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),w.browser.msie&&(w.$el.attr("contenteditable",!0),w.events.enableBlur()))}),w.events.on("keyup",function(e){if(e.shiftKey&&""===w.selection.text().replace(/\n/g,"")&&w.keys.isArrow(e.which)){var t=w.selection.element(),a=w.selection.endElement();t&&"IMG"==t.tagName?B(A(t)):a&&"IMG"==a.tagName&&B(A(a))}},!0),w.events.on("drop",V),w.events.on("element.beforeDrop",Y),w.events.on("mousedown window.mousedown",ge),w.events.on("window.touchmove",he),w.events.on("mouseup window.mouseup",function(){if(y&&!w.helpers.isMobile())return pe(),!1;he()}),w.events.on("touchstart touchend",function(){if(y&&w.helpers.isMobile())return pe(),!1;he()}),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),w.events.on("image.resizeEnd",function(){w.opts.iframe&&w.size.syncIframe()}),w.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),w.events.on("modals.hide",function(){y&&(Ee(),w.selection.clear())}),w.events.on("image.resizeEnd",function(){w.win.getSelection&&B(y)}),w.opts.imageAddNewLine&&w.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!w.node.isElement(t);)t=w.node.isLastSibling(t)?t.parentNode:null;w.node.isElement(t)&&(w.opts.enter===Rt.ENTER_BR?e.after("<br>"):A(w.node.blockParent(e.get(0))).after("<".concat(w.html.defaultTag(),"><br></").concat(w.html.defaultTag(),">")))})})(),"IMG"==w.el.tagName&&w.$el.addClass("fr-view"),w.events.$on(w.$el,w.helpers.isMobile()&&!w.helpers.isWindowsPhone()?"touchend":"click","IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',fe),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),w.events.$on(w.$el,"touchmove",function(){a=!0})),w.$wp?(w.events.on("window.keydown keydown",ne,!0),w.events.on("keyup",function(e){if(y&&e.which==Rt.KEYCODE.ENTER)return!1},!0),w.events.$on(w.$el,"keydown",function(){var e=w.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&w.node.isLastSibling(e))&&(e=e.parentNode),w.node.hasClass(e,"fr-inner")||(w.node.hasClass(e,"fr-img-caption")||(e=A(e).parents(".fr-img-caption").get(0)),w.node.hasClass(e,"fr-img-caption")&&(w.opts.trackChangesEnabled||A(e).after(Rt.INVISIBLE_SPACE+Rt.MARKERS),w.selection.restore()))})):w.events.$on(w.$win,"keydown",ne),w.events.on("toolbar.esc",function(){if(y){if(w.$wp)w.events.disableBlur(),w.events.focus();else{var e=y;pe(!0),w.selection.setAfter(e.get(0)),w.selection.restore()}return!1}},!0),w.events.on("toolbar.focusEditor",function(){if(y)return!1},!0),w.events.on("window.cut window.copy",function(e){if(y&&w.popups.isVisible("image.edit")&&!w.popups.get("image.edit").find(":focus").length){var t=ye();Ae()?(t.before(Rt.START_MARKER),t.after(Rt.END_MARKER),w.selection.restore(),w.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(Ee(),w.paste.saveCopiedText(y.get(0).outerHTML,y.attr("alt"))),"copy"==e.type?setTimeout(function(){B(y)}):(pe(!0),w.undo.saveStep(),setTimeout(function(){w.undo.saveStep()},0))}},!0),w.browser.msie&&w.events.on("keydown",function(e){if(!w.selection.isCollapsed()||!y)return!0;var t=e.which;t==Rt.KEYCODE.C&&w.keys.ctrlKey(e)?w.events.trigger("window.copy"):t==Rt.KEYCODE.X&&w.keys.ctrlKey(e)&&w.events.trigger("window.cut")}),w.events.$on(A(w.o_win),"keydown",function(e){var t=e.which;if(y&&t==Rt.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),w.events.$on(w.$win,"keydown",function(e){var t=e.which;y&&y.hasClass("fr-uploading")&&t==Rt.KEYCODE.ESC&&y.trigger("abortUpload")}),w.events.on("destroy",function(){y&&y.hasClass("fr-uploading")&&y.trigger("abortUpload")}),w.events.on("paste.before",ce),w.events.on("paste.beforeCleanup",de),w.events.on("paste.after",oe),w.events.on("html.set",v),w.events.on("html.inserted",v),v(),w.events.on("destroy",function(){s=[]}),w.events.on("html.processGet",re),w.opts.imageOutputSize&&w.events.on("html.beforeGet",function(){i=w.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=parseFloat(A(i[e]).css("padding-left"))+parseFloat(A(i[e]).css("padding-right")),a=A(i[e]).width()-t,n=i[e].style.width||a,r=i[e].style.height||A(i[e]).height();n&&i[e].setAttribute("width","".concat(n).replace(/px/,"")),r&&i[e].setAttribute("height","".concat(r).replace(/px/,""))}}),w.opts.iframe&&w.events.on("image.loaded",w.size.syncIframe),w.$wp&&(b(),w.events.on("contentChanged",b)),w.events.$on(A(w.o_win),"orientationchange.image",function(){setTimeout(function(){y&&B(y)},100)}),O(!0),j(!0),ee(!0),Q(!0),w.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return ae(e),!1})},showInsertPopup:function Se(){var e=w.$tb.find('.fr-command[data-cmd="insertImage"]'),t=w.popups.get("image.insert");if(t||(t=j()),F(),!t.hasClass("fr-active"))if(w.popups.refresh("image.insert"),w.popups.setContainer("image.insert",w.$tb),e.isVisible()){var a=w.button.getPosition(e),n=a.left,r=a.top;w.popups.show("image.insert",n,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("image.insert")},showLayer:function Re(e){var t,a,n=w.popups.get("image.insert");if(y||w.opts.toolbarInline){if(y){var r=ye(),i=0;Ae()&&(r=r.find(".fr-img-wrap"),i=y.outerWidth()/2),a=r.offset().top+r.outerHeight(),t=r.offset().left+i}}else{var o=w.$tb.find('.fr-command[data-cmd="insertImage"]');t=o.offset().left,a=o.offset().top+(w.opts.toolbarBottom?10:o.outerHeight()-10)}!y&&w.opts.toolbarInline&&(a=n.offset().top-w.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("image.insert",t,a,y?y.outerHeight():0,Ae()),w.accessibility.focusPopup(n)},refreshUploadButton:function ke(e){var t=w.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Le(e){var t=w.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=w.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){M(),D(w.language.translate("Loading image"));var t=e.val().trim();if(w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy&&w.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],y):I(n)},a.onerror=function(){U(t,!0,[],y)},a.open("GET","".concat(w.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else U(t,!0,[],y);e.val(""),e.blur()}},align:function Ie(e){var t=ye();t.removeClass("fr-fir fr-fil"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,be(),e),Ee(),R(),i(),w.selection.clear()},refreshAlign:function Oe(e){y&&e.find("> *").first().replaceWith(w.icon.create("image-align-".concat(ve())))},refreshAlignOnShow:function Me(e,t){y&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Fe(e){var t=ye();t.removeClass("fr-dii fr-dib"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ve()),Ee(),R(),i(),w.selection.clear()},refreshDisplayOnShow:function De(e,t){y&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:_e,back:function e(){y?(w.events.disableBlur(),A(".fr-popup input:focus").blur(),B(y)):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("image.insert"),w.toolbar.showInline())},get:we,getEl:ye,insert:U,showProgressBar:M,remove:ae,hideProgressBar:F,applyStyle:function Ne(e,t,a){if(void 0===t&&(t=w.opts.imageStyles),void 0===a&&(a=w.opts.imageMultipleStyles),!y)return!1;var n=ye();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),n.removeClass(r.join(" "))}"object"==kt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):(n.toggleClass(e),Ae()&&y.hasClass(e)&&y.removeClass(e)),B(y)},showAltPopup:X,showSizePopup:J,setAlt:function Be(e){if(y){var t=w.popups.get("image.alt");y.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),B(y)}},setSize:function Pe(e,t){if(y){var a=w.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;y.removeAttr("width").removeAttr("height"),e.match(n)?y.css("width",e):y.css("width",""),t.match(n)?y.css("height",t):y.css("height",""),Ae()&&(y.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?y.parents(".fr-img-caption").css("width",e):y.parents(".fr-img-caption").css("width",""),t.match(n)?y.parents(".fr-img-caption").css("height",t):y.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),B(y)}},toggleCaption:function Ue(){var e;if(y&&!Ae()){(e=y).parent().is("a")&&(e=y.parent());var t,a,n=y.parents("ul")&&0<y.parents("ul").length?y.parents("ul"):y.parents("ol")&&0<y.parents("ol").length?y.parents("ol"):[];if(0<n.length){var r=n.find("li").length,i=y.parents("li"),o=document.createElement("li");r-1===i.index()&&(n.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=w.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":y.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(w.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+y.attr("class")+'" style="'+(w.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),y.after('<span class="fr-inner"'.concat(w.browser.mozilla?"":' contenteditable="true"',">").concat(Rt.START_MARKER).concat(w.language.translate("Image Caption")).concat(Rt.END_MARKER,"</span>")),y.parents(".fr-img-caption").css("width",s);var l=y.parents(".fr-img-space-wrap").length;1==l?Ce(document.querySelector(".fr-img-space-wrap")):1<l&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),pe(!0),w.selection.restore()}else{if(e=ye(),y.insertBefore(e),null!==e[0].querySelector("a")){for(var c,d=e[0].querySelector("a"),f=document.createElement("a"),p=0,u=d.attributes,g=u.length;p<g;p++)c=u[p],f.setAttribute(c.nodeName,c.nodeValue);y.wrap(f)}y.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove();var h=y.parents(".fr-img-space-wrap").length;1==h?Ce(document.querySelector(".fr-img-space-wrap")):1<h&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),B(y)}},hasCaption:Ae,exitEdit:pe,edit:B}},Rt.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),Rt.RegisterShortcut(Rt.KEYCODE.P,"insertImage",null,"P"),Rt.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),Rt.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),Rt.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),Rt.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),Rt.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),Rt.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),Rt.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),Rt.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),Rt.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Rt.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),Rt.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Rt.RegisterCommand("imageAlign",{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=Rt.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),Rt.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Rt.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),Rt.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),Rt.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),Rt.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.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"))}}),Rt.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),Rt.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),Rt.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var n=t[a];"object"==kt(n)&&(n=n.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(n),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,n=this.image.getEl();n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Rt.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),Rt.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),Rt.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),Rt.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Rt.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),Rt.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),Rt.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),Rt.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}}),Object.assign(Rt.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),Rt.PLUGINS.imageManager=function(s){var l,c,i,o,d,f,p,u,g,h,m,v=s.$,b="image_manager",e=10,_=11,E=12,w=13,y=14,A=15,a=21,n=22,r={};function C(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function T(){d.empty();for(var e=0;e<m;e++)d.append('<div class="fr-list-column"></div>')}function S(){if(g<p.length&&i[0].scrollTop>=i[0].scrollHeight-s.opts.imageManagerScrollOffset-i.outerHeight()){u++;for(var e=s.opts.imageManagerPageSize*(u-1);e<Math.min(p.length,s.opts.imageManagerPageSize*u);e++)t(p[e])}}function t(r){var i=new Image,o=v(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+h++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");x(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var a=v(document.createElement("img"));if(r.thumb)a.attr("src",r.thumb);else{if(F(y,r),!r.url)return F(A,r),!1;a.attr("src",r.url)}if(r.url&&a.attr("data-url",r.url),r.tag)if(c.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),c.find(".fr-modal-tags").show(),0<=r.tag.indexOf(",")){for(var e=r.tag.split(","),t=0;t<e.length;t++)e[t]=e[t].trim(),0===f.find('a[title="'.concat(e[t],'"]')).length&&f.append('<a role="button" title="'.concat(e[t],'">').concat(e[t],"</a>"));a.attr("data-tag",e.join())}else 0===f.find('a[title="'.concat(r.tag.trim(),'"]')).length&&f.append('<a role="button" title="'.concat(r.tag.trim(),'">').concat(r.tag.trim(),"</a>")),a.attr("data-tag",r.tag.trim());for(var n in r.name&&a.attr("alt",r.name),r)r.hasOwnProperty(n)&&"thumb"!==n&&"url"!==n&&"tag"!==n&&a.attr("data-".concat(n),r[n]);o.append(a).append(v(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(v(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),f.find(".fr-selected-tag").each(function(e,t){P(a,t.text)||o.hide()}),a.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),g++,L(k(parseInt(a.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),x(!1),g%s.opts.imageManagerPageSize==0&&S()}),s.events.trigger("imageManager.imageLoaded",[a])},i.onerror=function(){g++,o.remove(),L(k(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),F(e,r),g%s.opts.imageManagerPageSize==0&&S()},i.src=r.thumb||r.url,R().append(o)}function R(){var n,r;return d.find(".fr-list-column").each(function(e,t){var a=v(t);0===e?(r=a.outerHeight(),n=a):a.outerHeight()<r&&(r=a.outerHeight(),n=a)}),n}function k(e){e===undefined&&(e=0);for(var t=[],a=h-1;e<=a;a--){var n=d.find(".fr-image-".concat(a));n.length&&(t.push(n),v(document.createElement("div")).attr("id","fr-image-hidden-container").append(n),d.find(".fr-image-".concat(a)).remove())}return t}function L(e){for(var t=e.length-1;0<=t;t--)R().append(e[t])}function x(e){if(e===undefined&&(e=!0),!l.isVisible())return!0;var t=C();if(t!==m){m=t;var a=k();T(),L(a)}s.modals.resize(b),e&&S()}function I(e){for(var t,a=e[0].attributes,n=a.length,r={};n--;)a[n]&&"src"!==(t=a[n].name)&&(r[t]=a[n].value);return r}function O(e){var t=v(e.currentTarget).siblings("img"),a=l.data("instance")||s,n=l.data("current-image");if(s.modals.hide(b),a.image.showProgressBar(),n)n.data("fr-old-src",n.attr("src")),n.trigger("click");else{a.events.focus(!0),a.selection.restore();var r=a.position.getBoundingRect(),i=r.left+r.width/2+v(s.doc).scrollLeft(),o=r.top+r.height+v(s.doc).scrollTop();a.popups.setContainer("image.insert",s.$sc),a.popups.show("image.insert",i,o)}a.image.insert(t.data("url"),!1,I(t),n)}function M(e){var i=v(e.currentTarget).siblings("img"),t=s.language.translate("Are you sure? Image will be deleted.");confirm(t)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[i])&&(i.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:i.attr("src")},I(i)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){s.events.trigger("imageManager.imageDeleted",[e]);var n=k(parseInt(i.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);i.parent().remove(),L(n),function r(){l.find("#fr-modal-tags > a").each(function(){0===l.find('#fr-image-list [data-tag*="'.concat(v(this).text(),'"]')).length&&v(this).removeClass("fr-selected-tag").hide()}),N()}(),x(!0)},fail:function(e){F(a,e.response||e.responseText)}})):F(n))}function F(e,t){10<=e&&e<20?o.hide():20<=e&&e<30&&v(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:r[e]},t])}function D(){var e=c.find(".fr-modal-head-line").outerHeight(),t=f.outerHeight();c.toggleClass("fr-show-tags"),c.hasClass("fr-show-tags")?(c.css("height",e+t),i.css("marginTop",e+t),f.find("a").css("opacity",1)):(c.css("height",e),i.css("marginTop",e),f.find("a").css("opacity",0))}function N(){var e=f.find(".fr-selected-tag");0<e.length?(d.find("img").parents().show(),e.each(function(e,n){d.find("img").each(function(e,t){var a=v(t);P(a,n.text)||a.parent().hide()})})):d.find("img").parents().show(),L(k()),S()}function B(e){e.preventDefault();var t=v(e.currentTarget);t.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&t.siblings("a").removeClass("fr-selected-tag"),N()}function P(e,t){for(var a=(e.attr("data-tag")||"").split(","),n=0;n<a.length;n++)if(a[n]===t)return!0;return!1}return r[e]="Image cannot be loaded from the passed link.",r[_]="Error during load images request.",r[E]="Missing imageManagerLoadURL option.",r[w]="Parsing load response failed.",r[y]="Missing image thumb.",r[A]="Missing image URL.",r[a]="Error during delete image request.",r[n]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function U(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function H(){if(!l){var e,t='<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid,'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat(Rt.SVG.tags,'"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"),'</h4></div>\n <div class="fr-modal-tags" id="fr-modal-tags">');e=s.opts.imageManagerPreloader?'<img class="fr-preloader" id="fr-preloader" alt="'.concat(s.language.translate("Loading"),'.." src="').concat(s.opts.imageManagerPreloader,'" style="display: none;">'):'<span class="fr-preloader" id="fr-preloader" style="display: none;">'.concat(s.language.translate("Loading"),"</span>"),e+='<div class="fr-image-list" id="fr-image-list"></div>';var a=s.modals.create(b,t,e);l=a.$modal,c=a.$head,i=a.$body}l.data("current-image",s.image.get()),s.modals.show(b),o||function n(){o=l.find("#fr-preloader"),d=l.find("#fr-image-list"),f=l.find("#fr-modal-tags"),m=C(),T(),c.css("height",c.find(".fr-modal-head-line").outerHeight()),s.events.$on(v(s.o_win),"resize",function(){x(!!p)}),s.events.bindClick(d,".fr-insert-img",O),s.events.bindClick(d,".fr-delete-img",M),s.helpers.isMobile()&&(s.events.bindClick(d,"div.fr-image-container",function(e){l.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),v(e.currentTarget).addClass("fr-mobile-selected")}),l.on(s._mousedown,function(){l.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),l.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),l.on(s._mousedown,"*",function(){s.events.disableBlur()}),i.on("scroll",S),s.events.bindClick(l,"button#fr-modal-more-".concat(s.sid),D),s.events.bindClick(f,"a",B)}(),function r(){o.show(),d.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?v(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){s.events.trigger("imageManager.imagesLoaded",[e]),function n(e,t){try{d.find(".fr-list-column").empty(),h=g=u=0,p=JSON.parse(e),S()}catch(a){F(w,t)}}(e,a.response),o.hide()},fail:function(e){F(_,e.response||e.responseText)}}):F(E)}()},hide:function $(){s.modals.hide(b)}}},!Rt.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");function n(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `\xab\xab\xab` and `\xbb\xbb\xbb` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n].defaultValue);return a}Rt.DEFAULTS.imageInsertButtons.push("imageManager"),Rt.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),Rt.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),Rt.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),Rt.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"}),Object.assign(Rt.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),Rt.PLUGINS.inlineClass=function(a){var n=a.$;return{apply:function t(e){a.format.toggle("span",{"class":e})},refreshOnShow:function r(e,t){t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=a.format.is("span",{"class":e});n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}},Rt.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineClasses;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'.concat(a,'" title="').concat(t[a],'">').concat(t[a],"</a></li>"));return e+="</ul>"},callback:function(e,t){this.inlineClass.apply(t)},refreshOnShow:function(e,t){this.inlineClass.refreshOnShow(e,t)},plugin:"inlineClass"}),Rt.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"}),Object.assign(Rt.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),Rt.PLUGINS.inlineStyle=function(r){return{apply:function i(e){for(var t=e.split(";"),a=0;a<t.length;a++){var n=t[a].split(":");t[a].length&&2==n.length&&r.format.applyStyle(n[0].trim(),n[1].trim())}}}},Rt.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var a in t)if(t.hasOwnProperty(a)){var n=t[a]+(-1===t[a].indexOf("display:block;")?" display:block;":"");e+='<li role="presentation"><span style="'.concat(n,'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="').concat(t[a],'" title="').concat(this.language.translate(a),'">').concat(this.language.translate(a),"</a></span></li>")}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),Rt.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"}),Object.assign(Rt.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),Rt.PLUGINS.lineBreaker=function(g){var h,t,r,m=g.$;function l(e,t){var a,n,r,i,o,s,l,c;if(null==e)o=(i=t.parent()).offset().top,a=(l=t.offset().top)-Math.min((l-o)/2,g.opts.lineBreakerOffset),r=i.outerWidth(),n=i.offset().left;else if(null==t)(s=(i=e.parent()).offset().top+i.outerHeight())<(c=e.offset().top+e.outerHeight())&&(s=(i=m(i).parent()).offset().top+i.outerHeight()),a=c+Math.min(Math.abs(s-c)/2,g.opts.lineBreakerOffset),r=i.outerWidth(),n=i.offset().left;else{i=e.parent();var d=e.offset().top+e.height(),f=t.offset().top;if(f<d)return!1;a=(d+f)/2,r=i.outerWidth(),n=i.offset().left}if(g.opts.iframe){var p=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),u=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().left-g.helpers.scrollLeft()+u,a+=g.$iframe.offset().top-g.helpers.scrollTop()+p}g.$box.append(h),h.css("top",a-g.win.pageYOffset),h.css("left",n-g.win.pageXOffset),h.css("width",r),h.data("tag1",e),h.data("tag2",t),h.addClass("fr-visible").data("instance",g)}function c(e){if(e){var t=m(e);if(0===g.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(g.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(g.opts.lineBreakerTags.join(",")).length)return e=t.parents(g.opts.lineBreakerTags.join(",")).get(0),0!==g.$el.find(m(e)).length&&m(e).is(g.opts.lineBreakerTags.join(","))?m(e):null}return null}function i(e,t){var a=g.doc.elementFromPoint(e,t);return a&&!m(a).closest(".fr-line-breaker").length&&!g.node.isElement(a)&&a!=g.$wp.get(0)&&function n(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==g.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==g.$wp.get(0),t.inFroalaWrapper}(a)?a:null}function o(e,t,a){for(var n=a,r=null;n<=g.opts.lineBreakerOffset&&!r;)(r=i(e,t-n))||(r=i(e,t+n)),n+=a;return r}function d(e,t,a){for(var n=null,r=100;!n&&e>g.$box.offset().left&&e<g.$box.offset().left+g.$box.outerWidth()&&0<r;)(n=i(e,t))||(n=o(e,t,5)),"left"==a?e-=g.opts.lineBreakerHorizontalOffset:e+=g.opts.lineBreakerHorizontalOffset,r-=g.opts.lineBreakerHorizontalOffset;return n}function a(e){var t=r=null,a=null,n=g.doc.elementFromPoint(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset);(t=n&&("HTML"==n.tagName||"BODY"==n.tagName||g.node.isElement(n)||0<=(n.getAttribute("class")||"").indexOf("fr-line-breaker"))?((a=o(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset,1))||(a=d(e.pageX-g.win.pageXOffset-g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"left")),a||(a=d(e.pageX-g.win.pageXOffset+g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"right")),c(a)):c(n))?function s(e,t){var a,n,r=e.offset().top,i=e.offset().top+e.outerHeight();if(Math.abs(i-t)<=g.opts.lineBreakerOffset||Math.abs(t-r)<=g.opts.lineBreakerOffset)if(Math.abs(i-t)<Math.abs(t-r)){var o=null;for((n=e.get(0)).nextSibling&&(o=n.nextSibling.offsetParent?n.nextSibling:null);o&&o.nodeType==Node.TEXT_NODE&&0===o.textContent.length;)o=o.nextSibling;if(!o)return l(e,null),!0;if(a=c(o))return l(e,a),!0}else{if(!(n=e.get(0)).previousSibling)return l(null,e),!0;if(a=c(n.previousSibling))return l(a,e),!0}h.removeClass("fr-visible").removeData("instance")}(t,e.pageY):g.core.sameInstance(h)&&h.removeClass("fr-visible").removeData("instance")}function n(e){return!(h.hasClass("fr-visible")&&!g.core.sameInstance(h))&&(g.popups.areVisible()||g.el.querySelector(".fr-selected-cell")?(h.removeClass("fr-visible"),!0):void(!1!==t||g.edit.isDisabled()||(r&&clearTimeout(r),r=setTimeout(a,30,e))))}function s(){r&&clearTimeout(r),h&&h.hasClass("fr-visible")&&h.removeClass("fr-visible").removeData("instance")}var f=function f(){t=!0,s()},p=function p(){t=!1};function u(e){e.preventDefault();var t=h.data("instance")||g;h.removeClass("fr-visible").removeData("instance");var a=h.data("tag1"),n=h.data("tag2"),r=g.html.defaultTag();if(null==a)if(g.opts.keepTextFormatOnTable&&n.children().get(0)!=undefined&&"TBODY"==n.children().get(0).tagName){var i=n.find("span"),o=null!=i[i.length-1]?i[i.length-1].getAttribute("style"):null,s=null!=o?"<"+i[i.length-1].nodeName.toLowerCase()+' style="'+o+'">':"<"+n.parent().get(0).nodeName.toLowerCase()+">",l=null!=o?"</"+i[i.length-1].nodeName.toLowerCase()+">":"</"+n.parent().get(0).nodeName.toLowerCase()+">";r?n.before("<".concat(r,">").concat(s).concat(Rt.MARKERS,"<br>").concat(l,"</").concat(r,">")):n.before("".concat(s).concat(Rt.MARKERS,"<br>").concat(l))}else r&&"TD"!=n.parent().get(0).tagName&&0===n.parents(r).length?n.before("<".concat(r,">").concat(Rt.MARKERS,"<br></").concat(r,">")):n.before("".concat(Rt.MARKERS,"<br>"));else if(g.opts.keepTextFormatOnTable&&a.children().get(0)!=undefined&&"TBODY"==a.children().get(0).tagName){var c=a.find("span"),d=null!=c[c.length-1]?c[c.length-1].getAttribute("style"):null,f=null!=d?"<"+c[c.length-1].nodeName.toLowerCase()+' style="'+d+'">':"<"+a.parent().get(0).nodeName.toLowerCase()+">",p=null!=d?"</"+c[c.length-1].nodeName.toLowerCase()+">":"</"+a.parent().get(0).nodeName.toLowerCase()+">";r?a.after("<".concat(r,">").concat(f).concat(Rt.MARKERS,"<br>").concat(p,"</").concat(r,">")):a.after("".concat(f).concat(Rt.MARKERS,"<br>").concat(p))}else r&&"TD"!=a.parent().get(0).tagName&&0===a.parents(r).length?a.after("<".concat(r,">").concat(Rt.MARKERS,"<br></").concat(r,">")):a.after("".concat(Rt.MARKERS,"<br>"));t.selection.restore(),g.toolbar.enable()}return{_init:function v(){if(!g.$wp)return!1;!function e(){g.shared.$line_breaker||(g.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(g.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),h=g.shared.$line_breaker,g.events.on("shared.destroy",function(){h.html("").removeData().remove(),h=null},!0),g.events.on("destroy",function(){h.removeData("instance").removeClass("fr-visible"),m("body").first().append(h),clearTimeout(r)},!0),g.events.$on(h,"mousemove",function(e){e.stopPropagation()},!0),g.events.bindClick(h,"a",u)}(),t=!1,g.events.$on(g.$win,"mousemove",n),g.events.$on(m(g.win),"scroll",s),g.events.on("popups.show.table.edit",s),g.events.on("commands.after",s),g.events.$on(m(g.win),"mousedown",f),g.events.$on(m(g.win),"mouseup",p)}}},Object.assign(Rt.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),Rt.PLUGINS.lineHeight=function(n){var s=n.$;return{_init:function e(){},apply:function r(e){n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var t=n.selection.blocks();t.length&&s(t[0]).parent().is("td")&&n.format.applyStyle("line-height",e.toString()),n.selection.save();for(var a=0;a<t.length;a++)s(t[a]).css("line-height",e),n.opts.enter!==Rt.ENTER_BR||t.length&&s(t[0]).parent().is("td")||(s(t[a]).hasClass("fr-temp-div")&&s(t[a]).removeClass("fr-temp-div"),""===s(t[a]).attr("class")&&s(t[a]).removeAttr("class")),""===s(t[a]).attr("style")&&s(t[a]).removeAttr("style");n.html.unwrap(),n.selection.restore()},refreshOnShow:function i(e,t){var a=n.selection.blocks();if(a.length){var o=s(a[0]);t.find(".fr-command").each(function(){var e=s(this).data("param1"),t=o.attr("style"),a=0<=(t||"").indexOf("line-height: "+e+";");if(t){var n=t.substring(t.indexOf("line-height")),r=n.substr(0,n.indexOf(";")),i=r&&r.split(":")[1];i&&i.length||"Default"!==o.text()||(a=!0)}t&&-1!==t.indexOf("line-height")||""!==e||(a=!0),s(this).toggleClass("fr-active",a).attr("aria-selected",a)})}}}},Rt.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command '.concat(a,'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="').concat(t[a],'" title="').concat(this.language.translate(a),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),Rt.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"}),Object.assign(Rt.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(Rt.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),Rt.PLUGINS.link=function(m){var v=m.$;function b(){var e=m.image?m.image.get():null;if(e||!m.$wp)return"A"==m.el.tagName?m.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=m.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(m.el)||!m.el.contains(t)||m.el==t)&&(t=null)}catch(o){t=null}if(t&&"A"===t.tagName)return t;var a,n,r=m.selection.element(),i=m.selection.endElement();"A"==r.tagName||m.node.isElement(r)||(r=m.opts.iframe&&null!==(a=m.markdown)&&void 0!==a&&a.isEnabled?null:v(r).parentsUntil(m.$el,"a").first().get(0));"A"==i.tagName||m.node.isElement(i)||(i=m.opts.iframe&&null!==(n=m.markdown)&&void 0!==n&&n.isEnabled?null:v(i).parentsUntil(m.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(m.el)||!m.el.contains(i)||m.el==i)&&(i=null)}catch(o){i=null}try{r&&(r.contains&&r.contains(m.el)||!m.el.contains(r)||m.el==r)&&(r=null)}catch(o){r=null}return i&&i==r&&"A"==i.tagName?(m.browser.msie||m.helpers.isMobile())&&(m.selection.info(r).atEnd||m.selection.info(r).atStart)?null:r:null}function _(){var e,t,a,n,r=m.image?m.image.get():null,i=[];if(r)"A"==r.get(0).parentNode.tagName&&i.push(r.get(0).parentNode);else if(m.win.getSelection){var o=m.win.getSelection();if(o.getRangeAt&&o.rangeCount){n=m.doc.createRange();for(var s=0;s<o.rangeCount;++s)if((t=(e=o.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())i.push(t);else{a=t.getElementsByTagName("a");for(var l=0;l<a.length;++l)n.selectNodeContents(a[l]),n.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<n.compareBoundaryPoints(e.START_TO_END,e)&&i.push(a[l])}}}else if(m.doc.selection&&"Control"!=m.doc.selection.type)if("a"==(t=(e=m.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())i.push(t);else{a=t.getElementsByTagName("a"),n=m.doc.body.createTextRange();for(var c=0;c<a.length;++c)n.moveToElementText(a[c]),-1<n.compareEndPoints("StartToEnd",e)&&n.compareEndPoints("EndToStart",e)<1&&i.push(a[c])}return i}function E(r){if(m.core.hasFocus()||m.opts.iframe&&(!document.hasFocus||document.hasFocus())){if(i(),r&&"keyup"===r.type&&(r.altKey||r.which==Rt.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=b(),t=m.image?m.image.get():null;if(e&&!t){if(m.image){var a=m.node.contents(e);if(1==a.length&&"IMG"==a[0].tagName){var n=m.selection.ranges(0);return 0===n.startOffset&&0===n.endOffset?v(e).before(Rt.INVISIBLE_SPACE+Rt.MARKERS):v(e).after(Rt.INVISIBLE_SPACE+Rt.MARKERS),m.selection.restore(),!1}}r&&r.stopPropagation(),o(e)}}},m.helpers.isIOS()?100:0)}}function o(e){var t=m.popups.get("link.edit");t||(t=function i(){var e="";1<=m.opts.linkEditButtons.length&&("A"==m.el.tagName&&0<=m.opts.linkEditButtons.indexOf("linkRemove")&&m.opts.linkEditButtons.splice(m.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(m.button.buildList(m.opts.linkEditButtons),"</div>"));var t={buttons:e},a=m.popups.create("link.edit",t);m.$wp&&m.events.$on(m.$wp,"scroll.link-edit",function(){b()&&m.popups.isVisible("link.edit")&&o(b())});return a}());var a=v(e);m.popups.isVisible("link.edit")||m.popups.refresh("link.edit"),m.popups.setContainer("link.edit",m.$sc);var n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();m.popups.show("link.edit",n,r,a.outerHeight(),!0)}function i(){m.popups.hide("link.edit")}function l(){var e=m.popups.get("link.insert"),t=b();if(t){var a,n,r=v(t),i=e.find('input.fr-link-attr[type="text"]'),o=e.find('input.fr-link-attr[type="checkbox"]');for(a=0;a<i.length;a++)(n=v(i[a])).val(r.attr(n.attr("name")||""));for(o.attr("checked",!1),a=0;a<o.length;a++)n=v(o[a]),r.attr(n.attr("name"))==n.data("checked")&&n.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(m.selection.text());e.find("input.fr-link-attr").trigger("change"),(m.image?m.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return m.popups.onRefresh("link.insert",l),!0;var t="";1<=m.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(m.button.buildList(m.opts.linkInsertButtons),"</div>"));var a="",n=0;for(var r in a='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(m.id,'">'),a+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(m.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate("URL"),'" tabIndex="').concat(++n,'"></div>'),m.opts.linkText&&(a+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(m.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate("Text"),'" tabIndex="').concat(++n,'"></div>')),m.opts.linkAttributes)if(m.opts.linkAttributes.hasOwnProperty(r)){var i=m.opts.linkAttributes[r];a+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate(i),'" tabIndex="').concat(++n,'"></div>')}m.opts.linkAlwaysBlank||(a+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(m.id,'" tabIndex="').concat(++n,'"><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(m.id,'">').concat(m.language.translate("Open in new tab"),"</label></div>"));var o={buttons:t,input_layer:a+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++n,'" type="button">').concat(m.language.translate("Insert"),"</button></div></div>")},s=m.popups.create("link.insert",o);return m.$wp&&m.events.$on(m.$wp,"scroll.link-insert",function(){(m.image?m.image.get():null)&&m.popups.isVisible("link.insert")&&f(),m.popups.isVisible("link.insert")&&d()}),s}function c(e,t,a){if(m.opts.trackChangesEnabled){if(m.edit.on(),m.events.focus(!0),m.undo.saveStep(),m.markers.insert(),m.html.wrap(),!m.$el.find(".fr-marker").length)return void m.popups.hide("link.insert");m.markers.remove()}if(void 0===a&&(a={}),!1===m.events.trigger("link.beforeInsert",[e,t,a]))return!1;var n=m.image?m.image.get():null;n||"A"==m.el.tagName?"A"==m.el.tagName&&m.$el.focus():(m.selection.restore(),m.popups.hide("link.insert"));var r=e;m.opts.linkConvertEmailAddress&&m.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===m.opts.linkAutoPrefix||new RegExp("^("+Rt.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(",".",'"',"\\"].indexOf((e||"")[0])<0&&(e=m.opts.linkAutoPrefix+e),e=m.helpers.sanitizeURL(e),m.opts.linkAlwaysBlank&&(a.target="_blank"),m.opts.linkAlwaysNoFollow&&(a.rel="nofollow"),m.helpers.isEmail(r)&&(a.target=null,a.rel=null),"_blank"==a.target?(m.opts.linkNoOpener&&(a.rel?a.rel+=" noopener":a.rel="noopener"),m.opts.linkNoReferrer&&(a.rel?a.rel+=" noreferrer":a.rel="noreferrer")):null==a.target&&(a.rel?a.rel=a.rel.replace(/noopener/,"").replace(/noreferrer/,""):a.rel=null),t=t||"",e===m.opts.linkAutoPrefix)return m.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),m.events.trigger("link.bad",[r]),!1;var i,o=b();if(o){if((i=v(o)).attr("href",e),0<t.length&&i.text()!=t&&!n){if(m.opts.trackChangesEnabled){var s=v(i.get(0).outerHTML);s.insertBefore(i.parent());var l=m.track_changes.wrapLinkInTracking(s,m.track_changes.getPendingChanges().length-1),c=m.track_changes.wrapInDelete(l);i.parent().append(c)}for(var d=i.get(0);1===d.childNodes.length&&d.childNodes[0].nodeType==Node.ELEMENT_NODE;)d=d.childNodes[0];v(d).text(t)}for(var f in n||i.prepend(Rt.START_MARKER).append(Rt.END_MARKER),a)a[f]?i.attr(f,a[f]):i.removeAttr(f);n||m.selection.restore()}else{n?(n.wrap('<a href="'.concat(e,'"></a>')),m.image.hasCaption()&&n.parent().append(n.parents(".fr-img-caption").find(".fr-inner"))):(m.format.remove("a"),m.selection.isCollapsed()?(t=0===t.length?r:t,m.html.insert('<a href="'.concat(e,'">').concat(Rt.START_MARKER).concat(t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")).concat(Rt.END_MARKER,"</a>")),m.selection.restore()):0<t.length&&t!=m.selection.text().replace(/\n/g,"")?(m.selection.remove(),m.html.insert('<a href="'.concat(e,'">').concat(Rt.START_MARKER).concat(t.replace(/&/g,"&amp;")).concat(Rt.END_MARKER,"</a>")),m.selection.restore()):(!function h(){if(!m.selection.isCollapsed()){m.selection.save();for(var e=m.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=v(e.pop());t.removeClass("fr-unprocessed");var a=m.node.deepestParent(t.get(0));if(a){for(var n=t.get(0),r="",i="";n=n.parentNode,m.node.isBlock(n)||(r+=m.node.closeTagString(n),i=m.node.openTagString(n)+i),n!=a;);var o=m.node.openTagString(t.get(0))+t.html()+m.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=a.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+o+i)).replace(i+r,""),a.outerHTML=s}e=m.$el.find(".fr-marker.fr-unprocessed").toArray()}m.html.cleanEmptyTags(),m.selection.restore()}}(),m.format.apply("a",{href:e})));for(var p=_(),u=0;u<p.length;u++)(i=v(p[u])).attr(a),i.removeAttr("_moz_dirty");1==p.length&&m.$wp&&!n&&(v(p[0]).prepend(Rt.START_MARKER).append(Rt.END_MARKER),m.selection.restore())}if(n){var g=m.popups.get("link.insert");g&&g.find("input:focus").blur(),m.image.edit(n)}else E()}function d(){i();var e=b();if(e){var t=m.popups.get("link.insert");t||(t=s()),m.popups.isVisible("link.insert")||(m.popups.refresh("link.insert"),m.selection.save(),m.helpers.isMobile()&&(m.events.disableBlur(),m.$el.blur(),m.events.enableBlur())),m.popups.setContainer("link.insert",m.$sc);var a=(m.image?m.image.get():null)||v(e),n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();m.popups.show("link.insert",n,r,a.outerHeight(),!0)}}function f(){var e=m.image?m.image.getEl():null;if(e){var t=m.popups.get("link.insert"),a=e.outerWidth()/2;m.image.hasCaption()&&(e=e.find(".fr-img-wrap"),v(e)&&v(e).find("img")&&(a=v(e).find("img").outerWidth()/2)),t||(t=s()),l(),m.popups.setContainer("link.insert",m.$sc);var n=e.offset().left+a,r=e.offset().top+e.outerHeight(),i=e.outerHeight();m.opts.iframe&&m.image.hasCaption()&&v(e)&&v(e).find("img")&&(i=v(e).find("img").outerHeight()),m.popups.show("link.insert",n,r,i,!0)}}return{_init:function e(){m.events.on("keyup",function(e){e.which!=Rt.KEYCODE.ESC&&E(e)}),m.events.on("window.mouseup",E),m.events.$on(m.$el,"click","a",function(e){m.edit.isDisabled()&&e.preventDefault()}),m.helpers.isMobile()&&m.events.$on(m.$doc,"selectionchange",E),s(!0),"A"==m.el.tagName&&m.$el.addClass("fr-view"),m.events.on("toolbar.esc",function(){if(m.popups.isVisible("link.edit"))return m.events.disableBlur(),m.events.focus(),!1},!0)},remove:function n(){var e=b(),t=m.image?m.image.get():null;if(!1===m.events.trigger("link.beforeRemove",[e]))return!1;if(t&&e)if(m.image.hasCaption()){t.addClass("img-link-caption"),v(e).replaceWith(v(e).html());var a=document.querySelectorAll("img.img-link-caption");m.image.edit(v(a[0])),v(a[0]).removeClass("img-link-caption")}else t.unwrap(),m.image.edit(t);else e&&(m.selection.save(),v(e).replaceWith(v(e).html()),m.selection.restore(),i())},showInsertPopup:function p(){var e=m.$tb.find('.fr-command[data-cmd="insertLink"]'),t=m.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(m.popups.refresh("link.insert"),m.popups.setContainer("link.insert",m.$tb||m.$sc),e.isVisible()){var a=m.button.getPosition(e),n=a.left,r=a.top;m.popups.show("link.insert",n,r,e.outerHeight())}else m.position.forSelection(t),m.popups.show("link.insert")},usePredefined:function u(e){var t,a,n=m.opts.linkList[e],r=m.popups.get("link.insert"),i=r.find('input.fr-link-attr[type="text"]'),o=r.find('input.fr-link-attr[type="checkbox"]');for(n.rel&&(r.rel=n.rel),a=0;a<i.length;a++)n[(t=v(i[a])).attr("name")]?(t.val(n[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(a=0;a<o.length;a++)(t=v(o[a])).attr("checked",t.data("checked")==n[t.attr("name")]);m.accessibility.focusPopup(r)},insertCallback:function g(){var e,t,a=m.popups.get("link.insert"),n=a.find('input.fr-link-attr[type="text"]'),r=a.find('input.fr-link-attr[type="checkbox"]'),i=(n.filter('[name="href"]').val()||"").trim(),o=m.opts.linkText?n.filter('[name="text"]').val():"",s={};for(t=0;t<n.length;t++)e=v(n[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=v(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;a.rel&&(s.rel=a.rel);var l=m.helpers.scrollTop();c(i,o,s),v(m.o_win).scrollTop(l)},insert:c,update:d,get:b,allSelected:_,back:function t(){m.image&&m.image.get()?m.image.back():(m.events.disableBlur(),m.selection.restore(),m.events.enableBlur(),b()&&m.$wp?(m.selection.restore(),i(),E()):"A"==m.el.tagName?(m.$el.focus(),E()):(m.popups.hide("link.insert"),m.toolbar.showInline()))},imageLink:f,applyStyle:function h(e,t,a){void 0===a&&(a=m.opts.linkMultipleStyles),void 0===t&&(t=m.opts.linkStyles);var n=b();if(!n)return!1;if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),v(n).removeClass(r.join(" "))}v(n).toggleClass(e),E()}}},Rt.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),Rt.RegisterShortcut(Rt.KEYCODE.K,"insertLink",null,"K"),Rt.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),Rt.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),Rt.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),Rt.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),Rt.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),Rt.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),Rt.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),Rt.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||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"))},plugin:"link"}),Rt.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),Rt.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,a=0;a<t.length;a++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(a,'">').concat(t[a].displayText||t[a].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),Rt.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),Rt.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),Rt.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),Rt.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),Rt.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(a,'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,n=this.link.get();if(n){var r=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=r.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),Object.assign(Rt.DEFAULTS,{listAdvancedTypes:!0}),Rt.PLUGINS.lists=function(u){var g=u.$;function f(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function p(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function c(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var i=a.length-1;0<=i;i--){var o=g(a[i]);o.replaceWith("<".concat(t.toLowerCase()," ").concat(u.node.attributes(o.get(0)),">").concat(o.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=u.html.defaultTag(),r=null;e.length&&(a="rtl"==u.opts.direction||"rtl"==g(e[0]).css("direction")?"margin-right":"margin-left");for(var i=0;i<e.length;i++)if("TD"!=e[i].tagName&&"TH"!=e[i].tagName&&"LI"!=e[i].tagName){var o=u.helpers.getPX(g(e[i]).css(a))||0;(e[i].style.marginLeft=null)===r&&(r=o);var s=0<r?"<".concat(t,' style="').concat(a,": ").concat(r,'px ">'):"<".concat(t,">"),l="</".concat(t,">");for(o-=r;0<o/u.opts.indentMargin;)s+="</".concat(t,">"),l+=l,o-=u.opts.indentMargin;n&&e[i].tagName.toLowerCase()==n?g(e[i]).replaceWith("".concat(s,"<li").concat(u.node.attributes(e[i]),">").concat(g(e[i]).html(),"</li>").concat(l)):g(e[i]).wrap("".concat(s,"<li></li>").concat(l))}u.clean.lists()}function d(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--){if(g(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}if(g(e[a]).contains(e[t])){e.splice(a,1);break}}var n=[];for(t=0;t<e.length;t++){var r=g(e[t]),i=e[t].parentNode,o=r.attr("class");if(r.before(p(i.tagName)),"LI"==i.parentNode.tagName)r.before(p("LI")),r.after(f("LI"));else if("OL"==i.parentNode.tagName)r.before(p("OL")),r.after(f("OL"));else if("UL"==i.parentNode.tagName)r.before(p("UL")),r.after(f("UL"));else{var s="";o&&(s+=' class="'.concat(o,'"'));var l="rtl"==u.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";u.helpers.getPX(g(i).css(l))&&0<=(g(i).attr("style")||"").indexOf("".concat(l,":"))&&(s+=' style="'.concat(l,":").concat(u.helpers.getPX(g(i).css(l)),'px;"')),u.html.defaultTag()&&0===r.find(u.html.blockTagsQuery()).length&&r.wrapInner(u.html.defaultTag()+s),u.node.isEmpty(r.get(0),!0)||0!==r.find(u.html.blockTagsQuery()).length||("DIV"==i.parentNode.tagName&&u.html.defaultTag()?(r.prepend(f(u.html.defaultTag())),r.append(p(u.html.defaultTag()))):r.append("<br>")),r.append(f("LI")),r.prepend(p("LI"))}r.after(f(i.tagName)),"LI"==i.parentNode.tagName&&(i=i.parentNode.parentNode),n.indexOf(i)<0&&n.push(i)}for(t=0;t<n.length;t++){var c=g(n[t]),d=c.html();d=(d=d.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(u.node.openTagString(c.get(0))+d+u.node.closeTagString(c.get(0)))}u.$el.find("li:empty").remove(),u.$el.find("ul:empty, ol:empty").remove(),u.clean.lists(),u.$el.find("ul:empty, ol:empty").remove(),u.html.wrap()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=u.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("UL"!=a[0].parentNode.tagName&&"UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!a[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function o(e){for(u.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);u.clean.lists(),u.selection.restore()}(r)}else{if("UL"!=a[0].parentElement.tagName&&"OL"!=a[0].parentElement.tagName&&"LI"!=a[0].parentElement.tagName)return;if(u.node.isBlock(a[0])&&"LI"!==a[0].tagName&&0<g(a[0]).parentsUntil(u.$el,"LI").length&&(a[0]=a[0].parentElement,r=a[0].parentElement),!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return void function s(e){u.selection.save();for(var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");0<e.childNodes.length;)t.append(e.childNodes[0]);var a=document.createElement("li");t.append(a),e.append(t),u.clean.lists(),u.selection.restore()}(r)}for(var i=0;i<a.length;i++)"LI"==a[i].tagName?(t=!0,n.push(a[i])):"LI"==a[i].parentNode.tagName&&(t=!0,n.push(a[i].parentNode));t&&("indent"==e?function p(e){u.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=g(e[t]).find("> ul, > ol").last().get(0);if(n){var r=g(document.createElement("li"));if(n.childNodes.length)for(var i=n.childNodes[0].attributes,o=0;o<i.length;o++){var s=i[o];"style"===s.name&&(r[0].style.cssText+=s.value)}g(n).prepend(r);for(var l=u.node.contents(e[t])[0];l&&!u.node.isList(l);){var c=l.nextSibling;r.append(l),l=c}g(a).append(g(n)),g(e[t]).remove()}else{var d=g(a).find("> ul, > ol").last().get(0);if(d)g(d).append(g(e[t]));else{var f=g("<".concat(e[t].parentNode.tagName,">"));g(a).append(f),f.append(g(e[t]))}}}}u.clean.lists(),u.selection.restore()}(n):function l(e){u.selection.save(),d(e),u.selection.restore()}(n))}}return{_init:function t(){u.events.on("commands.after",e),u.events.on("keydown",function(e){if(e.which==Rt.KEYCODE.TAB){for(var t=u.selection.blocks(),a=[],n=0;n<t.length;n++)"LI"==t[n].tagName?a.push(t[n]):"LI"==t[n].parentNode.tagName&&a.push(t[n].parentNode);if(1<=a.length||a.length&&(u.selection.info(a[0]).atStart||u.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?u.commands.outdent():u.commands.indent(),!1}},!0)},format:function h(e,t){var a,n,r=1<(n=u.selection.blocks(!0)).length&&n[n.length-1],i=u.selection.ranges();if(r&&i.length&&u.node.isEmpty(r)&&!i[0].endOffset&&i[0].setEndAfter(r.firstChild,1),u.html.syncInputs(),u.selection.save(),u.browser.safari&&u.helpers.getSafariVersion()<17){var o=u.selection.ranges();if(i&&i[0].endContainer&&o&&o[0].endContainer&&!i[0].endContainer.isSameNode(o[0].endContainer)&&i[0].endContainer.previousSibling&&i[0].endContainer.previousSibling.isSameNode(o[0].endContainer)){var s=g(o[0].endContainer).find('.fr-marker[data-type="false"]');g(i[0].endContainer).append(s[0])}}for(u.html.wrap(!0,!0,!0,!0),u.selection.restore(),n=u.selection.blocks(!0),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(u.selection.save(),function l(e,t){for(var a=!0,n=0;n<e.length;n++){if("LI"!=e[n].tagName)return!1;e[n].parentNode.tagName!=t&&(a=!1)}return a}(n,e)?t||d(n):c(n,e),u.html.unwrap(),u.selection.restore(),t=t||"default"){for(n=u.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);for(a=0;a<n.length;a++)"LI"==n[a].tagName&&(g(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(g(n[a].parentNode).attr("style")||"").length&&g(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=g(u.selection.element());if(a.get(0)!=u.el){var n=a.get(0);(n="LI"!=n.tagName&&n.firstElementChild&&"LI"!=n.firstElementChild.tagName?a.parents("li").get(0):"LI"==n.tagName||n.firstElementChild?n.firstElementChild&&"LI"==n.firstElementChild.tagName?a.get(0).firstChild:a.get(0):a.parents("li").get(0))&&n.parentNode.tagName==t&&u.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},Rt.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),Rt.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),Rt.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),Rt.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),Rt.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),Rt.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"}),Object.assign(Rt.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),Rt.PLUGINS.paragraphFormat=function(u){var g=u.$;function h(e,t){var a=u.html.defaultTag();if(t&&t.toLowerCase()!=a)if(0<e.find("ul, ol").length){var n=g("<"+t+">");e.prepend(n);for(var r=u.node.contents(e.get(0))[0];r&&["UL","OL"].indexOf(r.tagName)<0;){var i=r.nextSibling;n.append(r),r=i}}else e.html("<"+t+">"+e.html()+"</"+t+">")}return{apply:function m(e){"N"==e&&(e=u.html.defaultTag()),u.selection.save(),u.html.wrap(!0,!0,!u.opts.paragraphFormat.BLOCKQUOTE,!0,!0),u.selection.restore();var t,a,n,r,i,o,s,l,c=u.selection.blocks();u.selection.save(),u.$el.find("pre").attr("skip",!0);for(var d=0;d<c.length;d++)if(c[d].tagName!=e&&!u.node.isList(c[d])){var f=g(c[d]);if("LI"==c[d].tagName)h(f,e);else if("LI"==c[d].parentNode.tagName&&c[d])o=f,s=e,l=u.html.defaultTag(),s&&s.toLowerCase()!=l||(s='div class="fr-temp-div"'),o.replaceWith(g("<"+s+">").html(o.html()));else if(0<=["TD","TH"].indexOf(c[d].parentNode.tagName))n=f,r=e,i=u.html.defaultTag(),r||(r='div class="fr-temp-div"'+(u.node.isEmpty(n.get(0),!0)?' data-empty="true"':"")),r.toLowerCase()==i?(u.node.isEmpty(n.get(0),!0)||n.append("<br/>"),n.replaceWith(n.html())):n.replaceWith(g("<"+r+">").html(n.html()));else{if("PRE"===e&&null===f[0].nextSibling){var p=g("<br>");f[0].after(p[0])}t=f,(a=e)||(a='div class="fr-temp-div"'+(u.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),("H1"==a||"H2"==a||"H3"==a||"H4"==a||"H5"==a)&&-1<u.node.attributes(t.get(0)).indexOf("font-size:")?t.replaceWith(g("<"+a+" "+u.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(g("<"+a+" "+u.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty"))}}u.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){g(this).prev().append("<br>"+g(this).html()),g(this).remove()}),u.$el.find("pre").removeAttr("skip"),u.html.unwrap(),u.selection.restore()},refreshOnShow:function o(e,t){var a=u.selection.blocks();if(a.length){var n=a[0],r="N",i=u.html.defaultTag();n.tagName.toLowerCase()!=i&&n!=u.el&&(r=n.tagName),t.find('.fr-command[data-param1="'+r+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function i(e){if(u.opts.paragraphFormatSelection){var t=u.selection.blocks();if(t.length){var a=t[0],n="N",r=u.html.defaultTag();a.tagName.toLowerCase()!=r&&a!=u.el&&(n=a.tagName),0<=["LI","TD","TH"].indexOf(n)&&(n="N"),e.find(">span").text(u.language.translate(u.opts.paragraphFormat[n]))}else e.find(">span").text(u.language.translate(u.opts.paragraphFormat.N))}}}},Rt.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(e){return e.opts.paragraphFormatSelection},defaultSelection:function(e){return e.language.translate(e.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var a in t)if(t.hasOwnProperty(a)){var n=this.shortcuts.get("paragraphFormat."+a);n=n?'<span class="fr-shortcut">'+n+"</span>":"",e+='<li role="presentation"><'+("N"==a?this.html.defaultTag()||"DIV":a)+' style="padding: 0 !important; margin: 0 !important; border: 0 !important; background-color: transparent !important; '+("PRE"==a||"N"==a?"font-size: 15px":"font-weight: bold !important; ")+("H1"==a?"font-size: 2em !important; ":"")+("H2"==a?"font-size: 1.5em !important; ":"")+("H3"==a?"font-size: 1.17em !important; ":"")+("H4"==a?"font-size: 15px !important;":"")+'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></"+("N"==a?this.html.defaultTag()||"DIV":a)+"></li>"}return e+="</ul>"},title:"Paragraph Format",callback:function(e,t){this.paragraphFormat.apply(t)},refresh:function(e){this.paragraphFormat.refresh(e)},refreshOnShow:function(e,t){this.paragraphFormat.refreshOnShow(e,t)},plugin:"paragraphFormat"}),Rt.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"}),Object.assign(Rt.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),Rt.PLUGINS.paragraphStyle=function(l){var c=l.$;return{_init:function e(){},apply:function d(e,t,a){void 0===t&&(t=l.opts.paragraphStyles),void 0===a&&(a=l.opts.paragraphMultipleStyles);var n="";a||((n=Object.keys(t)).splice(n.indexOf(e),1),n=n.join(" ")),l.selection.save(),l.html.wrap(!0,!0,!0,!0),l.selection.restore();var r=l.selection.blocks();l.selection.save();for(var i=c(r[0]).hasClass(e),o=0;o<r.length;o++)c(r[o]).removeClass(n).toggleClass(e,!i),c(r[o]).hasClass("fr-temp-div")&&c(r[o]).removeClass("fr-temp-div"),""===c(r[o]).attr("class")&&c(r[o]).removeAttr("class");if(1===r.length&&"fr-text-bordered"===e&&null===r[0].nextSibling){var s=c("<br>");r[0].after(s[0])}l.html.unwrap(),l.selection.restore()},refreshOnShow:function r(e,t){var a=l.selection.blocks();if(a.length){var n=c(a[0]);t.find(".fr-command").each(function(){var e=c(this).data("param1"),t=n.hasClass(e);c(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},Rt.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command '.concat(a,'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="').concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},title:"Paragraph Style",callback:function(e,t){this.paragraphStyle.apply(t)},refreshOnShow:function(e,t){this.paragraphStyle.refreshOnShow(e,t)},plugin:"paragraphStyle"}),Rt.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"}),Object.assign(Rt.DEFAULTS,{html2pdf:window.html2pdf}),Rt.PLUGINS.print=function(l){return{run:function e(){!function s(e){var t=l.html.get(),a=null;l.shared.print_iframe?a=l.shared.print_iframe:((a=document.createElement("iframe")).name="fr-print",a.style.position="fixed",a.style.top="0",a.style.left="-9999px",a.style.height="100%",a.style.width="0",a.style.overflow="hidden",a.style["z-index"]="2147483647",a.style.tabIndex="-1",l.events.on("shared.destroy",function(){a.remove()}),l.shared.print_iframe=a);try{document.body.removeChild(a)}catch(o){}document.body.appendChild(a);var n=function n(){e(),a.removeEventListener("load",n)};a.addEventListener("load",n);var r=a.contentWindow;r.document.open(),r.document.write("<!DOCTYPE html><html "+(l.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),r.document.write(e.outerHTML)});var i=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(i,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",r.document.write(t.outerHTML)}),r.document.write('</head><body style="height:auto;text-align: '+("rtl"==l.opts.direction?"right":"left")+"; direction: "+l.opts.direction+"; "+(l.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),r.document.write(t),r.document.write("</div></body></html>"),r.document.close()}(function(){setTimeout(function(){l.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),l.$win.get(0).focus(),l.events.disableBlur(),l.events.focus()},0)})},toPDF:function t(){l.opts.html2pdf&&(l.$el.css("text-align","left"),l.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(l.el).save(),setTimeout(function(){l.$el.css("text-align","")},100))}}},Rt.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),Rt.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),Rt.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),Rt.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}}),Object.assign(Rt.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),Rt.QUICK_INSERT_BUTTONS={},Rt.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),Rt.RegisterQuickInsertButton=function(e,t){Rt.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},Rt.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")},!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),Rt.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),Rt.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),Rt.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),Rt.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),Rt.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),Rt.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),Rt.PLUGINS.quickInsert=function(o){var s,l,c=o.$,d=!1;function a(e){var t,a,n;(t=e.offset().top-o.$box.offset().top,a=(o.$iframe&&o.$iframe.offset().left||0)+e.offset().left-e.position().left-4<s.outerWidth()?e.offset().left+s.outerWidth():0-s.outerWidth(),o.opts.enter!=Rt.ENTER_BR)?n=(s.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(Rt.INVISIBLE_SPACE).insertAfter(e),n=(s.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(o.opts.iframe){var r=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top"));t+=o.$iframe.offset().top+r}s.hasClass("fr-on")&&0<=t&&l.css("top",t-n),0<=t&&t-Math.abs(n)<=o.$box.outerHeight()-e.outerHeight()?(s.hasClass("fr-hidden")&&(s.hasClass("fr-on")&&f(),s.removeClass("fr-hidden")),s.css("top",t-n)):s.hasClass("fr-visible")&&!o.opts.toolbarInline&&(s.addClass("fr-hidden"),p()),s.css("left",a)}function r(e){o.markdown&&o.markdown.isEnabled()||(s||function t(){o.shared.$quick_insert||(o.shared.$quick_insert=c(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(o.language.translate("Quick Insert"),'">').concat(o.icon.create("quickInsert"),"</a>")));s=o.shared.$quick_insert,o.tooltip.bind(o.$box,".fr-quick-insert > a.fr-floating-btn"),o.events.on("destroy",function(){c("body").first().append(s.removeClass("fr-on")),l&&(p(),c("body").first().append(l.css("left",-9999).css("top",-9999)))},!0),o.events.on("shared.destroy",function(){s.html("").removeData().remove(),s=null,l&&(l.html("").removeData().remove(),l=null)},!0),o.events.on("commands.before",i),o.events.on("commands.after",function(){o.popups.areVisible()||n()}),o.events.bindClick(o.$box,".fr-quick-insert > a",f),o.events.bindClick(o.$box,".fr-qi-helper > a.fr-btn",function(e){var t=c(e.currentTarget).data("cmd");if(!1===o.events.trigger("quickInsert.commands.before",[t]))return!1;Rt.QUICK_INSERT_BUTTONS[t].callback.apply(o,[e.currentTarget]),Rt.QUICK_INSERT_BUTTONS[t].undo&&o.undo.saveStep(),o.events.trigger("quickInsert.commands.after",[t]),o.quickInsert.hide()}),o.events.$on(o.$wp,"scroll",u),o.events.$on(o.$tb,"transitionend",".fr-more-toolbar",u)}(),s.hasClass("fr-on")&&p(),o.$box.append(s),a(e),s.data("tag",e),s.addClass("fr-visible"))}function n(){if(o.core.hasFocus()){var e=o.selection.element();if(o.opts.enter==Rt.ENTER_BR||o.node.isBlock(e)||(e=o.node.blockParent(e)),o.opts.enter==Rt.ENTER_BR&&!o.node.isBlock(e)){var t=o.node.deepestParent(e);t&&(e=t)}var a=function a(){return o.opts.enter!=Rt.ENTER_BR&&o.node.isEmpty(e)&&0<=o.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},n=function n(){return o.opts.enter==Rt.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||o.node.isBlock(e.previousSibling))||o.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||o.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||o.node.isBlock(e.nextSibling)))};e&&(a()||n())?s&&s.data("tag").is(c(e))&&s.hasClass("fr-on")?p():o.selection.isCollapsed()&&r(c(e)):i()}}function i(){s&&!d&&(s.hasClass("fr-on")&&p(),s.removeClass("fr-visible fr-on"),s.css("left",-9999).css("top",-9999))}function f(e){if(e&&e.preventDefault(),s.hasClass("fr-on")&&!s.hasClass("fr-hidden"))p();else{if(!o.shared.$qi_helper){for(var t=o.opts.quickInsertButtons,a='<div class="fr-qi-helper">',n=0,r=0;r<t.length;r++){var i=Rt.QUICK_INSERT_BUTTONS[t[r]];i&&(!i.requiredPlugin||Rt.PLUGINS[i.requiredPlugin]&&0<=o.opts.pluginsEnabled.indexOf(i.requiredPlugin))&&(a+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(o.language.translate(i.title),'" tabIndex="-1" data-cmd="').concat(t[r],'" style="transition-delay: ').concat(.025*n++,'s;">').concat(o.icon.create(i.icon),"</a>"))}a+="</div>",o.shared.$qi_helper=c(a),o.tooltip.bind(o.shared.$qi_helper,"a.fr-btn"),o.events.$on(o.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=o.shared.$qi_helper,o.$box.append(l),d=!0,setTimeout(function(){d=!1,l.css("top",parseFloat(s.css("top"))),l.css("left",parseFloat(s.css("left"))+s.outerWidth()),l.find("a").addClass("fr-size-1"),s.addClass("fr-on")},10)}}function p(){var t=o.$box.find(".fr-qi-helper");if(t.length){for(var a=t.find("a"),e=0;e<a.length;e++)!function(e){setTimeout(function(){t.children().eq(a.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){t.css("left",-9999),s&&!s.hasClass("fr-hidden")&&s.removeClass("fr-on")},25*e)}}function u(){s.hasClass("fr-visible")&&a(s.data("tag"))}return{_init:function e(){if(!o.$wp||!o.opts.quickInsertEnabled)return!1;o.popups.onShow("image.edit",i),o.events.on("mouseup",n),o.helpers.isMobile()&&o.events.$on(c(o.o_doc),"selectionchange",n),o.events.on("blur",i),o.events.on("keyup",n),o.events.on("keydown",function(){setTimeout(function(){n()},0)})},hide:i}},Rt.PLUGINS.quote=function(i){var o=i.$;function s(e){for(;e.parentNode&&e.parentNode!=i.el;)e=e.parentNode;return e}return{apply:function t(e){i.selection.save(),i.html.wrap(!0,!0,!0,!0),i.selection.restore(),"increase"==e?function n(){var e,t=i.selection.blocks();for(e=0;e<t.length;e++)t[e]=s(t[e]);i.selection.save();var a=o(document.createElement("blockquote"));for(a.insertBefore(t[0]),e=0;e<t.length;e++)a.append(t[e]);i.opts.trackChangesEnabled&&i.track_changes.addQuote(a),i.html.unwrap(),i.selection.restore()}():"decrease"==e&&function r(){var e,t=i.opts.trackChangesEnabled,a=i.selection.blocks();for(e=0;e<a.length;e++)"BLOCKQUOTE"!=a[e].tagName&&(a[e]=t&&o(a[e]).parentsUntil(i.$el,"[data-track-id^=pending]").get(0)||o(a[e]).parentsUntil(i.$el,"BLOCKQUOTE").get(0));for(i.selection.save(),e=0;e<a.length;e++)a[e]&&(t?i.track_changes.removeQuote(o(a[e]),e):o(a[e]).replaceWith(a[e].innerHTML));i.html.unwrap(),i.selection.restore()}()}}},Rt.RegisterShortcut(Rt.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),Rt.RegisterShortcut(Rt.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),Rt.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var a in t)if(t.hasOwnProperty(a)){var n=this.shortcuts.get("quote.".concat(a));e+='<li role="presentation"><a class="fr-command fr-active '.concat(a,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(a,'" title="').concat(t[a],'">').concat(this.language.translate(t[a])).concat(n?'<span class="fr-shortcut">'.concat(n,"</span>"):"","</a></li>")}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),Rt.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"}),Object.assign(Rt.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),Rt.PLUGINS.save=function(s){var l=s.$,n=null,c=null,t=!1,d=1,f=2,a={};function p(e,t){s.events.trigger("save.error",[{code:e,message:a[e]},t])}function r(e){void 0===e&&(e=s.html.get());var n=e,t=s.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),s.opts.saveURL){var a={};for(var r in s.opts.saveParams)if(s.opts.saveParams.hasOwnProperty(r)){var i=s.opts.saveParams[r];a[r]="function"==typeof i?i.call(this):i}var o={};o[s.opts.saveParam]=e,l(this).ajax({method:s.opts.saveMethod,url:s.opts.saveURL,data:Object.assign(o,a),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){c=n,s.events.trigger("save.after",[e])},fail:function(e){p(f,e.response||e.responseText)}})}else p(d)}function i(){clearTimeout(n),n=setTimeout(function(){var e=s.html.get();(c!=e||t)&&(t=!1,r(c=e))},0)}return a[d]="Missing saveURL option.",a[f]="Something went wrong during save.",{_init:function o(){if(s.opts.letteringClass)for(var e=s.opts.letteringClass,t=s.$el.find(".".concat(e)).length,a=0;a<t;a++)s.$el.find(".".concat(e))[a].innerHTML=s.$el.find(".".concat(e))[a].innerText.replace(/([\w'-]+|[?.",])/g,"<span class = 'fr-word-select'>$1</span>");s.opts.saveInterval&&(c=s.html.get(),s.events.on("contentChanged",function(){setTimeout(i,s.opts.saveInterval)}),s.events.on("keydown destroy",function(){clearTimeout(n)}))},save:r,reset:function e(){i(),t=!1},force:function u(){t=!0}}},Rt.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),Rt.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"}),Object.assign(Rt.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"&iexcl;",list:[{"char":"&iexcl;",desc:"INVERTED EXCLAMATION MARK"},{"char":"&cent;",desc:"CENT SIGN"},{"char":"&pound;",desc:"POUND SIGN"},{"char":"&curren;",desc:"CURRENCY SIGN"},{"char":"&yen;",desc:"YEN SIGN"},{"char":"&brvbar;",desc:"BROKEN BAR"},{"char":"&sect;",desc:"SECTION SIGN"},{"char":"&uml;",desc:"DIAERESIS"},{"char":"&copy;",desc:"COPYRIGHT SIGN"},{"char":"&trade;",desc:"TRADEMARK SIGN"},{"char":"&ordf;",desc:"FEMININE ORDINAL INDICATOR"},{"char":"&laquo;",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&not;",desc:"NOT SIGN"},{"char":"&reg;",desc:"REGISTERED SIGN"},{"char":"&macr;",desc:"MACRON"},{"char":"&deg;",desc:"DEGREE SIGN"},{"char":"&plusmn;",desc:"PLUS-MINUS SIGN"},{"char":"&sup2;",desc:"SUPERSCRIPT TWO"},{"char":"&sup3;",desc:"SUPERSCRIPT THREE"},{"char":"&acute;",desc:"ACUTE ACCENT"},{"char":"&micro;",desc:"MICRO SIGN"},{"char":"&para;",desc:"PILCROW SIGN"},{"char":"&middot;",desc:"MIDDLE DOT"},{"char":"&cedil;",desc:"CEDILLA"},{"char":"&sup1;",desc:"SUPERSCRIPT ONE"},{"char":"&ordm;",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"&raquo;",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&frac14;",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"&frac12;",desc:"VULGAR FRACTION ONE HALF"},{"char":"&frac34;",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"&iquest;",desc:"INVERTED QUESTION MARK"},{"char":"&Agrave;",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"&Aacute;",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"&Acirc;",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"&Atilde;",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"&Auml;",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"&Aring;",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"&AElig;",desc:"LATIN CAPITAL LETTER AE"},{"char":"&Ccedil;",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"&Egrave;",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"&Eacute;",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"&Ecirc;",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"&Euml;",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"&Igrave;",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"&Iacute;",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"&Icirc;",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"&Iuml;",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"&ETH;",desc:"LATIN CAPITAL LETTER ETH"},{"char":"&Ntilde;",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"&Ograve;",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"&Oacute;",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"&Ocirc;",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"&Otilde;",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"&Ouml;",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"&times;",desc:"MULTIPLICATION SIGN"},{"char":"&Oslash;",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"&Ugrave;",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"&Uacute;",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"&Ucirc;",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"&Uuml;",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"&Yacute;",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"&THORN;",desc:"LATIN CAPITAL LETTER THORN"},{"char":"&szlig;",desc:"LATIN SMALL LETTER SHARP S"},{"char":"&agrave;",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"&aacute;",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"&acirc;",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"&atilde;",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"&auml;",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"&aring;",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"&aelig;",desc:"LATIN SMALL LETTER AE"},{"char":"&ccedil;",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"&egrave;",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"&eacute;",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"&ecirc;",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"&euml;",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"&igrave;",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"&iacute;",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"&icirc;",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"&iuml;",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"&eth;",desc:"LATIN SMALL LETTER ETH"},{"char":"&ntilde;",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"&ograve;",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"&oacute;",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"&ocirc;",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"&otilde;",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"&ouml;",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"&divide;",desc:"DIVISION SIGN"},{"char":"&oslash;",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"&ugrave;",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"&uacute;",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"&ucirc;",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"&uuml;",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"&yacute;",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"&thorn;",desc:"LATIN SMALL LETTER THORN"},{"char":"&yuml;",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"&Alpha;",list:[{"char":"&Alpha;",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"&Beta;",desc:"GREEK CAPITAL LETTER BETA"},{"char":"&Gamma;",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"&Delta;",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"&Epsilon;",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"&Zeta;",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"&Eta;",desc:"GREEK CAPITAL LETTER ETA"},{"char":"&Theta;",desc:"GREEK CAPITAL LETTER THETA"},{"char":"&Iota;",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"&Kappa;",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"&Lambda;",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"&Mu;",desc:"GREEK CAPITAL LETTER MU"},{"char":"&Nu;",desc:"GREEK CAPITAL LETTER NU"},{"char":"&Xi;",desc:"GREEK CAPITAL LETTER XI"},{"char":"&Omicron;",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"&Pi;",desc:"GREEK CAPITAL LETTER PI"},{"char":"&Rho;",desc:"GREEK CAPITAL LETTER RHO"},{"char":"&Sigma;",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"&Tau;",desc:"GREEK CAPITAL LETTER TAU"},{"char":"&Upsilon;",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"&Phi;",desc:"GREEK CAPITAL LETTER PHI"},{"char":"&Chi;",desc:"GREEK CAPITAL LETTER CHI"},{"char":"&Psi;",desc:"GREEK CAPITAL LETTER PSI"},{"char":"&Omega;",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"&alpha;",desc:"GREEK SMALL LETTER ALPHA"},{"char":"&beta;",desc:"GREEK SMALL LETTER BETA"},{"char":"&gamma;",desc:"GREEK SMALL LETTER GAMMA"},{"char":"&delta;",desc:"GREEK SMALL LETTER DELTA"},{"char":"&epsilon;",desc:"GREEK SMALL LETTER EPSILON"},{"char":"&zeta;",desc:"GREEK SMALL LETTER ZETA"},{"char":"&eta;",desc:"GREEK SMALL LETTER ETA"},{"char":"&theta;",desc:"GREEK SMALL LETTER THETA"},{"char":"&iota;",desc:"GREEK SMALL LETTER IOTA"},{"char":"&kappa;",desc:"GREEK SMALL LETTER KAPPA"},{"char":"&lambda;",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"&mu;",desc:"GREEK SMALL LETTER MU"},{"char":"&nu;",desc:"GREEK SMALL LETTER NU"},{"char":"&xi;",desc:"GREEK SMALL LETTER XI"},{"char":"&omicron;",desc:"GREEK SMALL LETTER OMICRON"},{"char":"&pi;",desc:"GREEK SMALL LETTER PI"},{"char":"&rho;",desc:"GREEK SMALL LETTER RHO"},{"char":"&sigmaf;",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"&sigma;",desc:"GREEK SMALL LETTER SIGMA"},{"char":"&tau;",desc:"GREEK SMALL LETTER TAU"},{"char":"&upsilon;",desc:"GREEK SMALL LETTER UPSILON"},{"char":"&phi;",desc:"GREEK SMALL LETTER PHI"},{"char":"&chi;",desc:"GREEK SMALL LETTER CHI"},{"char":"&psi;",desc:"GREEK SMALL LETTER PSI"},{"char":"&omega;",desc:"GREEK SMALL LETTER OMEGA"},{"char":"&thetasym;",desc:"GREEK THETA SYMBOL"},{"char":"&upsih;",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"&straightphi;",desc:"GREEK PHI SYMBOL"},{"char":"&piv;",desc:"GREEK PI SYMBOL"},{"char":"&Gammad;",desc:"GREEK LETTER DIGAMMA"},{"char":"&gammad;",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"&varkappa;",desc:"GREEK KAPPA SYMBOL"},{"char":"&varrho;",desc:"GREEK RHO SYMBOL"},{"char":"&straightepsilon;",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"&backepsilon;",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"&#x400",list:[{"char":"&#x400",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"&#x401",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"&#x402",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"&#x403",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"&#x404",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"&#x405",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"&#x406",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x407",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"&#x408",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"&#x409",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"&#x40A",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"&#x40B",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"&#x40C",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"&#x40D",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"&#x40E",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"&#x40F",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"&#x410",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"&#x411",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"&#x412",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"&#x413",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"&#x414",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"&#x415",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"&#x416",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"&#x417",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"&#x418",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"&#x419",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"&#x41A",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"&#x41B",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"&#x41C",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"&#x41D",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"&#x41E",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"&#x41F",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"&#x420",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"&#x421",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"&#x422",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"&#x423",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"&#x424",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"&#x425",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"&#x426",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"&#x427",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"&#x428",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"&#x429",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"&#x42A",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"&#x42B",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"&#x42C",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"&#x42D",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"&#x42E",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"&#x42F",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"&#x430",desc:"CYRILLIC SMALL LETTER A"},{"char":"&#x431",desc:"CYRILLIC SMALL LETTER BE"},{"char":"&#x432",desc:"CYRILLIC SMALL LETTER VE"},{"char":"&#x433",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"&#x434",desc:"CYRILLIC SMALL LETTER DE"},{"char":"&#x435",desc:"CYRILLIC SMALL LETTER IE"},{"char":"&#x436",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"&#x437",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"&#x438",desc:"CYRILLIC SMALL LETTER I"},{"char":"&#x439",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"&#x43A",desc:"CYRILLIC SMALL LETTER KA"},{"char":"&#x43B",desc:"CYRILLIC SMALL LETTER EL"},{"char":"&#x43C",desc:"CYRILLIC SMALL LETTER EM"},{"char":"&#x43D",desc:"CYRILLIC SMALL LETTER EN"},{"char":"&#x43E",desc:"CYRILLIC SMALL LETTER O"},{"char":"&#x43F",desc:"CYRILLIC SMALL LETTER PE"},{"char":"&#x440",desc:"CYRILLIC SMALL LETTER ER"},{"char":"&#x441",desc:"CYRILLIC SMALL LETTER ES"},{"char":"&#x442",desc:"CYRILLIC SMALL LETTER TE"},{"char":"&#x443",desc:"CYRILLIC SMALL LETTER U"},{"char":"&#x444",desc:"CYRILLIC SMALL LETTER EF"},{"char":"&#x445",desc:"CYRILLIC SMALL LETTER HA"},{"char":"&#x446",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"&#x447",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"&#x448",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"&#x449",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"&#x44A",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"&#x44B",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"&#x44C",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"&#x44D",desc:"CYRILLIC SMALL LETTER E"},{"char":"&#x44E",desc:"CYRILLIC SMALL LETTER YU"},{"char":"&#x44F",desc:"CYRILLIC SMALL LETTER YA"},{"char":"&#x450",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"&#x451",desc:"CYRILLIC SMALL LETTER IO"},{"char":"&#x452",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"&#x453",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"&#x454",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"&#x455",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"&#x456",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x457",desc:"CYRILLIC SMALL LETTER YI"},{"char":"&#x458",desc:"CYRILLIC SMALL LETTER JE"},{"char":"&#x459",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"&#x45A",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"&#x45B",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"&#x45C",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"&#x45D",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"&#x45E",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"&#x45F",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"&ndash;",list:[{"char":"&ndash;",desc:"EN DASH"},{"char":"&mdash;",desc:"EM DASH"},{"char":"&lsquo;",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"&rsquo;",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"&sbquo;",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"&ldquo;",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"&rdquo;",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"&bdquo;",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"&dagger;",desc:"DAGGER"},{"char":"&Dagger;",desc:"DOUBLE DAGGER"},{"char":"&bull;",desc:"BULLET"},{"char":"&hellip;",desc:"HORIZONTAL ELLIPSIS"},{"char":"&permil;",desc:"PER MILLE SIGN"},{"char":"&prime;",desc:"PRIME"},{"char":"&Prime;",desc:"DOUBLE PRIME"},{"char":"&lsaquo;",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"&rsaquo;",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"&oline;",desc:"OVERLINE"},{"char":"&frasl;",desc:"FRACTION SLASH"}]},{title:"Currency","char":"&#x20A0",list:[{"char":"&#x20A0",desc:"EURO-CURRENCY SIGN"},{"char":"&#x20A1",desc:"COLON SIGN"},{"char":"&#x20A2",desc:"CRUZEIRO SIGN"},{"char":"&#x20A3",desc:"FRENCH FRANC SIGN"},{"char":"&#x20A4",desc:"LIRA SIGN"},{"char":"&#x20A5",desc:"MILL SIGN"},{"char":"&#x20A6",desc:"NAIRA SIGN"},{"char":"&#x20A7",desc:"PESETA SIGN"},{"char":"&#x20A8",desc:"RUPEE SIGN"},{"char":"&#x20A9",desc:"WON SIGN"},{"char":"&#x20AA",desc:"NEW SHEQEL SIGN"},{"char":"&#x20AB",desc:"DONG SIGN"},{"char":"&#x20AC",desc:"EURO SIGN"},{"char":"&#x20AD",desc:"KIP SIGN"},{"char":"&#x20AE",desc:"TUGRIK SIGN"},{"char":"&#x20AF",desc:"DRACHMA SIGN"},{"char":"&#x20B0",desc:"GERMAN PENNY SYMBOL"},{"char":"&#x20B1",desc:"PESO SIGN"},{"char":"&#x20B2",desc:"GUARANI SIGN"},{"char":"&#x20B3",desc:"AUSTRAL SIGN"},{"char":"&#x20B4",desc:"HRYVNIA SIGN"},{"char":"&#x20B5",desc:"CEDI SIGN"},{"char":"&#x20B6",desc:"LIVRE TOURNOIS SIGN"},{"char":"&#x20B7",desc:"SPESMILO SIGN"},{"char":"&#x20B8",desc:"TENGE SIGN"},{"char":"&#x20B9",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"&#x2190",list:[{"char":"&#x2190",desc:"LEFTWARDS ARROW"},{"char":"&#x2191",desc:"UPWARDS ARROW"},{"char":"&#x2192",desc:"RIGHTWARDS ARROW"},{"char":"&#x2193",desc:"DOWNWARDS ARROW"},{"char":"&#x2194",desc:"LEFT RIGHT ARROW"},{"char":"&#x2195",desc:"UP DOWN ARROW"},{"char":"&#x2196",desc:"NORTH WEST ARROW"},{"char":"&#x2197",desc:"NORTH EAST ARROW"},{"char":"&#x2198",desc:"SOUTH EAST ARROW"},{"char":"&#x2199",desc:"SOUTH WEST ARROW"},{"char":"&#x219A",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"&#x219B",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"&#x219C",desc:"LEFTWARDS WAVE ARROW"},{"char":"&#x219D",desc:"RIGHTWARDS WAVE ARROW"},{"char":"&#x219E",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"&#x219F",desc:"UPWARDS TWO HEADED ARROW"},{"char":"&#x21A0",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"&#x21A1",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"&#x21A2",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"&#x21A3",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"&#x21A4",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"&#x21A5",desc:"UPWARDS ARROW FROM BAR"},{"char":"&#x21A6",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"&#x21A7",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"&#x21A8",desc:"UP DOWN ARROW WITH BASE"},{"char":"&#x21A9",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"&#x21AA",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"&#x21AB",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"&#x21AC",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"&#x21AD",desc:"LEFT RIGHT WAVE ARROW"},{"char":"&#x21AE",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"&#x21AF",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"&#x21B0",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B1",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B2",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B3",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B4",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"&#x21B5",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"&#x21B6",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B7",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B8",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"&#x21B9",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"&#x21BA",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BB",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BC",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21BD",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21BE",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21BF",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C0",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21C1",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21C2",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21C3",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C4",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"&#x21C5",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"&#x21C6",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"&#x21C7",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"&#x21C8",desc:"UPWARDS PAIRED ARROWS"},{"char":"&#x21C9",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"&#x21CA",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"&#x21CB",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"&#x21CC",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"&#x21CD",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21CE",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"&#x21CF",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21D0",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"&#x21D1",desc:"UPWARDS DOUBLE ARROW"},{"char":"&#x21D2",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"&#x21D3",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"&#x21D4",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"&#x21D5",desc:"UP DOWN DOUBLE ARROW"},{"char":"&#x21D6",desc:"NORTH WEST DOUBLE ARROW"},{"char":"&#x21D7",desc:"NORTH EAST DOUBLE ARROW"},{"char":"&#x21D8",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"&#x21D9",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"&#x21DA",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"&#x21DB",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"&#x21DC",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"&#x21DD",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"&#x21DE",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21DF",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21E0",desc:"LEFTWARDS DASHED ARROW"},{"char":"&#x21E1",desc:"UPWARDS DASHED ARROW"},{"char":"&#x21E2",desc:"RIGHTWARDS DASHED ARROW"},{"char":"&#x21E3",desc:"DOWNWARDS DASHED ARROW"},{"char":"&#x21E4",desc:"LEFTWARDS ARROW TO BAR"},{"char":"&#x21E5",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"&#x21E6",desc:"LEFTWARDS WHITE ARROW"},{"char":"&#x21E7",desc:"UPWARDS WHITE ARROW"},{"char":"&#x21E8",desc:"RIGHTWARDS WHITE ARROW"},{"char":"&#x21E9",desc:"DOWNWARDS WHITE ARROW"},{"char":"&#x21EA",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"&#x21EB",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"&#x21EC",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"&#x21ED",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"&#x21EE",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"&#x21EF",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"&#x21F0",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"&#x21F1",desc:"NORTH WEST ARROW TO CORNER"},{"char":"&#x21F2",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"&#x21F3",desc:"UP DOWN WHITE ARROW"},{"char":"&#x21F4",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"&#x21F5",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"&#x21F6",desc:"THREE RIGHTWARDS ARROWS"},{"char":"&#x21F7",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F8",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F9",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"&#x21FA",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FB",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FC",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FD",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FE",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FF",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"&forall;",list:[{"char":"&forall;",desc:"FOR ALL"},{"char":"&part;",desc:"PARTIAL DIFFERENTIAL"},{"char":"&exist;",desc:"THERE EXISTS"},{"char":"&empty;",desc:"EMPTY SET"},{"char":"&nabla;",desc:"NABLA"},{"char":"&isin;",desc:"ELEMENT OF"},{"char":"&notin;",desc:"NOT AN ELEMENT OF"},{"char":"&ni;",desc:"CONTAINS AS MEMBER"},{"char":"&prod;",desc:"N-ARY PRODUCT"},{"char":"&sum;",desc:"N-ARY SUMMATION"},{"char":"&minus;",desc:"MINUS SIGN"},{"char":"&lowast;",desc:"ASTERISK OPERATOR"},{"char":"&radic;",desc:"SQUARE ROOT"},{"char":"&prop;",desc:"PROPORTIONAL TO"},{"char":"&infin;",desc:"INFINITY"},{"char":"&ang;",desc:"ANGLE"},{"char":"&and;",desc:"LOGICAL AND"},{"char":"&or;",desc:"LOGICAL OR"},{"char":"&cap;",desc:"INTERSECTION"},{"char":"&cup;",desc:"UNION"},{"char":"&int;",desc:"INTEGRAL"},{"char":"&there4;",desc:"THEREFORE"},{"char":"&sim;",desc:"TILDE OPERATOR"},{"char":"&cong;",desc:"APPROXIMATELY EQUAL TO"},{"char":"&asymp;",desc:"ALMOST EQUAL TO"},{"char":"&ne;",desc:"NOT EQUAL TO"},{"char":"&equiv;",desc:"IDENTICAL TO"},{"char":"&le;",desc:"LESS-THAN OR EQUAL TO"},{"char":"&ge;",desc:"GREATER-THAN OR EQUAL TO"},{"char":"&sub;",desc:"SUBSET OF"},{"char":"&sup;",desc:"SUPERSET OF"},{"char":"&nsub;",desc:"NOT A SUBSET OF"},{"char":"&sube;",desc:"SUBSET OF OR EQUAL TO"},{"char":"&supe;",desc:"SUPERSET OF OR EQUAL TO"},{"char":"&oplus;",desc:"CIRCLED PLUS"},{"char":"&otimes;",desc:"CIRCLED TIMES"},{"char":"&perp;",desc:"UP TACK"}]},{title:"Misc","char":"&spades;",list:[{"char":"&spades;",desc:"BLACK SPADE SUIT"},{"char":"&clubs;",desc:"BLACK CLUB SUIT"},{"char":"&hearts;",desc:"BLACK HEART SUIT"},{"char":"&diams;",desc:"BLACK DIAMOND SUIT"},{"char":"&#x2669",desc:"QUARTER NOTE"},{"char":"&#x266A",desc:"EIGHTH NOTE"},{"char":"&#x266B",desc:"BEAMED EIGHTH NOTES"},{"char":"&#x266C",desc:"BEAMED SIXTEENTH NOTES"},{"char":"&#x266D",desc:"MUSIC FLAT SIGN"},{"char":"&#x266E",desc:"MUSIC NATURAL SIGN"},{"char":"&#x2600",desc:"BLACK SUN WITH RAYS"},{"char":"&#x2601",desc:"CLOUD"},{"char":"&#x2602",desc:"UMBRELLA"},{"char":"&#x2603",desc:"SNOWMAN"},{"char":"&#x2615",desc:"HOT BEVERAGE"},{"char":"&#x2618",desc:"SHAMROCK"},{"char":"&#x262F",desc:"YIN YANG"},{"char":"&#x2714",desc:"HEAVY CHECK MARK"},{"char":"&#x2716",desc:"HEAVY MULTIPLICATION X"},{"char":"&#x2744",desc:"SNOWFLAKE"},{"char":"&#x275B",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275C",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275D",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275E",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x2764",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(Rt.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Rt.PLUGINS.specialCharacters=function(_){var E=_.$,e=_.opts.specialCharactersSets,r=_.opts.specialCharactersSets[0],o="";function s(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function t(e,a){var n="";return e.forEach(function(e){var t={elementClass:e.title===a.title?"fr-active fr-active-tab":"",title:e.title,dataParam1:e.title,desc:e["char"]};n+='<button class="fr-command fr-btn fr-special-character-category '.concat(t.elementClass,'" title="').concat(t.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(t.dataParam1,'"><span>').concat(t.desc,"</span></button>")}),n}(e,r),'\n </div>\n <div class="fr-icon-container fr-sc-container" style="outline: none;">\n ').concat(function n(e){var a="";return e.list.forEach(function(e){var t={dataParam1:e["char"],title:e.desc,splCharValue:e["char"]};a+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(t.dataParam1,'" tabindex="0"\n title="').concat(t.title,'">').concat(t.splCharValue,"</span>")}),a}(r),"\n </div>")}return{setSpecialCharacterCategory:function n(t){r=e.filter(function(e){return e.title===t})[0],function a(){_.popups.get("specialCharacters").html(o+s());var e=_.popups.get("specialCharacters").children().not(".fr-buttons");_.accessibility.registerPopup("specialCharacters"),_.accessibility.focusContent(e)}()},showSpecialCharsPopup:function l(){var e=_.popups.get("specialCharacters");if(e||(e=function i(){_.opts.toolbarInline&&0<_.opts.specialCharButtons.length&&(o='<div class="fr-buttons fr-tabs">'.concat(_.button.buildList(_.opts.specialCharButtons),"</div>"));var e={buttons:o,custom_layer:s()},t=_.popups.create("specialCharacters",e);return function a(b){_.events.on("popup.tab",function(e){var t=E(e.currentTarget);if(!_.popups.isVisible("specialCharacters")||!t.is("span, a"))return!0;var a,n,r,i=e.which,o=window.getComputedStyle(b.find(".fr-icon-container")[0]),s=o.getPropertyValue("grid-template-columns").split(" ").length;if(Rt.KEYCODE.TAB==i){var l=b.find("span.fr-special-character");if(t.is(l.first())&&e.shiftKey||t.is(l.last())&&!e.shiftKey){var c=b.find(".fr-buttons");a=!_.accessibility.focusToolbar(c,!!e.shiftKey)}if(!1!==a){var d=b.find("span.fr-special-character");d.add(b.find("button.fr-btn")),n=d.index(t),n=e.shiftKey?((n-1)%d.length+d.length)%d.length:(n+1)%d.length,r=d.get(n),_.events.disableBlur(),r.focus(),a=!1}}else if(Rt.KEYCODE.ARROW_UP==i||Rt.KEYCODE.ARROW_DOWN==i||Rt.KEYCODE.ARROW_LEFT==i||Rt.KEYCODE.ARROW_RIGHT==i){if(t.is("span.fr-icon")){var f=t.parent().find("span.fr-icon");n=f.index(t);var p=s,u=Math.ceil(f.length/p),g=n%p,h=Math.floor(n/p),m=h*p+g,v=u*p;Rt.KEYCODE.ARROW_UP==i?m=((m-p)%v+v)%v:Rt.KEYCODE.ARROW_DOWN==i?m=(m+p)%v:Rt.KEYCODE.ARROW_LEFT==i?m=((m-1)%v+v)%v:Rt.KEYCODE.ARROW_RIGHT==i&&(m=(m+1)%v),r=E(f.get(m)),_.events.disableBlur(),r.focus(),a=!1}}else Rt.KEYCODE.ENTER==i&&(t.is("a")?t[0].click():_.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){_.popups.refresh("specialCharacters"),_.popups.setContainer("specialCharacters",_.$tb);var t=_.$tb.find('.fr-command[data-cmd="specialCharacters"]'),a=_.button.getPosition(t),n=a.left,r=a.top;_.popups.show("specialCharacters",n,r,outerHeight)}},back:function t(){_.popups.hide("specialCharacters"),_.toolbar.showInline()}}},Rt.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),Rt.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),Rt.RegisterCommand("insertSpecialCharacter",{callback:function(e,t){this.undo.saveStep(),this.html.insert(t),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),Rt.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(e,t){this.specialCharacters.setSpecialCharacterCategory(t)}}),Rt.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}}),Object.assign(Rt.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(Rt.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableFooter","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,keepTextFormatOnTable:!1,tableInsertHelperOffset:15}),Rt.PLUGINS.table=function(C){var T,c,r,i,n,o,y,S=C.$;function h(){var e=R();if(e){var t=C.popups.get("table.edit");if(t||(t=p()),t){C.popups.setContainer("table.edit",C.$sc);var a=F(e),n=a.left+(a.right-a.left)/2,r=a.bottom;C.popups.show("table.edit",n,r,a.bottom-a.top,!0),C.edit.isDisabled()&&(C.$el.removeClass("fr-no-selection"),C.edit.on(),C.button.bulkRefresh(),C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)),C.selection.restore())}}}function s(){var e=R();if(e){var t=C.popups.get("table.colors");t||(t=function o(){var e="";0<C.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.tableColorsButtons),"</div>"));var t="";C.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(C.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(C.id,'" type="text" placeholder="').concat(C.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(C.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function r(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<C.opts.tableColors.length;t++)0!==t&&t%C.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=C.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(C.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(C.opts.tableColors[t],'"><span class="fr-sr-only">').concat(C.language.translate("Color")," ").concat(C.opts.tableColors[t],"&nbsp;&nbsp;&nbsp;</span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(C.language.translate("Clear Formatting"),'">').concat(C.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(C.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},n=C.popups.create("table.colors",a);return C.events.$on(C.$wp,"scroll.table-colors",function(){C.popups.isVisible("table.colors")&&s()}),function i(g){C.events.on("popup.tab",function(e){var t=S(e.currentTarget);if(!C.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,n=!0;if(Rt.KEYCODE.TAB==a){var r=g.find(".fr-buttons");n=!C.accessibility.focusToolbar(r,!!e.shiftKey)}else if(Rt.KEYCODE.ARROW_UP==a||Rt.KEYCODE.ARROW_DOWN==a||Rt.KEYCODE.ARROW_LEFT==a||Rt.KEYCODE.ARROW_RIGHT==a){var i=t.parent().find("span.fr-command"),o=i.index(t),s=C.opts.colorsStep,l=Math.floor(i.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;Rt.KEYCODE.ARROW_UP==a?f=((f-s)%p+p)%p:Rt.KEYCODE.ARROW_DOWN==a?f=(f+s)%p:Rt.KEYCODE.ARROW_LEFT==a?f=((f-1)%p+p)%p:Rt.KEYCODE.ARROW_RIGHT==a&&(f=(f+1)%p);var u=S(i.get(f));C.events.disableBlur(),u.focus(),n=!1}else Rt.KEYCODE.ENTER==a&&(C.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(n),n}()),C.popups.setContainer("table.colors",C.$sc);var a=F(e),n=(a.left+a.right)/2,r=a.bottom;!function i(){var e=C.popups.get("table.colors"),t=C.$el.find(".fr-selected-cell").first(),a=C.helpers.RGBToHex(t.css("background-color")),n=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),n.val(a).trigger("change")}(),C.popups.show("table.colors",n,r,a.bottom-a.top,!0)}}function l(){0===te().length&&C.toolbar.enable()}function d(e){if(e)return C.popups.onHide("table.insert",function(){C.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<C.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function i(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">',t=1;t<=C.opts.tableInsertMaxSize;t++){for(var a=1;a<=C.opts.tableInsertMaxSize;a++){var n="inline-block";2<t&&!C.helpers.isMobile()&&(n="none");var r="fr-table-cell ";1==t&&1==a&&(r+=" hover"),e+='<span class="fr-command '.concat(r,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(n,';" role="button"><span></span><span class="fr-sr-only">').concat(t," &times; ").concat(a,"&nbsp;&nbsp;&nbsp;</span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},n=C.popups.create("table.insert",a);return C.events.$on(n,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){f(S(e.currentTarget))},!0),function r(e){C.events.$on(e,"focus","[tabIndex]",function(e){var t=S(e.currentTarget);f(t)}),C.events.on("popup.tab",function(e){var t=S(e.currentTarget);if(!C.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,n=e.which;if(Rt.KEYCODE.ARROW_UP==n||Rt.KEYCODE.ARROW_DOWN==n||Rt.KEYCODE.ARROW_LEFT==n||Rt.KEYCODE.ARROW_RIGHT==n){if(t.is("span.fr-table-cell")){var r=t.parent().find("span.fr-table-cell"),i=r.index(t),o=C.opts.tableInsertMaxSize,s=i%o,l=Math.floor(i/o);Rt.KEYCODE.ARROW_UP==n?l=Math.max(0,l-1):Rt.KEYCODE.ARROW_DOWN==n?l=Math.min(C.opts.tableInsertMaxSize-1,l+1):Rt.KEYCODE.ARROW_LEFT==n?s=Math.max(0,s-1):Rt.KEYCODE.ARROW_RIGHT==n&&(s=Math.min(C.opts.tableInsertMaxSize-1,s+1));var c=l*o+s,d=S(r.get(c));f(d),C.events.disableBlur(),d.focus(),a=!1}}else Rt.KEYCODE.ENTER==n&&(C.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(n),n}function f(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var n=e.parent();n.siblings(".fr-table-size-info").html("".concat(t," &times; ").concat(a)),n.find("> span").removeClass("hover fr-active-item");for(var r=1;r<=C.opts.tableInsertMaxSize;r++)for(var i=0;i<=C.opts.tableInsertMaxSize;i++){var o=n.find('> span[data-row="'.concat(r,'"][data-col="').concat(i,'"]'));r<=t&&i<=a?o.addClass("hover"):r<=t+1||r<=2&&!C.helpers.isMobile()?o.css("display","inline-block"):2<r&&!C.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return C.popups.onHide("table.edit",l),!0;if(0<C.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(C.button.buildList(C.opts.tableEditButtons),"</div>")},a=C.popups.create("table.edit",t);return C.events.$on(C.$wp,"scroll.table-edit",function(){C.popups.isVisible("table.edit")&&h()}),a}return!1}function m(e){var t={startTag:"",closeTag:""};return C.opts.keepTextFormatOnTable&&(t=u(function s(e){var t=new Set,a=e.textContent,n=0,r=[e.firstChild];for(;0<r.length;){var i=r.pop();if(i&&(t.has(i)||(0===n&&a!==i.textContent&&(a=i.textContent,n++),t.add(i)),i.hasChildNodes()))for(var o=0;o<i.childNodes.length;){if(3===i.childNodes[o].nodeType)return ye(t);if(i.childNodes[o].textContent){if(0===n&&i.childNodes[o].textContent!==a){a=i.childNodes[o].textContent,r.push(i.childNodes[o]),n++;break}i.childNodes[o].textContent===a&&r.push(i.childNodes[o])}o++}}return ye(t)}(e).reverse())),{startTag:t.startTag,closeTag:t.closeTag}}function u(e){var t="",a="",n=["br","#text","#comment","font"];if(0<e.length)for(var r=e.length-1;0<=r;r--){var i=e[r],o=C.node.isBlock(i),s=n.indexOf(i.nodeName.toLowerCase());if(!o&&s<0){var l=i.style,c="";if(l&&l.length){for(var d=0;d<l.length;d++)c+=l[d]+": "+l[l[d]].replace(/"/gi,"")+"; ";c=c.trim()}t+=c?"<"+i.nodeName.toLowerCase()+' style="'+c+'">':"<"+i.nodeName.toLowerCase()+">",a="</"+i.nodeName.toLowerCase()+">"+a}}return{startTag:t,closeTag:a}}function g(){if(0<te().length){var e=ae();C.selection.setBefore(e.get(0))||C.selection.setAfter(e.get(0)),C.selection.restore(),C.popups.hide("table.edit"),C.opts.trackChangesEnabled?(C.track_changes.removedTable(e),I()):e.remove(),C.toolbar.enable()}}function v(e){var t=ae();if(0<t.length){if(0<C.$el.find("thead .fr-selected-cell").length&&"above"==e||0<C.$el.find("tfoot td.fr-selected-cell").length&&"below"==e)return;var a,n,r,i=R(),o=M(i);if(null==o)return;n="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<i[n].length;a++)if("below"==e&&n<i.length-1&&i[n][a]==i[n+1][a]||"above"==e&&0<n&&i[n][a]==i[n-1][a]){if(0===a||0<a&&i[n][a]!=i[n][a-1]){var l=S(i[n][a]);l.attr("rowspan",parseInt(l.attr("rowspan"),10)+1)}}else{var c=S(i[n][a]);if("TH"==c.attr("tagName").toUpperCase())s+='<th style="'+c.attr("style")+'" ><br></th>';else{var d=m(i[n][a]);s+='<td style="'+c.attr("style")+'" >'+d.startTag+"<br>"+d.closeTag+"</td>"}}s+="</tr>",r=0<C.$el.find("thead .fr-selected-cell").length&&"below"==e||0<C.$el.find("tfoot td.fr-selected-cell").length&&"above"==e?S(t.find("tbody").not(t.find("> table tbody"))):S(t.find("tr").not(t.find("> table tr")).get(n)),"below"==e?"TBODY"==r.attr("tagName")?r.prepend(s):r[0].parentNode&&r[0].insertAdjacentHTML("afterend",s):"above"==e&&("TBODY"==r.attr("tagName")?r.append(s):r.before(s),C.popups.isVisible("table.edit")&&h())}}function b(e,t,a){var n,r,i,o,s,l=0,c=R(a);if(e<(t=Math.min(t,c[0].length-1)))for(r=e;r<=t;r++)if(!(e<r&&c[0][r]==c[0][r-1])&&1<(o=Math.min(parseInt(c[0][r].getAttribute("colspan"),10)||1,t-e+1))&&c[0][r]==c[0][r+1])for(l=o-1,n=1;n<c.length;n++)if(c[n][r]!=c[n-1][r]){for(i=r;i<r+o;i++)if(c[n][i]!==undefined)if(1<(s=parseInt(c[n][i].getAttribute("colspan"),10)||1)&&c[n][i]==c[n][i+1])i+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&E(c,l,"colspan",0,c.length-1,e,t)}function _(e,t,a){var n,r,i,o,s,l=0,c=R(a);if(e<(t=Math.min(t,c.length-1)))for(n=e;n<=t;n++)if(!(e<n&&c[n][0]==c[n-1][0])&&c[n][0]!==undefined&&1<(o=Math.min(parseInt(c[n][0].getAttribute("rowspan"),10)||1,t-e+1))&&c[n][0]==c[n+1][0])for(l=o-1,r=1;r<c[0].length;r++)if(c[n][r]!=c[n][r-1]){for(i=n;i<n+o;i++)if(c[i][r]!==undefined)if(1<(s=parseInt(c[i][r].getAttribute("rowspan"),10)||1)&&c[i][r]==c[i+1][r])i+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&E(c,l,"rowspan",e,t,0,c[0].length-1)}function E(e,t,a,n,r,i,o){var s,l,c;for(s=n;s<=r;s++)for(l=i;l<=o;l++)n<s&&e[s][l]==e[s-1][l]||i<l&&e[s][l]==e[s][l-1]||e[s][l]!==undefined&&1<(c=parseInt(e[s][l].getAttribute(a),10)||1)&&(1<c-t?e[s][l].setAttribute(a,c-t):e[s][l].removeAttribute(a))}function w(e,t,a,n,r){_(e,t,r),b(a,n,r)}function t(e){var t=C.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",C.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function A(e){e.style.removeProperty("border"),e.style.removeProperty("border-top"),e.style.removeProperty("border-bottom"),e.style.removeProperty("border-left"),e.style.removeProperty("border-right")}function R(e){var c=[];if(null==(e=e||null)&&0<te().length&&(e=ae()),e){if(!e.find("tr").html().match(/xl[0-9]+/gi))for(var t=e.find("tr:empty"),a=t.length-1;0<=a;a--)S(t[a]).remove();e.find("tr").not(e.find("> table tr")).each(function(s,e){var t=S(e),l=0;t.find("> th, > td").each(function(e,t){for(var a=S(t),n=parseInt(a.attr("colspan"),10)||1,r=parseInt(a.attr("rowspan"),10)||1,i=s;i<s+r;i++)for(var o=l;o<l+n;o++)c[i]||(c[i]=[]),c[i][o]?l++:c[i][o]=t;l+=n})})}return c}function k(e,t){for(var a=0;a<t.length;a++)for(var n=0;n<t[a].length;n++)if(t[a][n]==e)return{row:a,col:n}}function L(e,t,a){for(var n=e+1,r=t+1;n<a.length;){if(a[n][t]!=a[e][t]){n--;break}n++}for(n==a.length&&n--;r<a[e].length;){if(a[e][r]!=a[e][t]){r--;break}r++}return r==a[e].length&&r--,{row:n,col:r}}function x(){C.el.querySelector(".fr-cell-fixed")&&C.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),C.el.querySelector(".fr-cell-handler")&&C.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function I(){var e=C.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=S(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),x()}function O(){C.events.disableBlur(),C.selection.clear(),C.$el.addClass("fr-no-selection"),C.$el.blur(),C.events.enableBlur()}function M(e){var t=C.$el.find(".fr-selected-cell");if(0<t.length){var a,n=e.length,r=0,i=e[0].length,o=0;for(a=0;a<t.length;a++){var s=k(t[a],e),l=L(s.row,s.col,e);n=Math.min(s.row,n),r=Math.max(l.row,r),i=Math.min(s.col,i),o=Math.max(l.col,o)}return{min_i:n,max_i:r,min_j:i,max_j:o}}return null}function F(e){var t=M(e);if(null!=t){var a=S(e[t.min_i][t.min_j]),n=S(e[t.min_i][t.max_j]),r=S(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:n.length&&n.offset().left+n.outerWidth(),top:a.length&&a.offset().top,bottom:r.length&&r.offset().top+r.outerHeight()}}}function D(e,t){if(S(e).is(t))I(),S(e).addClass("fr-selected-cell");else{O(),C.edit.off();var a=R(),n=k(e,a),r=k(t,a);if(!n||!r)return;var i=function u(e,t,a,n,r){var i,o,s,l,c=e,d=t,f=a,p=n;for(i=c;i<=d;i++)(1<(parseInt(S(r[i][f]).attr("rowspan"),10)||1)||1<(parseInt(S(r[i][f]).attr("colspan"),10)||1))&&(l=L((s=k(r[i][f],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p)),(1<(parseInt(S(r[i][p]).attr("rowspan"),10)||1)||1<(parseInt(S(r[i][p]).attr("colspan"),10)||1))&&(l=L((s=k(r[i][p],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p));for(o=f;o<=p;o++)(1<(parseInt(S(r[c][o]).attr("rowspan"),10)||1)||1<(parseInt(S(r[c][o]).attr("colspan"),10)||1))&&(l=L((s=k(r[c][o],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p)),(1<(parseInt(S(r[d][o]).attr("rowspan"),10)||1)||1<(parseInt(S(r[d][o]).attr("colspan"),10)||1))&&(l=L((s=k(r[d][o],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p));return c==e&&d==t&&f==a&&p==n?{min_i:e,max_i:t,min_j:a,max_j:n}:u(c,d,f,p,r)}(Math.min(n.row,r.row),Math.max(n.row,r.row),Math.min(n.col,r.col),Math.max(n.col,r.col),a);I(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=i.min_i;o<=i.max_i;o++)for(var s=i.min_j;s<=i.max_j;s++)S(e).closest("table").is(S(a[o][s]).closest("table"))&&S(a[o][s]).addClass("fr-selected-cell")}}function N(e){var t=null,a=S(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===C.$el.html.toString().search(t)?null:t}function B(){I(),C.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==S(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<te().length&&!t&&B(),!C.edit.isDisabled()||C.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)&&t&&B();else if(i=!0,t){0<te().length&&!e.shiftKey&&B(),e.stopPropagation(),C.events.trigger("image.hideResizer"),C.events.trigger("video.hideResizer"),r=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<C.$el.find("".concat(a,".fr-selected-cell")).length?S(C.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(S(t).closest("table"))?D(n,t):O():((C.keys.ctrlKey(e)||e.shiftKey)&&"TD"===e.currentTarget.tagName&&(1<te().length||0===S(t).find(C.selection.element()).length&&!S(t).is(C.selection.element()))&&O(),n=t,0<C.opts.tableEditButtons.length&&D(n,n))}}function a(e){if(!C.edit.isDisabled()&&C.popups.areVisible())return!0;var t=N(e);if(1===te().length&&null===t&&(C.toolbar.enable(),I()),(1===te().length&&t&&"TD"!==t.tagName&&"TH"!==t.tagName||!r&&!C.$tb.is(e.target)&&!C.$tb.is(S(e.target).closest(".fr-toolbar")))&&(C.toolbar.enable(),I()),("BODY"===e.target.tagName||"HTML"===e.target.tagName)&&!t&&0<te().length&&C.toolbar.enable(),!(1!=e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)){if(i=!1,r)r=!1,N(e)||1!=te().length?0<te().length?C.selection.isCollapsed()?(h(),C.toolbar.enable()):(I(),C.edit.on()):te().length||(C.$el.removeClass("fr-no-selection"),C.edit.on()):I();if(y){y=!1,T.removeClass("fr-moving"),C.$el.removeClass("fr-no-selection"),C.edit.on();var a=parseFloat(T.css("left"))+C.opts.tableResizerOffset+C.$wp.offset().left;C.opts.iframe&&(a-=C.$iframe.offset().left),T.data("release-position",a),T.removeData("max-left"),T.removeData("max-right"),function A(){var e=T.data("origin"),t=T.data("release-position");if(e!==t){var a=T.data("first"),n=T.data("second"),r=T.data("table"),i=r.outerWidth();if(C.undo.canDo()||C.undo.saveStep(),null!=a&&null!=n){var o,s,l,c=R(r),d=[],f=[],p=[],u=[];for(o=0;o<c.length;o++)s=S(c[o][a]),l=S(c[o][n]),d[o]=s.outerWidth(),p[o]=l.outerWidth(),f[o]=d[o]/i*100,u[o]=p[o]/i*100;for(o=0;o<c.length;o++)if(s=S(c[o][a]),l=S(c[o][n]),c[o][a]!=c[o][n]){var g=(f[o]*(d[o]+t-e)/d[o]).toFixed(4);s.css("width",g+"%"),l.css("width",(f[o]+u[o]-g).toFixed(4)+"%")}}else{var h,m=r.parent(),v=parseFloat(m.css("padding-left")),b=parseFloat(m.css("padding-right")),_=v+b,E=i/(m.width()-_)*100,w=(parseInt(r.css("margin-left"),10)||0)/m.width()*100,y=(parseInt(r.css("margin-right"),10)||0)/m.width()*100;"rtl"==C.opts.direction&&0===n||"rtl"!=C.opts.direction&&0!==n?(h=(i+t-e)/i*E,r.css("margin-right","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))):("rtl"==C.opts.direction&&0!==n||"rtl"!=C.opts.direction&&0===n)&&(h=(i-t+e)/i*E,r.css("margin-left","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(y).toFixed(4),"%)"))),r.css("width","".concat(Math.round(h).toFixed(4),"%"))}C.selection.restore(),C.undo.saveStep(),C.events.trigger("table.resized",[r.get(0)])}T.removeData("origin"),T.removeData("release-position"),T.removeData("first"),T.removeData("second"),T.removeData("table")}(),z()}}}function P(e){if((!(S(e.currentTarget).is(S(e.originalEvent.relatedTarget))||e.currentTarget.contains(e.originalEvent.relatedTarget)||e.originalEvent.relatedTarget&&e.originalEvent.relatedTarget.contains(e.currentTarget))||e.currentTarget.querySelector("input, textarea"))&&(C.events.$on(S("input, textarea"),"click",ne),!0===r&&0<C.opts.tableEditButtons.length)){if(S(e.currentTarget).closest("table").is(ae())){if("TBODY"===e.currentTarget.parentElement.parentElement.tagName&&"TD"==e.currentTarget.tagName&&0===C.$el.find("th.fr-selected-cell").length&&0===C.$el.find("tfoot td.fr-selected-cell").length)return void D(n,e.currentTarget);if("TFOOT"===e.currentTarget.parentElement.parentElement.tagName&&"TD"==e.currentTarget.tagName&&0===C.$el.find("tbody td.fr-selected-cell").length)return void D(n,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===C.$el.find("td.fr-selected-cell").length)return void D(n,e.currentTarget)}"TD"!==e.currentTarget.tagName&&"TH"!==e.currentTarget.tagName&&O()}}function U(e,t,a,n){for(var r,i=t;i!=C.el&&"TD"!=i.tagName&&"TH"!=i.tagName&&("up"==n?r=i.previousElementSibling:"down"==n&&(r=i.nextElementSibling),!r);)i=i.parentNode;"TD"==i.tagName||"TH"==i.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=C.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var n=R(S(a));"up"==t?H(k(e,n),a,n):"down"==t&&$(k(e,n),a,n)}}(i,n):r&&("up"==n&&C.selection.setAtEnd(r),"down"==n&&C.selection.setAtStart(r))}function H(e,t,a){0<S(".tribute-container").length&&"none"!=S(".tribute-container").css("display")||(0<e.row?C.selection.setAtEnd(a[e.row-1][e.col]):U(0,t,0,"up"))}function $(e,t,a){if(!(0<S(".tribute-container").length&&"none"!=S(".tribute-container").css("display"))){var n=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-n?C.selection.setAtStart(a[e.row+n][e.col]):U(0,t,0,"down")}}function z(){T&&(T.find("div").css("opacity",0),T.css("top",0),T.css("left",0),T.css("height",0),T.find("div").css("height",0),T.hide())}function W(){c&&c.removeClass("fr-visible").css("left","-9999px")}function K(e,t){var a,n=S(t);n&&(a=n.closest("table"));var r=a.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<n.closest("td").length?t=n.closest("td"):0<n.closest("th").length&&(t=n.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)T&&n.get(0)!=T.get(0)&&n.parent().get(0)!=T.get(0)&&C.core.sameInstance(T)&&z();else{if(n=S(t),0===C.$el.find(n).length)return!1;var i=n.offset().left-1,o=i+n.outerWidth();if(Math.abs(e.pageX-i)<=C.opts.tableResizerOffset||Math.abs(o-e.pageX)<=C.opts.tableResizerOffset){var s,l,c,d,f,p=R(a),u=k(t,p),g=L(u.row,u.col,p),h=a.offset().top,m=a.outerHeight()-1;"rtl"!=C.opts.direction?e.pageX-i<=C.opts.tableResizerOffset?(c=i,0<u.col?(d=i-q(u.col-1,p)+C.opts.tableResizingLimit,f=i+q(u.col,p)-C.opts.tableResizingLimit,s=u.col-1,l=u.col):(s=null,l=0,d=a.offset().left-1-parseInt(a.css("margin-left"),10),f=a.offset().left-1+a.width()-p[0].length*C.opts.tableResizingLimit)):o-e.pageX<=C.opts.tableResizerOffset&&(c=o,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=o-q(g.col,p)+C.opts.tableResizingLimit,f=o+q(g.col+1,p)-C.opts.tableResizingLimit,s=g.col,l=g.col+1):(s=g.col,l=null,d=a.offset().left-1+p[0].length*C.opts.tableResizingLimit,f=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):o-e.pageX<=C.opts.tableResizerOffset?(c=o,0<u.col?(d=o-q(u.col,p)+C.opts.tableResizingLimit,f=o+q(u.col-1,p)-C.opts.tableResizingLimit,s=u.col,l=u.col-1):(s=null,l=0,d=a.offset().left+p[0].length*C.opts.tableResizingLimit,f=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):e.pageX-i<=C.opts.tableResizerOffset&&(c=i,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=i-q(g.col+1,p)+C.opts.tableResizingLimit,f=i+q(g.col,p)-C.opts.tableResizingLimit,s=g.col+1,l=g.col):(s=g.col,l=null,d=r.offset().left+parseFloat(r.css("padding-left")),f=a.offset().left-1+a.width()-p[0].length*C.opts.tableResizingLimit)),T||function w(){C.shared.$table_resizer||(C.shared.$table_resizer=S(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),T=C.shared.$table_resizer,C.events.$on(T,"mousedown",function(e){return!C.core.sameInstance(T)||(0<te().length&&B(),1==e.which?(C.selection.save(),y=!0,T.addClass("fr-moving"),O(),C.edit.off(),T.find("div").css("opacity",1),!1):void 0)}),C.events.$on(T,"mousemove",function(e){if(!C.core.sameInstance(T))return!0;y&&(C.opts.iframe&&(e.pageX-=C.$iframe.offset().left),Q(e))}),C.events.on("shared.destroy",function(){T.html("").removeData().remove(),T=null},!0),C.events.on("destroy",function(){C.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),S("body").first().append(T.hide())},!0)}(),T.data("table",a),T.data("first",s),T.data("second",l),T.data("instance",C),C.$wp.append(T);var v=c-C.win.pageXOffset-C.opts.tableResizerOffset-C.$wp.offset().left,b=h-C.$wp.offset().top+C.$wp.scrollTop();if(C.opts.iframe){var _=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),E=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));v+=C.$iframe.offset().left+E,b+=C.$iframe.offset().top+_,d+=C.$iframe.offset().left,f+=C.$iframe.offset().left}T.data("max-left",d),T.data("max-right",f),T.data("origin",c-C.win.pageXOffset),T.css("top",b),T.css("left",v),T.css("height",m),T.find("div").css("height",m),T.css("padding-left",C.opts.tableResizerOffset),T.css("padding-right",C.opts.tableResizerOffset),T.show()}else C.core.sameInstance(T)&&z()}}function G(e,t){if(C.$box.find(".fr-line-breaker").isVisible())return!1;c||J(),C.$box.append(c),c.data("instance",C);var a,n=S(t).find("tr").first(),r=e.pageX,i=0,o=0;if(C.opts.iframe){var s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),l=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));i+=C.$iframe.offset().left-C.helpers.scrollLeft()+l,o+=C.$iframe.offset().top-C.helpers.scrollTop()+s}n.find("th, td").each(function(){var e=S(this);return e.offset().left<=r&&r<e.offset().left+e.outerWidth()/2?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-C.$box.offset().top-a-5),c.css("left",i+e.offset().left-C.$box.offset().left-a/2),c.data("selected-cell",e),c.data("position","before"),c.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=r&&r<e.offset().left+e.outerWidth()?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-C.$box.offset().top-a-5),c.css("left",i+e.offset().left-C.$box.offset().left+e.outerWidth()-a/2),c.data("selected-cell",e),c.data("position","after"),c.addClass("fr-visible"),!1):void 0})}function Y(e,t){if(C.$box.find(".fr-line-breaker").isVisible())return!1;c||J(),C.$box.append(c),c.data("instance",C);var a,n=S(t),r=e.pageY,i=0,o=0;if(C.opts.iframe){var s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),l=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));i+=C.$iframe.offset().left-C.helpers.scrollLeft()+l,o+=C.$iframe.offset().top-C.helpers.scrollTop()+s}n.find("tr").each(function(){var e=S(this);a=parseInt(c.find("a").css("width"),10);var t=i+e.offset().left-C.$box.offset().left;return t=0!==C.$box.offset().left?t-a-5:t+a-5,e.offset().top<=r&&r<e.offset().top+e.outerHeight()/2?(c.css("top",o+e.offset().top-C.$box.offset().top-a/2),c.css("left",t),c.data("selected-cell",e.find("td").first()),c.data("position","above"),c.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=r&&r<e.offset().top+e.outerHeight()?(c.css("top",o+e.offset().top-C.$box.offset().top+e.outerHeight()-a/2),c.css("left",t),c.data("selected-cell",e.find("td").first()),c.data("position","below"),c.addClass("fr-visible"),!1):void 0})}function V(e){o=null;var t=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset,e.pageY-C.win.pageYOffset);C.opts.tableResizer&&(!C.popups.areVisible()||C.popups.areVisible()&&C.popups.isVisible("table.edit"))&&K(e,t),!C.opts.tableInsertHelper||C.popups.areVisible()||C.$tb.hasClass("fr-inline")&&C.$tb.isVisible()||function i(e,t){if(0===te().length){var a,n,r;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||C.node.isElement(t)))for(a=1;a<=C.opts.tableInsertHelperOffset;a++){if(n=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset,e.pageY-C.win.pageYOffset+a),S(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(S(n).parents(".fr-wrapper").length||C.opts.iframe)&&"false"!=S(n).closest("table").attr("contenteditable"))return G(e,S(n).closest("table")),!0;if(r=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset+a,e.pageY-C.win.pageYOffset),S(r).hasClass("fr-tooltip"))return!0;if(r&&("TH"==r.tagName||"TD"==r.tagName||"TABLE"==r.tagName)&&(S(r).parents(".fr-wrapper").length||C.opts.iframe)&&"false"!=S(r).closest("table").attr("contenteditable"))return Y(e,S(r).closest("table")),!0}C.core.sameInstance(c)&&W()}}(e,t)}function j(){if(y){var e=T.data("table").offset().top-C.win.pageYOffset;if(C.opts.iframe){var t=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top"));e+=C.$iframe.offset().top-C.helpers.scrollTop()+t}T.css("top",e)}}function q(e,t){var a,n=S(t[0][e]).outerWidth();for(a=1;a<t.length;a++)n=Math.min(n,S(t[a][e]).outerWidth());return n}function X(e,t,a){var n,r=0;for(n=e;n<=t;n++)r+=q(n,a);return r}function Q(e){if(1<te().length&&i&&O(),!1===i&&!1===r&&!1===y)o&&clearTimeout(o),C.edit.isDisabled()&&!C.popups.isVisible("table.edit")||(o=setTimeout(V,30,e));else if(y){var t=e.pageX-C.win.pageXOffset;C.opts.iframe&&(t+=C.$iframe.offset().left);var a=T.data("max-left"),n=T.data("max-right");a<=t&&t<=n?T.css("left",t-C.opts.tableResizerOffset-C.$wp.offset().left):t<a&&parseFloat(T.css("left"),10)>a-C.opts.tableResizerOffset?T.css("left",a-C.opts.tableResizerOffset-C.$wp.offset().left):n<t&&parseFloat(T.css("left"),10)<n-C.opts.tableResizerOffset&&T.css("left",n-C.opts.tableResizerOffset-C.$wp.offset().left)}else i&&W()}function Z(e){C.node.isEmpty(e.get(0))?C.opts.keepTextFormatOnTable&&C.browser.mozilla?e.append(Rt.MARKERS):e.prepend(Rt.MARKERS):e.prepend(Rt.START_MARKER).append(Rt.END_MARKER)}function J(){C.shared.$ti_helper||(C.shared.$ti_helper=S(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(C.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),C.events.bindClick(C.shared.$ti_helper,"a",function(){var e=c.data("selected-cell"),t=c.data("position"),a=c.data("instance")||C;"before"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"after"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"above"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"below"==t&&(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()),W()}),C.events.on("shared.destroy",function(){C.shared.$ti_helper.html("").removeData().remove(),C.shared.$ti_helper=null},!0),C.events.$on(C.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),C.events.$on(S(C.o_win),"scroll",function(){W()},!0),C.events.$on(C.$wp,"scroll",function(){W()},!0)),c=C.shared.$ti_helper,C.events.on("destroy",function(){c=null}),C.tooltip.bind(C.$box,".fr-insert-helper > a.fr-floating-btn")}function ee(){n=null,clearTimeout(o)}function te(){return C.el.querySelectorAll(".fr-selected-cell")}function ae(){var e=te();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=C.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?S(t):S([])}return S([])}function ne(){r=!1}return{_init:function re(){if(!C.$wp)return!1;if(C.helpers.isMobile()&&(C.events.$on(C.$el,"mousedown",e),C.events.$on(C.$win,"mouseup",a)),!C.helpers.isMobile()){y=r=i=!1,C.events.$on(C.$el,"mousedown",e),C.popups.onShow("image.edit",function(){I(),r=i=!1}),C.popups.onShow("link.edit",function(){I(),r=i=!1}),C.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&I()}),C.events.$on(C.$el,"mouseover","th, td",P),C.events.$on(C.$win,"mouseup",a),C.opts.iframe&&C.events.$on(S(C.o_win),"mouseup",a),C.events.$on(C.$win,"mousemove",Q),C.events.$on(S(C.o_win),"scroll",j),C.events.on("contentChanged",function(){0<te().length&&(h(),C.$el.find("img").on("load.selected-cells",function(){S(this).off("load.selected-cells"),0<te().length&&h()}))}),C.events.$on(S(C.o_win),"resize",function(){I()}),C.events.on("toolbar.esc",function(){if(0<te().length)return C.events.disableBlur(),C.events.focus(),!1},!0),C.events.$on(S(C.o_win),"keydown",function(){i&&r&&(r=i=!1,C.$el.removeClass("fr-no-selection"),C.edit.on(),C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)),C.selection.restore(),I())}),C.events.$on(C.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=te();if(null!=t&&0<t.length){var a,n=R(),r=e.which,i=k(1==t.length?a=t[0]:(a=C.el.querySelector(".fr-cell-fixed"),C.el.querySelector(".fr-cell-handler")),n);if(Rt.KEYCODE.ARROW_RIGHT==r){if(i.col<n[0].length-1)return D(a,n[i.row][i.col+1]),!1}else if(Rt.KEYCODE.ARROW_DOWN==r){if(i.row<n.length-1)return D(a,n[i.row+1][i.col]),!1}else if(Rt.KEYCODE.ARROW_LEFT==r){if(0<i.col)return D(a,n[i.row][i.col-1]),!1}else if(Rt.KEYCODE.ARROW_UP==r&&0<i.row)return D(a,n[i.row-1][i.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=C.selection.blocks();if(a.length&&("P"!==(a=a[0]).tagName&&"DIV"!==a.tagName||(a=a.parentNode),"TD"==a.tagName||"TH"==a.tagName)){for(var n=a;n&&"TABLE"!=n.tagName&&n.parentNode!=C.el;)n=n.parentNode;if(n&&"TABLE"==n.tagName&&(Rt.KEYCODE.ARROW_LEFT==t||Rt.KEYCODE.ARROW_UP==t||Rt.KEYCODE.ARROW_RIGHT==t||Rt.KEYCODE.ARROW_DOWN==t)&&(0<te().length&&B(),C.browser.webkit&&(Rt.KEYCODE.ARROW_UP==t||Rt.KEYCODE.ARROW_DOWN==t))){var r=C.selection.ranges(0).startContainer;if(r.nodeType==Node.TEXT_NODE&&(Rt.KEYCODE.ARROW_UP==t&&(r.previousSibling&&"BR"!==r.previousSibling.tagName||r.previousSibling&&"BR"===r.previousSibling.tagName&&r.previousSibling.previousSibling)||Rt.KEYCODE.ARROW_DOWN==t&&(r.nextSibling&&"BR"!==r.nextSibling.tagName||r.nextSibling&&"BR"===r.nextSibling.tagName&&r.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var i=R(S(n)),o=k(a,i);return Rt.KEYCODE.ARROW_UP==t?H(o,n,i):Rt.KEYCODE.ARROW_DOWN==t&&$(o,n,i),C.selection.restore(),!1}}}(e)}),C.events.on("keydown",function(e){if(!1===function n(e){if(e.which==Rt.KEYCODE.TAB){var t;if(0<te().length)t=C.$el.find(".fr-selected-cell").last();else{var a=C.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=S(a):a!=C.el&&(0<S(a).parentsUntil(C.$el,"td").length?t=S(a).parents("td").first():0<S(a).parentsUntil(C.$el,"th").length&&(t=S(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===C.selection.get().focusOffset&&0<S(C.selection.element()).parentsUntil(C.$el,"ol, ul").length&&(0<S(C.selection.element()).closest("li").prev().length||S(C.selection.element()).is("li")&&0<S(C.selection.element()).prev().length))||(B(),e.shiftKey?0<t.prev().length?Z(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?Z(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&Z(t.closest("table").find("thead tr th").last()):0<t.next().length?Z(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?Z(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?Z(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),v("below"),I(),Z(t.closest("tr").next().find("td").first())),C.selection.restore(),!1)}}(e))return!1;var t=te();if(0<t.length){if(0<t.length&&C.keys.ctrlKey(e)&&e.which==Rt.KEYCODE.A)return I(),C.popups.isVisible("table.edit")&&C.popups.hide("table.edit"),t=[],!0;if(e.which==Rt.KEYCODE.ESC&&C.popups.isVisible("table.edit"))return I(),C.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==Rt.KEYCODE.BACKSPACE||e.which==Rt.KEYCODE.DELETE)){C.undo.saveStep();for(var a=0;a<t.length;a++)S(t[a]).html("<br>"),a==t.length-1&&S(t[a]).prepend(Rt.MARKERS);return C.selection.restore(),C.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=Rt.KEYCODE.F10&&!C.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function r(e){if(e.altKey&&e.which==Rt.KEYCODE.SPACE){var t,a=C.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<S(a).closest("td").length?t=S(a).closest("td").get(0):0<S(a).closest("th").length&&(t=S(a).closest("th").get(0)),t)return e.preventDefault(),D(t,t),h(),!1}}(e))return!1},!0);var t=[];C.events.on("html.beforeGet",function(){t=te();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),C.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),d(!0),p(!0)}C.events.on("destroy",ee)},insert:function ie(e,t){var a,n,r=function c(){var e={startTag:"",closeTag:""};if(C.opts.keepTextFormatOnTable){var t=S(C.selection.element().firstChild).parentsUntil(C.$el);e=u(t)}return{startTag:e.startTag,closeTag:e.closeTag}}(),i="<table "+(C.opts.tableDefaultWidth?'style="width: '+C.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',o=100/t;for(a=0;a<e;a++){for(i+="<tr>",n=0;n<t;n++)i+="<td"+(C.opts.tableDefaultWidth?' style="width: '+o.toFixed(4)+'%;"':"")+">"+r.startTag,0===a&&0===n&&(i+=Rt.MARKERS),i+="<br>"+r.closeTag+"</td>";i+="</tr>"}if(i+="</tbody></table>",C.opts.trackChangesEnabled){C.edit.on(),C.events.focus(!0),C.selection.restore(),C.undo.saveStep(),C.markers.insert(),C.html.wrap();var s=C.$el.find(".fr-marker");C.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(i),C.selection.clear()}else C.html.insert(i);C.selection.restore();var l=C.$el.find(".fr-inserted-table");l.removeClass("fr-inserted-table"),C.events.trigger("table.inserted",[l.get(0)])},remove:g,insertRow:v,deleteRow:function oe(){var e=ae();if(0<e.length){var t,a,n,r=R(),i=M(r);if(null==i)return;if(0===i.min_i&&i.max_i==r.length-1)g();else{for(t=i.max_i;t>=i.min_i;t--){for(n=S(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<r[t].length;a++)if(0===a||r[t][a]!=r[t][a-1]){var o=S(r[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<r.length-1&&r[t][a]==r[t+1][a]&&(0===t||r[t][a]!=r[t-1][a])){for(var l=r[t][a],c=a;0<c&&r[t][c]==r[t][c-1];)c--;0===c?S(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(l):S(r[t+1][c-1])[0].parentNode&&S(r[t+1][c-1])[0].insertAdjacentElement("afterend",l)}}var d=n.parent();n.remove(),0===d.find("tr").length&&d.remove(),r=R(e)}w(0,r.length-1,0,r[0].length-1,e),0<i.min_i?C.selection.setAtEnd(r[i.min_i-1][0]):C.selection.setAtEnd(r[0][0]),C.selection.restore(),C.popups.hide("table.edit")}}},insertColumn:function se(d){var e=ae();if(0<e.length){var f,p=R(),t=M(p);f="before"==d?t.min_j:t.max_j;var a,u=100/p[0].length,g=100/(p[0].length+1);e.find("th, td").each(function(){(a=S(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=S(this),n=0,r=0;n-1<f;){if(!(t=a.find("> th, > td").get(r))){t=null;break}t==p[e][n]?(n+=parseInt(S(t).attr("colspan"),10)||1,r++):(n+=parseInt(S(p[e][n]).attr("colspan"),10)||1,"after"==d&&(t=0===r?-1:a.find("> th, > td").get(r-1)))}var i=S(t);if("after"==d&&f<n-1||"before"==d&&0<f&&p[e][f]==p[e][f-1]){if(0===e||0<e&&p[e][f]!=p[e-1][f]){var o=parseInt(i.attr("colspan"),10)+1;i.attr("colspan",o),i.css("width",(i.data("old-width")*g/u+g).toFixed(4)+"%"),i.removeData("old-width")}}else{var s,l=(i.get(0)||"").tagName;if(0<a.find("th").length&&"TH"===l)s='<th style="width: '.concat(g.toFixed(4),'%;"><br></th>');else{var c=m(p[e][f]);s='<td style="'.concat(i.attr("style"),"; width: ").concat(g.toFixed(4),'%;">')+c.startTag+"<br>"+c.closeTag+"</td>"}S(s).append("<br>"),S(s).css("width","".concat(g.toFixed(4),"%")),-1==t?a.prepend(s):null==t?a.append(s):"before"==d?i.before(s):"after"==d&&i.after(s)}}),e.find("th, td").each(function(){(a=S(this)).data("old-width")&&(a.css("width",(a.data("old-width")*g/u).toFixed(4)+"%"),a.removeData("old-width"))}),C.popups.isVisible("table.edit")&&h()}},deleteColumn:function le(){var e=ae();if(0<e.length){var t,a,n,r=R(),i=M(r);if(null==i)return;if(0===i.min_j&&i.max_j==r[0].length-1)g();else{var o=0;for(t=0;t<r.length;t++)for(a=0;a<r[0].length;a++)(n=S(r[t][a])).hasClass("fr-selected-cell")||(n.data("old-width",n.outerWidth()/e.outerWidth()*100),(a<i.min_j||a>i.max_j)&&(o+=n.outerWidth()/e.outerWidth()*100));for(o/=r.length,a=i.max_j;a>=i.min_j;a--)for(t=0;t<r.length;t++)if(0===t||r[t][a]!=r[t-1][a])if(n=S(r[t][a]),1<(parseInt(n.attr("colspan"),10)||1)){var s=parseInt(n.attr("colspan"),10)-1;1==s?n.removeAttr("colspan"):n.attr("colspan",s),n.css("width",(100*(n.data("old-width")-q(a,r))/o).toFixed(4)+"%"),n.removeData("old-width")}else{var l=S(n.parent().get(0));n.remove(),0===l.find("> th, > td").length&&(0===l.prev().length||0===l.next().length||l.prev().find("> th[rowspan], > td[rowspan]").length<l.prev().find("> th, > td").length)&&l.remove()}w(0,r.length-1,0,r[0].length-1,e),0<i.min_j?C.selection.setAtEnd(r[i.min_i][i.min_j-1]):C.selection.setAtEnd(r[i.min_i][0]),C.selection.restore(),C.popups.hide("table.edit"),e.find("th, td").each(function(){(n=S(this)).data("old-width")&&(n.css("width",(100*n.data("old-width")/o).toFixed(4)+"%"),n.removeData("old-width"))})}}},mergeCells:function ce(){if(1<te().length&&(0===C.$el.find("th.fr-selected-cell").length||0===C.$el.find("td.fr-selected-cell").length)){x();var e,t,a=M(R());if(null==a)return;var n=C.$el.find(".fr-selected-cell"),r=S(n[0]),i=r.parent().find(".fr-selected-cell"),o=r.closest("table"),s=r.html(),l=0;for(e=0;e<i.length;e++)l+=S(i[e]).outerWidth();for(r.css("width",Math.min(100,l/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&r.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&r.attr("rowspan",a.max_i-a.min_i+1),e=1;e<n.length;e++)"<br>"!=(t=S(n[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();r.html(s),C.selection.setAtEnd(r.get(0)),C.selection.restore(),C.toolbar.enable(),_(a.min_i,a.max_i,o);var c=o.find("tr:empty");for(e=c.length-1;0<=e;e--)S(c[e]).remove();b(a.min_j,a.max_j,o),h()}},splitCellVertically:function de(){if(1==te().length){var e=C.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),n=e.outerWidth(),r=e.clone().html("<br>"),i=R(),o=k(e.get(0),i);if(1<t){var s=Math.ceil(t/2);n=X(o.col,o.col+s-1,i)/a*100;var l=X(o.col+s,o.col+t-1,i)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?r.attr("colspan",t-s):r.removeAttr("colspan"),e.css("width",n.toFixed(4)+"%"),r.css("width",l.toFixed(4)+"%")}else{var c;for(c=0;c<i.length;c++)if(0===c||i[c][o.col]!=i[c-1][o.col]){var d=S(i[c][o.col]);if(!d.is(e)){var f=(parseInt(d.attr("colspan"),10)||1)+1;d.attr("colspan",f)}}n=n/a*100/2,e.css("width","".concat(n.toFixed(4),"%")),r.css("width","".concat(n.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",r[0]),I(),C.popups.hide("table.edit")}},splitCellHorizontally:function fe(){if(1==te().length){var e=C.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),n=parseInt(e.attr("rowspan"),10),r=R(),i=k(e.get(0),r),o=e.clone().html("<br>");if(1<n){var s=Math.ceil(n/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<n-s?o.attr("rowspan",n-s):o.removeAttr("rowspan");for(var l=i.row+s,c=0===i.col?i.col:i.col-1;0<=c&&(r[l][c]==r[l][c-1]||0<l&&r[l][c]==r[l-1][c]);)c--;-1==c?S(a.find("tr").not(a.find("> table tr")).get(l)).prepend(o):S(r[l][c])[0].parentNode&&S(r[l][c])[0].insertAdjacentElement("afterend",o[0])}else{var d,f=S(document.createElement("tr")).append(o);for(d=0;d<r[0].length;d++)if(0===d||r[i.row][d]!=r[i.row][d-1]){var p=S(r[i.row][d]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",f[0])}I(),C.popups.hide("table.edit")}},addHeader:function pe(){var e=ae();if(0<e.length&&0===e.find("> th").length){var t,a="<thead><tr>",n=0;for(n=e.find("tr").first().find("> th").length,e.find("tr").first().find("> td").each(function(){var e=S(this);n+=parseInt(e.attr("colspan"),10)||1}),t=0;t<n;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},addFooter:function ue(){var e=ae();if(0<e.length&&0===e.find("tfoot").length){var t,a="<tfoot><tr>",n=0,r="> td";for(0<e.find("thead").length&&(r="> th"),e.find("tr").first().find(r).each(function(){var e=S(this);n+=parseInt(e.attr("colspan"),10)||1}),t=0;t<n;t++)a+="<td><br></td>";a+="</tr></tfoot>",e.append(a),h()}},removeHeader:function ge(){var e=ae(),t=e.find("> thead");if(0<(t=S(t)).length)if(0===e.find("tbody tr").length)g();else if(t.remove(),0<te().length)h();else{C.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(C.selection.setAtEnd(a),C.selection.restore())}},removeFooter:function he(){var e=ae(),t=e.find("tfoot");if(0<t.length)if(0===e.find("tbody tr").length)g();else if(t.remove(),0<te().length)h();else{C.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(C.selection.setAtEnd(a),C.selection.restore())}},setBackground:t,showInsertPopup:function me(){var e=C.$tb.find('.fr-command[data-cmd="insertTable"]'),t=C.popups.get("table.insert");if(t||(t=d()),!t.hasClass("fr-active")){C.popups.refresh("table.insert"),C.popups.setContainer("table.insert",C.$tb);var a=C.button.getPosition(e),n=a.left,r=a.top;C.popups.show("table.insert",n,r,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function ve(){0<te().length?h():(C.popups.hide("table.insert"),C.toolbar.showInline())},verticalAlign:function be(e){C.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function _e(e){C.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function Ee(e,t,a,n){if(0<t.length){if(C.opts.useClasses||("TABLE"===t.get(0).tagName?function i(e,t){var a=e.childNodes;if(0<a.length)for(var n=0;n<a.length;n++)"TD"===a[n].tagName?"fr-dashed-borders"===t||"fr-highlighted"===t||"fr-thick"===t?A(a[n]):"fr-alternate-rows"===t&&a[n].style.removeProperty("background-color"):i(a[n],t)}(t.get(0),e):A(t.get(0))),!a){var r=Object.keys(n);r.splice(r.indexOf(e),1),t.removeClass(r.join(" "))}t.toggleClass(e)}},selectedTable:ae,selectedCells:te,customColor:function we(){var e=C.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:D}},Rt.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),Rt.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),Rt.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),Rt.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),Rt.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("> thead").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),Rt.DefineIcon("tableFooter",{NAME:"table",FA5NAME:"table",SVG_KEY:"tableFooter"}),Rt.RegisterCommand("tableFooter",{title:"Table Footer",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableFooter"]').hasClass("fr-active")?this.table.removeFooter():this.table.addFooter()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("tfoot").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),Rt.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),Rt.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),Rt.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),Rt.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),Rt.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),Rt.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),Rt.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),Rt.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),Rt.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),Rt.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,n=this.$el.find(".fr-selected-cell").closest("table");n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Rt.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),Rt.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),Rt.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),Rt.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||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"))}}),Rt.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),Rt.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),Rt.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Rt.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),Rt.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Rt.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Rt.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),Rt.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),Rt.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,n=this.$el.find(".fr-selected-cell").first();n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Rt.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),Rt.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"}),Rt.URLRegEx="(^| |\\u00A0)(".concat(Rt.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),Rt.PLUGINS.url=function(f){var p=f.$,i=null;function t(e,t,a){for(var n="";a.length&&"."==a[a.length-1];)n+=".",a=a.substring(0,a.length-1);var r=a;if(f.opts.linkConvertEmailAddress)f.helpers.isEmail(r)&&!/^mailto:.*/i.test(r)&&(r="mailto:".concat(r));else if(f.helpers.isEmail(r))return t+a;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(r)||(r="//".concat(r)),(t||"")+"<a".concat(f.opts.linkAlwaysBlank?' target="_blank"':"").concat(i?' rel="'.concat(i,'"'):"",' data-fr-linked="true" href="').concat(r,'">').concat(a.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(n)}var u=function u(){return new RegExp(Rt.URLRegEx,"gi")};function g(e){return f.opts.linkAlwaysNoFollow&&(i="nofollow"),f.opts.linkAlwaysBlank&&(f.opts.linkNoOpener&&(i?i+=" noopener":i="noopener"),f.opts.linkNoReferrer&&(i?i+=" noreferrer":i="noreferrer")),e.replace(u(),t)}function h(e){var t=e.split(" ");return t[t.length-1]}function a(){var e=f.selection.ranges(0),t=e.startContainer;if(t.nodeType!==Node.TEXT_NODE)return!1;if(!t||e.startOffset!==(t.textContent||"").length){f.markers.insert();var a=f.$el.find(".fr-marker"),n=t.textContent.match(/(^| |\u00A0)(((([a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,})(\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))|((ftp|http|https):\/\/[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,})|(www\.[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,}\.[a-z0-9-]{2,24})|((ftp|http|https):\/\/[\u0021-\uffff]{1,}@[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,}))((:[0-9]{1,5})|)(((\/|\?|#)[a-z\u00a1-\uffff0-9@?\|!^=%&amp;\/~+#-\'*-_{}]*)|())|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\.[a-z0-9+-_]{1,}))$/gi);if(a.remove(),!n)return!1}if(function d(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==f.el)&&d(e.parentNode))}(t))return!1;if(u().test(h(t.textContent))){var r,i=t.textContent.length;if(0<i&&","===t.textContent.charAt(i-1)){p(t).before(g(t.textContent.substring(0,i-1))),(r=p(t.parentNode).find("a[data-fr-linked]")).removeAttr("data-fr-linked"),t.textContent=",";var o=f.win.getSelection().getRangeAt(0);o.setStart(t,1),o.setEnd(t,1)}else p(t).before(g(t.textContent)),(r=p(t.parentNode).find("a[data-fr-linked]")).removeAttr("data-fr-linked"),t.parentNode.removeChild(t);f.events.trigger("url.linked",[r.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var s=t.previousSibling.innerText+t.textContent,l=t.textContent.length;if(u().test(h(s))&&","!==t.textContent.charAt(l-1)){var c=(new DOMParser).parseFromString(g(s),"text/html").body.childNodes;t.parentNode.replaceChild(c[0],t.previousSibling),c.length&&p(t).before(c[0]),t.parentNode.removeChild(t)}}}return{_init:function e(){f.events.on("keypress",function(e){!f.selection.isCollapsed()||")"!=e.key&&"("!=e.key||a()},!0),f.events.on("keydown",function(e){var t=e.which;!f.selection.isCollapsed()||t!=Rt.KEYCODE.ENTER&&t!=Rt.KEYCODE.SPACE||a()},!0),f.events.on("paste.beforeCleanup",function(e){if(f.helpers.isURL(e)&&!f.$el[0].getAttribute("plainpaste")){var t=null;return f.opts.linkAlwaysBlank&&(f.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),f.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(f.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}if(f.$el[0].getAttribute("plainpaste"))return function a(e){if("string"==typeof e)return(e=e.replace(/&amp;/g,"&")).replace(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/gim,g).replace(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gim,g)}(e)})}}},Object.assign(Rt.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Rt.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}),Rt.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"}],Rt.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,Rt.PLUGINS.video=function(E){var s,d,f,w,n,a,y=E.$,A="https://i.froala.com/upload",p=2,u=3,g=4,C=5,T=6,r={};function h(){var e=E.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 i(){var e=E.popups.get("video.edit");if(e||(e=function o(){var e="";if(0<E.opts.videoEditButtons.length){E.opts.videoResponsive&&(-1<E.opts.videoEditButtons.indexOf("videoSize")&&E.opts.videoEditButtons.splice(E.opts.videoEditButtons.indexOf("videoSize"),1),-1<E.opts.videoEditButtons.indexOf("videoDisplay")&&E.opts.videoEditButtons.splice(E.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<E.opts.videoEditButtons.indexOf("videoAlign")&&E.opts.videoEditButtons.splice(E.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(E.button.buildList(E.opts.videoEditButtons)," \n </div>")},a=E.popups.create("video.edit",t);return E.events.$on(E.$wp,"scroll.video-edit",function(){w&&E.popups.isVisible("video.edit")&&(E.events.disableBlur(),c(w))}),a}return!1}()),e){E.popups.setContainer("video.edit",E.$sc),E.popups.refresh("video.edit");var t=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,i=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||i||w.find("audio").get(0)?(document.getElementById("autoplay-".concat(E.id))&&(document.getElementById("autoplay-".concat(E.id)).style.display="none"),document.getElementById("videoReplace-".concat(E.id))&&(document.getElementById("videoReplace-".concat(E.id)).style.display="none")):(document.getElementById("autoplay-".concat(E.id))&&(document.getElementById("autoplay-".concat(E.id)).style.display=""),document.getElementById("videoReplace-".concat(E.id))&&(document.getElementById("videoReplace-".concat(E.id)).style.display="")),E.popups.show("video.edit",a,n,t.outerHeight(),!0)}}function o(e){if(e)return E.popups.onRefresh("video.insert",h),E.popups.onHide("video.insert",Q),!0;var t="";E.opts.videoUpload||-1===E.opts.videoInsertButtons.indexOf("videoUpload")||E.opts.videoInsertButtons.splice(E.opts.videoInsertButtons.indexOf("videoUpload"),1);var a=E.button.buildList(E.opts.videoInsertButtons);""!==a&&(t='<div class="fr-buttons">'+a+"</div>");var n,r="",i=E.opts.videoInsertButtons.indexOf("videoUpload"),o=E.opts.videoInsertButtons.indexOf("videoByURL"),s=E.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=o){n=" fr-active",(i<o&&0<=i||s<o&&0<=s)&&(n="");r='<div class="fr-video-by-url-layer fr-layer'.concat(n,'" id="fr-video-by-url-layer-').concat(E.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(E.id,'" type="text" placeholder="').concat(E.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(E.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(E.language.translate("Insert"),"</button></div></div>")}var l="";0<=s&&(n=" fr-active",(i<s&&0<=i||o<s&&0<=o)&&(n=""),l='<div class="fr-video-embed-layer fr-layer'.concat(n,'" id="fr-video-embed-layer-').concat(E.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(E.id,'" type="text" placeholder="').concat(E.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(E.language.translate("Insert"),"</button></div></div>"));var c="";0<=i&&(n=" fr-active",(s<i&&0<=s||o<i&&0<=o)&&(n=""),c='<div class="fr-video-upload-layer fr-layer'.concat(n,'" id="fr-video-upload-layer-').concat(E.id,'"><strong>').concat(E.language.translate("Drop video"),"</strong><br>(").concat(E.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(E.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(E.id,'" role="button"></div></div>'));var d={buttons:t,by_url_layer:r,embed_layer:l,upload_layer:c,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=E.popups.create("video.insert",d);return function p(n){E.events.$on(n,"dragover dragenter",".fr-video-upload-layer",function(){return y(this).addClass("fr-drop"),!1},!0),E.events.$on(n,"dragleave dragend",".fr-video-upload-layer",function(){return y(this).removeClass("fr-drop"),!1},!0),E.events.$on(n,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),y(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||E;a.events.disableBlur(),a.video.upload(t.files),a.events.enableBlur()}},!0),E.helpers.isIOS()&&E.events.$on(n,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){y(this).trigger("click")},!0);E.events.$on(n,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||E;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}y(this).val("")},!0)}(f),f}function m(e){E.events.focus(!0),E.selection.restore();var t=!1;if(w&&(X(),t=!0),E.opts.trackChangesEnabled){E.edit.on(),E.events.focus(!0),E.selection.restore(),E.undo.saveStep(),E.markers.insert(),E.html.wrap();var a=E.$el.find(".fr-marker");E.node.isLastSibling(a)&&a.parent().hasClass("fr-deletable")&&a.insertAfter(a.parent()),a.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>")),E.selection.clear()}else E.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,E.opts.videoSplitHTML);E.popups.hide("video.insert");var n=E.$el.find(".fr-jiv");n.removeClass("fr-jiv"),n.toggleClass("fr-rv",E.opts.videoResponsive),Z(n,E.opts.videoDefaultDisplay,E.opts.videoDefaultAlign),n.toggleClass("fr-draggable",E.opts.videoMove),E.events.trigger(t?"video.replaced":"video.inserted",[n])}function v(){var e=y(this);E.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),c(e.parent()),E.events.trigger("video.loaded",[e.parent()])}function S(s,e,l,c,d){E.edit.off(),b("Loading video"),e&&(s=E.helpers.sanitizeURL(s));var f=function f(){var e,t;if(c){E.undo.canDo()||c.find("video").hasClass("fr-uploading")||E.undo.saveStep();var a=c.find("video").data("fr-old-src"),n=c.data("fr-replaced");if(c.data("fr-replaced",!1),0<c.find("iframe").length)c.remove(),e=O(s,l,v);else{E.$wp?((e=c.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&c.find("video").attr("src",a),c.replaceWith(e)):e=c;for(var r=e.find("video").get(0).attributes,i=0;i<r.length;i++){var o=r[i];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",v),e.find("video").attr("src",s)}E.edit.on(),P(),E.undo.saveStep(),E.$el.blur(),E.events.trigger(n?"video.replaced":"video.inserted",[e,d])}else e=O(s,l,v),P(),E.undo.saveStep(),E.events.trigger("video.inserted",[e,d])};R("Loading video"),f()}function R(e){var t=E.popups.get("video.insert");if(t||(t=o()),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(),w){var a=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video"));E.popups.setContainer("video.insert",E.$sc);var n=a.offset().left,r=a.offset().top+a.height();E.popups.show("video.insert",n,r,a.outerHeight())}void 0===e&&b(E.language.translate("Uploading"),0)}function l(e){var t=E.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||E.$el.find("video.fr-error").length)){if(E.events.focus(),E.$el.find("video.fr-error").length&&(E.$el.find("video.fr-error").parent().remove(),E.undo.saveStep(),E.undo.run(),E.undo.dropRedo()),!E.$wp&&w){var a=w;H(!0),E.selection.setAfter(a.find("video").get(0)),E.selection.restore()}E.popups.hide("video.insert")}}function b(e,t){var a=E.popups.get("video.insert");if(a){var n=a.find(".fr-video-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function _(e){R();var t=E.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),E.events.disableBlur(),a.focus()}function c(e){t.call(e.get(0))}function k(e,t,a){b("Loading video");var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(E.opts.videoUploadToS3||E.opts.videoUploadToAzure)if(201==n){var s;if(E.opts.videoUploadToAzure){if(!1===E.events.trigger("video.uploadedToAzure",[this.responseURL,a,r],!0))return E.edit.on(),!1;s=t}else s=function c(e){try{var t=y(e).find("Location").text(),a=y(e).find("Key").text();return!1===E.events.trigger("video.uploadedToS3",[t,a,e],!0)?(E.edit.on(),!1):t}catch(n){return G(g,e),!1}}(i);s&&S(s,!1,[],e,r||i)}else G(g,r||i);else if(200<=n&&n<300){var l=function d(e){try{if(!1===E.events.trigger("video.uploaded",[e],!0))return E.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(G(p,e),!1)}catch(a){return G(g,e),!1}}(o);l&&S(l.link,!1,l,e,r||o)}else G(u,r||o)}catch(f){G(g,r||o)}}function L(){G(g,this.response||this.responseText||this.responseXML)}function x(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;b(E.language.translate("Uploading"),t)}}function I(){E.edit.on(),l(!0)}function O(e,t,a){var n,r="";if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(r+=" ".concat(n,'="').concat(t[n],'"'));var i=E.opts.videoDefaultWidth;i&&"auto"!=i&&(i="".concat(i,"px")),E.helpers.isMobile()&&E.browser.safari&&(r+=" autoplay playsinline");var o=y(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+E.opts.videoDefaultDisplay[0]+("center"!=E.opts.videoDefaultAlign?" fr-fv"+E.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(i?' style="width: '+i+';" ':"")+" controls>"+E.language.translate("Your browser does not support HTML5 video.")+"</video>");o.toggleClass("fr-draggable",E.opts.videoMove),E.edit.on(),E.events.focus(!0),E.selection.restore(),E.undo.saveStep(),E.opts.videoSplitHTML?E.markers.split():(E.cursor.enter(),E.markers.insert()),E.html.wrap();var s=E.$el.find(".fr-marker");return E.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(o),E.selection.clear(),o.find("video").get(0).readyState>o.find("video").get(0).HAVE_FUTURE_DATA||E.helpers.isIOS()?a.call(o.find("video").get(0)):o.find("video").on("canplaythrough load",a),o}function M(e){if(!E.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),a=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!a)return!1;if("mousedown"==e.type){var n=E.$oel.get(0).ownerDocument,r=n.defaultView||n.parentWindow,i=!1;try{i=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(o){}i&&r.frameElement&&(t+=E.helpers.getPX(y(r.frameElement).offset().left)+r.frameElement.clientLeft,a=e.clientY+E.helpers.getPX(y(r.frameElement).offset().top)+r.frameElement.clientTop)}E.undo.canDo()||E.undo.saveStep(),(d=y(this)).data("start-x",t),d.data("start-y",a),s.show(),E.popups.hideAll(),z()}function F(e){if(!E.core.sameInstance(f))return!0;if(d){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),a=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!a)return!1;var n=d.data("start-x"),r=d.data("start-y");d.data("start-x",t),d.data("start-y",a);var i=t-n,o=a-r,s=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),l=s.width(),c=s.height();(d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(i=0-i),(d.hasClass("fr-hnw")||d.hasClass("fr-hne"))&&(o=0-o),s.css("width",l+i),s.css("height",c+o),s.removeAttr("width"),s.removeAttr("height"),U()}}function D(e){if(!E.core.sameInstance(f))return!0;d&&w&&(e&&e.stopPropagation(),d=null,s.hide(),U(),i(),E.undo.saveStep())}function N(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function B(e,t,a,n){return e.pageX=t,e.pageY=t,M.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),e.pageY=e.pageY+a*Math.floor(Math.pow(1.1,n)),F.call(this,e),D.call(this,e),++n}function P(){var e,t=Array.prototype.slice.call(E.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),y(t[e]).toggleClass("fr-draggable",E.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("src"))<0&&E.events.trigger("video.removed",[y(n[e])]);n=t}function U(){f||function o(){var e;if(E.shared.$video_resizer?(f=E.shared.$video_resizer,s=E.shared.$vid_overlay,E.events.on("destroy",function(){y("body").first().append(f.removeClass("fr-active"))},!0)):(E.shared.$video_resizer=y(document.createElement("div")).attr("class","fr-video-resizer"),f=E.shared.$video_resizer,E.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),E.opts.videoResize&&(f.append(N("nw")+N("ne")+N("sw")+N("se")),E.shared.$vid_overlay=y(document.createElement("div")).attr("class","fr-video-overlay"),s=E.shared.$vid_overlay,e=f.get(0).ownerDocument,y(e).find("body").first().append(s))),E.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,E.opts.videoResize&&(s.remove(),s=null)},!0),E.helpers.isMobile()||E.events.$on(y(E.o_win),"resize.video",function(){H(!0)}),E.opts.videoResize){e=f.get(0).ownerDocument,E.events.$on(f,E._mousedown,".fr-handler",M),E.events.$on(y(e),E._mousemove,F),E.events.$on(y(e.defaultView||e.parentWindow),E._mouseup,D),E.events.$on(s,"mouseleave",D);var n=1,r=null,i=0;E.events.on("keydown",function(e){if(w){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==Rt.KEYCODE.EQUALS||E.browser.mozilla&&a==Rt.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=B.call(this,e,1,1,n):(a==Rt.KEYCODE.HYPHEN||E.browser.mozilla&&a==Rt.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(n=B.call(this,e,2,-1,n)),r=a,i=e.timeStamp}}),E.events.on("keyup",function(){n=1})}}(),(E.$wp||E.$sc).append(f),f.data("instance",E);var e=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,a=0;E.opts.iframe&&(a=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-top")),t=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(E.opts.iframe?e.offset().top+a-1:e.offset().top-E.$wp.offset().top-1)+E.$wp.scrollTop()).css("left",(E.opts.iframe?e.offset().left+t-1:e.offset().left-E.$wp.offset().left-1)+E.$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&&a)return!0;if(e&&E.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(E.edit.isDisabled())return!1;for(var t=0;t<Rt.INSTANCES.length;t++)Rt.INSTANCES[t]!=E&&Rt.INSTANCES[t].events.trigger("video.hideResizer");E.toolbar.disable(),E.helpers.isMobile()&&(E.events.disableBlur(),E.$el.blur(),E.events.enableBlur()),E.$el.find(".fr-video.fr-active").removeClass("fr-active"),(w=y(this)).addClass("fr-active"),E.opts.iframe&&E.size.syncIframe(),te(),U(),i(),E.selection.clear(),E.button.bulkRefresh(),E.events.trigger("image.hideResizer")}function H(e){w&&(function t(){return E.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),E.toolbar.enable(),w.removeClass("fr-active"),w=null,z())}function $(){E.shared.vid_exit_flag=!0}function z(){E.shared.vid_exit_flag=!1}function W(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("video")){if(!E.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;E.markers.remove(),E.markers.insertAtPoint(e.originalEvent),E.$el.find(".fr-marker").replaceWith(Rt.MARKERS),E.popups.hideAll();var n=E.popups.get("video.insert");return n||(n=o()),E.popups.setContainer("video.insert",E.$sc),E.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),R(),0<=E.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))?K(t.files):G(T),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===E.events.trigger("video.beforeUpload",[e]))return!1;var t,a=e[0];if(!(null!==E.opts.videoUploadURL&&E.opts.videoUploadURL!=A||E.opts.videoUploadToS3||E.opts.videoUploadToAzure))return function _(n){w&&w.find("iframe")&&w.find("iframe").length&&X();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],a=0;a<e.length;a++)t.push(e.charCodeAt(a));S(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:n.type})),!1,null,w)},R(),r.readAsDataURL(n)}(a),!1;if(a.size>E.opts.videoMaxSize)return G(C),!1;if(E.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))<0)return G(T),!1;if(E.drag_support.formdata&&(t=E.drag_support.formdata?new FormData:null),t){var n;if(!1!==E.opts.videoUploadToS3)for(n in t.append("key",E.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(a.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",a.type),E.opts.videoUploadToS3.params)E.opts.videoUploadToS3.params.hasOwnProperty(n)&&t.append(n,E.opts.videoUploadToS3.params[n]);for(n in E.opts.videoUploadParams)E.opts.videoUploadParams.hasOwnProperty(n)&&t.append(n,E.opts.videoUploadParams[n]);t.append(E.opts.videoUploadParam,a);var r,i,o=E.opts.videoUploadURL;E.opts.videoUploadToS3&&(o=E.opts.videoUploadToS3.uploadURL?E.opts.videoUploadToS3.uploadURL:"https://".concat(E.opts.videoUploadToS3.region,".amazonaws.com/").concat(E.opts.videoUploadToS3.bucket));var s=E.opts.videoUploadMethod;E.opts.videoUploadToAzure&&(o=E.opts.videoUploadToAzure.uploadURL?"".concat(E.opts.videoUploadToAzure.uploadURL,"/").concat(a.name):encodeURI("https://".concat(E.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(E.opts.videoUploadToAzure.container,"/").concat(a.name)),r=o,E.opts.videoUploadToAzure.SASToken&&(o+=E.opts.videoUploadToAzure.SASToken),s="PUT");var l=E.core.getXHR(o,s);if(E.opts.videoUploadToAzure){var c=(new Date).toUTCString();if(!E.opts.videoUploadToAzure.SASToken&&E.opts.videoUploadToAzure.accessKey){var d=E.opts.videoUploadToAzure.account,f=E.opts.videoUploadToAzure.container;if(E.opts.videoUploadToAzure.uploadURL){var p=E.opts.videoUploadToAzure.uploadURL.split("/");f=p.pop(),d=p.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(c,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+d+"/"+f+"/"+a.name),h=s+"\n\n\n"+a.size+"\n\n"+a.type+"\n\n\n\n\n\n\n"+u+"\n"+g,m=E.cryptoJSPlugin.cryptoJS.HmacSHA256(h,E.cryptoJSPlugin.cryptoJS.enc.Base64.parse(E.opts.videoUploadToAzure.accessKey)).toString(E.cryptoJSPlugin.cryptoJS.enc.Base64),v="SharedKey "+d+":"+m;i=m,l.setRequestHeader("Authorization",v)}for(n in l.setRequestHeader("x-ms-version","2019-07-07"),l.setRequestHeader("x-ms-date",c),l.setRequestHeader("Content-Type",a.type),l.setRequestHeader("x-ms-blob-type","BlockBlob"),E.opts.videoUploadParams)E.opts.videoUploadParams.hasOwnProperty(n)&&l.setRequestHeader(n,E.opts.videoUploadParams[n]);for(n in E.opts.videoUploadToAzure.params)E.opts.videoUploadToAzure.params.hasOwnProperty(n)&&l.setRequestHeader(n,E.opts.videoUploadToAzure.params[n])}l.onload=function(){k.call(l,w,r,i)},l.onerror=L,l.upload.onprogress=x,l.onabort=I,R(),E.events.disableBlur(),E.edit.off(),E.events.enableBlur();var b=E.popups.get("video.insert");b&&y(b.off("abortUpload")).on("abortUpload",function(){4!=l.readyState&&l.abort()}),l.send(E.opts.videoUploadToAzure?a:t)}}}function G(e,t){E.edit.on(),w&&w.find("video").addClass("fr-error"),_(E.language.translate("Something went wrong. Please try again.")),E.events.trigger("video.error",[{code:e,message:r[e]},t])}function Y(){if(w){var e=E.popups.get("video.size"),t=w.find("iframe, embed, ".concat(w.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 V(e){if(e)return E.popups.onRefresh("video.size",Y),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(E.button.buildList(E.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(E.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(E.id,'" type="text" name="width" placeholder="').concat(E.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(E.id,'" type="text" name="height" placeholder="').concat(E.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(E.language.translate("Update"),"</button></div></div>")},a=E.popups.create("video.size",t);return E.events.$on(E.$wp,"scroll",function(){w&&E.popups.isVisible("video.size")&&(E.events.disableBlur(),c(w))}),a}function j(e){if(void 0===e&&(e=w),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 q(e){void 0===e&&(e=w);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 X(){if(w&&!1!==E.events.trigger("video.beforeRemove",[w])){var e=w;if(E.popups.hideAll(),H(!0),E.opts.trackChangesEnabled&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return void E.track_changes.removeSpecialItem(e);E.selection.setBefore(e.get(0))||E.selection.setAfter(e.get(0)),e.remove(),E.selection.restore(),E.html.fillEmptyBlocks()}}function Q(){l()}function Z(e,t,a){!E.opts.htmlUntouched&&E.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=E.$el.find("video").filter(function(){return 0===y(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(y(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),E.$el.find("embed, iframe").filter(function(){if(E.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<y(this).parents("span.fr-video").length)return!1;for(var e=y(this).attr("src"),t=0;t<Rt.VIDEO_PROVIDERS.length;t++){var a=Rt.VIDEO_PROVIDERS[t];if(a.test_regex.test(e)&&new RegExp(E.opts.videoAllowedProviders.join("|")).test(a.provider))return!0}return!1}).map(function(){return 0===y(this).parents("object").length?this:y(this).parents("object").get(0)}).wrap(y(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,a,n,r,i=E.$el.find("span.fr-video, video"),o=0;o<i.length;o++){var s=y(i[o]);!E.opts.htmlUntouched&&E.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(j(r)[0])),r.addClass("fr-dv".concat(q(r)[0]))),E.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):E.opts.htmlUntouched||E.opts.useClasses||(void 0,a=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,n=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":j(t),Z(t,a,n),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}i.toggleClass("fr-draggable",E.opts.videoMove)}}function ee(e){document.getElementById("autoplay-".concat(E.id)).style.cssText="background:".concat(e)}function te(){if(w){E.selection.clear();var e=E.doc.createRange();e.selectNode(w.get(0)),E.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[p]="No link in upload response.",r[u]="Error during file upload.",r[g]="Parsing response failed.",r[C]="File is too large.",r[T]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",E.shared.vid_exit_flag=!1,{_init:function ae(){E.opts.videoResponsive&&(E.opts.videoResize=!1),function e(){E.events.on("drop",W,!0),E.events.on("mousedown window.mousedown",$),E.events.on("window.touchmove",z),E.events.on("mouseup window.mouseup",H),E.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&H()}),E.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){H(!0)})}(),E.helpers.isMobile()&&(E.events.$on(E.$el,"touchstart","span.fr-video",function(){a=!1}),E.events.$on(E.$el,"touchmove",function(){a=!0})),E.events.on("html.set",J),J(),E.events.$on(E.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(E.browser.msie||E.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),E.events.$on(E.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==y(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),E.events.on("keydown",function(e){var t=e.which;return!w||t!=Rt.KEYCODE.BACKSPACE&&t!=Rt.KEYCODE.DELETE?w&&t==Rt.KEYCODE.ESC?(H(!0),e.preventDefault(),!1):w&&t!=Rt.KEYCODE.F10&&!E.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),X(),E.undo.saveStep(),!1)},!0),E.events.on("toolbar.esc",function(){if(w)return E.events.disableBlur(),E.events.focus(),!1},!0),E.events.on("toolbar.focusEditor",function(){if(w)return!1},!0),E.events.on("keydown",function(){E.$el.find("span.fr-video:empty").remove()}),E.$wp&&(P(),E.events.on("contentChanged",P)),o(!0),V(!0)},showInsertPopup:function ne(){var e=E.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=E.popups.get("video.insert");if(t||(t=o()),l(),!t.hasClass("fr-active"))if(E.popups.refresh("video.insert"),E.popups.setContainer("video.insert",E.$tb),e.isVisible()){var a=E.button.getPosition(e),n=a.left,r=a.top;E.popups.show("video.insert",n,r,e.outerHeight())}else E.position.forSelection(t),E.popups.show("video.insert")},showLayer:function re(e){var t,a,n=E.popups.get("video.insert");if(!w&&!E.opts.toolbarInline){var r=E.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,a=r.offset().top+(E.opts.toolbarBottom?10:r.outerHeight()-10)}E.opts.toolbarInline&&(a=n.offset().top-E.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),E.popups.show("video.insert",t,a,0),E.accessibility.focusPopup(n)},refreshByURLButton:function ie(e){var t=E.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 oe(e){var t=E.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=E.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 le(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;if(void 0===e){var a=(e=(E.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim()).match(/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/?(showcase\/)*([0-9))([a-z]*\/)*([0-9]{6,11})[?]?.*/);if(a&&7==a.length){var n=a[6],r=e.substring(0,e.lastIndexOf("/")),i=e.substring(e.lastIndexOf("/")+1,e.length);e=i.includes("?h=")||i.includes("?v=")||n===i?("".concat(r,"/").concat(i)||"").trim():("".concat(r,"?h=").concat(i)||"").trim()}}var o=null;if(/^http/.test(e)||(e="https://".concat(e)),E.helpers.isURL(e))for(var s=0;s<Rt.VIDEO_PROVIDERS.length;s++){var l=Rt.VIDEO_PROVIDERS[s],c="autoplay=1&mute=1";if(l.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)l.html=l.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var d=l.html.indexOf("{url}")+5;l.html=[l.html.slice(0,d),c,l.html.slice(d)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(l=Rt.VIDEO_PROVIDERS[s]).html=l.html.replace(c,"");if(l.test_regex.test(e)&&new RegExp(E.opts.videoAllowedProviders.join("|")).test(l.provider)){o=e.replace(l.url_regex,l.url_text),o=l.html.replace(/\{url\}/,o);break}}o?m(o):(_(E.language.translate("Something went wrong. Please try again.")),E.events.trigger("video.linkError",[e]))},insertEmbed:function ce(e){void 0===e&&(e=E.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&Rt.VIDEO_EMBED_REGEX.test(e)?m(e):(_(E.language.translate("Something went wrong. Please try again.")),E.events.trigger("video.codeError",[e]))},insert:m,align:function de(e){w.removeClass("fr-fvr fr-fvl"),!E.opts.htmlUntouched&&E.opts.useClasses?"left"==e?w.addClass("fr-fvl"):"right"==e&&w.addClass("fr-fvr"):Z(w,q(),e),te(),U(),i(),E.selection.clear()},refreshAlign:function fe(e){if(!w)return!1;e.find(">*").first().replaceWith(E.icon.create("video-align-".concat(j())))},refreshAlignOnShow:function pe(e,t){w&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ue(e){w.removeClass("fr-dvi fr-dvb"),!E.opts.htmlUntouched&&E.opts.useClasses?"inline"==e?w.addClass("fr-dvi"):"block"==e&&w.addClass("fr-dvb"):Z(w,e,j()),te(),U(),i(),E.selection.clear()},refreshDisplayOnShow:function ge(e,t){w&&t.find('.fr-command[data-param1="'.concat(q(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:X,hideProgressBar:l,showSizePopup:function he(){var e=E.popups.get("video.size");e||(e=V()),l(),E.popups.refresh("video.size"),E.popups.setContainer("video.size",E.$sc);var t=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.height();E.popups.show("video.size",a,n,t.height(),!0)},replace:function me(){var e=E.popups.get("video.insert");e||(e=o()),E.popups.isVisible("video.insert")||(l(),E.popups.refresh("video.insert"),E.popups.setContainer("video.insert",E.$sc));var t=w.offset().left+w.outerWidth()/2,a=w.offset().top+w.height();E.popups.show("video.insert",t,a,w.outerHeight(),!0)},back:function e(){w?(E.events.disableBlur(),w[0].click()):(E.events.disableBlur(),E.selection.restore(),E.events.enableBlur(),E.popups.hide("video.insert"),E.toolbar.showInline())},setSize:function ve(e,t){if(w){var a=E.popups.get("video.size"),n=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video"));n.css("width",e||a.find('input[name="width"]').val()),n.css("height",t||a.find('input[name="height"]').val()),n.get(0).style.width&&n.removeAttr("width"),n.get(0).style.height&&n.removeAttr("height"),a.find("input:focus").blur(),setTimeout(function(){w.trigger("click")},E.helpers.isAndroid()?50:0)}},get:function be(){return w},showProgressBar:R,_editVideo:c,setAutoplay:function _e(){var e;if(w.find("iframe, embed, audio").get(0))(e=w.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=w.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("")}}}},Rt.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"}),Rt.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),Rt.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),Rt.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)}}),Rt.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),Rt.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)}}),Rt.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),Rt.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)}}),Rt.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),Rt.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),Rt.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),Rt.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)}}),Rt.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),Rt.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Rt.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Rt.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Rt.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),Rt.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=Rt.COMMANDS.videoAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("video-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</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)}}),Rt.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Rt.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),Rt.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),Rt.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),Rt.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),Rt.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),Rt.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Rt.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),Rt.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),Rt.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().hasClass("fr-separator")&&e.next().removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next().hasClass("fr-separator")&&e.next().addClass("fr-hidden"))}}),Rt.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),Rt.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}}),Object.assign(Rt.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}),Rt.PLUGINS.wordPaste=function(C){var o,r,T,O=C.$,s="word_paste",g={},S=!0,R=0;function t(e){var t=C.opts.wordAllowedStyleProps;e||(C.opts.wordAllowedStyleProps=[]),0===r.indexOf("<colgroup>")&&(r="<table>"+r+"</table>"),r=i(r=r.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var a="",n=0;n++<t.length;)a+="&nbsp;";return a}),C.paste.getRtfClipboard());var a=C.doc.createElement("DIV");a.innerHTML=r,C.html.cleanBlankSpaces(a),r=a.innerHTML,r=(r=C.paste.cleanEmptyTagsAndDivs(r)).replace(/\u200b/g,""),function n(){C.modals.hide(s)}(),C.helpers.isMobile()&&C.events.focus(),C.paste.clean(r,!0,!0),C.opts.wordAllowedStyleProps=t}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e,t){if(t(e))for(var a=e.firstChild;a;){var n=a,r=a.previousSibling;a=a.nextSibling,h(n,t),n.previousSibling||n.nextSibling||n.parentNode||!a||r===a.previousSibling||!a.parentNode?n.previousSibling||n.nextSibling||n.parentNode||!a||a.previousSibling||a.nextSibling||a.parentNode||(r?a=r.nextSibling?r.nextSibling.nextSibling:null:e.firstChild&&(a=e.firstChild.nextSibling)):a=r?r.nextSibling:e.firstChild}}function M(e){return O(e).hasClass("ListContainerWrapper")&&0<O(e).find("ol").length}function F(e){return O(e).hasClass("ListContainerWrapper")&&0<O(e).find("ul").length}function D(e){if(M(e)||F(e))return!0;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 N(e){return M(e)||F(e)?O(e).find("li").attr("data-aria-level"):e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function B(e,n){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var a=document.createElement(e.tagName.toLowerCase());a.setAttribute("style",e.getAttribute("style")),a.innerHTML=t.innerHTML,t.innerHTML=a.outerHTML}h(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(C.browser.msie||C.browser.safari||C.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(a){return!1}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",m(e)),w(e,n)),!0});var r=M(e)?O(e).find("li").get(0).innerHTML:t.innerHTML;if(M(e)||F(e)){r="";for(var i=O(e).find("li"),o=0;o<i.length;o++){var s=O(i.get(o).innerHTML);s.find("span").each(function(){"&nbsp;"===O(this).html()&&(0<O(this).prev().text().trim().length?O(this).remove():O(this).html("&ZeroWidthSpace;"))});var l=i[o].style.marginLeft;l?(l=parseFloat(parseFloat(l).toFixed(2))+l.match(/[a-zA-Z]+/g)[0],r+='<li style = "margin-left: '.concat(l,';">').concat(s.get(0).innerHTML,"</li>")):r+="<li >".concat(s.get(0).innerHTML,"</li>")}}else{var c,d=null===(c=O(e).find("p").get(0))||void 0===c?void 0:c.style.marginLeft;r=d?(d=parseFloat(parseFloat(d).toFixed(2))+d.match(/[a-zA-Z]+/g)[0],'<li style = "margin-left: '.concat(d,';">').concat(r,"</li>")):"<li>".concat(r,"</li>")}return r=r.replace(/<!--[\s\S]*?-->/gi,"")}function m(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,a="",n=["line-height","font-family","font-size","color","background"].concat(ye(t||[])),r=e.getAttribute("style");return r&&n.forEach(function(t){var e=r.split(";").find(function(e){return e.trim().includes(t+":")});e&&(e.includes("mso")&&(e=e.match(new RegExp(t+":.*(;|)"))[0]),e.trim().startsWith(t)&&(a+=e+";"))}),a}function _(e,t){for(var a=document.createElement(t),n=0;n<e.attributes.length;n++){var r=e.attributes[n].name;"FONT"===e.tagName&&(C.browser.msie&&["id","class","style"].indexOf(r)<0||!C.browser.msie&&CSS.supports(r,e.getAttribute(r)))?O(a).css(r,e.getAttribute(r)):a.setAttribute(r,e.getAttribute(r))}return a.innerHTML=e.innerHTML,e.parentNode.replaceChild(a,e),a}function E(e,t){C.node.clearAttributes(e);for(var a=e.firstElementChild,n=0,r=!1,i=null;a;){if(a.firstElementChild&&-1!==a.firstElementChild.tagName.indexOf("W:"))for(var o=0;o<a.children.length;o++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==a.children[o]&&(a.innerHTML+=a.children[o]);(i=a.getAttribute("width"))||(i=a.style.width),i||r||(r=!0),n+=parseInt(i,10),(!a.firstChild||a.firstChild&&a.firstChild.data===Rt.UNICODE_NBSP)&&(a.firstChild&&k(a.firstChild),a.innerHTML="<br>");for(var s=a.firstElementChild,l=1===a.children.length;s;)"P"!==s.tagName||D(s)||l&&L(s),s=s.nextElementSibling;if(t){var c=a.getAttribute("class");if(c){var d=(c=x(c)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&I(a,t[f])}}t.td&&I(a,t.td)}var p=a.getAttribute("style");p&&(p=x(p))&&";"!==p.slice(-1)&&(p+=";");var u=a.getAttribute("valign");if(!u&&p){var g=p.match(/vertical-align:.+?[; "]{1,1}/gi);g&&(u=g[g.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var h=null;if(p){var m=p.match(/text-align:.+?[; "]{1,1}/gi);m&&(h=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===h&&(h=null)}var v=null;if(p){var b=p.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var _=a.getAttribute("colspan"),E=a.getAttribute("rowspan");_&&a.setAttribute("colspan",_),E&&a.setAttribute("rowspan",E),u&&(a.style["vertical-align"]=u),h&&(a.style["text-align"]=h),v&&(a.style["background-color"]=v),i&&a.setAttribute("width",i),a=a.nextElementSibling}for(a=e.firstElementChild;a;)i=a.getAttribute("width"),r&&a.removeAttribute("width"),a=a.nextElementSibling;e.previousSibling?T!=n&&(S=!1):T=n,!e.nextElementSibling&&S&&function A(e){for(;e;){for(var t=e.firstElementChild,a=null,n=0;t;)a=t.getAttribute("width"),n+=parseInt(a,10),t=t.nextElementSibling;for(t=e.firstElementChild;t;)a=t.getAttribute("width"),t.setAttribute("width",100*parseInt(a,10)/n+"%"),t=t.nextElementSibling;e=e.previousElementSibling}}(e);var w=O(e).parentsUntil("table").parent().last();if(R<n&&(R=n),!e.nextElementSibling&&0<w.length){var y=O(w)[0].width;O(w)[0].style.width=y||R,S=!(R=0)}}function L(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function x(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function I(e,t,a){if(t){var n=e.getAttribute("style");n&&";"!==n.slice(-1)&&(n+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var r=null;r=a?(n||"")+t:t+(n||""),e.setAttribute("style",r)}}var u=null;function v(e,t,a){for(var n=e.split(a),r=1;r<n.length;r++){var i=n[r];if(1<(i=i.split("shplid")).length){i=i[1];for(var o="",s=0;s<i.length&&"\\"!==i[s]&&"{"!==i[s]&&" "!==i[s]&&"\r"!==i[s]&&"\n"!==i[s];)o+=i[s],s++;var l=i.split("bliptag");if(l&&l.length<2)continue;var c=null;if(-1!==l[0].indexOf("pngblip")?c="image/png":-1!==l[0].indexOf("jpegblip")&&(c="image/jpeg"),!c)continue;var d=l[1].split("}");if(d&&d.length<2)continue;var f=void 0;if(2<d.length&&-1!==d[0].indexOf("blipuid"))f=d[1].split(" ");else{if((f=d[0].split(" "))&&f.length<2)continue;f.shift()}var p=f.join("");u[t+o]={image_hex:p,image_type:c}}}}function b(e,t){if(t){var a;if("IMG"===e.tagName){var n,r,i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&C.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));if(!(a=g[e.getAttribute("v:shapes")]))a=e.getAttribute("v:shapes"),null!=e&&e.parentNode&&null!=e&&null!==(n=e.parentNode)&&void 0!==n&&n.parentNode&&0<=(null==e||null===(r=e.parentNode)||void 0===r||null===(r=r.parentNode)||void 0===r||null===(r=r.innerHTML)||void 0===r?void 0:r.indexOf("msEquation"))&&(a=null)}else{var o;a=null==e||null===(o=e.parentNode)||void 0===o?void 0:o.getAttribute("o:spid")}if(e.removeAttribute("height"),a){!function f(e){u={},v(e,"i","\\shppict"),v(e,"s","\\shp{")}(t);var s=u[a.substring(7)];if(s){var l,c=function p(e){for(var t=e.match(/[0-9a-f]{2}/gi),a=[],n=0;n<t.length;n++)a.push(String.fromCharCode(parseInt(t[n],16)));var r=a.join("");return btoa(r)}(s.image_hex),d="data:"+s.image_type+";base64,"+c;if("IMG"===e.tagName)e.src=d,e.setAttribute("data-fr-image-pasted",!0);else O(null==e?void 0:e.parentNode).before('<img data-fr-image-pasted="true" src="'+d+'" style="'+(null==e||null===(l=e.parentNode)||void 0===l?void 0:l.getAttribute("style"))+'">').remove()}}}}function w(e,t){var a=e.tagName,n=a.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?_(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&_(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(a))return k(e),!1;for(var r=["META","LINK","XML","ST1:","O:","W:","FONT"],i=0;i<r.length;i++)if(-1!==a.indexOf(r[i]))return e.innerHTML&&(e.outerHTML=e.innerHTML),k(e),!1;if("TD"!==a){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var s=(o=x(o)).split(" "),l=0;l<s.length;l++){var c=[],d="."+s[l];c.push(d),d=n+d,c.push(d);for(var f=0;f<c.length;f++)t[c[f]]&&I(e,t[c[f]])}e.removeAttribute("class")}t&&t[n]&&I(e,t[n])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(a)){var p=e.getAttribute("class");if(p&&(t&&t[a.toLowerCase()+"."+p]&&I(e,t[a.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var u=x(p);(u=u.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",u):e.removeAttribute("class")}var g=e.getAttribute("style");if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&h[h.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}L(e)}if("TR"===a&&E(e,t),"A"!==a||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==a&&e.getAttribute("href")&&e.querySelector("img"))for(var m=e.querySelectorAll("span"),v=0;v<m.length;v++)m[v].innerText||(m[v].outerHTML=m[v].innerHTML);if("TD"!==a&&"TH"!==a||e.innerHTML||(e.innerHTML="<br>"),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=x(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function i(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"));var l=e.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function f(e){for(var t=e.split("v:shape"),a=1;a<t.length;a++){var n=t[a],r=n.split(' id="')[1];if(r&&1<r.length){r=r.split('"')[0];var i=n.split(' o:spid="')[1];i&&1<i.length&&(i=i.split('"')[0],g[r]=i)}}}(e);var a=(new DOMParser).parseFromString(e,"text/html"),n=a.head,r=a.body,c=function p(e){var t={},a=e.getElementsByTagName("style");if(a.length){var n=a[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(n)for(var r=0;r<n.length;r++){var i=n[r],o=i.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=i.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");o=o.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var l=o.split(", "),c=0;c<l.length;c++)t[l[c]]=s}}return t}(n);h(r,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===Rt.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(k(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),h(r,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||b(e,t),!0});for(var i=r.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),o=i.length-1;0<=o;o--)i[o].previousElementSibling&&"LI"===i[o].previousElementSibling.tagName&&i[o].previousElementSibling.appendChild(i[o]);h(r,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(D(e)){var t=e.parentNode,a=e.previousSibling,n=function I(e,t,a,n){var r,i,o,s,l,c,d,f=navigator.userAgent.toLowerCase();-1!=f.indexOf("safari")&&(f=-1<f.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var p,u,g,h,m=/[0-9a-zA-Z]./gi,v="",b=M(e),_=null===(r=O(e).find("ol"))||void 0===r||null===(r=r.attr("style"))||void 0===r||null===(r=r.split(";"))||void 0===r?void 0:r.find(function(e){return e.trim().startsWith("list-style-type")});_==undefined&&F(e)&&(_=null===(u=O(e).find("ul"))||void 0===u||null===(u=u.attr("style"))||void 0===u||null===(u=u.split(";"))||void 0===u?void 0:u.find(function(e){return e.trim().startsWith("list-style-type")}));if(b)c="ol",d=_?"list-style-type: "+_.replace("list-style-type:","").trim()+";":"";else if(F(e))c="ul",d=_?"list-style-type: "+_.replace("list-style-type:","").trim()+";":"";else{var E=e.querySelector('span[style="mso-list:Ignore"]');null==E&&"safari"==f&&(E=e.querySelector('span[lang="PT-BR"]'));var w=!1;E&&(w=w||m.test(E.textContent)),null!==E&&(p=E.textContent.trim().split(".")[0]),c=1==w?(p=(p=E.textContent.trim().split(".")[0]).replace(/\(([^)]+)\)/g,"$1"),isNaN(parseInt(p))?"i"==p?d="lower-roman;":"I"==p?d="upper-roman;":"o"==p?d="circle;":p.match(/^v$/)||(p.match(/^[a-z]$/)||p.match(/^[a-z]\)$/)?d="lower-alpha;":(p.match(/^[A-Z]$/)||p.match(/^[A-Z]\)$/))&&(d="upper-alpha;")):d="decimal;",d="list-style-type: "+d,"ol"):(null!=E&&(p=E.textContent.trim().split(".")[0]),"\xa7"==p?d="square;":"\xb7"==p&&(d="disc;"),d="list-style-type: "+d,"ul"),E==undefined||E.textContent==undefined||isNaN(parseInt(E.textContent.trim().split(".")[1],10))||(v=' class="decimal_type" ')}var y=1,A="",C=(N(e),e.style.marginLeft),T="";C.includes("in")?(T="in",C=parseFloat(C)-.5):C.includes("pt")&&(T="px",C=parseFloat(C)-10),C&&(h=" margin-left: "+C+T+";"),y="list-style-type: upper-alpha;"==d?b?parseInt(O(e).find("ol").attr("start")):p.charCodeAt(0)-64:"list-style-type: lower-alpha;"==d?b?parseInt(O(e).find("ol").attr("start")):p.charCodeAt(0)-96:b?parseInt(O(e).find("ol").attr("start")):parseInt(p),A+=d||"",A+=h||"",g="<"+c,g+=v||"",g+="ol"!=c||1==y||isNaN(y)?"":' start = "'+y+'"',g+=A?' style = "'+A+'"':"",g+=">";for(var S=!1;e;){if(!D(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var R=N(e);if((a=a||R)<R)g+=(l=I(e,t,R,e.style.marginLeft)).el.outerHTML,e=l.currentNode;else{if(R<a)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0),o&&o.firstElementChild&&o.firstElementChild.firstElementChild&&o.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0,i=m.test(o.firstElementChild.firstElementChild.firstChild.data||o.firstElementChild.firstElementChild.firstChild.firstChild&&o.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var k=!1;(!n&&!e.style.marginLeft||n&&e.style.marginLeft&&n===e.style.marginLeft)&&(k=!0),n=e.style.marginLeft,k||i===undefined?(s=B(e,t),e.nextSibling&&e.nextSibling.innerText!=undefined&&e.nextSibling.innerText!=undefined&&!g.includes('class="decimal_type"')&&(isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(g=g.substring(3,0)+' class="decimal_type"'+g.substring(3,g.length))),g+=s):(1==R&&(g+="</"+c+">",S=!0,o=null),g+=(l=I(e,t,R,e.style.marginLeft)).el.outerHTML,e=l.currentNode);var L=e&&e.nextElementSibling;if(L&&(o=L.previousElementSibling),e&&!D(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=L}}S||(g+="</"+c+">");var x=document.createElement("div");return x.innerHTML=g,{el:x,currentNode:e}}(e,c).el,r=null;return(r=a?a.nextSibling:t.firstChild)?t.insertBefore(n,r):t.appendChild(n),!1}return"FONT"===e.tagName&&(l&&"LibreOffice"===l[0]||c["."+e.getAttribute("class")])?e=_(e,"span"):l&&"\x3c!--StartFragment--\x3e"===l[0]&&"UL"===e.tagName&&(O(e).find("li span").each(function(){"&nbsp;"===O(this).html()&&(0<O(this).prev().text().trim().length?O(this).remove():O(this).html("&ZeroWidthSpace;"))}),O(e).is("ul")&&e.setAttribute("style",m(e,["margin","margin-left","list-style-type"])),O(e).find("ul").each(function(){this.setAttribute("style",m(this,["margin","margin-left","list-style-type"]))})),function s(t){Array.from(t.attributes).map(function(e){return e.name}).filter(function(e){return e.toLowerCase().startsWith("data-")||e.toLowerCase().startsWith("xml:")}).forEach(function(e){O(t).removeAttr(e)})}(e),w(e,c)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var i=e.nextSibling;i;)(i=e.nextSibling)&&k(i),i.data&&-1<i.data.indexOf("[endif]")&&(i=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var o=document.createElement("input");o.type="checkbox",e.parentNode.insertBefore(o,e.nextSibling)}return k(e),!1}),r.innerHTML=function u(e){var t=O(document.createElement("div")).attr("id","top-level");t.html(e);for(var a=t[0].querySelectorAll("ol, ul"),n=0;n<a.length;n++)if(O(a[n]).parentsUntil("#top-level","ol, ul").length){a[n].style.removeProperty("margin-left");for(var r=a[n].children,i=0;i<r.length;i++)"LI"==r[i].tagName&&r[i].style.removeProperty("margin-left")}return t[0].innerHTML}(r.innerHTML),h(r,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var a=e.parentNode;a&&(k(e),!(e=a).innerHTML)&&"TD"!==e.parentNode.tagName;)a=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=x(t))&&";"!==t.slice(-1)&&(t+=";");var a=t.match(/(^|\S+?):.+?;{1,1}/gi);if(a){for(var n={},r=0;r<a.length;r++){var i=a[r].split(":");2===i.length&&("text-align"===i[0]&&"SPAN"===e.tagName||(n[i[0]]=i[1]))}var o="";for(var s in n)if(n.hasOwnProperty(s)){if("font-size"===s&&"pt;"===n[s].slice(-3)){var l=null;try{l=parseFloat(n[s].slice(0,-3),10)}catch(d){l=null}if(l){var c=C.opts.fontSizeUnit;"px"===c?(l=Math.round(1.33*l),n[s]=l+"px;"):"pt"===c&&(l=Math.round(l),n[s]=l+"pt;")}}o+=s+":"+n[s]}o&&e.setAttribute("style",o)}}}(e)}return!0}),h(r,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}),h(r,function(e){return e&&"P"===e.tagName&&"DIV"===e.parentNode.tagName&&1==e.parentNode.children.length&&O(e).unwrap(),!0});var s=r.outerHTML,d=C.opts.htmlAllowedStyleProps;return C.opts.htmlAllowedStyleProps=C.opts.wordAllowedStyleProps,s=C.clean.html(s,C.opts.wordDeniedTags,C.opts.wordDeniedAttrs,!1),C.opts.htmlAllowedStyleProps=d,s}return{_init:function e(){C.events.on("paste.wordPaste",function(e){return r=e,C.opts.wordPasteModal?function i(){if(!o){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> '+C.language.translate("Word Paste Detected")+"</h4>",t=function r(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+C.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">'+C.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+C.language.translate("Keep")+"</button></div>",e+="</div>"}(),a=C.modals.create(s,e,t),n=a.$body;o=a.$modal,a.$modal.addClass("fr-middle"),C.events.$on(n,"click","button.fr-remove-word",function(){var e=o.data("instance")||C;e.wordPaste.clean()},!0),C.events.$on(n,"click","button.fr-keep-word",function(){var e=o.data("instance")||C;e.wordPaste.clean(!0)},!0),C.events.$on(O(C.o_win),"resize",function(){C.modals.resize(s)})}C.modals.show(s),C.modals.resize(s)}():t(C.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:i}};var y={},a={},p={},u=n(!0),g="vanilla",h={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:n(!0),allOn:function _(){var e=n(!0),t={};for(var a in e)e.hasOwnProperty(a)&&(t[a]=!0);return t}()};function m(e,t){var a=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};y.helper.isArray(e)||(e=[e]);for(var r=0;r<e.length;++r){var i=a+" sub-extension "+r+": ",o=e[r];if("object"!==kt(o))return n.valid=!1,n.error=i+"must be an object, but "+kt(o)+" given",n;if(!y.helper.isString(o.type))return n.valid=!1,n.error=i+'property "type" must be a string, but '+kt(o.type)+" given",n;var s=o.type=o.type.toLowerCase();if("language"===s&&(s=o.type="lang"),"html"===s&&(s=o.type="output"),"lang"!==s&&"output"!==s&&"listener"!==s)return n.valid=!1,n.error=i+"type "+s+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',n;if("listener"===s){if(y.helper.isUndefined(o.listeners))return n.valid=!1,n.error=i+'. Extensions of type "listener" must have a property called "listeners"',n}else if(y.helper.isUndefined(o.filter)&&y.helper.isUndefined(o.regex))return n.valid=!1,n.error=i+s+' extensions must define either a "regex" property or a "filter" method',n;if(o.listeners){if("object"!==kt(o.listeners))return n.valid=!1,n.error=i+'"listeners" property must be an object but '+kt(o.listeners)+" given",n;for(var l in o.listeners)if(o.listeners.hasOwnProperty(l)&&"function"!=typeof o.listeners[l])return n.valid=!1,n.error=i+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+l+" must be a function but "+kt(o.listeners[l])+" given",n}if(o.filter){if("function"!=typeof o.filter)return n.valid=!1,n.error=i+'"filter" must be a function, but '+kt(o.filter)+" given",n}else if(o.regex){if(y.helper.isString(o.regex)&&(o.regex=new RegExp(o.regex,"g")),!(o.regex instanceof RegExp))return n.valid=!1,n.error=i+'"regex" property must either be a string or a RegExp object, but '+kt(o.regex)+" given",n;if(y.helper.isUndefined(o.replace))return n.valid=!1,n.error=i+'"regex" extensions must implement a replace string or function',n}}return n}function o(e,t){return"\xa8E"+t.charCodeAt(0)+"E"}y.helper={},y.extensions={},y.setOption=function(e,t){return u[e]=t,this},y.getOption=function(e){return u[e]},y.getOptions=function(){return u},y.resetOptions=function(){u=n(!0)},y.setFlavor=function(e){if(!h.hasOwnProperty(e))throw Error(e+" flavor was not found");y.resetOptions();var t=h[e];for(var a in g=e,t)t.hasOwnProperty(a)&&(u[a]=t[a])},y.getFlavor=function(){return g},y.getFlavorOptions=function(e){if(h.hasOwnProperty(e))return h[e]},y.getDefaultOptions=function(e){return n(e)},y.subParser=function(e,t){if(y.helper.isString(e)){if(void 0===t){if(a.hasOwnProperty(e))return a[e];throw Error("SubParser named "+e+" not registered!")}a[e]=t}},y.extension=function(e,t){if(!y.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=y.helper.stdExtName(e),y.helper.isUndefined(t)){if(!p.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return p[e]}"function"==typeof t&&(t=t()),y.helper.isArray(t)||(t=[t]);var a=m(t,e);if(!a.valid)throw Error(a.error);p[e]=t},y.getAllExtensions=function(){return p},y.removeExtension=function(e){delete p[e]},y.resetExtensions=function(){p={}},y.validateExtension=function(e){var t=m(e,null);return!!t.valid},y.hasOwnProperty("helper")||(y.helper={}),y.helper.isString=function(e){return"string"==typeof e||e instanceof String},y.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},y.helper.isArray=function(e){return Array.isArray(e)},y.helper.isUndefined=function(e){return void 0===e},y.helper.forEach=function(e,t){if(y.helper.isUndefined(e))throw new Error("obj param is required");if(y.helper.isUndefined(t))throw new Error("callback param is required");if(!y.helper.isFunction(t))throw new Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(y.helper.isArray(e))for(var a=0;a<e.length;a++)t(e[a],a,e);else{if("object"!==kt(e))throw new Error("obj does not seem to be an array or an iterable object");for(var n in e)e.hasOwnProperty(n)&&t(e[n],n,e)}},y.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},y.helper.escapeCharactersCallback=o,y.helper.escapeCharacters=function(e,t,a){var n="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";a&&(n="\\\\"+n);var r=new RegExp(n,"g");return e=e.replace(r,o)},y.helper.unescapeHTMLEntities=function(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var v=function v(e,t,a,n){var r,i,o,s,l,c=n||"",d=-1<c.indexOf("g"),f=new RegExp(t+"|"+a,"g"+c.replace(/g/g,"")),p=new RegExp(t,c.replace(/g/g,"")),u=[];do{for(r=0;o=f.exec(e);)if(p.test(o[0]))r++||(s=(i=f.lastIndex)-o[0].length);else if(r&&!--r){l=o.index+o[0].length;var g={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l},wholeMatch:{start:s,end:l}};if(u.push(g),!d)return u}}while(r&&(f.lastIndex=i));return u};y.helper.matchRecursiveRegExp=function(e,t,a,n){for(var r=v(e,t,a,n),i=[],o=0;o<r.length;++o)i.push([e.slice(r[o].wholeMatch.start,r[o].wholeMatch.end),e.slice(r[o].match.start,r[o].match.end),e.slice(r[o].left.start,r[o].left.end),e.slice(r[o].right.start,r[o].right.end)]);return i},y.helper.replaceRecursiveRegExp=function(e,t,a,n,r){if(!y.helper.isFunction(t)){var i=t;t=function t(){return i}}var o=v(e,a,n,r),s=e,l=o.length;if(0<l){var c=[];0!==o[0].wholeMatch.start&&c.push(e.slice(0,o[0].wholeMatch.start));for(var d=0;d<l;++d)c.push(t(e.slice(o[d].wholeMatch.start,o[d].wholeMatch.end),e.slice(o[d].match.start,o[d].match.end),e.slice(o[d].left.start,o[d].left.end),e.slice(o[d].right.start,o[d].right.end))),d<l-1&&c.push(e.slice(o[d].wholeMatch.end,o[d+1].wholeMatch.start));o[l-1].wholeMatch.end<e.length&&c.push(e.slice(o[l-1].wholeMatch.end)),s=c.join("")}return s},y.helper.regexIndexOf=function(e,t,a){if(!y.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var n=e.substring(a||0).search(t);return 0<=n?n+(a||0):n},y.helper.splitAtIndex=function(e,t){if(!y.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},y.helper.encodeEmailAddress=function(e){var a=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=a[Math.floor(2*Math.random())](e);else{var t=Math.random();e=.9<t?a[2](e):.45<t?a[1](e):a[0](e)}return e})},y.helper.padEnd=function(e,t,a){return t>>=0,a=String(a||" "),e.length>t?String(e):((t-=e.length)>a.length&&(a+=a.repeat(t/a.length)),String(e)+a.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),y.helper.regexes={asteriskDashAndColon:/([*_:~])/g},y.helper.emojis={"+1":"\ud83d\udc4d","-1":"\ud83d\udc4e",100:"\ud83d\udcaf",1234:"\ud83d\udd22","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49","8ball":"\ud83c\udfb1",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",abc:"\ud83d\udd24",abcd:"\ud83d\udd21",accept:"\ud83c\ude51",aerial_tramway:"\ud83d\udea1",airplane:"\u2708\ufe0f",alarm_clock:"\u23f0",alembic:"\u2697\ufe0f",alien:"\ud83d\udc7d",ambulance:"\ud83d\ude91",amphora:"\ud83c\udffa",anchor:"\u2693\ufe0f",angel:"\ud83d\udc7c",anger:"\ud83d\udca2",angry:"\ud83d\ude20",anguished:"\ud83d\ude27",ant:"\ud83d\udc1c",apple:"\ud83c\udf4e",aquarius:"\u2652\ufe0f",aries:"\u2648\ufe0f",arrow_backward:"\u25c0\ufe0f",arrow_double_down:"\u23ec",arrow_double_up:"\u23eb",arrow_down:"\u2b07\ufe0f",arrow_down_small:"\ud83d\udd3d",arrow_forward:"\u25b6\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_up_down:"\u2195\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_upper_left:"\u2196\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",art:"\ud83c\udfa8",articulated_lorry:"\ud83d\ude9b",artificial_satellite:"\ud83d\udef0",astonished:"\ud83d\ude32",athletic_shoe:"\ud83d\udc5f",atm:"\ud83c\udfe7",atom_symbol:"\u269b\ufe0f",avocado:"\ud83e\udd51",b:"\ud83c\udd71\ufe0f",baby:"\ud83d\udc76",baby_bottle:"\ud83c\udf7c",baby_chick:"\ud83d\udc24",baby_symbol:"\ud83d\udebc",back:"\ud83d\udd19",bacon:"\ud83e\udd53",badminton:"\ud83c\udff8",baggage_claim:"\ud83d\udec4",baguette_bread:"\ud83e\udd56",balance_scale:"\u2696\ufe0f",balloon:"\ud83c\udf88",ballot_box:"\ud83d\uddf3",ballot_box_with_check:"\u2611\ufe0f",bamboo:"\ud83c\udf8d",banana:"\ud83c\udf4c",bangbang:"\u203c\ufe0f",bank:"\ud83c\udfe6",bar_chart:"\ud83d\udcca",barber:"\ud83d\udc88",baseball:"\u26be\ufe0f",basketball:"\ud83c\udfc0",basketball_man:"\u26f9\ufe0f",basketball_woman:"\u26f9\ufe0f&zwj;\u2640\ufe0f",bat:"\ud83e\udd87",bath:"\ud83d\udec0",bathtub:"\ud83d\udec1",battery:"\ud83d\udd0b",beach_umbrella:"\ud83c\udfd6",bear:"\ud83d\udc3b",bed:"\ud83d\udecf",bee:"\ud83d\udc1d",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",beetle:"\ud83d\udc1e",beginner:"\ud83d\udd30",bell:"\ud83d\udd14",bellhop_bell:"\ud83d\udece",bento:"\ud83c\udf71",biking_man:"\ud83d\udeb4",bike:"\ud83d\udeb2",biking_woman:"\ud83d\udeb4&zwj;\u2640\ufe0f",bikini:"\ud83d\udc59",biohazard:"\u2623\ufe0f",bird:"\ud83d\udc26",birthday:"\ud83c\udf82",black_circle:"\u26ab\ufe0f",black_flag:"\ud83c\udff4",black_heart:"\ud83d\udda4",black_joker:"\ud83c\udccf",black_large_square:"\u2b1b\ufe0f",black_medium_small_square:"\u25fe\ufe0f",black_medium_square:"\u25fc\ufe0f",black_nib:"\u2712\ufe0f",black_small_square:"\u25aa\ufe0f",black_square_button:"\ud83d\udd32",blonde_man:"\ud83d\udc71",blonde_woman:"\ud83d\udc71&zwj;\u2640\ufe0f",blossom:"\ud83c\udf3c",blowfish:"\ud83d\udc21",blue_book:"\ud83d\udcd8",blue_car:"\ud83d\ude99",blue_heart:"\ud83d\udc99",blush:"\ud83d\ude0a",boar:"\ud83d\udc17",boat:"\u26f5\ufe0f",bomb:"\ud83d\udca3",book:"\ud83d\udcd6",bookmark:"\ud83d\udd16",bookmark_tabs:"\ud83d\udcd1",books:"\ud83d\udcda",boom:"\ud83d\udca5",boot:"\ud83d\udc62",bouquet:"\ud83d\udc90",bowing_man:"\ud83d\ude47",bow_and_arrow:"\ud83c\udff9",bowing_woman:"\ud83d\ude47&zwj;\u2640\ufe0f",bowling:"\ud83c\udfb3",boxing_glove:"\ud83e\udd4a",boy:"\ud83d\udc66",bread:"\ud83c\udf5e",bride_with_veil:"\ud83d\udc70",bridge_at_night:"\ud83c\udf09",briefcase:"\ud83d\udcbc",broken_heart:"\ud83d\udc94",bug:"\ud83d\udc1b",building_construction:"\ud83c\udfd7",bulb:"\ud83d\udca1",bullettrain_front:"\ud83d\ude85",bullettrain_side:"\ud83d\ude84",burrito:"\ud83c\udf2f",bus:"\ud83d\ude8c",business_suit_levitating:"\ud83d\udd74",busstop:"\ud83d\ude8f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",butterfly:"\ud83e\udd8b",cactus:"\ud83c\udf35",cake:"\ud83c\udf70",calendar:"\ud83d\udcc6",call_me_hand:"\ud83e\udd19",calling:"\ud83d\udcf2",camel:"\ud83d\udc2b",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",camping:"\ud83c\udfd5",cancer:"\u264b\ufe0f",candle:"\ud83d\udd6f",candy:"\ud83c\udf6c",canoe:"\ud83d\udef6",capital_abcd:"\ud83d\udd20",capricorn:"\u2651\ufe0f",car:"\ud83d\ude97",card_file_box:"\ud83d\uddc3",card_index:"\ud83d\udcc7",card_index_dividers:"\ud83d\uddc2",carousel_horse:"\ud83c\udfa0",carrot:"\ud83e\udd55",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",cd:"\ud83d\udcbf",chains:"\u26d3",champagne:"\ud83c\udf7e",chart:"\ud83d\udcb9",chart_with_downwards_trend:"\ud83d\udcc9",chart_with_upwards_trend:"\ud83d\udcc8",checkered_flag:"\ud83c\udfc1",cheese:"\ud83e\uddc0",cherries:"\ud83c\udf52",cherry_blossom:"\ud83c\udf38",chestnut:"\ud83c\udf30",chicken:"\ud83d\udc14",children_crossing:"\ud83d\udeb8",chipmunk:"\ud83d\udc3f",chocolate_bar:"\ud83c\udf6b",christmas_tree:"\ud83c\udf84",church:"\u26ea\ufe0f",cinema:"\ud83c\udfa6",circus_tent:"\ud83c\udfaa",city_sunrise:"\ud83c\udf07",city_sunset:"\ud83c\udf06",cityscape:"\ud83c\udfd9",cl:"\ud83c\udd91",clamp:"\ud83d\udddc",clap:"\ud83d\udc4f",clapper:"\ud83c\udfac",classical_building:"\ud83c\udfdb",clinking_glasses:"\ud83e\udd42",clipboard:"\ud83d\udccb",clock1:"\ud83d\udd50",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",closed_book:"\ud83d\udcd5",closed_lock_with_key:"\ud83d\udd10",closed_umbrella:"\ud83c\udf02",cloud:"\u2601\ufe0f",cloud_with_lightning:"\ud83c\udf29",cloud_with_lightning_and_rain:"\u26c8",cloud_with_rain:"\ud83c\udf27",cloud_with_snow:"\ud83c\udf28",clown_face:"\ud83e\udd21",clubs:"\u2663\ufe0f",cocktail:"\ud83c\udf78",coffee:"\u2615\ufe0f",coffin:"\u26b0\ufe0f",cold_sweat:"\ud83d\ude30",comet:"\u2604\ufe0f",computer:"\ud83d\udcbb",computer_mouse:"\ud83d\uddb1",confetti_ball:"\ud83c\udf8a",confounded:"\ud83d\ude16",confused:"\ud83d\ude15",congratulations:"\u3297\ufe0f",construction:"\ud83d\udea7",construction_worker_man:"\ud83d\udc77",construction_worker_woman:"\ud83d\udc77&zwj;\u2640\ufe0f",control_knobs:"\ud83c\udf9b",convenience_store:"\ud83c\udfea",cookie:"\ud83c\udf6a",cool:"\ud83c\udd92",policeman:"\ud83d\udc6e",copyright:"\xa9\ufe0f",corn:"\ud83c\udf3d",couch_and_lamp:"\ud83d\udecb",couple:"\ud83d\udc6b",couple_with_heart_woman_man:"\ud83d\udc91",couple_with_heart_man_man:"\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc69",couplekiss_man_man:"\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc68",couplekiss_man_woman:"\ud83d\udc8f",couplekiss_woman_woman:"\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc69",cow:"\ud83d\udc2e",cow2:"\ud83d\udc04",cowboy_hat_face:"\ud83e\udd20",crab:"\ud83e\udd80",crayon:"\ud83d\udd8d",credit_card:"\ud83d\udcb3",crescent_moon:"\ud83c\udf19",cricket:"\ud83c\udfcf",crocodile:"\ud83d\udc0a",croissant:"\ud83e\udd50",crossed_fingers:"\ud83e\udd1e",crossed_flags:"\ud83c\udf8c",crossed_swords:"\u2694\ufe0f",crown:"\ud83d\udc51",cry:"\ud83d\ude22",crying_cat_face:"\ud83d\ude3f",crystal_ball:"\ud83d\udd2e",cucumber:"\ud83e\udd52",cupid:"\ud83d\udc98",curly_loop:"\u27b0",currency_exchange:"\ud83d\udcb1",curry:"\ud83c\udf5b",custard:"\ud83c\udf6e",customs:"\ud83d\udec3",cyclone:"\ud83c\udf00",dagger:"\ud83d\udde1",dancer:"\ud83d\udc83",dancing_women:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f&zwj;\u2642\ufe0f",dango:"\ud83c\udf61",dark_sunglasses:"\ud83d\udd76",dart:"\ud83c\udfaf",dash:"\ud83d\udca8",date:"\ud83d\udcc5",deciduous_tree:"\ud83c\udf33",deer:"\ud83e\udd8c",department_store:"\ud83c\udfec",derelict_house:"\ud83c\udfda",desert:"\ud83c\udfdc",desert_island:"\ud83c\udfdd",desktop_computer:"\ud83d\udda5",male_detective:"\ud83d\udd75\ufe0f",diamond_shape_with_a_dot_inside:"\ud83d\udca0",diamonds:"\u2666\ufe0f",disappointed:"\ud83d\ude1e",disappointed_relieved:"\ud83d\ude25",dizzy:"\ud83d\udcab",dizzy_face:"\ud83d\ude35",do_not_litter:"\ud83d\udeaf",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",dollar:"\ud83d\udcb5",dolls:"\ud83c\udf8e",dolphin:"\ud83d\udc2c",door:"\ud83d\udeaa",doughnut:"\ud83c\udf69",dove:"\ud83d\udd4a",dragon:"\ud83d\udc09",dragon_face:"\ud83d\udc32",dress:"\ud83d\udc57",dromedary_camel:"\ud83d\udc2a",drooling_face:"\ud83e\udd24",droplet:"\ud83d\udca7",drum:"\ud83e\udd41",duck:"\ud83e\udd86",dvd:"\ud83d\udcc0","e-mail":"\ud83d\udce7",eagle:"\ud83e\udd85",ear:"\ud83d\udc42",ear_of_rice:"\ud83c\udf3e",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",egg:"\ud83e\udd5a",eggplant:"\ud83c\udf46",eight_pointed_black_star:"\u2734\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",electric_plug:"\ud83d\udd0c",elephant:"\ud83d\udc18",email:"\u2709\ufe0f",end:"\ud83d\udd1a",envelope_with_arrow:"\ud83d\udce9",euro:"\ud83d\udcb6",european_castle:"\ud83c\udff0",european_post_office:"\ud83c\udfe4",evergreen_tree:"\ud83c\udf32",exclamation:"\u2757\ufe0f",expressionless:"\ud83d\ude11",eye:"\ud83d\udc41",eye_speech_bubble:"\ud83d\udc41&zwj;\ud83d\udde8",eyeglasses:"\ud83d\udc53",eyes:"\ud83d\udc40",face_with_head_bandage:"\ud83e\udd15",face_with_thermometer:"\ud83e\udd12",fist_oncoming:"\ud83d\udc4a",factory:"\ud83c\udfed",fallen_leaf:"\ud83c\udf42",family_man_woman_boy:"\ud83d\udc6a",family_man_boy:"\ud83d\udc68&zwj;\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_girl:"\ud83d\udc68&zwj;\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_man_man_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_man_girl:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_man_woman_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_woman_boy:"\ud83d\udc69&zwj;\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_woman_girl:"\ud83d\udc69&zwj;\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",fast_forward:"\u23e9",fax:"\ud83d\udce0",fearful:"\ud83d\ude28",feet:"\ud83d\udc3e",female_detective:"\ud83d\udd75\ufe0f&zwj;\u2640\ufe0f",ferris_wheel:"\ud83c\udfa1",ferry:"\u26f4",field_hockey:"\ud83c\udfd1",file_cabinet:"\ud83d\uddc4",file_folder:"\ud83d\udcc1",film_projector:"\ud83d\udcfd",film_strip:"\ud83c\udf9e",fire:"\ud83d\udd25",fire_engine:"\ud83d\ude92",fireworks:"\ud83c\udf86",first_quarter_moon:"\ud83c\udf13",first_quarter_moon_with_face:"\ud83c\udf1b",fish:"\ud83d\udc1f",fish_cake:"\ud83c\udf65",fishing_pole_and_fish:"\ud83c\udfa3",fist_raised:"\u270a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",flags:"\ud83c\udf8f",flashlight:"\ud83d\udd26",fleur_de_lis:"\u269c\ufe0f",flight_arrival:"\ud83d\udeec",flight_departure:"\ud83d\udeeb",floppy_disk:"\ud83d\udcbe",flower_playing_cards:"\ud83c\udfb4",flushed:"\ud83d\ude33",fog:"\ud83c\udf2b",foggy:"\ud83c\udf01",football:"\ud83c\udfc8",footprints:"\ud83d\udc63",fork_and_knife:"\ud83c\udf74",fountain:"\u26f2\ufe0f",fountain_pen:"\ud83d\udd8b",four_leaf_clover:"\ud83c\udf40",fox_face:"\ud83e\udd8a",framed_picture:"\ud83d\uddbc",free:"\ud83c\udd93",fried_egg:"\ud83c\udf73",fried_shrimp:"\ud83c\udf64",fries:"\ud83c\udf5f",frog:"\ud83d\udc38",frowning:"\ud83d\ude26",frowning_face:"\u2639\ufe0f",frowning_man:"\ud83d\ude4d&zwj;\u2642\ufe0f",frowning_woman:"\ud83d\ude4d",middle_finger:"\ud83d\udd95",fuelpump:"\u26fd\ufe0f",full_moon:"\ud83c\udf15",full_moon_with_face:"\ud83c\udf1d",funeral_urn:"\u26b1\ufe0f",game_die:"\ud83c\udfb2",gear:"\u2699\ufe0f",gem:"\ud83d\udc8e",gemini:"\u264a\ufe0f",ghost:"\ud83d\udc7b",gift:"\ud83c\udf81",gift_heart:"\ud83d\udc9d",girl:"\ud83d\udc67",globe_with_meridians:"\ud83c\udf10",goal_net:"\ud83e\udd45",goat:"\ud83d\udc10",golf:"\u26f3\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f&zwj;\u2640\ufe0f",gorilla:"\ud83e\udd8d",grapes:"\ud83c\udf47",green_apple:"\ud83c\udf4f",green_book:"\ud83d\udcd7",green_heart:"\ud83d\udc9a",green_salad:"\ud83e\udd57",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\ud83d\ude2c",grin:"\ud83d\ude01",grinning:"\ud83d\ude00",guardsman:"\ud83d\udc82",guardswoman:"\ud83d\udc82&zwj;\u2640\ufe0f",guitar:"\ud83c\udfb8",gun:"\ud83d\udd2b",haircut_woman:"\ud83d\udc87",haircut_man:"\ud83d\udc87&zwj;\u2642\ufe0f",hamburger:"\ud83c\udf54",hammer:"\ud83d\udd28",hammer_and_pick:"\u2692",hammer_and_wrench:"\ud83d\udee0",hamster:"\ud83d\udc39",hand:"\u270b",handbag:"\ud83d\udc5c",handshake:"\ud83e\udd1d",hankey:"\ud83d\udca9",hatched_chick:"\ud83d\udc25",hatching_chick:"\ud83d\udc23",headphones:"\ud83c\udfa7",hear_no_evil:"\ud83d\ude49",heart:"\u2764\ufe0f",heart_decoration:"\ud83d\udc9f",heart_eyes:"\ud83d\ude0d",heart_eyes_cat:"\ud83d\ude3b",heartbeat:"\ud83d\udc93",heartpulse:"\ud83d\udc97",hearts:"\u2665\ufe0f",heavy_check_mark:"\u2714\ufe0f",heavy_division_sign:"\u2797",heavy_dollar_sign:"\ud83d\udcb2",heavy_heart_exclamation:"\u2763\ufe0f",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",helicopter:"\ud83d\ude81",herb:"\ud83c\udf3f",hibiscus:"\ud83c\udf3a",high_brightness:"\ud83d\udd06",high_heel:"\ud83d\udc60",hocho:"\ud83d\udd2a",hole:"\ud83d\udd73",honey_pot:"\ud83c\udf6f",horse:"\ud83d\udc34",horse_racing:"\ud83c\udfc7",hospital:"\ud83c\udfe5",hot_pepper:"\ud83c\udf36",hotdog:"\ud83c\udf2d",hotel:"\ud83c\udfe8",hotsprings:"\u2668\ufe0f",hourglass:"\u231b\ufe0f",hourglass_flowing_sand:"\u23f3",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",houses:"\ud83c\udfd8",hugs:"\ud83e\udd17",hushed:"\ud83d\ude2f",ice_cream:"\ud83c\udf68",ice_hockey:"\ud83c\udfd2",ice_skate:"\u26f8",icecream:"\ud83c\udf66",id:"\ud83c\udd94",ideograph_advantage:"\ud83c\ude50",imp:"\ud83d\udc7f",inbox_tray:"\ud83d\udce5",incoming_envelope:"\ud83d\udce8",tipping_hand_woman:"\ud83d\udc81",information_source:"\u2139\ufe0f",innocent:"\ud83d\ude07",interrobang:"\u2049\ufe0f",iphone:"\ud83d\udcf1",izakaya_lantern:"\ud83c\udfee",jack_o_lantern:"\ud83c\udf83",japan:"\ud83d\uddfe",japanese_castle:"\ud83c\udfef",japanese_goblin:"\ud83d\udc7a",japanese_ogre:"\ud83d\udc79",jeans:"\ud83d\udc56",joy:"\ud83d\ude02",joy_cat:"\ud83d\ude39",joystick:"\ud83d\udd79",kaaba:"\ud83d\udd4b",key:"\ud83d\udd11",keyboard:"\u2328\ufe0f",keycap_ten:"\ud83d\udd1f",kick_scooter:"\ud83d\udef4",kimono:"\ud83d\udc58",kiss:"\ud83d\udc8b",kissing:"\ud83d\ude17",kissing_cat:"\ud83d\ude3d",kissing_closed_eyes:"\ud83d\ude1a",kissing_heart:"\ud83d\ude18",kissing_smiling_eyes:"\ud83d\ude19",kiwi_fruit:"\ud83e\udd5d",koala:"\ud83d\udc28",koko:"\ud83c\ude01",label:"\ud83c\udff7",large_blue_circle:"\ud83d\udd35",large_blue_diamond:"\ud83d\udd37",large_orange_diamond:"\ud83d\udd36",last_quarter_moon:"\ud83c\udf17",last_quarter_moon_with_face:"\ud83c\udf1c",latin_cross:"\u271d\ufe0f",laughing:"\ud83d\ude06",leaves:"\ud83c\udf43",ledger:"\ud83d\udcd2",left_luggage:"\ud83d\udec5",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",lemon:"\ud83c\udf4b",leo:"\u264c\ufe0f",leopard:"\ud83d\udc06",level_slider:"\ud83c\udf9a",libra:"\u264e\ufe0f",light_rail:"\ud83d\ude88",link:"\ud83d\udd17",lion:"\ud83e\udd81",lips:"\ud83d\udc44",lipstick:"\ud83d\udc84",lizard:"\ud83e\udd8e",lock:"\ud83d\udd12",lock_with_ink_pen:"\ud83d\udd0f",lollipop:"\ud83c\udf6d",loop:"\u27bf",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",love_hotel:"\ud83c\udfe9",love_letter:"\ud83d\udc8c",low_brightness:"\ud83d\udd05",lying_face:"\ud83e\udd25",m:"\u24c2\ufe0f",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",mahjong:"\ud83c\udc04\ufe0f",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",man:"\ud83d\udc68",man_artist:"\ud83d\udc68&zwj;\ud83c\udfa8",man_astronaut:"\ud83d\udc68&zwj;\ud83d\ude80",man_cartwheeling:"\ud83e\udd38&zwj;\u2642\ufe0f",man_cook:"\ud83d\udc68&zwj;\ud83c\udf73",man_dancing:"\ud83d\udd7a",man_facepalming:"\ud83e\udd26&zwj;\u2642\ufe0f",man_factory_worker:"\ud83d\udc68&zwj;\ud83c\udfed",man_farmer:"\ud83d\udc68&zwj;\ud83c\udf3e",man_firefighter:"\ud83d\udc68&zwj;\ud83d\ude92",man_health_worker:"\ud83d\udc68&zwj;\u2695\ufe0f",man_in_tuxedo:"\ud83e\udd35",man_judge:"\ud83d\udc68&zwj;\u2696\ufe0f",man_juggling:"\ud83e\udd39&zwj;\u2642\ufe0f",man_mechanic:"\ud83d\udc68&zwj;\ud83d\udd27",man_office_worker:"\ud83d\udc68&zwj;\ud83d\udcbc",man_pilot:"\ud83d\udc68&zwj;\u2708\ufe0f",man_playing_handball:"\ud83e\udd3e&zwj;\u2642\ufe0f",man_playing_water_polo:"\ud83e\udd3d&zwj;\u2642\ufe0f",man_scientist:"\ud83d\udc68&zwj;\ud83d\udd2c",man_shrugging:"\ud83e\udd37&zwj;\u2642\ufe0f",man_singer:"\ud83d\udc68&zwj;\ud83c\udfa4",man_student:"\ud83d\udc68&zwj;\ud83c\udf93",man_teacher:"\ud83d\udc68&zwj;\ud83c\udfeb",man_technologist:"\ud83d\udc68&zwj;\ud83d\udcbb",man_with_gua_pi_mao:"\ud83d\udc72",man_with_turban:"\ud83d\udc73",tangerine:"\ud83c\udf4a",mans_shoe:"\ud83d\udc5e",mantelpiece_clock:"\ud83d\udd70",maple_leaf:"\ud83c\udf41",martial_arts_uniform:"\ud83e\udd4b",mask:"\ud83d\ude37",massage_woman:"\ud83d\udc86",massage_man:"\ud83d\udc86&zwj;\u2642\ufe0f",meat_on_bone:"\ud83c\udf56",medal_military:"\ud83c\udf96",medal_sports:"\ud83c\udfc5",mega:"\ud83d\udce3",melon:"\ud83c\udf48",memo:"\ud83d\udcdd",men_wrestling:"\ud83e\udd3c&zwj;\u2642\ufe0f",menorah:"\ud83d\udd4e",mens:"\ud83d\udeb9",metal:"\ud83e\udd18",metro:"\ud83d\ude87",microphone:"\ud83c\udfa4",microscope:"\ud83d\udd2c",milk_glass:"\ud83e\udd5b",milky_way:"\ud83c\udf0c",minibus:"\ud83d\ude90",minidisc:"\ud83d\udcbd",mobile_phone_off:"\ud83d\udcf4",money_mouth_face:"\ud83e\udd11",money_with_wings:"\ud83d\udcb8",moneybag:"\ud83d\udcb0",monkey:"\ud83d\udc12",monkey_face:"\ud83d\udc35",monorail:"\ud83d\ude9d",moon:"\ud83c\udf14",mortar_board:"\ud83c\udf93",mosque:"\ud83d\udd4c",motor_boat:"\ud83d\udee5",motor_scooter:"\ud83d\udef5",motorcycle:"\ud83c\udfcd",motorway:"\ud83d\udee3",mount_fuji:"\ud83d\uddfb",mountain:"\u26f0",mountain_biking_man:"\ud83d\udeb5",mountain_biking_woman:"\ud83d\udeb5&zwj;\u2640\ufe0f",mountain_cableway:"\ud83d\udea0",mountain_railway:"\ud83d\ude9e",mountain_snow:"\ud83c\udfd4",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",movie_camera:"\ud83c\udfa5",moyai:"\ud83d\uddff",mrs_claus:"\ud83e\udd36",muscle:"\ud83d\udcaa",mushroom:"\ud83c\udf44",musical_keyboard:"\ud83c\udfb9",musical_note:"\ud83c\udfb5",musical_score:"\ud83c\udfbc",mute:"\ud83d\udd07",nail_care:"\ud83d\udc85",name_badge:"\ud83d\udcdb",national_park:"\ud83c\udfde",nauseated_face:"\ud83e\udd22",necktie:"\ud83d\udc54",negative_squared_cross_mark:"\u274e",nerd_face:"\ud83e\udd13",neutral_face:"\ud83d\ude10","new":"\ud83c\udd95",new_moon:"\ud83c\udf11",new_moon_with_face:"\ud83c\udf1a",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde",next_track_button:"\u23ed",ng:"\ud83c\udd96",no_good_man:"\ud83d\ude45&zwj;\u2642\ufe0f",no_good_woman:"\ud83d\ude45",night_with_stars:"\ud83c\udf03",no_bell:"\ud83d\udd15",no_bicycles:"\ud83d\udeb3",no_entry:"\u26d4\ufe0f",no_entry_sign:"\ud83d\udeab",no_mobile_phones:"\ud83d\udcf5",no_mouth:"\ud83d\ude36",no_pedestrians:"\ud83d\udeb7",no_smoking:"\ud83d\udead","non-potable_water":"\ud83d\udeb1",nose:"\ud83d\udc43",notebook:"\ud83d\udcd3",notebook_with_decorative_cover:"\ud83d\udcd4",notes:"\ud83c\udfb6",nut_and_bolt:"\ud83d\udd29",o:"\u2b55\ufe0f",o2:"\ud83c\udd7e\ufe0f",ocean:"\ud83c\udf0a",octopus:"\ud83d\udc19",oden:"\ud83c\udf62",office:"\ud83c\udfe2",oil_drum:"\ud83d\udee2",ok:"\ud83c\udd97",ok_hand:"\ud83d\udc4c",ok_man:"\ud83d\ude46&zwj;\u2642\ufe0f",ok_woman:"\ud83d\ude46",old_key:"\ud83d\udddd",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",om:"\ud83d\udd49",on:"\ud83d\udd1b",oncoming_automobile:"\ud83d\ude98",oncoming_bus:"\ud83d\ude8d",oncoming_police_car:"\ud83d\ude94",oncoming_taxi:"\ud83d\ude96",open_file_folder:"\ud83d\udcc2",open_hands:"\ud83d\udc50",open_mouth:"\ud83d\ude2e",open_umbrella:"\u2602\ufe0f",ophiuchus:"\u26ce",orange_book:"\ud83d\udcd9",orthodox_cross:"\u2626\ufe0f",outbox_tray:"\ud83d\udce4",owl:"\ud83e\udd89",ox:"\ud83d\udc02","package":"\ud83d\udce6",page_facing_up:"\ud83d\udcc4",page_with_curl:"\ud83d\udcc3",pager:"\ud83d\udcdf",paintbrush:"\ud83d\udd8c",palm_tree:"\ud83c\udf34",pancakes:"\ud83e\udd5e",panda_face:"\ud83d\udc3c",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87",parasol_on_ground:"\u26f1",parking:"\ud83c\udd7f\ufe0f",part_alternation_mark:"\u303d\ufe0f",partly_sunny:"\u26c5\ufe0f",passenger_ship:"\ud83d\udef3",passport_control:"\ud83d\udec2",pause_button:"\u23f8",peace_symbol:"\u262e\ufe0f",peach:"\ud83c\udf51",peanuts:"\ud83e\udd5c",pear:"\ud83c\udf50",pen:"\ud83d\udd8a",pencil2:"\u270f\ufe0f",penguin:"\ud83d\udc27",pensive:"\ud83d\ude14",performing_arts:"\ud83c\udfad",persevere:"\ud83d\ude23",person_fencing:"\ud83e\udd3a",pouting_woman:"\ud83d\ude4e",phone:"\u260e\ufe0f",pick:"\u26cf",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",pig_nose:"\ud83d\udc3d",pill:"\ud83d\udc8a",pineapple:"\ud83c\udf4d",ping_pong:"\ud83c\udfd3",pisces:"\u2653\ufe0f",pizza:"\ud83c\udf55",place_of_worship:"\ud83d\uded0",plate_with_cutlery:"\ud83c\udf7d",play_or_pause_button:"\u23ef",point_down:"\ud83d\udc47",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up:"\u261d\ufe0f",point_up_2:"\ud83d\udc46",police_car:"\ud83d\ude93",policewoman:"\ud83d\udc6e&zwj;\u2640\ufe0f",poodle:"\ud83d\udc29",popcorn:"\ud83c\udf7f",post_office:"\ud83c\udfe3",postal_horn:"\ud83d\udcef",postbox:"\ud83d\udcee",potable_water:"\ud83d\udeb0",potato:"\ud83e\udd54",pouch:"\ud83d\udc5d",poultry_leg:"\ud83c\udf57",pound:"\ud83d\udcb7",rage:"\ud83d\ude21",pouting_cat:"\ud83d\ude3e",pouting_man:"\ud83d\ude4e&zwj;\u2642\ufe0f",pray:"\ud83d\ude4f",prayer_beads:"\ud83d\udcff",pregnant_woman:"\ud83e\udd30",previous_track_button:"\u23ee",prince:"\ud83e\udd34",princess:"\ud83d\udc78",printer:"\ud83d\udda8",purple_heart:"\ud83d\udc9c",purse:"\ud83d\udc5b",pushpin:"\ud83d\udccc",put_litter_in_its_place:"\ud83d\udeae",question:"\u2753",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",racehorse:"\ud83d\udc0e",racing_car:"\ud83c\udfce",radio:"\ud83d\udcfb",radio_button:"\ud83d\udd18",radioactive:"\u2622\ufe0f",railway_car:"\ud83d\ude83",railway_track:"\ud83d\udee4",rainbow:"\ud83c\udf08",rainbow_flag:"\ud83c\udff3\ufe0f&zwj;\ud83c\udf08",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90",raised_hands:"\ud83d\ude4c",raising_hand_woman:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b&zwj;\u2642\ufe0f",ram:"\ud83d\udc0f",ramen:"\ud83c\udf5c",rat:"\ud83d\udc00",record_button:"\u23fa",recycle:"\u267b\ufe0f",red_circle:"\ud83d\udd34",registered:"\xae\ufe0f",relaxed:"\u263a\ufe0f",relieved:"\ud83d\ude0c",reminder_ribbon:"\ud83c\udf97",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",rescue_worker_helmet:"\u26d1",restroom:"\ud83d\udebb",revolving_hearts:"\ud83d\udc9e",rewind:"\u23ea",rhinoceros:"\ud83e\udd8f",ribbon:"\ud83c\udf80",rice:"\ud83c\udf5a",rice_ball:"\ud83c\udf59",rice_cracker:"\ud83c\udf58",rice_scene:"\ud83c\udf91",right_anger_bubble:"\ud83d\uddef",ring:"\ud83d\udc8d",robot:"\ud83e\udd16",rocket:"\ud83d\ude80",rofl:"\ud83e\udd23",roll_eyes:"\ud83d\ude44",roller_coaster:"\ud83c\udfa2",rooster:"\ud83d\udc13",rose:"\ud83c\udf39",rosette:"\ud83c\udff5",rotating_light:"\ud83d\udea8",round_pushpin:"\ud83d\udccd",rowing_man:"\ud83d\udea3",rowing_woman:"\ud83d\udea3&zwj;\u2640\ufe0f",rugby_football:"\ud83c\udfc9",running_man:"\ud83c\udfc3",running_shirt_with_sash:"\ud83c\udfbd",running_woman:"\ud83c\udfc3&zwj;\u2640\ufe0f",sa:"\ud83c\ude02\ufe0f",sagittarius:"\u2650\ufe0f",sake:"\ud83c\udf76",sandal:"\ud83d\udc61",santa:"\ud83c\udf85",satellite:"\ud83d\udce1",saxophone:"\ud83c\udfb7",school:"\ud83c\udfeb",school_satchel:"\ud83c\udf92",scissors:"\u2702\ufe0f",scorpion:"\ud83e\udd82",scorpius:"\u264f\ufe0f",scream:"\ud83d\ude31",scream_cat:"\ud83d\ude40",scroll:"\ud83d\udcdc",seat:"\ud83d\udcba",secret:"\u3299\ufe0f",see_no_evil:"\ud83d\ude48",seedling:"\ud83c\udf31",selfie:"\ud83e\udd33",shallow_pan_of_food:"\ud83e\udd58",shamrock:"\u2618\ufe0f",shark:"\ud83e\udd88",shaved_ice:"\ud83c\udf67",sheep:"\ud83d\udc11",shell:"\ud83d\udc1a",shield:"\ud83d\udee1",shinto_shrine:"\u26e9",ship:"\ud83d\udea2",shirt:"\ud83d\udc55",shopping:"\ud83d\udecd",shopping_cart:"\ud83d\uded2",shower:"\ud83d\udebf",shrimp:"\ud83e\udd90",signal_strength:"\ud83d\udcf6",six_pointed_star:"\ud83d\udd2f",ski:"\ud83c\udfbf",skier:"\u26f7",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",sleeping:"\ud83d\ude34",sleeping_bed:"\ud83d\udecc",sleepy:"\ud83d\ude2a",slightly_frowning_face:"\ud83d\ude41",slightly_smiling_face:"\ud83d\ude42",slot_machine:"\ud83c\udfb0",small_airplane:"\ud83d\udee9",small_blue_diamond:"\ud83d\udd39",small_orange_diamond:"\ud83d\udd38",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",smile:"\ud83d\ude04",smile_cat:"\ud83d\ude38",smiley:"\ud83d\ude03",smiley_cat:"\ud83d\ude3a",smiling_imp:"\ud83d\ude08",smirk:"\ud83d\ude0f",smirk_cat:"\ud83d\ude3c",smoking:"\ud83d\udeac",snail:"\ud83d\udc0c",snake:"\ud83d\udc0d",sneezing_face:"\ud83e\udd27",snowboarder:"\ud83c\udfc2",snowflake:"\u2744\ufe0f",snowman:"\u26c4\ufe0f",snowman_with_snow:"\u2603\ufe0f",sob:"\ud83d\ude2d",soccer:"\u26bd\ufe0f",soon:"\ud83d\udd1c",sos:"\ud83c\udd98",sound:"\ud83d\udd09",space_invader:"\ud83d\udc7e",spades:"\u2660\ufe0f",spaghetti:"\ud83c\udf5d",sparkle:"\u2747\ufe0f",sparkler:"\ud83c\udf87",sparkles:"\u2728",sparkling_heart:"\ud83d\udc96",speak_no_evil:"\ud83d\ude4a",speaker:"\ud83d\udd08",speaking_head:"\ud83d\udde3",speech_balloon:"\ud83d\udcac",speedboat:"\ud83d\udea4",spider:"\ud83d\udd77",spider_web:"\ud83d\udd78",spiral_calendar:"\ud83d\uddd3",spiral_notepad:"\ud83d\uddd2",spoon:"\ud83e\udd44",squid:"\ud83e\udd91",stadium:"\ud83c\udfdf",star:"\u2b50\ufe0f",star2:"\ud83c\udf1f",star_and_crescent:"\u262a\ufe0f",star_of_david:"\u2721\ufe0f",stars:"\ud83c\udf20",station:"\ud83d\ude89",statue_of_liberty:"\ud83d\uddfd",steam_locomotive:"\ud83d\ude82",stew:"\ud83c\udf72",stop_button:"\u23f9",stop_sign:"\ud83d\uded1",stopwatch:"\u23f1",straight_ruler:"\ud83d\udccf",strawberry:"\ud83c\udf53",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",stuck_out_tongue_winking_eye:"\ud83d\ude1c",studio_microphone:"\ud83c\udf99",stuffed_flatbread:"\ud83e\udd59",sun_behind_large_cloud:"\ud83c\udf25",sun_behind_rain_cloud:"\ud83c\udf26",sun_behind_small_cloud:"\ud83c\udf24",sun_with_face:"\ud83c\udf1e",sunflower:"\ud83c\udf3b",sunglasses:"\ud83d\ude0e",sunny:"\u2600\ufe0f",sunrise:"\ud83c\udf05",sunrise_over_mountains:"\ud83c\udf04",surfing_man:"\ud83c\udfc4",surfing_woman:"\ud83c\udfc4&zwj;\u2640\ufe0f",sushi:"\ud83c\udf63",suspension_railway:"\ud83d\ude9f",sweat:"\ud83d\ude13",sweat_drops:"\ud83d\udca6",sweat_smile:"\ud83d\ude05",sweet_potato:"\ud83c\udf60",swimming_man:"\ud83c\udfca",swimming_woman:"\ud83c\udfca&zwj;\u2640\ufe0f",symbols:"\ud83d\udd23",synagogue:"\ud83d\udd4d",syringe:"\ud83d\udc89",taco:"\ud83c\udf2e",tada:"\ud83c\udf89",tanabata_tree:"\ud83c\udf8b",taurus:"\u2649\ufe0f",taxi:"\ud83d\ude95",tea:"\ud83c\udf75",telephone_receiver:"\ud83d\udcde",telescope:"\ud83d\udd2d",tennis:"\ud83c\udfbe",tent:"\u26fa\ufe0f",thermometer:"\ud83c\udf21",thinking:"\ud83e\udd14",thought_balloon:"\ud83d\udcad",ticket:"\ud83c\udfab",tickets:"\ud83c\udf9f",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",timer_clock:"\u23f2",tipping_hand_man:"\ud83d\udc81&zwj;\u2642\ufe0f",tired_face:"\ud83d\ude2b",tm:"\u2122\ufe0f",toilet:"\ud83d\udebd",tokyo_tower:"\ud83d\uddfc",tomato:"\ud83c\udf45",tongue:"\ud83d\udc45",top:"\ud83d\udd1d",tophat:"\ud83c\udfa9",tornado:"\ud83c\udf2a",trackball:"\ud83d\uddb2",tractor:"\ud83d\ude9c",traffic_light:"\ud83d\udea5",train:"\ud83d\ude8b",train2:"\ud83d\ude86",tram:"\ud83d\ude8a",triangular_flag_on_post:"\ud83d\udea9",triangular_ruler:"\ud83d\udcd0",trident:"\ud83d\udd31",triumph:"\ud83d\ude24",trolleybus:"\ud83d\ude8e",trophy:"\ud83c\udfc6",tropical_drink:"\ud83c\udf79",tropical_fish:"\ud83d\udc20",truck:"\ud83d\ude9a",trumpet:"\ud83c\udfba",tulip:"\ud83c\udf37",tumbler_glass:"\ud83e\udd43",turkey:"\ud83e\udd83",turtle:"\ud83d\udc22",tv:"\ud83d\udcfa",twisted_rightwards_arrows:"\ud83d\udd00",two_hearts:"\ud83d\udc95",two_men_holding_hands:"\ud83d\udc6c",two_women_holding_hands:"\ud83d\udc6d",u5272:"\ud83c\ude39",u5408:"\ud83c\ude34",u55b6:"\ud83c\ude3a",u6307:"\ud83c\ude2f\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6e80:"\ud83c\ude35",u7121:"\ud83c\ude1a\ufe0f",u7533:"\ud83c\ude38",u7981:"\ud83c\ude32",u7a7a:"\ud83c\ude33",umbrella:"\u2614\ufe0f",unamused:"\ud83d\ude12",underage:"\ud83d\udd1e",unicorn:"\ud83e\udd84",unlock:"\ud83d\udd13",up:"\ud83c\udd99",upside_down_face:"\ud83d\ude43",v:"\u270c\ufe0f",vertical_traffic_light:"\ud83d\udea6",vhs:"\ud83d\udcfc",vibration_mode:"\ud83d\udcf3",video_camera:"\ud83d\udcf9",video_game:"\ud83c\udfae",violin:"\ud83c\udfbb",virgo:"\u264d\ufe0f",volcano:"\ud83c\udf0b",volleyball:"\ud83c\udfd0",vs:"\ud83c\udd9a",vulcan_salute:"\ud83d\udd96",walking_man:"\ud83d\udeb6",walking_woman:"\ud83d\udeb6&zwj;\u2640\ufe0f",waning_crescent_moon:"\ud83c\udf18",waning_gibbous_moon:"\ud83c\udf16",warning:"\u26a0\ufe0f",wastebasket:"\ud83d\uddd1",watch:"\u231a\ufe0f",water_buffalo:"\ud83d\udc03",watermelon:"\ud83c\udf49",wave:"\ud83d\udc4b",wavy_dash:"\u3030\ufe0f",waxing_crescent_moon:"\ud83c\udf12",wc:"\ud83d\udebe",weary:"\ud83d\ude29",wedding:"\ud83d\udc92",weight_lifting_man:"\ud83c\udfcb\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f&zwj;\u2640\ufe0f",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",wheel_of_dharma:"\u2638\ufe0f",wheelchair:"\u267f\ufe0f",white_check_mark:"\u2705",white_circle:"\u26aa\ufe0f",white_flag:"\ud83c\udff3\ufe0f",white_flower:"\ud83d\udcae",white_large_square:"\u2b1c\ufe0f",white_medium_small_square:"\u25fd\ufe0f",white_medium_square:"\u25fb\ufe0f",white_small_square:"\u25ab\ufe0f",white_square_button:"\ud83d\udd33",wilted_flower:"\ud83e\udd40",wind_chime:"\ud83c\udf90",wind_face:"\ud83c\udf2c",wine_glass:"\ud83c\udf77",wink:"\ud83d\ude09",wolf:"\ud83d\udc3a",woman:"\ud83d\udc69",woman_artist:"\ud83d\udc69&zwj;\ud83c\udfa8",woman_astronaut:"\ud83d\udc69&zwj;\ud83d\ude80",woman_cartwheeling:"\ud83e\udd38&zwj;\u2640\ufe0f",woman_cook:"\ud83d\udc69&zwj;\ud83c\udf73",woman_facepalming:"\ud83e\udd26&zwj;\u2640\ufe0f",woman_factory_worker:"\ud83d\udc69&zwj;\ud83c\udfed",woman_farmer:"\ud83d\udc69&zwj;\ud83c\udf3e",woman_firefighter:"\ud83d\udc69&zwj;\ud83d\ude92",woman_health_worker:"\ud83d\udc69&zwj;\u2695\ufe0f",woman_judge:"\ud83d\udc69&zwj;\u2696\ufe0f",woman_juggling:"\ud83e\udd39&zwj;\u2640\ufe0f",woman_mechanic:"\ud83d\udc69&zwj;\ud83d\udd27",woman_office_worker:"\ud83d\udc69&zwj;\ud83d\udcbc",woman_pilot:"\ud83d\udc69&zwj;\u2708\ufe0f",woman_playing_handball:"\ud83e\udd3e&zwj;\u2640\ufe0f",woman_playing_water_polo:"\ud83e\udd3d&zwj;\u2640\ufe0f",woman_scientist:"\ud83d\udc69&zwj;\ud83d\udd2c",woman_shrugging:"\ud83e\udd37&zwj;\u2640\ufe0f",woman_singer:"\ud83d\udc69&zwj;\ud83c\udfa4",woman_student:"\ud83d\udc69&zwj;\ud83c\udf93",woman_teacher:"\ud83d\udc69&zwj;\ud83c\udfeb",woman_technologist:"\ud83d\udc69&zwj;\ud83d\udcbb",woman_with_turban:"\ud83d\udc73&zwj;\u2640\ufe0f",womans_clothes:"\ud83d\udc5a",womans_hat:"\ud83d\udc52",women_wrestling:"\ud83e\udd3c&zwj;\u2640\ufe0f",womens:"\ud83d\udeba",world_map:"\ud83d\uddfa",worried:"\ud83d\ude1f",wrench:"\ud83d\udd27",writing_hand:"\u270d\ufe0f",x:"\u274c",yellow_heart:"\ud83d\udc9b",yen:"\ud83d\udcb4",yin_yang:"\u262f\ufe0f",yum:"\ud83d\ude0b",zap:"\u26a1\ufe0f",zipper_mouth_face:"\ud83e\udd10",zzz:"\ud83d\udca4",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},y.Converter=function(a){var r={},o=[],s=[],l={},n=g,i={parsed:{},raw:"",format:""};function c(e,t){if(t=t||null,y.helper.isString(e)){if(t=e=y.helper.stdExtName(e),y.extensions[e])return void function i(e,t){"function"==typeof e&&(e=e(new y.Converter));y.helper.isArray(e)||(e=[e]);var a=m(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n<e.length;++n)switch(e[n].type){case"lang":o.push(e[n]);break;case"output":s.push(e[n]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(y.extensions[e],e);if(y.helper.isUndefined(p[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=p[e]}"function"==typeof e&&(e=e()),y.helper.isArray(e)||(e=[e]);var a=m(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n<e.length;++n){switch(e[n].type){case"lang":o.push(e[n]);break;case"output":s.push(e[n])}if(e[n].hasOwnProperty("listeners"))for(var r in e[n].listeners)e[n].listeners.hasOwnProperty(r)&&d(r,e[n].listeners[r])}}function d(e,t){if(!y.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+kt(e)+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+kt(t)+" given");l.hasOwnProperty(e)||(l[e]=[]),l[e].push(t)}!function f(){for(var e in a=a||{},u)u.hasOwnProperty(e)&&(r[e]=u[e]);{if("object"!==kt(a))throw Error("Converter expects the passed parameter to be an object, but "+kt(a)+" was passed instead.");for(var t in a)a.hasOwnProperty(t)&&(r[t]=a[t])}r.extensions&&y.helper.forEach(r.extensions,c)}(),this._dispatch=function(e,t,a,n){if(l.hasOwnProperty(e))for(var r=0;r<l[e].length;++r){var i=l[e][r](e,t,this,a,n);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return d(e,t),this},this.makeHtml=function(t){if(!t)return t;var a={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:o,outputModifiers:s,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return t=(t=(t=(t=(t=t.replace(/\xa8/g,"\xa8T")).replace(/\$/g,"\xa8D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),r.smartIndentationFix&&(t=function n(e){var t=e.match(/^\s*/)[0].length,a=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(a,"")}(t)),t="\n\n"+t+"\n\n",t=(t=y.subParser("detab")(t,r,a)).replace(/^[ \t]+$/gm,""),y.helper.forEach(o,function(e){t=y.subParser("runExtension")(e,t,r,a)}),t=y.subParser("metadata")(t,r,a),t=y.subParser("hashPreCodeTags")(t,r,a),t=y.subParser("githubCodeBlocks")(t,r,a),t=y.subParser("hashHTMLBlocks")(t,r,a),t=y.subParser("hashCodeTags")(t,r,a),t=y.subParser("stripLinkDefinitions")(t,r,a),t=y.subParser("blockGamut")(t,r,a),t=y.subParser("unhashHTMLSpans")(t,r,a),t=(t=(t=y.subParser("unescapeSpecialChars")(t,r,a)).replace(/\xa8D/g,"$$")).replace(/\xa8T/g,"\xa8"),t=y.subParser("completeHTMLDocument")(t,r,a),y.helper.forEach(s,function(e){t=y.subParser("runExtension")(e,t,r,a)}),i=a.metadata,t},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">\xa8NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var a=t.createElement("div");a.innerHTML=e;var n={preList:function c(e){for(var t=e.querySelectorAll("pre"),a=[],n=0;n<t.length;++n)if(1===t[n].childElementCount&&"code"===t[n].firstChild.tagName.toLowerCase()){var r=t[n].firstChild.innerHTML.trim(),i=t[n].firstChild.getAttribute("data-language")||"";if(""===i)for(var o=t[n].firstChild.className.split(" "),s=0;s<o.length;++s){var l=o[s].match(/^language-(.+)$/);if(null!==l){i=l[1];break}}r=y.helper.unescapeHTMLEntities(r),a.push(r),t[n].outerHTML='<precode language="'+i+'" precodenum="'+n.toString()+'"></precode>'}else a.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return a}(a)};!function s(e){for(var t=0;t<e.childNodes.length;++t){var a=e.childNodes[t];3===a.nodeType?/\S/.test(a.nodeValue)?(a.nodeValue=a.nodeValue.split("\n").join(" "),a.nodeValue=a.nodeValue.replace(/(\s)+/g,"$1")):(e.removeChild(a),--t):1===a.nodeType&&s(a)}}(a);for(var r=a.childNodes,i="",o=0;o<r.length;o++)i+=y.subParser("makeMarkdown.node")(r[o],n);return i},this.setOption=function(e,t){r[e]=t},this.getOption=function(e){return r[e]},this.getOptions=function(){return r},this.addExtension=function(e,t){c(e,t=t||null)},this.useExtension=function(e){c(e)},this.setFlavor=function(e){if(!h.hasOwnProperty(e))throw Error(e+" flavor was not found");var t=h[e];for(var a in n=e,t)t.hasOwnProperty(a)&&(r[a]=t[a])},this.getFlavor=function(){return n},this.removeExtension=function(e){y.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var a=e[t],n=0;n<o.length;++n)o[n]===a&&o[n].splice(n,1);for(;0<s.length;++n)s[0]===a&&s[0].splice(n,1)}},this.getAllExtensions=function(){return{language:o,output:s}},this.getMetadata=function(e){return e?i.raw:i.parsed},this.getMetadataFormat=function(){return i.format},this._setMetadataPair=function(e,t){i.parsed[e]=t},this._setMetadataFormat=function(e){i.format=e},this._setMetadataRaw=function(e){i.raw=e}},y.subParser("anchors",function(e,l,c){var d=function d(e,t,a,n,r,i,o){if(y.helper.isUndefined(o)&&(o=""),a=a.toLowerCase(),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))n="";else if(!n){if(a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,y.helper.isUndefined(c.gUrls[a]))return e;n=c.gUrls[a],y.helper.isUndefined(c.gTitles[a])||(o=c.gTitles[a])}var s='<a href="'+(n=n.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"';return""!==o&&null!==o&&(s+=' title="'+(o=(o=o.replace(/"/g,"&quot;")).replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"'),l.openLinksInNewWindow&&!/^#/.test(n)&&(s+=' rel="noopener noreferrer" target="\xa8E95Eblank"'),s+=">"+t+"</a>"};return e=(e=(e=(e=(e=c.converter._dispatch("anchors.before",e,l,c)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,d)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d)).replace(/\[([^\[\]]+)]()()()()()/g,d),l.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,t,a,n,r){if("\\"===a)return t+n;if(!y.helper.isString(l.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var i=l.ghMentionsLink.replace(/\{u}/g,r),o="";return l.openLinksInNewWindow&&(o=' rel="noopener noreferrer" target="\xa8E95Eblank"'),t+'<a href="'+i+'"'+o+">"+n+"</a>"})),e=c.converter._dispatch("anchors.after",e,l,c)});var r=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,s=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,l=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,c=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,d=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,f=function f(p){return function(e,t,a,n,r,i,o){var s=a=a.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback),l="",c="",d=t||"",f=o||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),p.excludeTrailingPunctuationFromURLs&&i&&(l=i),p.openLinksInNewWindow&&(c=' rel="noopener noreferrer" target="\xa8E95Eblank"'),d+'<a href="'+a+'"'+c+">"+s+"</a>"+l+f}},b=function b(r,i){return function(e,t,a){var n="mailto:";return t=t||"",a=y.subParser("unescapeSpecialChars")(a,r,i),r.encodeEmails?(n=y.helper.encodeEmailAddress(n+a),a=y.helper.encodeEmailAddress(a)):n+=a,t+'<a href="'+n+'">'+a+"</a>"}};y.subParser("autoLinks",function(e,t,a){return e=(e=(e=a.converter._dispatch("autoLinks.before",e,t,a)).replace(l,f(t))).replace(d,b(t,a)),e=a.converter._dispatch("autoLinks.after",e,t,a)}),y.subParser("simplifiedAutoLinks",function(e,t,a){return t.simplifiedAutoLink?(e=a.converter._dispatch("simplifiedAutoLinks.before",e,t,a),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(s,f(t)):e.replace(r,f(t))).replace(c,b(t,a)),e=a.converter._dispatch("simplifiedAutoLinks.after",e,t,a)):e}),y.subParser("blockGamut",function(e,t,a){return e=a.converter._dispatch("blockGamut.before",e,t,a),e=y.subParser("blockQuotes")(e,t,a),e=y.subParser("headers")(e,t,a),e=y.subParser("horizontalRule")(e,t,a),e=y.subParser("lists")(e,t,a),e=y.subParser("codeBlocks")(e,t,a),e=y.subParser("tables")(e,t,a),e=y.subParser("hashHTMLBlocks")(e,t,a),e=y.subParser("paragraphs")(e,t,a),e=a.converter._dispatch("blockGamut.after",e,t,a)}),y.subParser("blockQuotes",function(e,t,a){e=a.converter._dispatch("blockQuotes.before",e,t,a),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/\xa80/g,"")).replace(/^[ \t]+$/gm,""),e=y.subParser("githubCodeBlocks")(e,t,a),e=(e=(e=y.subParser("blockGamut")(e,t,a)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,t){var a=t;return a=(a=a.replace(/^ {2}/gm,"\xa80")).replace(/\xa80/g,"")}),y.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,a)}),e=a.converter._dispatch("blockQuotes.after",e,t,a)}),y.subParser("codeBlocks",function(e,o,s){e=s.converter._dispatch("codeBlocks.before",e,o,s);return e=(e=(e+="\xa80").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=\xa80))/g,function(e,t,a){var n=t,r=a,i="\n";return n=y.subParser("outdent")(n,o,s),n=y.subParser("encodeCode")(n,o,s),n=(n=(n=y.subParser("detab")(n,o,s)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o.omitExtraWLInCodeBlocks&&(i=""),n="<pre><code>"+n+i+"</code></pre>",y.subParser("hashBlock")(n,o,s)+r})).replace(/\xa80/,""),e=s.converter._dispatch("codeBlocks.after",e,o,s)}),y.subParser("codeSpans",function(e,i,o){return void 0===(e=o.converter._dispatch("codeSpans.before",e,i,o))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,a,n){var r=n;return r=(r=r.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),r=t+"<code>"+(r=y.subParser("encodeCode")(r,i,o))+"</code>",r=y.subParser("hashHTMLSpans")(r,i,o)}),e=o.converter._dispatch("codeSpans.after",e,i,o)}),y.subParser("completeHTMLDocument",function(e,t,a){if(!t.completeHTMLDocument)return e;e=a.converter._dispatch("completeHTMLDocument.before",e,t,a);var n="html",r="<!DOCTYPE HTML>\n",i="",o='<meta charset="utf-8">\n',s="",l="";for(var c in"undefined"!=typeof a.metadata.parsed.doctype&&(r="<!DOCTYPE "+a.metadata.parsed.doctype+">\n","html"!==(n=a.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='<meta charset="utf-8">')),a.metadata.parsed)if(a.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i="<title>"+a.metadata.parsed.title+"</title>\n";break;case"charset":o="html"===n||"html5"===n?'<meta charset="'+a.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+a.metadata.parsed.charset+'">\n';break;case"language":case"lang":s=' lang="'+a.metadata.parsed[c]+'"',l+='<meta name="'+c+'" content="'+a.metadata.parsed[c]+'">\n';break;default:l+='<meta name="'+c+'" content="'+a.metadata.parsed[c]+'">\n'}return e=r+"<html"+s+">\n<head>\n"+i+o+l+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",e=a.converter._dispatch("completeHTMLDocument.after",e,t,a)}),y.subParser("detab",function(e,t,a){return e=(e=(e=(e=(e=(e=a.converter._dispatch("detab.before",e,t,a)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"\xa8A\xa8B")).replace(/\xa8B(.+?)\xa8A/g,function(e,t){for(var a=t,n=4-a.length%4,r=0;r<n;r++)a+=" ";return a})).replace(/\xa8A/g," ")).replace(/\xa8B/g,""),e=a.converter._dispatch("detab.after",e,t,a)}),y.subParser("ellipsis",function(e,t,a){return e=(e=a.converter._dispatch("ellipsis.before",e,t,a)).replace(/\.\.\./g,"\u2026"),e=a.converter._dispatch("ellipsis.after",e,t,a)}),y.subParser("emoji",function(e,t,a){if(!t.emoji)return e;return e=(e=a.converter._dispatch("emoji.before",e,t,a)).replace(/:([\S]+?):/g,function(e,t){return y.helper.emojis.hasOwnProperty(t)?y.helper.emojis[t]:e}),e=a.converter._dispatch("emoji.after",e,t,a)}),y.subParser("encodeAmpsAndAngles",function(e,t,a){return e=(e=(e=(e=(e=a.converter._dispatch("encodeAmpsAndAngles.before",e,t,a)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),e=a.converter._dispatch("encodeAmpsAndAngles.after",e,t,a)}),y.subParser("encodeBackslashEscapes",function(e,t,a){return e=(e=(e=a.converter._dispatch("encodeBackslashEscapes.before",e,t,a)).replace(/\\(\\)/g,y.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeBackslashEscapes.after",e,t,a)}),y.subParser("encodeCode",function(e,t,a){return e=(e=a.converter._dispatch("encodeCode.before",e,t,a)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeCode.after",e,t,a)}),y.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,a){return e=(e=(e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,a)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)})).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)}),e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,a)}),y.subParser("githubCodeBlocks",function(e,i,o){return i.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,i,o),e=(e=(e+="\xa80").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,t,a,n){var r=i.omitExtraWLInCodeBlocks?"":"\n";return n=y.subParser("encodeCode")(n,i,o),n="<pre><code"+(a?' class="'+a+" language-"+a+'"':"")+">"+(n=(n=(n=y.subParser("detab")(n,i,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+r+"</code></pre>",n=y.subParser("hashBlock")(n,i,o),"\n\n\xa8G"+(o.ghCodeBlocks.push({text:e,codeblock:n})-1)+"G\n\n"})).replace(/\xa80/,""),o.converter._dispatch("githubCodeBlocks.after",e,i,o)):e}),y.subParser("hashBlock",function(e,t,a){return e=(e=a.converter._dispatch("hashBlock.before",e,t,a)).replace(/(^\n+|\n+$)/g,""),e="\n\n\xa8K"+(a.gHtmlBlocks.push(e)-1)+"K\n\n",e=a.converter._dispatch("hashBlock.after",e,t,a)}),y.subParser("hashCodeTags",function(e,i,o){e=o.converter._dispatch("hashCodeTags.before",e,i,o);var s=function s(e,t,a,n){var r=a+y.subParser("encodeCode")(t,i,o)+n;return"\xa8C"+(o.gHtmlSpans.push(r)-1)+"C"};return e=y.helper.replaceRecursiveRegExp(e,s,"<code\\b[^>]*>","</code>","gim"),e=o.converter._dispatch("hashCodeTags.after",e,i,o)}),y.subParser("hashElement",function(e,t,n){return function(e,t){var a=t;return a=(a=(a=a.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),a="\n\n\xa8K"+(n.gHtmlBlocks.push(a)-1)+"K\n\n"}}),y.subParser("hashHTMLBlocks",function(e,t,i){e=i.converter._dispatch("hashHTMLBlocks.before",e,t,i);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function o(e,t,a,n){var r=e;return-1!==a.search(/\bmarkdown\b/)&&(r=a+i.converter.makeHtml(t)+n),"\n\n\xa8K"+(i.gHtmlBlocks.push(r)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"&lt;"+t+"&gt;"}));for(var n=0;n<a.length;++n)for(var r,s=new RegExp("^ {0,3}(<"+a[n]+"\\b[^>]*>)","im"),l="<"+a[n]+"\\b[^>]*>",c="</"+a[n]+">";-1!==(r=y.helper.regexIndexOf(e,s));){var d=y.helper.splitAtIndex(e,r),f=y.helper.replaceRecursiveRegExp(d[1],o,l,c,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,t,i)),e=(e=y.helper.replaceRecursiveRegExp(e,function(e){return"\n\n\xa8K"+(i.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,t,i)),e=i.converter._dispatch("hashHTMLBlocks.after",e,t,i)}),y.subParser("hashHTMLSpans",function(e,t,a){function n(e){return"\xa8C"+(a.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=a.converter._dispatch("hashHTMLSpans.before",e,t,a)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=a.converter._dispatch("hashHTMLSpans.after",e,t,a)}),y.subParser("unhashHTMLSpans",function(e,t,a){e=a.converter._dispatch("unhashHTMLSpans.before",e,t,a);for(var n=0;n<a.gHtmlSpans.length;++n){for(var r=a.gHtmlSpans[n],i=0;/\xa8C(\d+)C/.test(r);){var o=RegExp.$1;if(r=r.replace("\xa8C"+o+"C",a.gHtmlSpans[o]),10===i)break;++i}e=e.replace("\xa8C"+n+"C",r)}return e=a.converter._dispatch("unhashHTMLSpans.after",e,t,a)}),y.subParser("hashPreCodeTags",function(e,i,o){e=o.converter._dispatch("hashPreCodeTags.before",e,i,o);var s=function s(e,t,a,n){var r=a+y.subParser("encodeCode")(t,i,o)+n;return"\n\n\xa8G"+(o.ghCodeBlocks.push({text:e,codeblock:r})-1)+"G\n\n"};return e=y.helper.replaceRecursiveRegExp(e,s,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),e=o.converter._dispatch("hashPreCodeTags.after",e,i,o)}),y.subParser("headers",function(e,l,c){e=c.converter._dispatch("headers.before",e,l,c);var d=isNaN(parseInt(l.headerLevelStart))?1:parseInt(l.headerLevelStart),t=l.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=l.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(t,function(e,t){var a=y.subParser("spanGamut")(t,l,c),n=l.noHeaderId?"":' id="'+f(t)+'"',r="<h"+d+n+">"+a+"</h"+d+">";return y.subParser("hashBlock")(r,l,c)})).replace(a,function(e,t){var a=y.subParser("spanGamut")(t,l,c),n=l.noHeaderId?"":' id="'+f(t)+'"',r=d+1,i="<h"+r+n+">"+a+"</h"+r+">";return y.subParser("hashBlock")(i,l,c)});var n=l.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function f(e){var t,a;if(l.customizedHeaderId){var n=e.match(/\{([^{]+?)}\s*$/);n&&n[1]&&(e=n[1])}return t=e,a=y.helper.isString(l.prefixHeaderId)?l.prefixHeaderId:!0===l.prefixHeaderId?"section-":"",l.rawPrefixHeaderId||(t=a+t),t=l.ghCompatibleHeaderId?t.replace(/ /g,"-").replace(/&amp;/g,"").replace(/\xa8T/g,"").replace(/\xa8D/g,"").replace(/[&+$,\/:;=?@"#{}|^\xa8~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():l.rawHeaderId?t.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/\xa8T/g,"\xa8").replace(/\xa8D/g,"$").replace(/["']/g,"-").toLowerCase():t.replace(/[^\w]/g,"").toLowerCase(),l.rawPrefixHeaderId&&(t=a+t),c.hashLinkCounts[t]?t=t+"-"+c.hashLinkCounts[t]++:c.hashLinkCounts[t]=1,t}return e=e.replace(n,function(e,t,a){var n=a;l.customizedHeaderId&&(n=a.replace(/\s?\{([^{]+?)}\s*$/,""));var r=y.subParser("spanGamut")(n,l,c),i=l.noHeaderId?"":' id="'+f(a)+'"',o=d-1+t.length,s="<h"+o+i+">"+r+"</h"+o+">";return y.subParser("hashBlock")(s,l,c)}),e=c.converter._dispatch("headers.after",e,l,c)}),y.subParser("horizontalRule",function(e,t,a){e=a.converter._dispatch("horizontalRule.before",e,t,a);var n=y.subParser("hashBlock")("<hr />",t,a);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=a.converter._dispatch("horizontalRule.after",e,t,a)}),y.subParser("images",function(e,t,p){function l(e,t,a,n,r,i,o,s){var l=p.gUrls,c=p.gTitles,d=p.gDimensions;if(a=a.toLowerCase(),s||(s=""),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))n="";else if(""===n||null===n){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,y.helper.isUndefined(l[a]))return e;n=l[a],y.helper.isUndefined(c[a])||(s=c[a]),y.helper.isUndefined(d[a])||(r=d[a].width,i=d[a].height)}t=t.replace(/"/g,"&quot;").replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback);var f='<img src="'+(n=n.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'" alt="'+t+'"';return s&&y.helper.isString(s)&&(f+=' title="'+(s=s.replace(/"/g,"&quot;").replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"'),r&&i&&(f+=' width="'+(r="*"===r?"auto":r)+'"',f+=' height="'+(i="*"===i?"auto":i)+'"'),f+=" />"}return e=(e=(e=(e=(e=(e=p.converter._dispatch("images.before",e,t,p)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function c(e,t,a,n,r,i,o,s){return l(e,t,a,n=n.replace(/\s/g,""),r,i,0,s)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,l)).replace(/!\[([^\[\]]+)]()()()()()/g,l),e=p.converter._dispatch("images.after",e,t,p)}),y.subParser("italicsAndBold",function(e,t,a){function n(e,t,a){return t+e+a}return e=a.converter._dispatch("italicsAndBold.before",e,t,a),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return n(t,"<strong><em>","</em></strong>")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return n(t,"<strong>","</strong>")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return n(t,"<em>","</em>")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?n(t,"<strong><em>","</em></strong>"):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?n(t,"<strong>","</strong>"):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?n(t,"<em>","</em>"):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<strong><em>","</em></strong>")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<strong>","</strong>")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<em>","</em>")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"<strong><em>","</em></strong>"):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"<strong>","</strong>"):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?n(t,"<em>","</em>"):e}),e=a.converter._dispatch("italicsAndBold.after",e,t,a)}),y.subParser("lists",function(e,p,d){function u(e,t){d.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80| {0,3}([*+-]|\d+[.])[ \t]+))/gm,c=/\n[ \t]*\n(?!\xa80)/.test(e+="\xa80");return p.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,function(e,t,a,n,r,i,o){o=o&&""!==o.trim();var s=y.subParser("outdent")(r,p,d),l="";return i&&p.tasklists&&(l=' class="task-list-item" style="list-style-type: none;"',s=s.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return o&&(e+=" checked"),e+=">"})),s=s.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"\xa8A"+e}),s="<li"+l+">"+(s=(s=t||-1<s.search(/\n{2,}/)?(s=y.subParser("githubCodeBlocks")(s,p,d),y.subParser("blockGamut")(s,p,d)):(s=(s=y.subParser("lists")(s,p,d)).replace(/\n$/,""),s=(s=y.subParser("hashHTMLBlocks")(s,p,d)).replace(/\n\n+/g,"\n\n"),c?y.subParser("paragraphs")(s,p,d):y.subParser("spanGamut")(s,p,d))).replace("\xa8A",""))+"</li>\n"})).replace(/\xa80/g,""),d.gListLevel--,t&&(e=e.replace(/\s+$/,"")),e}function g(e,t){if("ol"===t){var a=e.match(/^ *(\d+)\./);if(a&&"1"!==a[1])return' start="'+a[1]+'"'}return""}function h(e){return"ul"===e?' style="list-style: disc !important;padding: 0px 0px 0px 40px !important;"':' style="list-style: decimal !important;padding: 0px 0px 0px 40px !important;"'}function r(n,r,i){var o=p.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=p.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===r?o:s,c="",d=h(r);if(-1!==n.search(l))!function f(e){var t=e.search(l),a=g(n,r);d=h(r),-1!==t?(c+="\n\n<"+r+d+a+">\n"+u(e.slice(0,t),!!i)+"</"+r+">\n",l="ul"===(r="ul"===r?"ol":"ul")?o:s,f(e.slice(t))):c+="\n\n<"+r+d+a+">\n"+u(e,!!i)+"</"+r+">\n"}(n);else{var e=g(n,r);c="\n\n<"+r+d+e+">\n"+u(n,!!i)+"</"+r+">\n"}return c}return e=d.converter._dispatch("lists.before",e,p,d),e+="\xa80",e=(e=d.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,a){return r(t,-1<a.search(/[*+-]/g)?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,a,n){return r(a,-1<n.search(/[*+-]/g)?"ul":"ol",!1)})).replace(/\xa80/,""),e=d.converter._dispatch("lists.after",e,p,d)}),y.subParser("metadata",function(e,t,n){if(!t.metadata)return e;function r(e){(e=(e=(n.metadata.raw=e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,a){return n.metadata.parsed[t]=a,""})}return e=(e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*\xab\xab\xab+(\S*?)\n([\s\S]+?)\n\xbb\xbb\xbb+\n/,function(e,t,a){return r(a),"\xa8M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,a){return t&&(n.metadata.format=t),r(a),"\xa8M"})).replace(/\xa8M/g,""),e=n.converter._dispatch("metadata.after",e,t,n)}),y.subParser("outdent",function(e,t,a){return e=(e=(e=a.converter._dispatch("outdent.before",e,t,a)).replace(/^(\t|[ ]{1,4})/gm,"\xa80")).replace(/\xa80/g,""),e=a.converter._dispatch("outdent.after",e,t,a)}),y.subParser("paragraphs",function(e,t,a){for(var n=(e=(e=(e=a.converter._dispatch("paragraphs.before",e,t,a)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),r=[],i=n.length,o=0;o<i;o++){var s=n[o];0<=s.search(/\xa8(K|G)(\d+)\1/g)?r.push(s):0<=s.search(/\S/)&&(s=(s=y.subParser("spanGamut")(s,t,a)).replace(/^([ \t]*)/g,"<p>"),s+="</p>",r.push(s))}for(i=r.length,o=0;o<i;o++){for(var l="",c=r[o],d=!1;/\xa8(K|G)(\d+)\1/.test(c);){var f=RegExp.$1,p=RegExp.$2;l=(l="K"===f?a.gHtmlBlocks[p]:d?y.subParser("encodeCode")(a.ghCodeBlocks[p].text,t,a):a.ghCodeBlocks[p].codeblock).replace(/\$/g,"$$$$"),c=c.replace(/(\n\n)?\xa8(K|G)\d+\2(\n\n)?/,l),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(c)&&(d=!0)}r[o]=c}return e=(e=(e=r.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),a.converter._dispatch("paragraphs.after",e,t,a)}),y.subParser("runExtension",function(e,t,a,n){if(e.filter)t=e.filter(t,n.converter,a);else if(e.regex){var r=e.regex;r instanceof RegExp||(r=new RegExp(r,"g")),t=t.replace(r,e.replace)}return t}),y.subParser("spanGamut",function(e,t,a){return e=a.converter._dispatch("spanGamut.before",e,t,a),e=y.subParser("codeSpans")(e,t,a),e=y.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,a),e=y.subParser("encodeBackslashEscapes")(e,t,a),e=y.subParser("images")(e,t,a),e=y.subParser("anchors")(e,t,a),e=y.subParser("autoLinks")(e,t,a),e=y.subParser("simplifiedAutoLinks")(e,t,a),e=y.subParser("emoji")(e,t,a),e=y.subParser("underline")(e,t,a),e=y.subParser("italicsAndBold")(e,t,a),e=y.subParser("strikethrough")(e,t,a),e=y.subParser("ellipsis")(e,t,a),e=y.subParser("hashHTMLSpans")(e,t,a),e=y.subParser("encodeAmpsAndAngles")(e,t,a),t.simpleLineBreaks?/\n\n\xa8K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/ +\n/g,"<br />\n"),e=a.converter._dispatch("spanGamut.after",e,t,a)}),y.subParser("strikethrough",function(e,n,r){return n.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,n,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,t){return function a(e){return n.simplifiedAutoLink&&(e=y.subParser("simplifiedAutoLinks")(e,n,r)),"<del>"+e+"</del>"}(t)}),e=r.converter._dispatch("strikethrough.after",e,n,r)),e}),y.subParser("stripLinkDefinitions",function(e,s,l){var c=function c(e,t,a,n,r,i,o){return t=t.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?l.gUrls[t]=a.replace(/\s/g,""):l.gUrls[t]=y.subParser("encodeAmpsAndAngles")(a,s,l),i?i+o:(o&&(l.gTitles[t]=o.replace(/"|'/g,"&quot;")),s.parseImgDimensions&&n&&r&&(l.gDimensions[t]={width:n,height:r}),"")};return e=(e=(e=(e+="\xa80").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=\xa80)|(?=\n\[))/gm,c)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=\xa80))/gm,c)).replace(/\xa80/,"")}),y.subParser("tables",function(e,v,b){if(!v.tables)return e;function t(e){var t,a=e.split("\n");for(t=0;t<a.length;++t)/^ {0,3}\|/.test(a[t])&&(a[t]=a[t].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(a[t])&&(a[t]=a[t].replace(/\|[ \t]*$/,"")),a[t]=y.subParser("codeSpans")(a[t],v,b);var n,r,i,o,s,l=a[0].split("|").map(function(e){return e.trim()}),c=a[1].split("|").map(function(e){return e.trim()}),d=[],f=[],p=[],u=[];for(a.shift(),a.shift(),t=0;t<a.length;++t)""!==a[t].trim()&&d.push(a[t].split("|").map(function(e){return e.trim()}));if(l.length<c.length)return e;for(t=0;t<c.length;++t)p.push((n=c[t],/^:[ \t]*--*$/.test(n)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(n)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(n)?' style="text-align:center;"':""));for(t=0;t<l.length;++t)y.helper.isUndefined(p[t])&&(p[t]=""),f.push((r=l[t],i=p[t],o=void 0,o="",r=r.trim(),(v.tablesHeaderId||v.tableHeaderId)&&(o=' id="'+r.replace(/ /g,"_").toLowerCase()+'"'),"<th"+o+i+">"+(r=y.subParser("spanGamut")(r,v,b))+"</th>\n"));for(t=0;t<d.length;++t){for(var g=[],h=0;h<f.length;++h)y.helper.isUndefined(d[t][h]),g.push((s=d[t][h],"<td"+p[h]+">"+y.subParser("spanGamut")(s,v,b)+"</td>\n"));u.push(g)}return function m(e,t){for(var a="<table>\n<thead>\n<tr>\n",n=e.length,r=0;r<n;++r)a+=e[r];for(a+="</tr>\n</thead>\n<tbody>\n",r=0;r<t.length;++r){a+="<tr>\n";for(var i=0;i<n;++i)a+=t[r][i];a+="</tr>\n"}return a+="</tbody>\n</table>\n"}(f,u)}return e=(e=(e=(e=b.converter._dispatch("tables.before",e,v,b)).replace(/\\(\|)/g,y.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|\xa80)/gm,t)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|\xa80)/gm,t),e=b.converter._dispatch("tables.after",e,v,b)}),y.subParser("underline",function(e,t,a){return t.underline?(e=a.converter._dispatch("underline.before",e,t,a),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return"<u>"+t+"</u>"})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return"<u>"+t+"</u>"}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/(_)/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("underline.after",e,t,a)):e}),y.subParser("unescapeSpecialChars",function(e,t,a){return e=(e=a.converter._dispatch("unescapeSpecialChars.before",e,t,a)).replace(/\xa8E(\d+)E/g,function(e,t){var a=parseInt(t);return String.fromCharCode(a)}),e=a.converter._dispatch("unescapeSpecialChars.after",e,t,a)}),y.subParser("makeMarkdown.blockquote",function(e,t){var a="";if(e.hasChildNodes())for(var n=e.childNodes,r=n.length,i=0;i<r;++i){var o=y.subParser("makeMarkdown.node")(n[i],t);""!==o&&(a+=o)}return a="> "+(a=a.trim()).split("\n").join("\n> ")}),y.subParser("makeMarkdown.codeBlock",function(e,t){var a=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+a+"\n"+t.preList[n]+"\n```"}),y.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),y.subParser("makeMarkdown.emphasis",function(e,t){var a="";if(e.hasChildNodes()){a+="*";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="*"}return a}),y.subParser("makeMarkdown.header",function(e,t,a){var n=new Array(a+1).join("#"),r="";if(e.hasChildNodes()){r=n+" ";for(var i=e.childNodes,o=i.length,s=0;s<o;++s)r+=y.subParser("makeMarkdown.node")(i[s],t)}return r}),y.subParser("makeMarkdown.hr",function(){return"---"}),y.subParser("makeMarkdown.image",function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),y.subParser("makeMarkdown.links",function(e,t){var a="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,r=n.length;a="[";for(var i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="](",a+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(a+=' "'+e.getAttribute("title")+'"'),a+=")"}return a}),y.subParser("makeMarkdown.list",function(e,t,a){var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,i=r.length,o=e.getAttribute("start")||1,s=0;s<i;++s)if("undefined"!=typeof r[s].tagName&&"li"===r[s].tagName.toLowerCase()){n+=("ol"===a?o.toString()+". ":"- ")+y.subParser("makeMarkdown.listItem")(r[s],t),++o}return(n+="\n\x3c!-- --\x3e\n").trim()}),y.subParser("makeMarkdown.listItem",function(e,t){for(var a="",n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);return/\n$/.test(a)?a=a.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):a+="\n",a}),y.subParser("makeMarkdown.node",function(e,t,a){a=a||!1;var n="";if(3===e.nodeType)return y.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":a||(n=y.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":a||(n=y.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":a||(n=y.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":a||(n=y.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":a||(n=y.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":a||(n=y.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":a||(n=y.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":a||(n=y.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":a||(n=y.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":a||(n=y.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":a||(n=y.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":a||(n=y.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":a||(n=y.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":a||(n=y.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":n=y.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":n=y.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":n=y.subParser("makeMarkdown.strong")(e,t);break;case"del":n=y.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":n=y.subParser("makeMarkdown.links")(e,t);break;case"img":n=y.subParser("makeMarkdown.image")(e,t);break;default:n=e.outerHTML+"\n\n"}return n}),y.subParser("makeMarkdown.paragraph",function(e,t){var a="";if(e.hasChildNodes())for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);return a=a.trim()}),y.subParser("makeMarkdown.pre",function(e,t){var a=e.getAttribute("prenum");return"<pre>"+t.preList[a]+"</pre>"}),y.subParser("makeMarkdown.strikethrough",function(e,t){var a="";if(e.hasChildNodes()){a+="~~";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="~~"}return a}),y.subParser("makeMarkdown.strong",function(e,t){var a="";if(e.hasChildNodes()){a+="**";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="**"}return a}),y.subParser("makeMarkdown.table",function(e,t){var a,n,r="",i=[[],[]],o=e.querySelectorAll("thead>tr>th"),s=e.querySelectorAll("tbody>tr");for(a=0;a<o.length;++a){var l=y.subParser("makeMarkdown.tableCell")(o[a],t),c="---";if(o[a].hasAttribute("style"))switch(o[a].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":c=":---";break;case"text-align:right;":c="---:";break;case"text-align:center;":c=":---:"}i[0][a]=l.trim(),i[1][a]=c}for(a=0;a<s.length;++a){var d=i.push([])-1,f=s[a].getElementsByTagName("td");for(n=0;n<o.length;++n){var p=" ";"undefined"!=typeof f[n]&&(p=y.subParser("makeMarkdown.tableCell")(f[n],t)),i[d].push(p)}}var u=3;for(a=0;a<i.length;++a)for(n=0;n<i[a].length;++n){var g=i[a][n].length;u<g&&(u=g)}for(a=0;a<i.length;++a){for(n=0;n<i[a].length;++n)1===a?":"===i[a][n].slice(-1)?i[a][n]=y.helper.padEnd(i[a][n].slice(-1),u-1,"-")+":":i[a][n]=y.helper.padEnd(i[a][n],u,"-"):i[a][n]=y.helper.padEnd(i[a][n],u);r+="| "+i[a].join(" | ")+" |\n"}return r.trim()}),y.subParser("makeMarkdown.tableCell",function(e,t){var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t,!0);return a.trim()}),y.subParser("makeMarkdown.txt",function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/\xa8NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=y.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),Rt.PLUGINS.markdown=function(o){var s,l,a,n,r,c=o.$,i=!1,d="",f="",p="",u="",g=[],h=[],m="",v=null,b=null;function _(e){e=function u(e){var t=e,a=e.match(/(\[\^(.+?)\])[^:]/g),n=e.match(/(\[\^(.+?)\]:)/g);if(a&&n){a.forEach(function(e,t,a){a[t]=a[t].substring(0,a[t].length-1)}),a=a.filter(function(e,t){return a.indexOf(e)===t}),n=n.filter(function(e,t){return n.indexOf(e)===t});for(var r=1,i=0;i<a.length;i++){var o="";if(1==r&&(o='<hr class="footnote-sep"><ol>'),-1<n.indexOf(a[i]+":")){for(var s=-1<(t=(t=t.split(n[i]).join("{ftnt-plc}")).replace(n[i].substring(0,n[i].length-1),'<sup id="fnref:'.concat(r,'"><a href="#fn:').concat(r,'" class="footnote-a">').concat(r,"</a></sup>"))).indexOf(a[i])?1:0,l=0;s&&(l++,t=t.replace(n[i].substring(0,n[i].length-1),'<sup id="fnref:'.concat(r,":").concat(l,'"><a href="#fn:').concat(r,":").concat(l,'" class="footnote-a">').concat(r,":").concat(l,"</a></sup>")),s=-1<t.indexOf(a[i])?1:0););var c=(t=t.split("{ftnt-plc}").join(n[i])).indexOf(n[i]),d=t,f=d.substring(c,d.length-1);if(f=f.split("\n")[0],t=t.replace(f,""),-1<f.indexOf(": ")){f=f.split(": ")[1],f+='<a href="#fnref:'.concat(r,'" class="footnote-a">\u21a9</a>');for(var p=l;0!=l;)f+='<a href="#fnref:'.concat(r,":").concat(p-l+1,'" class="footnote-a">\u21a9</a>'),l--;f+="</p></li>",t=t+o+'<li id="fn:'.concat(r,'"><p>')+f,r++}}}1!=r&&(t+="</ol>")}return e=t}(e=function s(e){for(var t=/^[A-Za-z0-9]/g,a=/^:[ ]{1}(.+?)+/g,n=e.split("\n"),r=n,i=n.length-1,o=1;o<i;o++)null!==n[o].match(a)&&(null!==n[o-1].match(t)&&o<i-1&&null!==n[o+1].match(a)?(r[o-1]="<dl><dt>"+n[o-1]+"</dt>",r[o]="<dd>"+n[o].substring(2)+"</dd>"):null!==n[o-1].match(t)&&(o<i-1&&null===n[o+1].match(a)||o==i-1)?(r[o-1]="<dl><dt>"+n[o-1]+"</dt>",r[o]="<dd>"+n[o].substring(2)+"</dd></dl>"):o<i-1&&null!==n[o+1].match(a)?r[o]="<dd>"+n[o].substring(2)+"</dd>":r[o]="<dd>"+n[o].substring(2)+"</dd></dl>");return e=r.join("\n")}(e=function t(e){var n=e.indexOf("```"),r=0;-1<n&&(r=-1<(r=e.substring(n+1).indexOf("```"))?r+3:r);return e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,function(e,t,a){return n<a&&a<r?"---":"<hr />\n"})}(e=function a(e){return-1<(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.split("</p>").join("</p>\n")).split("</div>").join("\n")).replace(/(<([^>]+)>)/gi,"")).replace(/&gt;/gi,">")).replace(/&lt;/gi,"<")).split("&quot;").join('"')).split("&amp;").join("&")).split("&#39;").join("'")).split("&nbsp;").join(" ")).replace(/\|+\n[^\|]/g,function(e){return e.replace("\n","\n\n")})).indexOf("Powered by Froala Editor")&&(e=e.replace("Powered by Froala Editor","")),e}(e)))),e=n.makeHtml(e),e=o.clean.html(e),o.$wp.find(l)[0].innerHTML=e}return{_init:function t(){if(function e(){o.events.on("contentChanged",function(){i&&_(o.html.get(!1,!1))},!0),o.events.$on(c(o.o_win),"resize",function(){i&&(l[0].style.width=o.$wp[0].clientWidth-o.$el[0].clientWidth+2+"px")}),o.events.on("paste.afterCleanup",function(e){if(i){var t=o.doc.createElement("div");t.innerHTML=e;for(var a,n=t.querySelectorAll("img"),r=0;r<n.length;r++)(a=n[r]).outerHTML=a.outerHTML.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e=t.innerHTML}return e})}(),n=new y.Converter({strikethrough:!0,tables:!0,tablesHeaderId:!0,simpleLineBreaks:!0,ghCodeBlocks:!0,tasklists:!0,customizedHeaderId:!0,requireSpaceBeforeHeadingText:!0,underline:!0}),o.$tb&&(a=o.$tb.find('.fr-command[data-cmd="markdown"]')),!o.$wp)return!1},refresh:function E(e){var t=i;e.toggleClass("fr-active",t).attr("aria-pressed",t)},toggle:function w(){i?function e(){f=o.html.get(!0,!0),o.opts.pastePlain=!1,o.$el.removeClass("fr-markdown-editor"),o.$wp.append(r[0].firstChild),c(r).remove(),o.$wp.find(s).remove(),o.$wp.find(l).remove(),o.$wp[0].lastChild.after(o.$placeholder[0]),o.$el.removeAttr("style"),o.size.refresh(),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(a).removeClass("fr-disabled").attr("aria-disabled",!1),o.opts.iframe&&(o.$el=b,o.$wp=v,Object.keys(h).map(function(e){o.$el[0].setAttribute(e,h[e]),"class"!=e&&m[0].removeAttribute(e)}),o.$el[0].style.removeProperty("padding")),o.html.set(d),o.opts.iframe&&(o.$el=b,o.$wp=v,o.$placeholder=null,o.placeholder.show(),o.placeholder.refresh())}():function t(){var i;d=o.html.get(!0,!0),o.html.set(f),o.opts.pastePlain=!0,o.opts.iframe?(o.$el[0].removeAttribute("spellcheck"),Array.from(o.$el[0].attributes).map(function(e){var t=e.name,a=e.value;return"class"!=t&&(g[t]=a),h[t]=a,o.$el[0].removeAttribute(t)}),o.$el[0].style.padding=0,o.$el[0].innerHTML="",o.$placeholder.hide()):o.$el.addClass("fr-markdown-editor"),r=c('<div class="fr-wrapper-markdown" />'),o.opts.heightMin?r.css("min-height","".concat(o.opts.heightMin,"px")):r.css("min-height","200px"),o.opts.heightMax?(r.css("maxHeight","".concat(o.opts.heightMax,"px")),r.css("overflow","auto")):(r.css("maxHeight",""),r.css("overflow","")),o.opts.height&&(r.css("height","".concat(o.opts.height,"px")),r.css("overflow","auto"),r.css("minHeight",o.opts.height-o.helpers.getPX(o.$el.css("padding-top"))-o.helpers.getPX(o.$el.css("padding-bottom")))),o.opts.iframe?(u=c('<div class="fr-box fr-basic fr-top"></div>'),p=c('<div class="fr-markdown-wrapper"></div>'),m=c('<div class="fr-element fr-markdown-editor"><p><br></p></div>'),Object.keys(g).map(function(e){return m[0].setAttribute(e,g[e])}),f&&(m[0].innerHTML=f),r[0].appendChild(m[0]),p[0].appendChild(r[0]),u[0].appendChild(p[0]),1==c(o.$html.find("body")[0]).find(".fr-box").length?(o.$el.prevAll().filter(function(e){return!["CodeMirror cm-s-default CodeMirror-wrap","fr-code"].includes(e.className)}).remove(),o.$el[0].appendChild(r[0])):(o.$el[0].appendChild(u[0]),v=o.$wp,o.$wp=p),b=o.$el,o.$el=m):(o.$wp.append(r),r[0].appendChild(o.$el[0])),s=c('<div class="gutter-horizontal"><div class="e-resize-handler"><i class="fa fa-circle-thin" aria-hidden="true"></i></div></div>'),c(r).append(s[0]),l=c('<div class="fr-element fr-markdown-view"></div>'),c(r).append(l[0]),c(r).after(o.$placeholder[0]),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(a).filter(function(){return"fullscreen"!==c(this).data("cmd")&&"moreMisc"!==c(this).data("cmd")}).addClass("fr-disabled").attr("aria-disabled",!0),c(s).on("mousedown touchstart",function(e){i={e:e,offsetLeft:s[0].offsetLeft,offsetTop:s[0].offsetTop,firstWidth:o.$el[0].offsetWidth,secondWidth:l[0].offsetWidth};var a=function a(e){o.selection.clear();var t={x:e.clientX-i.e.clientX,y:e.clientY-i.e.clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<125||i.secondWidth-t.x<125||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},n=function n(e){o.selection.clear();var t={x:e.changedTouches[0].clientX-i.e.changedTouches[0].clientX,y:e.changedTouches[0].clientY-i.e.changedTouches[0].clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<100||i.secondWidth-t.x<100||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},t=function t(){document.onmousemove=document.onmouseup=null,document.ontouchmove=document.ontouchend=null},r=function r(){o.$doc[0].onmousemove=o.$doc[0].onmouseup=null,o.$doc[0].ontouchmove=o.$doc[0].ontouchend=null};o.opts.iframe&&o.markdown.isEnabled?(o.$doc[0].onmousemove=a,o.$doc[0].ontouchmove=n,o.$doc[0].onmouseup=r,o.$doc[0].ontouchend=r):(document.onmousemove=a,document.ontouchmove=n,document.onmouseup=t,document.ontouchend=t)}),_(f)}(),i=!i},isEnabled:function e(){return i}}},Rt.DefineIcon("markdown",{NAME:"markdown",SVG_KEY:"markdown"}),Rt.RegisterCommand("markdown",{title:"Markdown",undo:!1,focus:!1,toggle:!0,forcedRefresh:!0,accessibilityFocus:!0,callback:function(){this.markdown.toggle()},refresh:function(e){this.markdown.refresh(e)},plugin:"markdown"}),Object.assign(Rt.DEFAULTS,{wordCounterMax:-1,wordCounterCount:!0}),Rt.PLUGINS.wordCounter=function(p){var a,t=p.$;function u(){var e=p.el.innerText.toString();e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi," ")).replace(/\u00a0/g," ")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).replace(/[\u200A\u200C-\u200D\uFEFF\u202F\u2000-\u2009\u205F\u3000\u1680\u00A0\u0020]/g," ")).replace(/[\u200B]/g,"")).replace(/\t+/g," ")).split(" ").join("\n");var t=p.$el.find(".fr-pagebreak"),a=e.split(/\r?\n/),n=0;return a.forEach(function(e){0<(e=e.replace(/\s/g,"")).length&&n++}),n-2*t.length}function e(e){var t=!1;if(p.opts.wordCounterMax<0)return!0;if(u()<p.opts.wordCounterMax)return!0;var a=e.which,n=p.selection.get(),r=n.focusOffset,i=n.focusNode.textContent,o=(i=i.replace(/\u00a0/g," ")).toUpperCase().charCodeAt(r-1),s=i.toUpperCase().charCodeAt(r);return n.focusNode.data||(o=s=NaN),!function l(e,t){if(p.keys.isCharacter(e)&&p.keys.isCharacter(t)&&e!=Rt.KEYCODE.SPACE&&t!=Rt.KEYCODE.SPACE)return!0;return!1}(o,s)||a!==Rt.KEYCODE.ENTER&&a!==Rt.KEYCODE.SPACE||(t=!0),(function c(e,t){return e===Rt.KEYCODE.SPACE&&t===Rt.KEYCODE.SPACE}(o,s)||function d(e,t){if(isNaN(e)&&t===Rt.KEYCODE.SPACE||e===Rt.KEYCODE.SPACE&&isNaN(t))return!0;return!1}(o,s)||function f(e,t){if(isNaN(e)&&isNaN(t))return!0;return!1}(o,s))&&p.keys.isCharacter(a)&&a!=Rt.KEYCODE.SPACE&&(t=!0),u()>p.opts.wordCounterMax&&(p.keys.isCharacter(a)||a===Rt.KEYCODE.ENTER)&&(t=!0),!(!p.keys.ctrlKey(e)&&t||a===Rt.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),p.events.trigger("wordCounter.exceeded"),!1)}function n(){if(p.opts.wordCounterCount){var e=u()+(0<p.opts.wordCounterMax?"/"+p.opts.wordCounterMax:"");a.text("".concat(p.language.translate("Words")," : ").concat(e)),p.opts.toolbarBottom&&a.css("margin-bottom",p.$tb.outerHeight(!0));var t=p.$wp.get(0).offsetWidth-p.$wp.get(0).clientWidth;0<=t&&("rtl"==p.opts.direction?a.css("margin-left",t):a.css("margin-right",t))}}function r(e){return p.opts.wordCounterMax<0?e:t("<div>").html(e).text().split(" ").length+u()<=p.opts.wordCounterMax?e:(p.events.trigger("wordCounter.exceeded"),"")}return{_init:function i(){return!!p.$wp&&!!p.opts.wordCounterCount&&((a=t(document.createElement("span")).attr("class","fr-counter fr-wCounter")).css("bottom",p.$wp.css("border-bottom-width")),p.$second_tb?p.$second_tb.append(a):p.$wp.append(a),p.events.on("keydown",e,!0),p.events.on("paste.afterCleanup",r),p.events.on("keyup contentChanged input",function(){p.events.trigger("wordCounter.update")}),p.events.on("wordCounter.update",n),p.events.trigger("wordCounter.update"),void p.events.on("destroy",function(){t(p.o_win).off("resize.char".concat(p.id)),a.removeData().remove(),a=null}))},wordCount:u}}});
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(St){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function He(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=l(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==a["return"]||a["return"]()}finally{if(s)throw i}}}}function ye(e){return function t(e){if(Array.isArray(e))return r(e)}(e)||function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(e){if("string"==typeof e)return r(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void 0}}if((St=St&&St.hasOwnProperty("default")?St["default"]:St).PLUGINS.align=function(r){var i=r.$;return{apply:function o(e){var t=r.selection.element();if(i(t).parents(".fr-img-caption").length)i(t).css("text-align",e);else{r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore();for(var a=r.selection.blocks(),n=0;n<a.length;n++)i(a[n]).css("text-align",e).removeClass("fr-temp-div"),""===i(a[n]).attr("class")&&i(a[n]).removeAttr("class"),""===i(a[n]).attr("style")&&i(a[n]).removeAttr("style");r.selection.save(),r.html.unwrap(),r.selection.restore()}},refresh:function n(e){var t=r.selection.blocks();if(t.length){var a=r.helpers.getAlignment(i(t[0]));e.find("> *").first().replaceWith(r.icon.create("align-".concat(a)))}},refreshOnShow:function s(e,t){var a=r.selection.blocks();if(a.length){var n=r.helpers.getAlignment(i(a[0]));t.find('a.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function l(e){var t=r.selection.blocks();if(t.length){var a=r.helpers.getAlignment(i(t[0]));a=a.charAt(0).toUpperCase()+a.slice(1),"align".concat(a)===e.attr("data-cmd")&&e.addClass("fr-active")}}}},St.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),St.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),St.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),St.RegisterCommand("align",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.align.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align"data-param1="\n '.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">\n ').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.align.apply(t)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,t){this.align.refreshOnShow(e,t)},plugin:"align"}),St.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Object.assign(St.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),St.PLUGINS.charCounter=function(n){var a,r=n.$,i=function i(){return(n.opts.iframe&&n.markdown&&n.markdown.isEnabled()?n.$el.text()||"":n.el.textContent||"").replace(/\u200B/g,"").length};function e(e){if(n.opts.charCounterMax<0)return!0;if(i()<n.opts.charCounterMax)return!0;var t=e.which;return!(!n.keys.ctrlKey(e)&&n.keys.isCharacter(t)||t===St.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function t(e){return n.opts.charCounterMax<0?e:r("<div>").html(e).text().length+i()<=n.opts.charCounterMax?e:(n.events.trigger("charCounter.exceeded"),"")}function o(e,t,a){return n.opts.charCounterMax<0||(e.includes('<span class="fr-emoticon')||e.includes('<i class="fa ')?!(i()>=n.opts.charCounterMax)||(n.events.trigger("charCounter.exceeded"),!1):r("<div>").html(e).text().length+i()<=n.opts.charCounterMax||(n.events.trigger("charCounter.exceeded"),!1))}function s(){if(n.opts.charCounterCount){var e=i()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");a.text("".concat(n.language.translate("Characters")," : ").concat(e)),n.opts.toolbarBottom&&a.css("margin-bottom",n.$tb.outerHeight(!0));var t=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=t&&("rtl"==n.opts.direction?a.css("margin-left",t):a.css("margin-right",t))}}return{_init:function l(){return!!n.$wp&&!!n.opts.charCounterCount&&((a=r(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb?n.$second_tb.append(a):n.$wp.append(a),n.events.on("keydown",e,!0),n.events.on("paste.afterCleanup",t),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("html.beforeInsert",o),n.events.on("charCounter.update",s),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){r(n.o_win).off("resize.char".concat(n.id)),a.removeData().remove(),a=null}))},count:i}},St.PLUGINS.codeBeautifier=function(){var e,t,a,n,j={};function L(n,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},a={"@media":!0,"@supports":!0,"@document":!0};e=e||{},n=(n=n||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,i=e.indent_char||" ",o=e.selector_separator_newline===undefined||e.selector_separator_newline,s=e.end_with_newline!==undefined&&e.end_with_newline,l=e.newline_between_rules===undefined||e.newline_between_rules,c=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(i="\t",r=1),c=c.replace(/\\r/,"\r").replace(/\\n/,"\n");var d,f=/^\s+$/,p=-1,u=0;function g(){return(d=n.charAt(++p))||""}function h(e){var t,a=p;return e&&v(),t=n.charAt(p+1)||"",p=a-1,g(),t}function m(e){for(var t=p;g();)if("\\"===d)g();else{if(-1!==e.indexOf(d))break;if("\n"===d)break}return n.substring(t,p+1)}function v(){for(var e="";f.test(h());)g(),e+=d;return e}function b(){var e="";for(d&&f.test(d)&&(e=d);f.test(g());)e+=d;return e}function E(e){var t=p;for(e="/"===h(),g();g();){if(!e&&"*"===d&&"/"===h()){g();break}if(e&&"\n"===d)return n.substring(t,p)}return n.substring(t,p)+d}function _(e){return n.substring(p-e.length,p).toLowerCase()===e}function w(){for(var e=0,t=p+1;t<n.length;t++){var a=n.charAt(t);if("{"===a)return!0;if("("===a)e+=1;else if(")"===a){if(0===e)return!1;e-=1}else if(" "===a||"}"===a)return!1}return!1}var y=n.match(/^[\t ]*/)[0],A=new Array(r+1).join(i),C=0,T=0;for(var k,S,R,L={"{":function(e){L.singleSpace(),x.push(e),L.newLine()},"}":function(e){L.newLine(),x.push(e),L.newLine()},_lastCharWhitespace:function(){return f.test(x[x.length-1])},newLine:function(e){x.length&&(e||"\n"===x[x.length-1]||L.trim(),x.push("\n"),y&&x.push(y))},singleSpace:function(){x.length&&!L._lastCharWhitespace()&&x.push(" ")},preserveSingleSpace:function(){k&&L.singleSpace()},trim:function(){for(;L._lastCharWhitespace();)x.pop()}},x=[],I=!1,O=!1,F=!1,M="",D="";;){var P=b();k=""!==P;var N=-1!==P.indexOf("\n");if(D=M,!(M=d))break;if("/"===d&&"*"===h()){var B=0===C;(N||B)&&L.newLine(),x.push(E()),L.newLine(),B&&L.newLine(!0)}else if("/"===d&&"/"===h())N||"{"===D||L.trim(),L.singleSpace(),x.push(E()),L.newLine();else if("@"===d){L.preserveSingleSpace(),x.push(d);var U=(void 0,S=p,R=m(": , {}()[]/='\""),p=S-1,g(),R);U.match(/[ :]$/)&&(g(),U=m(": ").replace(/\s$/,""),x.push(U),L.singleSpace()),(U=U.replace(/\s$/,""))in t&&(T+=1,U in a&&(F=!0))}else"#"===d&&"{"===h()?(L.preserveSingleSpace(),x.push(m("}"))):"{"===d?"}"===h(!0)?(v(),g(),L.singleSpace(),x.push("{}"),L.newLine(),l&&0===C&&L.newLine(!0)):(C++,y+=A,L["{"](d),I=F?(F=!1,T<C):T<=C):"}"===d?(C--,y=y.slice(0,-r),L["}"](d),O=I=!1,T&&T--,l&&0===C&&L.newLine(!0)):":"===d?(v(),!I&&!F||_("&")||w()?":"===h()?(g(),x.push("::")):x.push(":"):(O=!0,x.push(":"),L.singleSpace())):'"'===d||"'"===d?(L.preserveSingleSpace(),x.push(m(d))):" "===d?(O=!1,x.push(d),L.newLine()):"("===d?_("url")?(x.push(d),v(),g()&&(")"!==d&&'"'!==d&&"'"!==d?x.push(m(")")):p--)):(u++,L.preserveSingleSpace(),x.push(d),v()):")"===d?(x.push(d),u--):","===d?(x.push(d),v(),o&&!O&&u<1?L.newLine():L.singleSpace()):("]"===d||("["===d?L.preserveSingleSpace():"="===d?(v(),d="="):L.preserveSingleSpace()),x.push(d))}var H="";return y&&(H+=y),H+=x.join("").replace(/[\r\n\t ]+$/,""),s&&(H+="\n"),"\n"!=c&&(H=H.replace(/[\n]/g,c)),H}function q(e,t){for(var a=0;a<t.length;a+=1)if(t[a]===e)return!0;return!1}function X(e){return e.replace(/^\s+|\s+$/g,"")}function x(e,t){return new r(e,t).beautify()}e=j,t="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",a=new RegExp("[".concat(t,"]")),n=new RegExp("[".concat(t," ").concat("\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f","]")),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|".concat(e.newline.source)),e.allLineBreaks=new RegExp(e.lineBreak.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||170<=e&&a.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||170<=e&&n.test(String.fromCharCode(e))))};var Z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(n,e){var c,r,i,d,o,s,l,f,p,t,a,u,g,h=[],m="";function v(e,t){var a=0;return e&&(a=e.indentation_level,!c.just_added_newline()&&e.line_indent_level>a&&(a=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:a,line_indent_level:e?e.line_indent_level:a,start_line_index:c.get_line_number(),ternary_depth:0}}for(u={TK_START_EXPR:function M(){x();var e=Z.Expression;if("["===d.text){if("TK_WORD"===o||")"===f.last_text)return"TK_RESERVED"===o&&q(f.last_text,i.line_starters)&&(c.space_before_token=!0),T(e),A(),C(),void(g.space_in_paren&&(c.space_before_token=!0));e=Z.ArrayLiteral,k(f.mode)&&("["!==f.last_text&&(","!==f.last_text||"]"!==s&&"}"!==s)||g.keep_array_indentation||w())}else"TK_RESERVED"===o&&"for"===f.last_text?e=Z.ForInitializer:"TK_RESERVED"===o&&q(f.last_text,["if","while"])&&(e=Z.Conditional);" "===f.last_text||"TK_START_BLOCK"===o?w():"TK_END_EXPR"===o||"TK_START_EXPR"===o||"TK_END_BLOCK"===o||"."===f.last_text?_(d.wanted_newline):"TK_RESERVED"===o&&"("===d.text||"TK_WORD"===o||"TK_OPERATOR"===o?"TK_RESERVED"===o&&("function"===f.last_word||"typeof"===f.last_word)||"*"===f.last_text&&"function"===s?g.space_after_anon_function&&(c.space_before_token=!0):"TK_RESERVED"!==o||!q(f.last_text,i.line_starters)&&"catch"!==f.last_text||g.space_before_conditional&&(c.space_before_token=!0):c.space_before_token=!0;"("===d.text&&"TK_RESERVED"===o&&"await"===f.last_word&&(c.space_before_token=!0);"("===d.text&&("TK_EQUALS"!==o&&"TK_OPERATOR"!==o||L()||_());T(e),A(),g.space_in_paren&&(c.space_before_token=!0);C()},TK_END_EXPR:function D(){for(;f.mode===Z.Statement;)R();f.multiline_frame&&_("]"===d.text&&k(f.mode)&&!g.keep_array_indentation);g.space_in_paren&&("TK_START_EXPR"!==o||g.space_in_empty_paren?c.space_before_token=!0:(c.trim(),c.space_before_token=!1));"]"===d.text&&g.keep_array_indentation?(A(),R()):(R(),A());c.remove_redundant_indentation(p),f.do_while&&p.mode===Z.Conditional&&(p.mode=Z.Expression,f.do_block=!1,f.do_while=!1)},TK_START_BLOCK:function P(){var e=O(1),t=O(2);t&&(":"===t.text&&q(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||q(e.text,["get","set"])&&q(t.type,["TK_WORD","TK_RESERVED"]))?q(s,["class","interface"])?T(Z.BlockStatement):T(Z.ObjectLiteral):T(Z.BlockStatement);var a=!e.comments_before.length&&"}"===e.text&&"function"===f.last_word&&"TK_END_EXPR"===o;"expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?"TK_OPERATOR"!==o&&(a||"TK_EQUALS"===o||"TK_RESERVED"===o&&I(f.last_text)&&"else"!==f.last_text)?c.space_before_token=!0:w(!1,!0):"TK_OPERATOR"!==o&&"TK_START_EXPR"!==o?"TK_START_BLOCK"===o?w():c.space_before_token=!0:k(p.mode)&&","===f.last_text&&("}"===s?c.space_before_token=!0:w());A(),C()},TK_END_BLOCK:function N(){for(;f.mode===Z.Statement;)R();var e="TK_START_BLOCK"===o;"expand"===g.brace_style?e||w():e||(k(f.mode)&&g.keep_array_indentation?(g.keep_array_indentation=!1,w(),g.keep_array_indentation=!0):w());R(),A()},TK_WORD:F,TK_RESERVED:F,TK_SEMICOLON:function B(){x()&&(c.space_before_token=!1);for(;f.mode===Z.Statement&&!f.if_block&&!f.do_block;)R();A()},TK_STRING:function U(){x()?c.space_before_token=!0:"TK_RESERVED"===o||"TK_WORD"===o?c.space_before_token=!0:"TK_COMMA"===o||"TK_START_EXPR"===o||"TK_EQUALS"===o||"TK_OPERATOR"===o?L()||_():w();A()},TK_EQUALS:function H(){x();f.declaration_statement&&(f.declaration_assignment=!0);c.space_before_token=!0,A(),c.space_before_token=!0},TK_OPERATOR:function $(){x();if("TK_RESERVED"===o&&I(f.last_text))return c.space_before_token=!0,void A();if("*"===d.text&&"TK_DOT"===o)return void A();if(":"===d.text&&f.in_case)return f.case_body=!0,C(),A(),w(),void(f.in_case=!1);if("::"===d.text)return void A();"TK_OPERATOR"===o&&_();var e=!0,t=!0;q(d.text,["--","++","!","~"])||q(d.text,["-","+"])&&(q(o,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||q(f.last_text,i.line_starters)||","===f.last_text)?(t=e=!1,!d.wanted_newline||"--"!==d.text&&"++"!==d.text||w(!1,!0)," "===f.last_text&&S(f.mode)&&(e=!0),"TK_RESERVED"===o?e=!0:"TK_END_EXPR"===o?e=!("]"===f.last_text&&("--"===d.text||"++"===d.text)):"TK_OPERATOR"===o&&(e=q(d.text,["--","-","++","+"])&&q(f.last_text,["--","-","++","+"]),q(d.text,["+","-"])&&q(f.last_text,["--","++"])&&(t=!0)),f.mode!==Z.BlockStatement&&f.mode!==Z.Statement||"{"!==f.last_text&&" "!==f.last_text||w()):":"===d.text?0===f.ternary_depth?e=!1:f.ternary_depth-=1:"?"===d.text?f.ternary_depth+=1:"*"===d.text&&"TK_RESERVED"===o&&"function"===f.last_text&&(t=e=!1);c.space_before_token=c.space_before_token||e,A(),c.space_before_token=t},TK_COMMA:function z(){if(f.declaration_statement)return S(f.parent.mode)&&(f.declaration_assignment=!1),A(),void(f.declaration_assignment?w(f.declaration_assignment=!1,!0):(c.space_before_token=!0,g.comma_first&&_()));A(),f.mode===Z.ObjectLiteral||f.mode===Z.Statement&&f.parent.mode===Z.ObjectLiteral?(f.mode===Z.Statement&&R(),w()):(c.space_before_token=!0,g.comma_first&&_())},TK_BLOCK_COMMENT:function K(){if(c.raw)return c.add_raw_token(d),void(d.directives&&"end"===d.directives.preserve&&(g.test_output_raw||(c.raw=!1)));if(d.directives)return w(!1,!0),A(),"start"===d.directives.preserve&&(c.raw=!0),void w(!1,!0);if(!j.newline.test(d.text)&&!d.wanted_newline)return c.space_before_token=!0,A(),void(c.space_before_token=!0);var e,t=function o(e){var t;e=e.replace(/\x0d/g,"");var a=[];t=e.indexOf("\n");for(;-1!==t;)a.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&a.push(e);return a}(d.text),a=!1,n=!1,r=d.whitespace_before,i=r.length;w(!1,!0),1<t.length&&(!function s(e,t){for(var a=0;a<e.length;a++){var n=X(e[a]);if(n.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function l(e,t){for(var a,n=0,r=e.length;n<r;n++)if((a=e[n])&&0!==a.indexOf(t))return!1;return!0}(t.slice(1),r)&&(n=!0):a=!0);for(A(t[0]),e=1;e<t.length;e++)w(!1,!0),a?A(" ".concat(t[e].replace(/^\s+/g,""))):n&&t[e].length>i?A(t[e].substring(i)):c.add_token(t[e]);w(!1,!0)},TK_COMMENT:function W(){d.wanted_newline?w(!1,!0):c.trim(!0);c.space_before_token=!0,A(),w(!1,!0)},TK_DOT:function G(){x();"TK_RESERVED"===o&&I(f.last_text)?c.space_before_token=!0:_(")"===f.last_text&&g.break_chained_methods);A()},TK_UNKNOWN:function V(){A(),"\n"===d.text[d.text.length-1]&&w()},TK_EOF:function Y(){for(;f.mode===Z.Statement;)R()}},g={},(e=e||{}).braces_on_own_line!==undefined&&(g.brace_style=e.braces_on_own_line?"expand":"collapse"),g.brace_style=e.brace_style?e.brace_style:g.brace_style?g.brace_style:"collapse","expand-strict"===g.brace_style&&(g.brace_style="expand"),g.indent_size=e.indent_size?parseInt(e.indent_size,10):4,g.indent_char=e.indent_char?e.indent_char:" ",g.eol=e.eol?e.eol:"\n",g.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,g.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,g.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),g.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,g.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,g.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,g.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,g.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,g.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,g.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,g.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),g.e4x=e.e4x!==undefined&&e.e4x,g.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,g.comma_first=e.comma_first!==undefined&&e.comma_first,g.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,g.jslint_happy&&(g.space_after_anon_function=!0),e.indent_with_tabs&&(g.indent_char="\t",g.indent_size=1),g.eol=g.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),l="";0<g.indent_size;)l+=g.indent_char,g.indent_size-=1;var b=0;if(n&&n.length){for(;" "===n.charAt(b)||"\t"===n.charAt(b);)m+=n.charAt(b),b+=1;n=n.substring(b)}function E(e){var t=e.newlines;if(g.keep_array_indentation&&k(f.mode))for(var a=0;a<t;a+=1)w(0<a);else if(g.max_preserve_newlines&&t>g.max_preserve_newlines&&(t=g.max_preserve_newlines),g.preserve_newlines&&1<e.newlines){w();for(var n=1;n<t;n+=1)w(!0)}u[(d=e).type]()}function _(e){if(e=e!==undefined&&e,!c.just_added_newline())if(g.preserve_newlines&&d.wanted_newline||e)w(!1,!0);else if(g.wrap_line_length){c.current_line.get_character_count()+d.text.length+(c.space_before_token?1:0)>=g.wrap_line_length&&w(!1,!0)}}function w(e,t){if(!t&&" "!==f.last_text&&","!==f.last_text&&"="!==f.last_text&&"TK_OPERATOR"!==o)for(;f.mode===Z.Statement&&!f.if_block&&!f.do_block;)R();c.add_new_line(e)&&(f.multiline_frame=!0)}function y(){c.just_added_newline()&&(g.keep_array_indentation&&k(f.mode)&&d.wanted_newline?(c.current_line.push(d.whitespace_before),c.space_before_token=!1):c.set_indent(f.indentation_level)&&(f.line_indent_level=f.indentation_level))}function A(e){c.raw?c.add_raw_token(d):(g.comma_first&&"TK_COMMA"===o&&c.just_added_newline()&&","===c.previous_line.last()&&(c.previous_line.pop(),y(),c.add_token(","),c.space_before_token=!0),e=e||d.text,y(),c.add_token(e))}function C(){f.indentation_level+=1}function T(e){p=f?(t.push(f),f):v(null,e),f=v(p,e)}function k(e){return e===Z.ArrayLiteral}function S(e){return q(e,[Z.Expression,Z.ForInitializer,Z.Conditional])}function R(){0<t.length&&(p=f,f=t.pop(),p.mode===Z.Statement&&c.remove_redundant_indentation(p))}function L(){return f.parent.mode===Z.ObjectLiteral&&f.mode===Z.Statement&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===o&&q(f.last_text,["get","set"]))}function x(){return!!("TK_RESERVED"===o&&q(f.last_text,["const","let","const"])&&"TK_WORD"===d.type||"TK_RESERVED"===o&&"do"===f.last_text||"TK_RESERVED"===o&&"return"===f.last_text&&!d.wanted_newline||"TK_RESERVED"===o&&"else"===f.last_text&&("TK_RESERVED"!==d.type||"if"!==d.text)||"TK_END_EXPR"===o&&(p.mode===Z.ForInitializer||p.mode===Z.Conditional)||"TK_WORD"===o&&f.mode===Z.BlockStatement&&!f.in_case&&"--"!==d.text&&"++"!==d.text&&"function"!==s&&"TK_WORD"!==d.type&&"TK_RESERVED"!==d.type||f.mode===Z.ObjectLiteral&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===o&&q(f.last_text,["get","set"])))&&(T(Z.Statement),C(),"TK_RESERVED"===o&&q(f.last_text,["const","let","const"])&&"TK_WORD"===d.type&&(f.declaration_statement=!0),L()||_("TK_RESERVED"===d.type&&q(d.text,["do","for","if","while"])),!0)}function I(e){return q(e,["case","return","do","if","throw","else"])}function O(e){var t=r+(e||0);return t<0||t>=h.length?null:h[t]}function F(){("TK_RESERVED"===d.type&&f.mode!==Z.ObjectLiteral&&q(d.text,["set","get"])&&(d.type="TK_WORD"),"TK_RESERVED"===d.type&&f.mode===Z.ObjectLiteral)&&(":"===O(1).text&&(d.type="TK_WORD"));if(x()||!d.wanted_newline||S(f.mode)||"TK_OPERATOR"===o&&"--"!==f.last_text&&"++"!==f.last_text||"TK_EQUALS"===o||!g.preserve_newlines&&"TK_RESERVED"===o&&q(f.last_text,["const","let","const","set","get"])||w(),f.do_block&&!f.do_while){if("TK_RESERVED"===d.type&&"while"===d.text)return c.space_before_token=!0,A(),c.space_before_token=!0,void(f.do_while=!0);w(),f.do_block=!1}if(f.if_block)if(f.else_block||"TK_RESERVED"!==d.type||"else"!==d.text){for(;f.mode===Z.Statement;)R();f.if_block=!1,f.else_block=!1}else f.else_block=!0;if("TK_RESERVED"===d.type&&("case"===d.text||"default"===d.text&&f.in_case_statement))return w(),(f.case_body||g.jslint_happy)&&(!function e(){0<f.indentation_level&&(!f.parent||f.indentation_level>f.parent.indentation_level)&&(f.indentation_level-=1)}(),f.case_body=!1),A(),f.in_case=!0,void(f.in_case_statement=!0);if("TK_RESERVED"===d.type&&"function"===d.text&&((q(f.last_text,["}"," "])||c.just_added_newline()&&!q(f.last_text,["[","{",":","=",","]))&&(c.just_added_blankline()||d.comments_before.length||(w(),w(!0))),"TK_RESERVED"===o||"TK_WORD"===o?"TK_RESERVED"===o&&q(f.last_text,["get","set","new","return","export","async"])?c.space_before_token=!0:"TK_RESERVED"===o&&"default"===f.last_text&&"export"===s?c.space_before_token=!0:w():"TK_OPERATOR"===o||"="===f.last_text?c.space_before_token=!0:(f.multiline_frame||!S(f.mode)&&!k(f.mode))&&w()),"TK_COMMA"!==o&&"TK_START_EXPR"!==o&&"TK_EQUALS"!==o&&"TK_OPERATOR"!==o||L()||_(),"TK_RESERVED"===d.type&&q(d.text,["function","get","set"]))return A(),void(f.last_word=d.text);(a="NONE","TK_END_BLOCK"===o?"TK_RESERVED"===d.type&&q(d.text,["else","catch","finally"])?"expand"===g.brace_style||"end-expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?a="NEWLINE":(a="SPACE",c.space_before_token=!0):a="NEWLINE":"TK_SEMICOLON"===o&&f.mode===Z.BlockStatement?a="NEWLINE":"TK_SEMICOLON"===o&&S(f.mode)?a="SPACE":"TK_STRING"===o?a="NEWLINE":"TK_RESERVED"===o||"TK_WORD"===o||"*"===f.last_text&&"function"===s?a="SPACE":"TK_START_BLOCK"===o?a="NEWLINE":"TK_END_EXPR"===o&&(c.space_before_token=!0,a="NEWLINE"),"TK_RESERVED"===d.type&&q(d.text,i.line_starters)&&")"!==f.last_text&&(a="else"===f.last_text||"export"===f.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===d.type&&q(d.text,["else","catch","finally"]))?"TK_END_BLOCK"!==o||"expand"===g.brace_style||"end-expand"===g.brace_style||"none"===g.brace_style&&d.wanted_newline?w():(c.trim(!0),"}"!==c.current_line.last()&&w(),c.space_before_token=!0):"NEWLINE"===a?"TK_RESERVED"===o&&I(f.last_text)?c.space_before_token=!0:"TK_END_EXPR"!==o?"TK_START_EXPR"===o&&"TK_RESERVED"===d.type&&q(d.text,["const","let","const"])||":"===f.last_text||("TK_RESERVED"===d.type&&"if"===d.text&&"else"===f.last_text?c.space_before_token=!0:w()):"TK_RESERVED"===d.type&&q(d.text,i.line_starters)&&")"!==f.last_text&&w():f.multiline_frame&&k(f.mode)&&","===f.last_text&&"}"===s?w():"SPACE"===a&&(c.space_before_token=!0);A(),f.last_word=d.text,"TK_RESERVED"===d.type&&"do"===d.text&&(f.do_block=!0),"TK_RESERVED"===d.type&&"if"===d.text&&(f.if_block=!0)}o="TK_START_BLOCK",s="",(c=new Q(l,m)).raw=g.test_output_raw,t=[],T(Z.BlockStatement),this.beautify=function(){var e,t;for(i=new ee(n,g,l),h=i.tokenize(),r=0;e=O();){for(var a=0;a<e.comments_before.length;a++)E(e.comments_before[a]);E(e),s=f.last_text,o=e.type,f.last_text=e.text,r+=1}return t=c.get_code(),g.end_with_newline&&(t+="\n"),"\n"!=g.eol&&(t=t.replace(/[\n]/g,g.eol)),t}}function i(t){var a=0,n=-1,r=[],i=!0;this.set_indent=function(e){a=t.baseIndentLength+e*t.indent_length,n=e},this.get_character_count=function(){return a},this.is_empty=function(){return i},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),a+=e.length,i=!1},this.pop=function(){var e=null;return i||(e=r.pop(),a-=e.length,i=0===r.length),e},this.remove_indent=function(){0<n&&(n-=1,a-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),a-=1;i=0===r.length},this.toString=function(){var e="";return this._empty||(0<=n&&(e=t.indent_cache[n]),e+=r.join("")),e}}function Q(t,a){a=a||"",this.indent_cache=[a],this.baseIndentLength=a.length,this.indent_length=t.length,this.raw=!1;var n=[];this.baseIndentString=a,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new i(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return n.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<n.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==Z.ForInitializer&&e.mode!==Z.Conditional)for(var t=e.start_line_index,a=n.length;t<a;)n[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,a);e&&1<n.length&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=1<n.length?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===n.length||n[n.length-2].is_empty())}}var J=function J(e,t,a,n,r,i){this.type=e,this.text=t,this.comments_before=[],this.newlines=a||0,this.wanted_newline=0<a,this.whitespace_before=n||"",this.parent=null,this.directives=null};function ee(R,L,e){var x="\n\r\t ".split(""),I=/[0-9]/,O=/[01234567]/,F=/[0123456789abcdefABCDEF]/,M="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var D,P,N,B,U,H,$=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),z=/([\s\S]*?)((?:\*\/)|$)/g,K=/([^\n\r\u2028\u2029]*)/g,W=/\/\* beautify( \w+[:]\w+)+ \*\//g,G=/ (\w+)[:](\w+)/g,V=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,Y=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function o(){var e,t,a=[];if(D=0,P="",H<=U)return["","TK_EOF"];t=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var n=R.charAt(U);for(U+=1;q(n,x);){if(j.newline.test(n)?"\n"===n&&"\r"===R.charAt(U-2)||(D+=1,a=[]):a.push(n),H<=U)return["","TK_EOF"];n=R.charAt(U),U+=1}if(a.length&&(P=a.join("")),I.test(n)){var r=!0,i=!0,o=I;for("0"===n&&U<H&&/[Xxo]/.test(R.charAt(U))?(i=r=!1,n+=R.charAt(U),U+=1,o=/[o]/.test(R.charAt(U))?O:F):(n="",U-=1);U<H&&o.test(R.charAt(U));)n+=R.charAt(U),U+=1,r&&U<H&&"."===R.charAt(U)&&(n+=R.charAt(U),U+=1,r=!1),i&&U<H&&/[Ee]/.test(R.charAt(U))&&(n+=R.charAt(U),(U+=1)<H&&/[+-]/.test(R.charAt(U))&&(n+=R.charAt(U),U+=1),r=i=!1);return[n,"TK_WORD"]}if(j.isIdentifierStart(R.charCodeAt(U-1))){if(U<H)for(;j.isIdentifierChar(R.charCodeAt(U))&&(n+=R.charAt(U),(U+=1)!==H););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&q(t.text,["set","get"])||!q(n,$)?[n,"TK_WORD"]:"in"===n?[n,"TK_OPERATOR"]:[n,"TK_RESERVED"]}if("("===n||"["===n)return[n,"TK_START_EXPR"];if(")"===n||"]"===n)return[n,"TK_END_EXPR"];if("{"===n)return[n,"TK_START_BLOCK"];if("}"===n)return[n,"TK_END_BLOCK"];if(" "===n)return[n,"TK_SEMICOLON"];if("/"===n){var s="";if("*"===R.charAt(U)){U+=1,z.lastIndex=U;var l=z.exec(R);s="/*".concat(l[0]),U+=l[0].length;var c=function k(e){if(!e.match(W))return null;var t={};G.lastIndex=0;for(var a=G.exec(e);a;)t[a[1]]=a[2],a=G.exec(e);return t}(s);return c&&"start"===c.ignore&&(V.lastIndex=U,s+=(l=V.exec(R))[0],U+=l[0].length),[s=s.replace(j.lineBreak,"\n"),"TK_BLOCK_COMMENT",c]}if("/"===R.charAt(U)){U+=1,K.lastIndex=U;var d=K.exec(R);return s="//".concat(d[0]),U+=d[0].length,[s,"TK_COMMENT"]}}if("`"===n||"'"===n||'"'===n||("/"===n||L.e4x&&"<"===n&&R.slice(U-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&q(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&q(t.parent.text,["if","while","for"])||q(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var f=n,p=!1,u=!1;if(e=n,"/"===f)for(var g=!1;U<H&&(p||g||R.charAt(U)!==f)&&!j.newline.test(R.charAt(U));)e+=R.charAt(U),p?p=!1:(p="\\"===R.charAt(U),"["===R.charAt(U)?g=!0:"]"===R.charAt(U)&&(g=!1)),U+=1;else if(L.e4x&&"<"===f){var h=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,m=R.slice(U-1),v=h.exec(m);if(v&&0===v.index){for(var b=v[2],E=0;v;){var _=!!v[1],w=v[2],y=!!v[v.length-1]||"![CDATA["===w.slice(0,8);if(w!==b||y||(_?--E:++E),E<=0)break;v=h.exec(m)}var A=v?v.index+v[0].length:m.length;return m=m.slice(0,A),U+=A-1,[m=m.replace(j.lineBreak,"\n"),"TK_STRING"]}}else for(;U<H&&(p||R.charAt(U)!==f&&("`"===f||!j.newline.test(R.charAt(U))));)(p||"`"===f)&&j.newline.test(R.charAt(U))?("\r"===R.charAt(U)&&"\n"===R.charAt(U+1)&&(U+=1),e+="\n"):e+=R.charAt(U),p=p?("x"!==R.charAt(U)&&"u"!==R.charAt(U)||(u=!0),!1):"\\"===R.charAt(U),U+=1;if(u&&L.unescape_strings&&(e=function S(e){var t,a=!1,n="",r=0,i="",o=0;for(;a||r<e.length;)if(t=e.charAt(r),r++,a){if(a=!1,"x"===t)i=e.substr(r,2),r+=2;else{if("u"!==t){n+="\\".concat(t);continue}i=e.substr(r,4),r+=4}if(!i.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(o=parseInt(i,16))&&o<32){n+="x"===t?"\\x".concat(i):"\\u".concat(i);continue}if(34===o||39===o||92===o)n+="\\".concat(String.fromCharCode(o));else{if("x"===t&&126<o&&o<=255)return e;n+=String.fromCharCode(o)}}else"\\"===t?a=!0:n+=t;return n}(e)),U<H&&R.charAt(U)===f&&(e+=f,U+=1,"/"===f))for(;U<H&&j.isIdentifierStart(R.charCodeAt(U));)e+=R.charAt(U),U+=1;return[e,"TK_STRING"]}if("#"===n){if(0===B.length&&"!"===R.charAt(U)){for(e=n;U<H&&"\n"!==n;)e+=n=R.charAt(U),U+=1;return["".concat(X(e),"\n"),"TK_UNKNOWN"]}var C="#";if(U<H&&I.test(R.charAt(U))){for(;C+=n=R.charAt(U),(U+=1)<H&&"#"!==n&&"="!==n;);return"#"===n||("["===R.charAt(U)&&"]"===R.charAt(U+1)?(C+="[]",U+=2):"{"===R.charAt(U)&&"}"===R.charAt(U+1)&&(C+="{}",U+=2)),[C,"TK_WORD"]}}if("<"===n&&("?"===R.charAt(U)||"%"===R.charAt(U))){Y.lastIndex=U-1;var T=Y.exec(R);if(T)return n=T[0],U+=n.length-1,[n=n.replace(j.lineBreak,"\n"),"TK_STRING"]}if("<"===n&&"\x3c!--"===R.substring(U-1,U+3)){for(U+=3,n="\x3c!--";!j.newline.test(R.charAt(U))&&U<H;)n+=R.charAt(U),U++;return N=!0,[n,"TK_COMMENT"]}if("-"===n&&N&&"--\x3e"===R.substring(U-1,U+2))return N=!1,U+=2,["--\x3e","TK_COMMENT"];if("."===n)return[n,"TK_DOT"];if(q(n,M)){for(;U<H&&q(n+R.charAt(U),M)&&(n+=R.charAt(U),!(H<=(U+=1))););return","===n?[n,"TK_COMMA"]:"="===n?[n,"TK_EQUALS"]:[n,"TK_OPERATOR"]}return[n,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,a;H=R.length,U=0,N=!1,B=[];for(var n=null,r=[],i=[];!t||"TK_EOF"!==t.type;){for(a=o(),e=new J(a[1],a[0],D,P);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=a[2]),i.push(e),a=o(),e=new J(a[1],a[0],D,P);i.length&&(e.comments_before=i,i=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(n),n=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&n&&("]"===e.text&&"["===n.text||")"===e.text&&"("===n.text||"}"===e.text&&"{"===n.text)&&(e.parent=n.parent,n=r.pop()),B.push(e),t=e}return B}}return{run:function I(e,t){function o(e){return e.replace(/\s+$/g,"")}var a,n,r,m,i,s,v,l,c,b,E,_,d,f;for((t=t||{}).wrap_line_length!==undefined&&0!==parseInt(t.wrap_line_length,10)||t.max_char===undefined||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),n=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),m=t.indent_char===undefined?" ":t.indent_char,s=t.brace_style===undefined?"collapse":t.brace_style,i=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),v=t.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],l=t.preserve_newlines===undefined||t.preserve_newlines,c=l?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,b=t.indent_handlebars!==undefined&&t.indent_handlebars,E=t.wrap_attributes===undefined?"auto":t.wrap_attributes,_=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,d=t.end_with_newline!==undefined&&t.end_with_newline,f=Array.isArray(t.extra_liners)?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),t.indent_with_tabs&&(m="\t",r=1),(a=new function R(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=n,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:f,in_array:function(e,t){for(var a=0;a<t.length;a++)if(e===t[a])return!0;return!1}},this.is_whitespace=function(e){for(;0<e.length;e++)if(!this.Utils.in_array(e.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)l&&"\n"===e&&this.newlines<=c&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(b){var a=this.input.substr(this.pos,3);if("{{#"===a||"{{/"===a)break;if("{{!"===a)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",a=new RegExp("</".concat(e,"\\s*>"),"igm");a.lastIndex=this.pos;var n=a.exec(this.input),r=n?n.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags["".concat(e,"count")]?this.tags["".concat(e,"count")]++:this.tags["".concat(e,"count")]=1,this.tags[e+this.tags["".concat(e,"count")]]=this.indent_level,this.tags[e+this.tags["".concat(e,"count")]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags["".concat(e,"count")]},this.retrieve_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags["".concat(e,"count")]+"parent"],delete this.tags[e+this.tags["".concat(e,"count")]],1===this.tags["".concat(e,"count")]?delete this.tags["".concat(e,"count")]:this.tags["".concat(e,"count")]--}},this.indent_to_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]])}},this.get_tag=function(e){var t,a,n="",r=[],i="",o=!1,s=!0,l=this.pos,c=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=l,this.line_char_count=c),r.length?r.join(""):["","TK_EOF"];if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace))o=!0;else{if("'"!==n&&'"'!==n||(n+=this.get_unformatted(n),o=!0),"="===n&&(o=!1),r.length&&"="!=r[r.length-1]&&">"!=n&&o){if(this.space_or_wrap(r),o=!1,!s&&"force"===E&&"/"!=n){this.print_newline(!0,r),this.print_indentation(r);for(var d=0;d<_;d++)r.push(m)}for(var f=0;f<r.length;f++)if(" "===r[f]){s=!1;break}}if(b&&"<"===a&&n+this.input.charAt(this.pos)==="{{"&&(n+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(n=" ".concat(n)),o=!0),"<"!==n||a||(t=this.pos-1,a="<"),b&&!a&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===n||"/"===n||"!"===n?this.pos-3:this.pos-2,a="{"),this.line_char_count++,r.push(n),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(b&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(b&&"{"===a&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=n);var p,u,g=r.join("");p=-1!=g.indexOf(" ")?g.indexOf(" "):"{"===g[0]?g.indexOf("}"):g.indexOf(">"),u="<"!==g[0]&&b?"#"===g[2]?3:2:1;var h=g.substring(u,p).toLowerCase();return"/"===g.charAt(g.length-2)||this.Utils.in_array(h,this.Utils.single_token)?e||(this.tag_type="SINGLE"):b&&"{"===g[0]&&"else"===h?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(h,v)?(i=this.get_unformatted("</".concat(h,">"),g),r.push(i),this.pos,this.tag_type="SINGLE"):"script"===h&&(-1===g.search("type")||-1<g.search("type")&&-1<g.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(h),this.tag_type="SCRIPT"):"style"===h&&(-1===g.search("type")||-1<g.search("type")&&-1<g.search("text/css"))?e||(this.record_tag(h),this.tag_type="STYLE"):"!"===h.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===h.charAt(0)?(this.retrieve_tag(h.substring(1)),this.tag_type="END"):(this.record_tag(h),"html"!=h.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(h,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=l,this.line_char_count=c),r.join("")},this.get_comment=function(e){var t="",a=">",n=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==a[a.length-1]||-1==t.indexOf(a));)!n&&t.length<10&&(0===t.indexOf("<![if")?(a="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(a="]]>",n=!0):0===t.indexOf("<![")?(a="]>",n=!0):0===t.indexOf("\x3c!--")?(a="--\x3e",n=!0):0===t.indexOf("{{!")?(a="}}",n=!0):0===t.indexOf("<?")?(a="?>",n=!0):0===t.indexOf("<%")&&(a="%>",n=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var a="",n="",r=0,i=!0;do{if(this.pos>=this.input.length)return n;if(a=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(a,this.Utils.whitespace)){if(!i){this.line_char_count--;continue}if("\n"===a||"\r"===a){n+="\n",this.line_char_count=0;continue}}n+=a,this.line_char_count++,i=!0,b&&"{"===a&&n.length&&"{"===n[n.length-2]&&(r=(n+=this.get_unformatted("}}")).length)}while(-1===n.toLowerCase().indexOf(e,r));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_".concat(this.tag_type)]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_".concat(t)]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var a=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(a&&!this.Utils.in_array(a,t))},this.printer=function(e,t,a,n,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=a,this.brace_style=r,this.indent_level=0,this.wrap_line_length=n;for(var i=this.line_char_count=0;i<this.indent_size;i++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!=t[t.length-1])&&("\n"!=t[t.length-1]&&(t[t.length-1]=o(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=function t(e){return e.replace(/^\s+/g,"")}(e)),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=o(e)),e&&""!==e&&(1<e.length&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(0<t,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,m,r,i,s);;){var p=a.get_token();if(a.token_text=p[0],a.token_type=p[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case"TK_TAG_START":a.print_newline(!1,a.output),a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===a.last_token&&""===a.last_text){var u=a.token_text.match(/\w+/)[0],g=null;a.output.length&&(g=a.output[a.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===g||g[1]!=u&&!a.Utils.in_array(g[1],v))&&a.print_newline(!1,a.output)}a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var h=a.token_text.match(/^\s*<([a-z-]+)/i);h&&a.Utils.in_array(h[1],v)||a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var w=a.token_text,y=void 0,A=1;"TK_SCRIPT"===a.token_type?y=x:"TK_STYLE"===a.token_type&&(y=L),"keep"===t.indent_scripts?A=0:"separate"===t.indent_scripts&&(A=-a.indent_level);var C=a.get_full_indent(A);if(y)w=y(w.replace(/^\s*/,C),t);else{var T=w.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,k=a.get_full_indent(A-T);w=w.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+k).replace(/\s+$/,"")}w&&(a.print_token_raw(w),a.print_newline(!0,a.output))}a.current_mode="TAG";break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type,a.last_text=a.token_text}var S=a.output.join("").replace(/[\r\n\t ]+$/,"");return d&&(S+="\n"),S}}},Object.assign(St.DEFAULTS,{codeMirror:window.CodeMirror,codeMirrorOptions:{lineNumbers:!0,tabMode:"indent",indentWithTabs:!0,lineWrapping:!0,mode:"text/html",tabSize:2},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","ol","table","dl"],brace_style:"expand",indent_char:"\t",indent_size:1,wrap_line_length:0},codeViewKeepActiveButtons:["fullscreen"]}),St.PLUGINS.codeView=function(c){var d,f,p=c.$,u=function u(){return c.$box.hasClass("fr-code-view")};function g(){return f?f.getValue():d.val()}function h(){u()&&(f&&f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin||c.opts.height?(c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",c.opts.heightMin||c.opts.height),d.css("height",c.opts.height)):c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var m,v=!1;function b(){u()&&c.events.trigger("blur")}function E(){u()&&v&&c.events.trigger("focus")}function n(e){d||(!function l(){d=p('<textarea class="fr-code" tabIndex="-1">'),c.$wp.append(d),d.attr("dir",c.opts.direction),c.$box.hasClass("fr-basic")||(m=p('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'.concat(c.helpers.isMobile()?"":" fr-desktop",'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>')),c.$box.append(m),c.events.bindClick(c.$box,"a.html-switch",function(){c.events.trigger("commands.before",["html"]),_(!1),c.events.trigger("commands.after",["html"])}));var e=function e(){return!u()};c.events.on("buttons.refresh",e),c.events.on("copy",e,!0),c.events.on("cut",e,!0),c.events.on("paste",e,!0),c.events.on("destroy",w,!0),c.events.on("html.set",function(){u()&&_(!0)}),c.events.on("codeView.update",h),c.events.on("codeView.toggle",function(){c.$box.hasClass("fr-code-view")&&_()}),c.events.on("form.submit",function(){u()&&(c.html.set(g()),c.events.trigger("contentChanged",[],!0))},!0)}(),!f&&c.opts.codeMirror?((f=c.opts.codeMirror.fromTextArea(d.get(0),c.opts.codeMirrorOptions)).on("blur",b),f.on("focus",E)):(c.events.$on(d,"keydown keyup change input",function(){c.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height="".concat(this.scrollHeight,"px"))}),c.events.$on(d,"blur",b),c.events.$on(d,"focus",E))),c.undo.saveStep(),c.html.cleanEmptyTags(),c.html.cleanWhiteTags(!0),c.core.hasFocus()&&(c.core.isEmpty()||(c.selection.save(),c.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),c.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=c.html.get(!1,!0);c.$el.find("span.fr-tmp").remove(),c.$box.toggleClass("fr-code-view",!0);var a,n,r=!1;if(c.core.hasFocus()&&(r=!0,c.events.disableBlur(),c.$el.blur()),t=(t=t.replace(/<span class="fr-tmp fr-sm">F<\/span>/,"FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/,"FROALA-EM"),c.codeBeautifier&&!t.includes("fr-embedly")&&(t=c.codeBeautifier.run(t,c.opts.codeBeautifierOptions)),f){a=t.indexOf("FROALA-SM"),(n=t.indexOf("FROALA-EM"))<a?a=n:n-=9;var i=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,a).length-t.substring(0,a).replace(/\n/g,"").length,o=t.substring(0,n).length-t.substring(0,n).replace(/\n/g,"").length;a=t.substring(0,a).length-t.substring(0,t.substring(0,a).lastIndexOf("\n")+1).length,n=t.substring(0,n).length-t.substring(0,t.substring(0,n).lastIndexOf("\n")+1).length,f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin&&c.$box.find(".CodeMirror-scroll").css("min-height",c.opts.heightMin),f.setValue(t),v=!r,f.focus(),v=!0,f.setSelection({line:i,ch:a},{line:o,ch:n}),f.refresh(),f.clearHistory()}else{a=t.indexOf("FROALA-SM"),n=t.indexOf("FROALA-EM")-9,c.opts.heightMin&&d.css("min-height",c.opts.heightMin),c.opts.height&&d.css("height",c.opts.height),c.opts.heightMax&&d.css("max-height",c.opts.height||c.opts.heightMax),d.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var s=p(c.o_doc).scrollTop();v=!r,d.focus(),v=!0,d.get(0).setSelectionRange(a,n),p(c.o_doc).scrollTop(s)}c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!c.helpers.isMobile()&&c.opts.toolbarInline&&c.toolbar.hide()}function _(e){void 0===e&&(e=!u());var t=c.$tb.find('.fr-command[data-cmd="html"]');e?(c.popups.hideAll(),n(t)):(c.$box.toggleClass("fr-code-view",!1),function a(e){var t=g();c.html.set(t),c.$el.blur(),c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1),c.selection.setAtStart(c.el),c.selection.restore(),c.placeholder.refresh(),c.undo.saveStep()}(t),c.events.trigger("codeView.update"))}function w(){u()&&_(!1),f&&f.toTextArea(),d.val("").removeData().remove(),d=null,m&&(m.remove(),m=null)}return{_init:function e(){if(c.events.on("focus",function(){c.opts.toolbarContainer&&function t(){var e=c.$tb.find('.fr-command[data-cmd="html"]');u()?(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1))}()}),!c.$wp)return!1},toggle:_,isActive:u,get:g}},St.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),St.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"}),Object.assign(St.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(St.DEFAULTS,{colorsText:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsBackground:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsStep:7,colorsHEXInput:!0,colorsButtons:["colorsBack","|","-"]}),St.PLUGINS.colors=function(m){var v=m.$,s='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(m.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(m.language.translate("HEX Color"),'" \n tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n ').concat(m.language.translate("OK"),"</button></div></div>");function l(e){for(var t="text"===e?m.opts.colorsText:m.opts.colorsBackground,a='<div class="fr-color-set fr-'.concat(e,'-color fr-selected-set">'),n=0;n<t.length;n++)0!==n&&n%m.opts.colorsStep==0&&(a+="<br>"),"REMOVE"!==t[n]?a+='<span class="fr-command fr-select-color" style="background:'.concat(t[n],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(e,'Color" \n data-param1="').concat(t[n],'"><span class="fr-sr-only"> ').concat(m.language.translate("Color")).concat(t[n]," \n &nbsp;&nbsp;&nbsp;</span></span>"):a+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(e,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(m.language.translate("Clear Formatting"),'">').concat(m.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(m.language.translate("Clear Formatting")," </span></span>");return"".concat(a,"</div>")}function c(e){var t,a=m.popups.get("".concat(e,"Color.picker")),n=v(m.selection.element());t="background"===e?"background-color":"color";var r=a.find(".fr-".concat(e,"-color .fr-select-color"));for(r.find(".fr-selected-color").remove(),r.removeClass("fr-active-item"),r.not('[data-param1="REMOVE"]').attr("aria-selected",!1);n.get(0)!==m.el;){if("transparent"!==n.css(t)&&"rgba(0, 0, 0, 0)"!==n.css(t)){var i=a.find(".fr-".concat(e,'-color .fr-select-color[data-param1="').concat(m.helpers.RGBToHex(n.css(t)),'"]'));i.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),i.addClass("fr-active-item").attr("aria-selected",!0);break}n=n.parent()}!function o(e){var t=m.popups.get("".concat(e,"Color.picker")),a=t.find(".fr-".concat(e,"-color .fr-active-item")).attr("data-param1"),n=t.find(".fr-color-hex-layer input");a||(a="");n.length&&v(n.val(a).input).trigger("change")}(e)}function n(e){"REMOVE"!==e?m.format.applyStyle("background-color",m.helpers.HEXtoRGB(e)):m.format.removeStyle("background-color"),m.popups.hide("backgroundColor.picker")}function r(e){"REMOVE"!==e?m.format.applyStyle("color",m.helpers.HEXtoRGB(e)):m.format.removeStyle("color"),m.popups.hide("textColor.picker")}return{showColorsPopup:function d(e){var t=m.$tb.find('.fr-command[data-cmd="'.concat(e,'"]')),a=m.popups.get("".concat(e,".picker"));if(a||(a=function o(e){var t="";m.opts.toolbarInline&&0<m.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(m.button.buildList(m.opts.colorsButtons),"\n </div>"));var a,n="";a="textColor"===e?(m.opts.colorsHEXInput&&(n=s.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(m.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:t,text_colors:l("text"),custom_color:n}):(m.opts.colorsHEXInput&&(n=s.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(m.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:t,background_colors:l("background"),custom_color:n});var r=m.popups.create("".concat(e,".picker"),a);return function i(g,h){m.events.on("popup.tab",function(e){var t=v(e.currentTarget);if(!m.popups.isVisible(h)||!t.is("span"))return!0;var a=e.which,n=!0;if(St.KEYCODE.TAB===a){var r=g.find(".fr-buttons");n=!m.accessibility.focusToolbar(r,!!e.shiftKey)}else if(St.KEYCODE.ARROW_UP===a||St.KEYCODE.ARROW_DOWN===a||St.KEYCODE.ARROW_LEFT===a||St.KEYCODE.ARROW_RIGHT===a){if(t.is("span.fr-select-color")){var i=t.parent().find("span.fr-select-color"),o=i.index(t),s=m.opts.colorsStep,l=Math.floor(i.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;St.KEYCODE.ARROW_UP===a?f=((f-s)%p+p)%p:St.KEYCODE.ARROW_DOWN===a?f=(f+s)%p:St.KEYCODE.ARROW_LEFT===a?f=((f-1)%p+p)%p:St.KEYCODE.ARROW_RIGHT===a&&(f=(f+1)%p);var u=v(i.get(f));m.events.disableBlur(),u.focus(),n=!1}}else St.KEYCODE.ENTER===a&&(m.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(r,"".concat(e,".picker")),r}(e)),!a.hasClass("fr-active"))if(m.popups.setContainer("".concat(e,".picker"),m.$tb),c("textColor"===e?"text":"background"),t.isVisible()){var n=m.button.getPosition(t),r=n.left,i=n.top;m.popups.show("".concat(e,".picker"),r,i,t.outerHeight())}else m.position.forSelection(a),m.popups.show("".concat(e,".picker"))},background:n,customColor:function i(e){var t=m.popups.get("".concat(e,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var a=t.val();"background"===e?n(a):r(a)}},text:r,back:function e(){m.popups.hide("textColor.picker"),m.popups.hide("backgroundColor.picker"),m.toolbar.showInline()}}},St.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),St.RegisterCommand("textColor",{title:"Text Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("textColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("textColor.picker")):this.colors.showColorsPopup("textColor")}}),St.RegisterCommand("applytextColor",{undo:!0,callback:function(e,t){this.colors.text(t)}}),St.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),St.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),St.RegisterCommand("backgroundColor",{title:"Background Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("backgroundColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("backgroundColor.picker")):this.colors.showColorsPopup("backgroundColor")}}),St.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(e,t){this.colors.background(t)}}),St.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),St.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),St.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"}),Object.assign(St.DEFAULTS,{dragInline:!0}),St.PLUGINS.draggable=function(d){var f=d.$;function e(e){return!(!e.originalEvent||!e.originalEvent.target||e.originalEvent.target.nodeType!==Node.TEXT_NODE)||(e.target&&"A"===e.target.tagName&&1===e.target.childNodes.length&&"IMG"===e.target.childNodes[0].tagName&&(e.target=e.target.childNodes[0]),f(e.target).hasClass("fr-draggable")?(d.undo.canDo()||d.undo.saveStep(),d.opts.dragInline?d.$el.attr("contenteditable",!0):d.$el.attr("contenteditable",!1),d.opts.toolbarInline&&d.toolbar.hide(),f(e.target).addClass("fr-dragging"),d.browser.msie||d.browser.edge||d.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}var p,u=function u(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||d.node.isElement(e)))};function g(e,t,a){if(d.opts.iframe){var n=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-top")),r=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-left"));e+=d.$iframe.offset().top+n,t+=d.$iframe.offset().left+r}p.offset().top!==e&&p.css("top",e),p.offset().left!==t&&p.css("left",t),p.width()!==a&&p.css("width",a)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",d.opts.dragInline?(!function a(){for(var e=null,t=0;t<St.INSTANCES.length;t++)if((e=St.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||d.browser.msie||d.browser.edge)&&e.preventDefault():(e.preventDefault(),function c(e){var t=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset);if(!u(t)){for(var a=0,n=t;!u(n)&&n===t&&0<e.originalEvent.pageY-d.win.pageYOffset-a;)a++,n=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset-a);(!u(n)||p&&0===d.$el.find(n).length&&n!==p.get(0))&&(n=null);for(var r=0,i=t;!u(i)&&i===t&&e.originalEvent.pageY-d.win.pageYOffset+r<f(d.doc).height();)r++,i=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset+r);(!u(i)||p&&0===d.$el.find(i).length&&i!==p.get(0))&&(i=null),t=null===i&&n?n:i&&null===n?i:i&&n?a<r?n:i:null}if(f(t).hasClass("fr-drag-helper"))return!1;if(t&&!d.node.isBlock(t)&&(t=d.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=f(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=f(t).parents("UL, OL").get(0)),t&&!f(t).hasClass("fr-drag-helper")){var o;p||(St.$draggable_helper||(St.$draggable_helper=f(document.createElement("div")).attr("class","fr-drag-helper")),p=St.$draggable_helper,d.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null},!0)),o=e.originalEvent.pageY<f(t).offset().top+f(t).outerHeight()/2;var s=f(t),l=0;o||0!==s.next().length?(o||(s=s.next()),"before"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(0<s.prev().length&&(l=parseFloat(s.prev().css("margin-bottom"))||0),l=Math.max(l,parseFloat(s.css("margin-top"))||0),g(s.offset().top-l/2-d.$box.offset().top,s.offset().left-d.win.pageXOffset-d.$box.offset().left,s.width()),p.data("fr-position","before"))):"after"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(l=parseFloat(s.css("margin-bottom"))||0,g(s.offset().top+f(t).height()+l/2-d.$box.offset().top,s.offset().left-d.win.pageXOffset-d.$box.offset().left,s.width()),p.data("fr-position","after")),p.data("fr-tag",s),p.addClass("fr-visible"),d.$box.append(p)}else p&&0<d.$box.find(p).length&&p.removeClass("fr-visible")}(e))}function a(e){e.originalEvent.dataTransfer.dropEffect="move",d.opts.dragInline||e.preventDefault()}function n(e){d.$el.attr("contenteditable",!0);var t=d.$el.find(".fr-dragging");p&&p.hasClass("fr-visible")&&d.$box.find(p).length?r(e):t.length&&(e.preventDefault(),e.stopPropagation()),p&&d.$box.find(p).length&&p.removeClass("fr-visible"),t.removeClass("fr-dragging")}function r(e){var t,a;d.$el.attr("contenteditable",!0);for(var n=0;n<St.INSTANCES.length;n++)if((t=St.INSTANCES[n].$el.find(".fr-dragging")).length){a=St.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),p&&p.hasClass("fr-visible")&&d.$box.find(p).length)p.data("fr-tag")[p.data("fr-position")]('<span class="fr-marker"></span>'),p.removeClass("fr-visible");else if(!1===d.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=d.events.chainTrigger("element.beforeDrop",t)))return!1;var r=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(r=t.parent()),d.core.isEmpty())d.events.focus();else d.$el.find(".fr-marker").replaceWith(St.MARKERS),d.selection.restore();if(a===d||d.undo.canDo()||d.undo.saveStep(),d.core.isEmpty())d.$el.html(r);else{var i=d.markers.insert();(d||"").selection&&r.contains(i)&&r.before(i),0===r.find(i).length?f(i).replaceWith(r):0===t.find(i).length&&f(i).replaceWith(t),t.after(St.MARKERS),d.selection.restore()}return d.popups.hideAll(),d.selection.save(),d.$el.find(d.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(d.opts.htmlAllowedEmptyTags.join(",")).remove(),d.html.wrap(),d.html.fillEmptyBlocks(),d.selection.restore(),d.undo.saveStep(),d.opts.iframe&&d.size.syncIframe(),a!==d&&(a.popups.hideAll(),a.$el.find(a.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),a.html.wrap(),a.html.fillEmptyBlocks(),a.undo.saveStep(),a.events.trigger("element.dropped"),a.opts.iframe&&a.size.syncIframe()),d.events.trigger("element.dropped",[r]),!1}p&&p.removeClass("fr-visible"),d.undo.canDo()||d.undo.saveStep(),setTimeout(function(){d.undo.saveStep()},0)}function i(e){if(e&&"DIV"===e.tagName&&d.node.hasClass(e,"fr-drag-helper"))e.parentNode.removeChild(e);else if(e&&e.nodeType===Node.ELEMENT_NODE)for(var t=e.querySelectorAll("div.fr-drag-helper"),a=0;a<t.length;a++)t[a].parentNode.removeChild(t[a])}return{_init:function o(){d.opts.enter===St.ENTER_BR&&(d.opts.dragInline=!0),d.events.on("dragstart",e,!0),d.events.on("dragover",t,!0),d.events.on("dragenter",a,!0),d.events.on("document.dragend",n,!0),d.events.on("document.drop",n,!0),d.events.on("drop",r,!0),d.events.on("html.processGet",i)}}},Object.assign(St.DEFAULTS,{editInPopup:!1}),St.MODULES.editInPopup=function(n){function e(){n.events.$on(n.$el,n._mouseup,function(){setTimeout(function(){!function a(){var e,t=n.popups.get("text.edit");e="INPUT"===n.el.tagName?n.$el.attr("placeholder"):n.$el.text(),t.find("input").val(e).trigger("change"),n.popups.setContainer("text.edit",n.$sc),n.popups.show("text.edit",n.$el.offset().left+n.$el.outerWidth()/2,n.$el.offset().top+n.$el.outerHeight(),n.$el.outerHeight())}()},10)})}return{_init:function a(){n.opts.editInPopup&&(!function t(){var e={edit:'<div id="fr-text-edit-'.concat(n.id,'" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(n.language.translate("Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">').concat(n.language.translate("Update"),"</button></div></div>")};n.popups.create("text.edit",e)}(),e())},update:function t(){var e=n.popups.get("text.edit").find("input").val();0===e.length&&(e=n.opts.placeholderText),"INPUT"===n.el.tagName?n.$el.attr("placeholder",e):n.$el.text(e),n.events.trigger("contentChanged"),n.popups.hide("text.edit")}}},St.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}}),Object.assign(St.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(St.DEFAULTS,{emoticonsSet:[{id:"people",name:"Smileys & People",code:"1f600",emoticons:[{code:"1f600",desc:"Grinning face"},{code:"1f601",desc:"Grinning Face with Smiling Eyes"},{code:"1f602",desc:"Face with Tears of Joy"},{code:"1f603",desc:"Smiling Face with Open Mouth"},{code:"1f604",desc:"Smiling Face with Open Mouth and Smiling Eyes"},{code:"1f605",desc:"Smiling Face with Open Mouth and Cold Sweat"},{code:"1f606",desc:"Smiling Face with Open Mouth and Tightly-Closed Eyes"},{code:"1f609",desc:"Winking Face"},{code:"1f60a",desc:"Smiling Face with Smiling Eyes"},{code:"1f608",desc:"Face Savouring Delicious Food"},{code:"1f60e",desc:"Smiling Face with Sunglasses"},{code:"1f60d",desc:"Smiling Face with Heart-Shaped Eyes"},{code:"1f618",desc:"Face Throwing a Kiss"},{code:"1f617",desc:"Kissing Face"},{code:"1f619",desc:"Kissing Face with Smiling Eyes"},{code:"1f61a",desc:"Kissing Face with Closed Eyes"},{code:"263a",desc:"White Smiling Face"},{code:"1f642",desc:"Slightly Smiling Face"},{code:"1f610",desc:"Neutral Face"},{code:"1f611",desc:"Expressionless Face"},{code:"1f636",desc:"Face Without Mouth"},{code:"1f60f",desc:"Smirking Face"},{code:"1f623",desc:"Persevering Face"},{code:"1f625",desc:"Disappointed but Relieved Face"},{code:"1f62e",desc:"Face with Open Mouth"},{code:"1f62f",desc:"Hushed Face"},{code:"1f62a",desc:"Sleepy Face"},{code:"1f62b",desc:"Tired Face"},{code:"1f634",desc:"Sleeping Face"},{code:"1f60c",desc:"Relieved Face"},{code:"1f61b",desc:"Face with Stuck-out Tongue"},{code:"1f61c",desc:"Face with Stuck-out Tongue and Winking Eye"},{code:"1f61d",desc:"Face with Stuck-out Tongue and Tightly-Closed Eyes"},{code:"1f612",desc:"Unamused Face"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f614",desc:"Pensive Face"},{code:"1f615",desc:"Confused Face"},{code:"1f632",desc:"Astonished Face"},{code:"1f616",desc:"Confounded Face"},{code:"1f61e",desc:"Disappointed Face"},{code:"1f61f",desc:"Worried Face"},{code:"1f624",desc:"Face with Look of Triumph"},{code:"1f622",desc:"Crying Face"},{code:"1f62d",desc:"Loudly Crying Face"},{code:"1f626",desc:"Frowning Face with Open Mouth"},{code:"1f627",desc:"Anguished Face"},{code:"1f628",desc:"Fearful Face"},{code:"1f629",desc:"Weary Face"},{code:"1f62c",desc:"Grimacing Face"},{code:"1f630",desc:"Face with Open Mouth and Cold Sweat"},{code:"1f631",desc:"Face Screaming in Fear"},{code:"1f633",desc:"Flushed Face"},{code:"1f635",desc:"Dizzy Face"},{code:"1f621",desc:"Pouting Face"},{code:"1f620",desc:"Angry Face"},{code:"1f637",desc:"Face with Medical Mask"},{code:"1f607",desc:"Smiling Face with Halo"},{code:"1f608",desc:"Smiling Face with Horns"},{code:"1f47f",desc:"Imp"},{code:"1f479",desc:"Japanese Ogre"},{code:"1f47a",desc:"Japanese Goblin"},{code:"1f480",desc:"Skull"},{code:"1f47b",desc:"Ghost"},{code:"1f47d",desc:"Extraterrestrial Alien"},{code:"1f47e",desc:"Alien Monster"},{code:"1f4a9",desc:"Pile of Poo"},{code:"1f63a",desc:"Smiling Cat Face with Open Mouth"},{code:"1f638",desc:"Grinning Cat Face with Smiling Eyes"},{code:"1f639",desc:"Cat Face with Tears of Joy"},{code:"1f63b",desc:"Smiling Cat Face with Heart-Shaped Eyes"},{code:"1f63c",desc:"Cat Face with Wry Smile"},{code:"1f63d",desc:"Kissing Cat Face with Closed Eyes"},{code:"1f640",desc:"Weary Cat Face"},{code:"1f63f",desc:"Crying Cat Face"},{code:"1f63e",desc:"Pouting Cat Face"},{code:"1f648",desc:"See-No-Evil Monkey"},{code:"1f649",desc:"Hear-No-Evil Monkey"},{code:"1f64a",desc:"Speak-No-Evil Monkey"},{code:"1f476",desc:"Baby"},{code:"1f466",desc:"Boy"},{code:"1f467",desc:"Girl"},{code:"1f468",desc:"Man"},{code:"1f469",desc:"Woman"},{code:"1f474",desc:"Older Man"},{code:"1f475",desc:"Older Woman"},{code:"1f46e",desc:"Police Officer"},{code:"1f482",desc:" Guardsman"},{code:"1f477",desc:" Construction Worker"},{code:"1f478",desc:"Princess"},{code:"1f473",desc:"Man with Turban"},{code:"1f472",desc:"Man with Gua Pi Mao"},{code:"1f471",desc:"Person with Blond Hair"},{code:"1f470",desc:"Bride with Veil"},{code:"1f47c",desc:"Baby Angel"},{code:"1f385",desc:"Father Christmas"},{code:"1f64e",desc:"Person with Pouting Face"},{code:"1f645",desc:"Face with No Good Gesture"},{code:"1f646",desc:"Face with Ok Gesture"},{code:"1f481",desc:"Information Desk Person"},{code:"1f64b",desc:"Happy Person Raising One Hand"},{code:"1f647",desc:"Person Bowing Deeply"},{code:"1f486",desc:"Face Massage"},{code:"1f487",desc:"Haircut"},{code:"1f6b6",desc:"Pedestrian"},{code:"1f3c3",desc:"Runner"},{code:"1f483",desc:"Dancer"},{code:"1f46f",desc:"Woman with Bunny Ears"},{code:"1f6c0",desc:"Bath"},{code:"1f464",desc:"Bust in Silhouette"},{code:"1f465",desc:"Busts in Silhouette"},{code:"1f3c7",desc:"Horse Racing"},{code:"1f3c2",desc:" Snowboarder"},{code:"1f3c4",desc:" Surfer"},{code:"1f6a3",desc:" Rowboat"},{code:"1f3ca",desc:" Swimmer"},{code:"1f6b4",desc:" Bicyclist"},{code:"1f6b5",desc:"Mountain Bicyclist"},{code:"1f46b",desc:" Man and Woman Holding Hands"},{code:"1f46c",desc:"Two Men Holding Hands"},{code:"1f46d",desc:"Two Women Holding Hands"},{code:"1f48f",desc:"Kiss"},{code:"1f468-2764-1f48b-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",desc:"Man Kiss Man"},{code:"1f469-2764-1f48b-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Kiss Woman"},{code:"1f491",desc:"Couple with Heart"},{code:"1f468-2764-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",desc:"Man Heart Man"},{code:"1f469-2764-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Heart Woman"},{code:"1f46a",desc:"Family"},{code:"1f468",desc:"Man Woman Boy"},{code:"1f468-1f469-1f467",desc:"Man Woman Girl"},{code:"1f468-1f469-1f467-1f466",desc:"Man Woman Girl Boy"},{code:"1f468-1f469-1f466-1f466",desc:"Man Woman Boy Boy"},{code:"1f468-1f469-1f467-1f467",desc:"Man Woman Girl Girl"},{code:"1f468-1f468-1f466",desc:"Man Man Boy"},{code:"1f468-1f468-1f467",desc:"Man Man Girl"},{code:"1f468-1f468-1f467-1f466",desc:"Man Man Girl Boy"},{code:"1f468-1f468-1f466-1f466",desc:"Man Man Boy Boy"},{code:"1f469-1f469-1f466",desc:"Woman Woman Boy"},{code:"1f469-1f469-1f467",desc:"Woman Woman Girl"},{code:"1f469-1f469-1f467-1f466",desc:"Woman Woman Girl Boy"},{code:"1f469-1f469-1f467-1f467",desc:"Woman Woman Girl Girl"},{code:"1f4aa",desc:"Flexed Biceps"},{code:"1f448",desc:"White Left Pointing Backhand Index"},{code:"1f449",desc:"White Right Pointing Backhand Index"},{code:"1f446",desc:"White Up Pointing Backhand Index"},{code:"1f447",desc:"White Down Pointing Backhand Index"},{code:"270c",desc:"Victory Hand"},{code:"270b",desc:"Raised Hand"},{code:"1f44c",desc:"Ok Hand Sign"},{code:"1f44d",desc:"Thumbs Up Sign"},{code:"1f44e",desc:"Thumbs Down Sign"},{code:"270a",desc:"Raised Fist"},{code:"1f44a",desc:"Fisted Hand Sign"},{code:"1f44b",desc:"Waving Hand Sign"},{code:"1f44f",desc:"Clapping Hands Sign"},{code:"1f450",desc:"Open Hands Sign"},{code:"1f64c",desc:"Person Raising Both Hands in Celebration"},{code:"1f64f",desc:"Person with Folded Hands"},{code:"1f485",desc:"Nail Polish"},{code:"1f442",desc:"Ear"},{code:"1f443",desc:"Nose"},{code:"1f463",desc:"Footprints"},{code:"1f440",desc:"Eyes"},{code:"1f445",desc:"Tongue"},{code:"1f444",desc:"Mouth"},{code:"1f48b",desc:"Kiss Mark"},{code:"1f498",desc:"Heart with Arrow"},{code:"2764",desc:"Heavy Black Heart"},{code:"1f493",desc:"Heavy Black Heart"},{code:"1f494",desc:"Broken Heart"},{code:"1f495",desc:"Two Hearts"},{code:"1f496",desc:"Sparkling Hearts"},{code:"1f497",desc:"Growing Hearts"},{code:"1f499",desc:"Blue Heart"},{code:"1f49a",desc:"Green Heart"},{code:"1f49b",desc:"Yellow Heart"},{code:"1f49c",desc:"Purple Heart"},{code:"1f49d",desc:"Heart with Ribbon"},{code:"1f49e",desc:"Revolving Hearts"},{code:"1f49f",desc:"Heart Decoration"},{code:"1f48c",desc:"Love Letter"},{code:"1f4a4",desc:"Sleeping Symbol"},{code:"1f4a2",desc:"Anger Symbol"},{code:"1f4a3",desc:"Bomb"},{code:"1f4a5",desc:"Collision Symbol"},{code:"1f4a6",desc:"Splashing Sweat Symbol"},{code:"1f4a8",desc:"Dash Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ac",desc:"Speech Balloon"},{code:"1f4ad",desc:"Thought Balloon"},{code:"1f453",desc:"Eyeglasses"},{code:"1f454",desc:"Necktie"},{code:"1f455",desc:"T-Shirt"},{code:"1f456",desc:"Jeans"},{code:"1f457",desc:"Dress"},{code:"1f458",desc:"Kimono"},{code:"1f459",desc:"Bikini"},{code:"1f45a",desc:"Womans Clothes"},{code:"1f45b",desc:"Purse"},{code:"1f45c",desc:"Handbag"},{code:"1f45d",desc:"Pouch"},{code:"1f392",desc:"School Satchel"},{code:"1f45e",desc:"Mans Shoe"},{code:"1f45f",desc:"Athletic Shoe"},{code:"1f460",desc:"High-Heeled Shoe"},{code:"1f461",desc:"Womans Sandal"},{code:"1f462",desc:"Womans Boots"},{code:"1f451",desc:"Crown"},{code:"1f452",desc:"Womans Hat"},{code:"1f462",desc:"Top Hat"},{code:"1f393",desc:"Graduation Cap"},{code:"1f484",desc:"Lipstick"},{code:"1f48d",desc:"Ring"},{code:"1f48e",desc:"Gem Stone"}]},{id:"nature",name:"Animals & Nature",code:"1F435",emoticons:[{code:"1F435",desc:"Monkey Face"},{code:"1F412",desc:"Monkey"},{code:"1F436",desc:"Dog Face"},{code:"1F415",desc:"Dog"},{code:"1F429",desc:"Poodle"},{code:"1F43A",desc:"Wolf Face"},{code:"1F431",desc:"Cat Face"},{code:"1F408",desc:"Cat"},{code:"1F42F",desc:"Tiger Face"},{code:"1F405",desc:"Tiger"},{code:"1F406",desc:"Leopard"},{code:"1F434",desc:"Horse Face"},{code:"1F40E",desc:"Horse"},{code:"1F42E",desc:"Cow Face"},{code:"1F402",desc:"Ox"},{code:"1F403",desc:"Water Buffalo"},{code:"1F404",desc:"Cow"},{code:"1F437",desc:"Pig Face"},{code:"1F416",desc:"Pig"},{code:"1F417",desc:"Boar"},{code:"1F43D",desc:"Pig Nose"},{code:"1F40F",desc:"Ram"},{code:"1F411",desc:"Sheep"},{code:"1F410",desc:"Goat"},{code:"1F42A",desc:"Dromedary Camel"},{code:"1F42B",desc:"Bactrian Camel"},{code:"1F418",desc:"Elephant"},{code:"1F42D",desc:"Mouse Face"},{code:"1F401",desc:"Mouse"},{code:"1F400",desc:"Rat"},{code:"1F439",desc:"Hamster Face"},{code:"1F430",desc:"Rabbit Face"},{code:"1F407",desc:"Rabbit"},{code:"1F43B",desc:"Bear Face"},{code:"1F428",desc:"Koala"},{code:"1F43C",desc:"Panda Face"},{code:"1F43E",desc:"Paw Prints"},{code:"1F414",desc:"Chicken"},{code:"1F413",desc:"Rooster"},{code:"1F423",desc:"Hatching Chick"},{code:"1F424",desc:"Baby Chick"},{code:"1F425",desc:"Front-Facing Baby Chick"},{code:"1F426",desc:"Bird"},{code:"1F427",desc:"Penguin"},{code:"1F438",desc:"Frog Face"},{code:"1F40A",desc:"Crocodile"},{code:"1F422",desc:"Turtle"},{code:"1F40D",desc:"Snake"},{code:"1F432",desc:"Dragon Face"},{code:"1F409",desc:"Dragon"},{code:"1F433",desc:"Spouting Whale"},{code:"1F40B",desc:"Whale"},{code:"1F42C",desc:"Dolphin"},{code:"1F41F",desc:"Fish"},{code:"1F420",desc:"Tropical Fish"},{code:"1F421",desc:"Blowfish"},{code:"1F419",desc:"Octopus"},{code:"1F41A",desc:"Spiral Shell"},{code:"1F40C",desc:"Snail"},{code:"1F41B",desc:"Bug"},{code:"1F41C",desc:"Ant"},{code:"1F41D",desc:"Honeybee"},{code:"1F41E",desc:"Lady Beetle"},{code:"1F490",desc:"Bouquet"},{code:"1F338",desc:"Cherry Blossom"},{code:"1F4AE",desc:"White Flower"},{code:"1F339",desc:"Rose"},{code:"1F33A",desc:"Hibiscus"},{code:"1F33B",desc:"Sunflower"},{code:"1F33C",desc:"Blossom"},{code:"1F337",desc:"Tulip"},{code:"1F331",desc:"Seedling"},{code:"1F332",desc:"Evergreen Tree"},{code:"1F333",desc:"Deciduous Tree"},{code:"1F334",desc:"Palm Tree"},{code:"1F335",desc:"Cactus"},{code:"1F33E",desc:"Ear of Rice"},{code:"1F33F",desc:"Herb"},{code:"2618",desc:"Four Leaf Clover"},{code:"1F341",desc:"Maple Leaf"},{code:"1F342",desc:"Fallen Leaf"},{code:"1F343",desc:"Leaf Fluttering in Wind"}]},{id:"foods",name:"Food & Drink",code:"1F347",emoticons:[{code:"1F347",desc:"Grapes"},{code:"1F348",desc:"Melon"},{code:"1F349",desc:"Watermelon"},{code:"1F34A",desc:"Tangerine"},{code:"1F34B",desc:"Lemon"},{code:"1F34C",desc:"Banana"},{code:"1F34D",desc:"Pineapple"},{code:"1F34E",desc:"Red Apple"},{code:"1F34F",desc:"Green Apple"},{code:"1F350",desc:"Pear"},{code:"1F351",desc:"Peach"},{code:"1F352",desc:"Cherries"},{code:"1F353",desc:"Strawberry"},{code:"1F345",desc:"Tomato"},{code:"1F346",desc:"Aubergine"},{code:"1F33D",desc:"Ear of Maize"},{code:"1F344",desc:"Mushroom"},{code:"1F330",desc:"Chestnut"},{code:"1F35E",desc:"Bread"},{code:"1F356",desc:"Meat on Bone"},{code:"1F357",desc:"Poultry Leg"},{code:"1F354",desc:"Hamburger"},{code:"1F35F",desc:"French Fries"},{code:"1F355",desc:"Slice of Pizza"},{code:"1F373",desc:"Cooking"},{code:"1F372",desc:"Pot of Food"},{code:"1F371",desc:"Bento Box"},{code:"1F358",desc:"Rice Cracker"},{code:"1F359",desc:"Rice Ball"},{code:"1F35A",desc:"Cooked Rice"},{code:"1F35B",desc:"Curry and Rice"},{code:"1F35C",desc:"Steaming Bowl"},{code:"1F35D",desc:"Spaghetti"},{code:"1F360",desc:"Roasted Sweet Potato"},{code:"1F362",desc:"Oden"},{code:"1F363",desc:"Sushi"},{code:"1F364",desc:"Fried Shrimp"},{code:"1F365",desc:"Fish Cake with Swirl Design"},{code:"1F361",desc:"Dango"},{code:"1F366",desc:"Soft Ice Cream"},{code:"1F367",desc:"Shaved Ice"},{code:"1F368",desc:"Ice Cream"},{code:"1F369",desc:"Doughnut"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday Cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate Bar"},{code:"1F36C",desc:"Candy"},{code:"1F36D",desc:"Lollipop"},{code:"1F36E",desc:"Custard"},{code:"1F36F",desc:"Honey Pot"},{code:"1F37C",desc:"Baby Bottle"},{code:"2615",desc:"Hot Beverage"},{code:"1F375",desc:"Teacup Without Handle"},{code:"1F376",desc:"Sake Bottle and Cup"},{code:"1F377",desc:"Wine Glass"},{code:"1F378",desc:"Cocktail Glass"},{code:"1F379",desc:"Tropical Drink"},{code:"1F37A",desc:"Beer Mug"},{code:"1F37B",desc:"Clinking Beer Mugs"},{code:"1F374",desc:"Fork and Knife"},{code:"1F52A",desc:"Hocho"}]},{id:"activity",name:"Activities",code:"1f383",emoticons:[{code:"1f383",desc:" Jack-O-Lantern"},{code:"1f384",desc:"Christmas Tree"},{code:"1f386",desc:" Fireworks"},{code:"1f387",desc:"Firework Sparkler"},{code:"2728",desc:" Sparkles"},{code:"1f388",desc:"Balloon"},{code:"1f389",desc:"Party Popper"},{code:"1f38a",desc:"Confetti Ball"},{code:"1f38b",desc:"Tanabata Tree"},{code:"1f38d",desc:"Pine Decoration"},{code:"1f38e",desc:"Japanese Dolls"},{code:"1f38f",desc:"Carp Streamer"},{code:"1f390",desc:"Wind Chime"},{code:"1f391",desc:"Moon Viewing Ceremony"},{code:"1f380",desc:"Ribbon"},{code:"1f381",desc:"Wrapped Present"},{code:"1f3ab",desc:"Ticket"},{code:"1f3c6",desc:"Trophy"},{code:"1f388",desc:"Balloon"},{code:"26bd",desc:"Soccer Ball"},{code:"26be",desc:"Baseball"},{code:"1f3c0",desc:"Basketball and Hoop"},{code:"1f3c8",desc:"American Football"},{code:"1f3c9",desc:"Rugby Football"},{code:"1f3be",desc:"Tennis Racquet and Ball"},{code:"1f3b1",desc:"Billiards"},{code:"1f3b3",desc:"Bowling"},{code:"1f3af",desc:"Direct Hit"},{code:"26f3",desc:"Flag in Hole"},{code:"1f3a3",desc:"Fishing Pole and Fish"},{code:"1f3bd",desc:"Running Shirt with Sash"},{code:"1f3bf",desc:"Ski and Ski Boot"},{code:"1f3ae",desc:"Video Game"},{code:"1f3b2",desc:"Game Die"},{code:"2660",desc:"Black Spade Suit"},{code:"2665",desc:"Black Heart SuiT"},{code:"2666",desc:"Black Diamond Suit"},{code:"2663",desc:"Black Club Suit"},{code:"1f0cf",desc:"Playing Card Black Joker"},{code:"1f004",desc:"Mahjong Tile Red Dragon"},{code:"1f3b4",desc:"Flower Playing Cards"}]},{id:"places",name:"Travel & Places",code:"1f30d",emoticons:[{code:"1f30d",desc:"Earth Globe Europe-Africa"},{code:"1f30e",desc:"Earth Globe Americas"},{code:"1f30f",desc:"Earth Globe Asia-Australia"},{code:"1f310",desc:"Globe with Meridians"},{code:"1f5fe",desc:"Silhouette of Japan"},{code:"1f30b",desc:"Volcano"},{code:"1f5fb",desc:"Mount Fuji"},{code:"1f3e0",desc:"House Building"},{code:"1f3e1",desc:"House with Garden"},{code:"1f3e2",desc:"Office Building"},{code:"1f3e3",desc:"Japanese Post Office"},{code:"1f3e4",desc:"European Post Office"},{code:"1f3e5",desc:"Hospital"},{code:"1f3e6",desc:"Bank"},{code:"1f3e8",desc:"Hotel"},{code:"1f3e9",desc:"Love Hotel"},{code:"1f3ea",desc:"Convenience Store"},{code:"1f3eb",desc:"School"},{code:"1f3ec",desc:"Department Store"},{code:"1f3ed",desc:"Factory"},{code:"1f3ef",desc:"Japanese Castle"},{code:"1f3f0",desc:"European Castle"},{code:"1f492",desc:"Wedding"},{code:"1f5fc",desc:"Tokyo Tower"},{code:"1f5fd",desc:"Statue of Liberty"},{code:"26ea",desc:"Church"},{code:"26f2",desc:"Fountain"},{code:"26fa",desc:"Tent"},{code:"1f301",desc:"Foggy"},{code:"1f303",desc:"Night with Stars"},{code:"1f304",desc:"Sunrise over Mountains"},{code:"1f305",desc:"Sunrise"},{code:"1f306",desc:"Cityscape at Dusk"},{code:"1f307",desc:"Sunset over Buildings"},{code:"1f309",desc:"Bridge at Night"},{code:"2668",desc:"Hot Springs"},{code:"1f30c",desc:"Milky Way"},{code:"1f3a0",desc:"Carousel Horse"},{code:"1f3a1",desc:"Ferris Wheel"},{code:"1f3a2",desc:"Roller Coaster"},{code:"1f488",desc:"Barber Pole"},{code:"1f3aa",desc:"Circus Tent"},{code:"1f3ad",desc:"Performing Arts"},{code:"1f3a8",desc:"Artist Palette"},{code:"1f3b0",desc:"Slot Machine"},{code:"1f682",desc:"Steam Locomotive"},{code:"1f683",desc:"Railway Car"},{code:"1f684",desc:"High-Speed Train"},{code:"1f685",desc:"High-Speed Train with Bullet Nose"},{code:"1f686",desc:"Train"},{code:"1f687",desc:"Metro"},{code:"1f688",desc:"Light Rail"},{code:"1f689",desc:"Station"},{code:"1f68a",desc:"Tram"},{code:"1f69d",desc:"Monorail"},{code:"1f69e",desc:"Mountain Railway"},{code:"1f68b",desc:"Tram Car"},{code:"1f68c",desc:"Bus"},{code:"1f68d",desc:"Oncoming Bus"},{code:"1f68e",desc:"Trolleybus"},{code:"1f690",desc:"Minibus"},{code:"1f691",desc:"Ambulance"},{code:"1f692",desc:"Fire Engine"},{code:"1f693",desc:"Police Car"},{code:"1f694",desc:"Oncoming Police Car"},{code:"1f695",desc:"Taxi"},{code:"1f695",desc:"Oncoming Taxi"},{code:"1f697",desc:"Automobile"},{code:"1f698",desc:"Oncoming Automobile"},{code:"1f699",desc:"Recreational Vehicle"},{code:"1f69a",desc:"Delivery Truck"},{code:"1f69b",desc:"Articulated Lorry"},{code:"1f69c",desc:"Tractor"},{code:"1f6b2",desc:"Bicycle"},{code:"1f68f",desc:"Bus Stop"},{code:"26fd",desc:"Fuel Pump"},{code:"1f6a8",desc:"Police Cars Revolving Light"},{code:"1f6a5",desc:"Horizontal Traffic Light"},{code:"1f6a6",desc:"Vertical Traffic Light"},{code:"1f6a7",desc:"Construction Sign"},{code:"2693",desc:"Anchor"},{code:"26f5",desc:"Sailboat"},{code:"1f6a4",desc:"Speedboat"},{code:"1f6a2",desc:"Ship"},{code:"2708",desc:"Airplane"},{code:"1f4ba",desc:"Seat"},{code:"1f681",desc:"Helicopter"},{code:"1f69f",desc:"Suspension Railway"},{code:"1f6a0",desc:"Mountain Cableway"},{code:"1f6a1",desc:"Aerial Tramway"},{code:"1f680",desc:"Rocket"},{code:"1f6aa",desc:"Door"},{code:"1f6bd",desc:"Toilet"},{code:"1f6bf",desc:"Shower"},{code:"1f6c1",desc:"Bathtub"},{code:"231b",desc:"Hourglass"},{code:"23f3",desc:"Hourglass with Flowing Sand"},{code:"231a",desc:"Watch"},{code:"23f0",desc:"Alarm Clock"},{code:"1f55b",desc:"Clock Face Twelve Oclock"},{code:"1f567",desc:"Clock Face Twelve-Thirty"},{code:"1f550",desc:"Clock Face One Oclock"},{code:"1f55c",desc:"Clock Face One-thirty"},{code:"1f551",desc:"Clock Face Two Oclock"},{code:"1f55d",desc:"Clock Face Two-thirty"},{code:"1f552",desc:"Clock Face Three Oclock"},{code:"1f55e",desc:"Clock Face Three-thirty"},{code:"1f553",desc:"Clock Face Four Oclock"},{code:"1f55f",desc:"Clock Face Four-thirty"},{code:"1f554",desc:"Clock Face Five Oclock"},{code:"1f560",desc:"Clock Face Five-thirty"},{code:"1f555",desc:"Clock Face Six Oclock"},{code:"1f561",desc:"Clock Face Six-thirty"},{code:"1f556",desc:"Clock Face Seven Oclock"},{code:"1f562",desc:"Clock Face Seven-thirty"},{code:"1f557",desc:"Clock Face Eight Oclock"},{code:"1f563",desc:"Clock Face Eight-thirty"},{code:"1f558",desc:"Clock Face Nine Oclock"},{code:"1f564",desc:"Clock Face Nine-thirty"},{code:"1f559",desc:"Clock Face Ten Oclock"},{code:"1f565",desc:"Clock Face Ten-thirty"},{code:"1f55a",desc:"Clock Face Eleven Oclock"},{code:"1f566",desc:"Clock Face Eleven-thirty"},{code:"1f311",desc:"New Moon Symbol"},{code:"1f312",desc:"Waxing Crescent Moon Symbol"},{code:"1f313",desc:"First Quarter Moon Symbol"},{code:"1f314",desc:"Waxing Gibbous Moon Symbol"},{code:"1f315",desc:"Full Moon Symbol"},{code:"1f316",desc:"Waning Gibbous Moon Symbol"},{code:"1f317",desc:"Last Quarter Moon Symbol"},{code:"1f318",desc:"Waning Crescent Moon Symbol"},{code:"1f319",desc:"Crescent Moon"},{code:"1f31a",desc:"New Moon with Face"},{code:"1f31b",desc:"First Quarter Moon with Face"},{code:"1f31c",desc:"Last Quarter Moon with Face"},{code:"2600",desc:"Black Sun with Rays"},{code:"1f31d",desc:"Full Moon with Face"},{code:"1f31e",desc:"Sun with Face"},{code:"2b50",desc:"White Medium Star"},{code:"1f31f",desc:"Glowing Star"},{code:"1f320",desc:"Shooting Star"},{code:"2601",desc:"Cloud"},{code:"26c5",desc:"Sun Behind Cloud"},{code:"1f300",desc:"Cyclone"},{code:"1f308",desc:"Rainbow"},{code:"1f302",desc:"Closed Umbrella"},{code:"2614",desc:"Umbrella with Rain Drops"},{code:"26a1",desc:"High Voltage Sign"},{code:"2744",desc:"Snowflake"},{code:"2603",desc:"Snowman Without Snow"},{code:"1f525",desc:"Fire"},{code:"1f4a7",desc:"Droplet"},{code:"1F30A",desc:"Water Wave"}]},{id:"objects",name:"Objects",code:"1F507",emoticons:[{code:"1F507",desc:"Speaker with Cancellation Stroke"},{code:"1F508",desc:"Speaker"},{code:"1F509",desc:"Speaker with One Sound Wave"},{code:"1F50A",desc:"Speaker with Three Sound Wave"},{code:"1F4E2",desc:"Public Address Loudspeaker"},{code:"1F4E3",desc:"Cheering Megaphone"},{code:"1F4EF",desc:"Postal Horn"},{code:"1F514",desc:"Bell"},{code:"1F515",desc:"Bell with Cancellation Stroke"},{code:"1F3BC",desc:"Musical Score"},{code:"1F3B5",desc:"Musical Note"},{code:"1F3B6",desc:"Multiple Musical Notes"},{code:"1F3A4",desc:"Microphone"},{code:"1F3A7",desc:"Headphone"},{code:"1F4FB",desc:"Radio"},{code:"1F3B7",desc:"Saxophone"},{code:"1F3B8",desc:"Guitar"},{code:"1F3B9",desc:"Musical Keyboard"},{code:"1F3BA",desc:"Trumpet"},{code:"1F3BB",desc:"Violin"},{code:"1F4F1",desc:"Mobile Phone"},{code:"1F4F2",desc:"Mobile Phone with Rightwards Arrow at Left"},{code:"260E",desc:"Black Telephone"},{code:"1F4DE",desc:"Telephone Receiver"},{code:"1F4DF",desc:"Pager"},{code:"1F4E0",desc:"Fax Machine"},{code:"1F50B",desc:"Battery"},{code:"1F50C",desc:"Electric Plug"},{code:"1F4BB",desc:"Personal Computer"},{code:"1F4BD",desc:"Minidisc"},{code:"1F4BE",desc:"Floppy Disk"},{code:"1F4BF",desc:"Optical Disk"},{code:"1F4C0",desc:"Dvd"},{code:"1F3A5",desc:"Movie Camera"},{code:"1F3AC",desc:"Clapper Board"},{code:"1F4FA",desc:"Television"},{code:"1F4F7",desc:"Camera"},{code:"1F4F9",desc:"Video Camera"},{code:"1F4FC",desc:"Videocassette"},{code:"1F50D",desc:"Left-Pointing Magnifying Glass"},{code:"1F50E",desc:"Right-Pointing Magnifying Glass"},{code:"1F52C",desc:"Microscope"},{code:"1F52D",desc:"Telelscope"},{code:"1F4E1",desc:"Satellite Antenna"},{code:"1F4A1",desc:"Electric Light Bulb"},{code:"1F526",desc:"Electric Torch"},{code:"1F3EE",desc:"Izakaya Lantern"},{code:"1F4D4",desc:"Notebook with Decorative Cover"},{code:"1F4D5",desc:"Closed Book"},{code:"1F4D6",desc:"Open Book"},{code:"1F4D7",desc:"Green Book"},{code:"1F4D8",desc:"Blue Book"},{code:"1F4D9",desc:"Orange Book"},{code:"1F4DA",desc:"Books"},{code:"1F4D3",desc:"Notebook"},{code:"1F4D2",desc:"Ledger"},{code:"1F4C3",desc:"Curl"},{code:"1F4DC",desc:"Scroll"},{code:"1F4C4",desc:"Page Facing Up"},{code:"1F4F0",desc:"Newspaper"},{code:"1F4D1",desc:"Bookmark Tabs"},{code:"1F516",desc:"Bookmark"},{code:"1F4B0",desc:"Money Bag"},{code:"1F4B4",desc:"Banknote with Yen Sign"},{code:"1F4B5",desc:"Banknote with Dollar Sign"},{code:"1F4B6",desc:"Banknote with Euro Sign"},{code:"1F4B7",desc:"Banknote with Pound Sign"},{code:"1F4B8",desc:"Money with Wings"},{code:"1F4B3",desc:"Credit Card"},{code:"1F4B9",desc:"Chart with Upwards Trend and Yen Sign"},{code:"1F4B1",desc:"Currency Exchange"},{code:"1F4B2",desc:"Heavy Dollar Sign"},{code:"2709",desc:"Envelope"},{code:"1F4E7",desc:"E-Mail Symbol"},{code:"1F4E8",desc:"Incoming Envelope"},{code:"1F4E9",desc:"Envelope with Downwards Arrow Above"},{code:"1F4E4",desc:"Outbox Tray"},{code:"1F4E5",desc:"Inbox Tray"},{code:"1F4E6",desc:"Package"},{code:"1F4BE",desc:"Closed Mailbox with Raised Flag"},{code:"1F4EA",desc:"Closed Mailbox with Lowered Flag"},{code:"1F4EC",desc:"Open Mailbox with Raised Flag"},{code:"1F4ED",desc:"Open Mailbox with Lowered Flag"},{code:"1F5F3",desc:"Postbox"},{code:"270F",desc:"Pencil"},{code:"2712",desc:"Black Nib"},{code:"1F4DD",desc:"Memo"},{code:"1F4BC",desc:"Briefcase"},{code:"1F4C1",desc:"File Folder"},{code:"1F4C2",desc:"Open File Folder"},{code:"1F4C5",desc:"Calender"},{code:"1F4C6",desc:"Tear-off Calender"},{code:"1F4C7",desc:"Card Index"},{code:"1F4C8",desc:"Chart with Upwards Trend"},{code:"1F4C9",desc:"Chart with Downwards Trend"},{code:"1F4CA",desc:"Bar Chart"},{code:"1F4CB",desc:"Clipboard"},{code:"1F4CC",desc:"Pushpin"},{code:"1F4CD",desc:"Round Pushpin"},{code:"1F4CE",desc:"Paperclip"},{code:"1F4CF",desc:"Straight Ruler"},{code:"1F4D0",desc:"Triangular Ruler"},{code:"2702",desc:"Black Scissors"},{code:"1F512",desc:"Lock"},{code:"1F513",desc:"Open Lock"},{code:"1F50F",desc:"Lock with Ink Pen"},{code:"1F510",desc:"Closed Lock with Key"},{code:"1F511",desc:"Key"},{code:"1F528",desc:"Hammer"},{code:"1F52B",desc:"Pistol"},{code:"1F527",desc:"Wrench"},{code:"1F529",desc:"Nut and Bolt"},{code:"1F517",desc:"Link Symbol"},{code:"1F489",desc:"Syringe"},{code:"1F48A",desc:"Pill"},{code:"1F6AC",desc:"Smoking Symbol"},{code:"1F5FF",desc:"Moyai"},{code:"1F52E",desc:"Crystal Ball"}]},{id:"symbols",name:"Symbols",code:"1F3E7",emoticons:[{code:"1F3E7",desc:"Automated Teller Machine"},{code:"1F6AE",desc:"Put Litter in Its Place Symbol"},{code:"1F6B0",desc:"Potable Water Symbol"},{code:"267F",desc:"Wheelchair Symbol"},{code:"1F6B9",desc:"Mens Symbol"},{code:"1F6BA",desc:"Womens Symbol"},{code:"1F6BB",desc:"Restroom"},{code:"1F6BC",desc:"Baby Symbol"},{code:"1F6BE",desc:"Water Closet"},{code:"1F6C2",desc:"Passport Control"},{code:"1F6C3",desc:"Customs"},{code:"1F6C4",desc:"Baggage Claim"},{code:"1F6C5",desc:"Left Luggage"},{code:"26A0",desc:"Warning Sign"},{code:"1F6B8",desc:"Children Crossing"},{code:"26D4",desc:"No Entry"},{code:"1F6AB",desc:"No Entry Sign"},{code:"1F6B3",desc:"No Bicycles"},{code:"1F6AD",desc:"No Smoking Symbol"},{code:"1F6AF",desc:"Do Not Litter Symbol"},{code:"1F6B1",desc:"Non-Potable Water Symbol"},{code:"1F6B7",desc:"No Pedestrians"},{code:"1F4F5",desc:"No Mobile Phones"},{code:"1F51E",desc:"No One Under Eighteen Symbol"},{code:"2B06",desc:"Upwards Black Arrow"},{code:"2197",desc:"North East Arrow"},{code:"27A1",desc:"Black Rightwards Arrow"},{code:"2198",desc:"South East Arrow"},{code:"2B07",desc:"Downwards Black Arrow"},{code:"2199",desc:"South West Arrow"},{code:"2B05",desc:"Leftwards Black Arrow"},{code:"2196",desc:"North West Arrow"},{code:"2195",desc:"Up Down Arrow"},{code:"2194",desc:"Left Right Arrow"},{code:"21A9",desc:"Leftwards Arrow with Hook"},{code:"21AA",desc:"Rightwards Arrow with Hook"},{code:"2934",desc:"Arrow Pointing Rightwards Then Curving Upwards"},{code:"2935",desc:"Arrow Pointing Rightwards Then Curving Downwards"},{code:"1F503",desc:"Clockwise Downwards and Upwards Open Circle Arrows"},{code:"1F504",desc:"Anticlockwise Downwards and Upwards Open Circle Arrows"},{code:"1F519",desc:"Back with Leftwards Arrow Above"},{code:"1F51A",desc:"End with Leftwards Arrow Above"},{code:"1F51B",desc:"On with Exclamation Mark with Left Right Arrow Above"},{code:"1F51C",desc:"Soon with Rightwards Arrow Above"},{code:"1F51D",desc:"Top with Upwards Arrow Above"},{code:"1F52F",desc:"Six Pointed Star with Middle Dot"},{code:"2648",desc:"Aries"},{code:"2649",desc:"Taurus"},{code:"264A",desc:"Gemini"},{code:"264B",desc:"Cancer"},{code:"264C",desc:"Leo"},{code:"264D",desc:"Virgo"},{code:"264E",desc:"Libra"},{code:"264F",desc:"Scorpius"},{code:"2650",desc:"Sagittarius"},{code:"2651",desc:"Capricorn"},{code:"2652",desc:"Aquarius"},{code:"2653",desc:"Pisces"},{code:"26CE",desc:"Ophiuchus"},{code:"1F500",desc:"Twisted Rightwards Arrows"},{code:"1F501",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows"},{code:"1F502",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows with Circled One Overlay"},{code:"25B6",desc:"Black Right-Pointing Triangle"},{code:"23E9",desc:"Black Right-Pointing Double Triangle"},{code:"25C0",desc:"Black Left-Pointing Triangle"},{code:"23EA",desc:"Black Left-Pointing Double Triangle"},{code:"1F53C",desc:"Up-Pointing Small Red Triangle"},{code:"23EB",desc:"Black Up-Pointing Double Triangle"},{code:"1F53D",desc:"Down-Pointing Small Red Triangle"},{code:"23EC",desc:"Black Down-Pointing Double Triangle"},{code:"1F3A6",desc:"Cinema"},{code:"1F505",desc:"Low Brightness Symbol"},{code:"1F506",desc:"High Brightness Symbol"},{code:"1F4F6",desc:"Antenna with Bars"},{code:"1F4F3",desc:"Vibration Mode"},{code:"1F4F4",desc:"Mobile Phone off"},{code:"267B",desc:"Black Universal Recycling Symbol"},{code:"1F531",desc:"Trident Emblem"},{code:"1F4DB",desc:"Name Badge"},{code:"1F530",desc:"Japanese Symbol for Beginner"},{code:"2B55",desc:"Heavy Large Circle"},{code:"2705",desc:"White Heavy Check Mark"},{code:"2611",desc:"Ballot Box with Check"},{code:"2714",desc:"Heavy Check Mark"},{code:"2716",desc:"Heavy Multiplication X"},{code:"274C",desc:"Cross Mark"},{code:"274E",desc:"Negative Squared Cross Mark"},{code:"2795",desc:"Heavy Plus Sign"},{code:"2796",desc:"Heavy Minus Sign"},{code:"2797",desc:"Heavy Division Sign"},{code:"27B0",desc:"Curly Loop"},{code:"27BF",desc:"Double Curly Loop"},{code:"303D",desc:"Part Alternation Mark"},{code:"2733",desc:"Eight Spoked Asterisk"},{code:"2734",desc:"Eight Pointed Black Star"},{code:"2747",desc:"Sparkle"},{code:"203C",desc:"Double Exclamation Mark"},{code:"2049",desc:"Exclamation Question Mark"},{code:"2753",desc:"Black Question Mark Ornament"},{code:"2754",desc:"White Question Mark Ornament"},{code:"2755",desc:"White Exclamation Mark Ornament"},{code:"2757",desc:"Heavy Exclamation Mark Symbol"},{code:"3030",desc:"Wavy Dash"},{code:"2122",desc:"Trade Mark Sign"},{code:"1F51F",desc:"Keycap Ten"},{code:"1F4AF",desc:"Hundred Points Symbol"},{code:"1F520",desc:"Input Symbol for Latin Capital Letters"},{code:"1F521",desc:"Input Symbol for Latin Small Letters"},{code:"1F522",desc:"Input Symbol for Numbers"},{code:"1F523",desc:"Input Symbol for Symbols"},{code:"1F524",desc:"Input Symbol for Latin Letters"},{code:"1F170",desc:"Negative Squared Latin Capital Letter a"},{code:"1F18E",desc:"Negative Squared Ab"},{code:"1F171",desc:"Negative Squared Latin Capital Letter B"},{code:"1F191",desc:"Squared Cl"},{code:"1F192",desc:"Squared Cool"},{code:"1F193",desc:"Squared Free"},{code:"2139",desc:"Information Source"},{code:"1F194",desc:"Squared Id"},{code:"24C2",desc:"Circled Latin Capital Letter M"},{code:"1F195",desc:"Squared New"},{code:"1F196",desc:"Squared Ng"},{code:"1F17E",desc:"Negative Squared Latin Capital Letter O"},{code:"1F197",desc:"Squared Ok"},{code:"1F17F",desc:"Negative Squared Latin Capital Letter P"},{code:"1F198",desc:"Squared Sos"},{code:"1F199",desc:"Squared Up with Exclamation Mark"},{code:"1F19A",desc:"Squared Vs"},{code:"1F201",desc:"Squared Katakana Koko"},{code:"1F202",desc:"Squared Katakana Sa"},{code:"1F237",desc:"Squared Cjk Unified Ideograph-6708"},{code:"1F236",desc:"Squared Cjk Unified Ideograph-6709"},{code:"1F22F",desc:"Squared Cjk Unified Ideograph-6307"},{code:"1F250",desc:"Circled Ideograph Advantage"},{code:"1F239",desc:"Squared Cjk Unified Ideograph-5272"},{code:"1F21A",desc:"Squared Cjk Unified Ideograph-7121"},{code:"1F232",desc:"Squared Cjk Unified Ideograph-7981"},{code:"1F251",desc:"Circled Ideograph Accept"},{code:"1F238",desc:"Squared Cjk Unified Ideograph-7533"},{code:"1F234",desc:"Squared Cjk Unified Ideograph-5408"},{code:"1F233",desc:"Squared Cjk Unified Ideograph-7a7a"},{code:"3297",desc:"Circled Ideograph Congratulation"},{code:"3299",desc:"Circled Ideograph Secret"},{code:"1F23A",desc:"Squared Cjk Unified Ideograph-55b6"},{code:"1F235",desc:"Squared Cjk Unified Ideograph-6e80"},{code:"25AA",desc:"Black Small Square"},{code:"25AB",desc:"White Small Square"},{code:"25FB",desc:"White Medium Square"},{code:"25FC",desc:"Black Medium Square"},{code:"25FD",desc:"White Medium Small Square"},{code:"25FE",desc:"Black Medium Small Square"},{code:"2B1B",desc:"Black Large Square"},{code:"2B1C",desc:"White Large Square"},{code:"1F536",desc:"Large Orange Diamond"},{code:"1F537",desc:"Large Blue Diamond"},{code:"1F538",desc:"Small Orange Diamond"},{code:"1F539",desc:"Small Blue Diamond"},{code:"1F53A",desc:"Up-Pointing Red Triangle"},{code:"1F53B",desc:"Down-Pointing Red Triangle"},{code:"1F4A0",desc:"Diamond Shape with a Dot Inside"},{code:"1F518",desc:"Radio Button"},{code:"1F532",desc:"Black Square Button"},{code:"1F533",desc:"White Square Button"},{code:"26AA",desc:"Medium White Circle"},{code:"26AB",desc:"Medium Black Circle"},{code:"1F534",desc:"Large Red Circle"},{code:"1F535",desc:"Large Blue Circle"}]},{id:"flags",name:"Flags",code:"1F3C1",emoticons:[{code:"1f3c1",desc:"Chequered Flag"},{code:"1f1e8-1f1f3",desc:"China Flag"},{code:"1f38c",desc:"Crossed Flags"},{code:"1f1e9-1f1ea",desc:"Germany Flag"},{code:"1f1ea-1f1f8",desc:"Spain Flag"},{code:"1f1e6-1f1e8",desc:"Ascension Island Flag"},{code:"1f1e6-1f1e9",desc:"Andorra Flag"},{code:"1f1e6-1f1ea",desc:"United Arab Emirates Flag"},{code:"1f1e6-1f1eb",desc:"Afghanistan Flag"},{code:"1f1e6-1f1ec",desc:"Antigua & Barbuda Flag"},{code:"1f1e6-1f1ee",desc:"Anguilla Flag"},{code:"1f1e6-1f1f1",desc:"Albania Flag"},{code:"1f1e6-1f1f2",desc:"Armenia Flag"},{code:"1f1e6-1f1f4",desc:"Angola Flag"},{code:"1f1e6-1f1f6",desc:"Antarctica Flag"},{code:"1f1e6-1f1f7",desc:"Argentina Flag"},{code:"1f1e6-1f1f8",desc:"American Samoa Flag"},{code:"1f1e6-1f1f9",desc:"Austria Flag"},{code:"1f1e6-1f1fa",desc:"Australia Flag"},{code:"1f1e6-1f1fc",desc:"Aruba Flag"},{code:"1f1e6-1f1fd",desc:"\xc5land Islands Flag"},{code:"1f1e6-1f1ff",desc:"Azerbaijan Flag"},{code:"1f1e7-1f1e7",desc:"Barbados Flag"},{code:"1f1e7-1f1e9",desc:"Bangladesh Flag"},{code:"1f1e7-1f1ea",desc:"Belgium Flag"},{code:"1f1e7-1f1eb",desc:"Burkina Faso Flag"},{code:"1f1e7-1f1ec",desc:"Bulgaria Flag"},{code:"1f1e7-1f1ed",desc:"Bahrain Flag"},{code:"1f1e7-1f1ee",desc:"Burundi Flag"},{code:"1f1e7-1f1ef",desc:"Benin Flag"},{code:"1f1e7-1f1f1",desc:"St. Barth\xe9lemy Flag"},{code:"1f1e7-1f1f2",desc:"Bermuda Flag"},{code:"1f1e7-1f1f4",desc:"Bolivia Flag"},{code:"1f1e7-1f1f6",desc:"Caribbean Netherlands Flag"},{code:"1f1e7-1f1f7",desc:"Brazil Flag"},{code:"1f1e7-1f1f8",desc:"Bahamas Flag"},{code:"1f1e7-1f1f9",desc:"Bhutan Flag"},{code:"1f1e7-1f1fb",desc:"Bouvet Island Flag"},{code:"1f1e7-1f1fc",desc:"Botswana Flag"},{code:"1f1e7-1f1fe",desc:"Belarus Flag"},{code:"1f1e7-1f1ff",desc:"Belize Flag"},{code:"1f1e8-1f1e6",desc:"Canada Flag"},{code:"1f1e8-1f1e8",desc:"Cocos (keeling) Islands Flag"},{code:"1f1e8-1f1e9",desc:"Congo - Kinshasa Flag"},{code:"1f1e8-1f1eb",desc:"Central African Republic Flag"},{code:"1f1e8-1f1ec",desc:"Congo - Brazzaville Flag"},{code:"1f1e8-1f1ed",desc:"Switzerland Flag"},{code:"1f1e8-1f1ee",desc:"C\xf4te D\u2019ivoire Flag"},{code:"1f1e8-1f1f0",desc:"Cook Islands Flag"},{code:"1f1e8-1f1f1",desc:"Chile Flag"},{code:"1f1e8-1f1f2",desc:"Cameroon Flag"},{code:"1f1e8-1f1f4",desc:"Colombia Flag"},{code:"1f1e8-1f1f7",desc:"Costa Rica Flag"},{code:"1f1e8-1f1fa",desc:"Cuba Flag"},{code:"1f1e8-1f1fb",desc:"Cape Verde Flag"},{code:"1f1e8-1f1fc",desc:"Cura\xe7ao Flag"},{code:"1f1e8-1f1fd",desc:"Christmas Island Flag"},{code:"1f1e8-1f1fe",desc:"Cyprus Flag"},{code:"1f1e8-1f1ff",desc:'Czechia Flag"'},{code:"1f1e9-1f1ec",desc:"Diego Garcia Flag"},{code:"1f1e9-1f1ef",desc:"Djibouti Flag"},{code:"1f1e9-1f1f0",desc:"Denmark Flag"},{code:"1f1e9-1f1f2",desc:"Dominica Flag"},{code:"1f1e9-1f1f4",desc:"Dominican Republic Flag"},{code:"1f1e9-1f1ff",desc:"Algeria Flag"},{code:"1f1ea-1f1e6",desc:"Ceuta & Melilla Flag"},{code:"1f1ea-1f1e8",desc:"Ecuador Flag"},{code:"1f1ea-1f1ea",desc:"Estonia Flag"},{code:"1f1ea-1f1ec",desc:"Egypt Flag"},{code:"1f1ea-1f1ed",desc:"Western Sahara Flag"},{code:"1f1ea-1f1f7",desc:"Eritrea Flag"},{code:"1f1ea-1f1f9",desc:"Ethiopia Flag"},{code:"1f1ea-1f1fa",desc:"European Union Flag"},{code:"1f1eb-1f1ee",desc:"Finland Flag"},{code:"1f1eb-1f1ef",desc:"Fiji Flag"},{code:"1f1eb-1f1f0",desc:"Falkland Islands Flag"},{code:"1f1eb-1f1f2",desc:"Micronesia Flag"},{code:"1f1eb-1f1f4",desc:"Faroe Islands Flag"},{code:"1f1ec-1f1e6",desc:"Gabon Flag"},{code:"1f1ec-1f1e9",desc:"Grenada Flag"},{code:"1f1ec-1f1ea",desc:"Georgia Flag"},{code:"1f1ec-1f1eb",desc:"French Guiana Flag"},{code:"1f1ec-1f1ec",desc:"Guernsey Flag"},{code:"1f1ec-1f1ed",desc:"Ghana Flag"},{code:"1f1ec-1f1ee",desc:"Gibraltar Flag"},{code:"1f1ec-1f1f1",desc:"Greenland Flag"},{code:"1f1ec-1f1f2",desc:"Gambia Flag"},{code:"1f1ec-1f1f3",desc:"Guinea Flag"},{code:"1f1ec-1f1f5",desc:"Guadeloupe Flag"},{code:"1f1ec-1f1f6",desc:"Equatorial Guinea Flag"},{code:"1f1ec-1f1f7",desc:"Greece Flag"},{code:"1f1ec-1f1f8",desc:"South Georgia & South Sandwich Islands Flag"},{code:"1f1ec-1f1f9",desc:"Guatemala Flag"},{code:"1f1ec-1f1fa",desc:"Guam Flag"},{code:"1f1ec-1f1fc",desc:"Guinea-Bissau Flag"},{code:"1f1ec-1f1fe",desc:"Guyana Flag"},{code:"1f1ed-1f1f0",desc:"Hong Kong Sar China Flag"},{code:"1f1ed-1f1f2",desc:"Heard & Mcdonald Islands Flag"},{code:"1f1ed-1f1f3",desc:"Honduras Flag"},{code:"1f1ed-1f1f7",desc:"Croatia Flag"},{code:"1f1ed-1f1f9",desc:"Haiti Flag"},{code:"1f1ed-1f1fa",desc:"Hungary Flag"},{code:"1f1ee-1f1e8",desc:"Canary Islands Flag"},{code:"1f1ee-1f1e9",desc:"Indonesia Flag"},{code:"1f1ee-1f1ea",desc:"Ireland Flag"},{code:"1f1ee-1f1f1",desc:"Israel Flag"},{code:"1f1ee-1f1f2",desc:"Isle of Man Flag"},{code:"1f1ee-1f1f3",desc:"India Flag"},{code:"1f1ee-1f1f4",desc:"British Indian Ocean Territory Flag"},{code:"1f1ee-1f1f6",desc:"Iraq Flag"},{code:"1f1ee-1f1f7",desc:"Iran Flag"},{code:"1f1ee-1f1f8",desc:"Iceland Flag"},{code:"1f1ef-1f1ea",desc:"Jersey Flag"},{code:"1f1ef-1f1f2",desc:"Jamaica Flag"},{code:"1f1ef-1f1f4",desc:"Jordan Flag"},{code:"1f1f0-1f1ea",desc:"Kenya Flag"},{code:"1f1f0-1f1ec",desc:"Kyrgyzstan Flag"},{code:"1f1f0-1f1ed",desc:"Cambodia Flag"},{code:"1f1f0-1f1ee",desc:"Kiribati Flag"},{code:"1f1f0-1f1f2",desc:"Comoros Flag"},{code:"1f1f0-1f1f3",desc:"St. Kitts & Nevis Flag"},{code:"1f1f0-1f1f5",desc:"North Korea Flag"},{code:"1f1f0-1f1fc",desc:"Kuwait Flag"},{code:"1f1f0-1f1fe",desc:"Cayman Islands Flag"},{code:"1f1f0-1f1ff",desc:"Kazakhstan Flag"},{code:"1f1f1-1f1e6",desc:"Laos Flag"},{code:"1f1f1-1f1e7",desc:"Lebanon Flag"},{code:"1f1f1-1f1e8",desc:"St. Lucia Flag"},{code:"1f1f1-1f1ee",desc:"Liechtenstein Flag"},{code:"1f1f1-1f1f0",desc:"Sri Lanka Flag"},{code:"1f1f1-1f1f7",desc:"Liberia Flag"},{code:"1f1f1-1f1f8",desc:"Lesotho Flag"},{code:"1f1f1-1f1f9",desc:"Lithuania Flag"},{code:"1f1f1-1f1fa",desc:"Luxembourg Flag"},{code:"1f1f1-1f1fb",desc:"Latvia Flag"},{code:"1f1f1-1f1fe",desc:"Libya Flag"},{code:"1f1f2-1f1e6",desc:"Morocco Flag"},{code:"1f1f2-1f1e8",desc:"Monaco Flag"},{code:"1f1f2-1f1e9",desc:"Moldova Flag"},{code:"1f1f2-1f1ea",desc:"Montenegro Flag"},{code:"1f1f2-1f1eb",desc:"St. Martin Flag"},{code:"1f1f2-1f1ec",desc:"Madagascar Flag"},{code:"1f1f2-1f1ed",desc:"Marshall Islands Flag"},{code:"1f1f2-1f1f0",desc:"Macedonia Flag"},{code:"1f1f2-1f1f1",desc:"Mali Flag"},{code:"1f1f2-1f1f2",desc:"Myanmar (burma) Flag"},{code:"1f1f2-1f1f3",desc:"Mongolia Flag"},{code:"1f1f2-1f1f4",desc:"Macau Sar China Flag"},{code:"1f1f2-1f1f5",desc:"Northern Mariana Islands Flag"},{code:"1f1f2-1f1f6",desc:"Martinique Flag"},{code:"1f1f2-1f1f7",desc:"Mauritania Flag"},{code:"1f1f2-1f1f8",desc:"Montserrat Flag"},{code:"1f1f2-1f1f9",desc:"Malta Flag"},{code:"1f1f2-1f1fa",desc:"Mauritius Flag"},{code:"1f1f2-1f1fb",desc:"Maldives Flag"},{code:"1f1f2-1f1fc",desc:"Malawi Flag"},{code:"1f1f2-1f1fd",desc:"Mexico Flag"},{code:"1f1f2-1f1fe",desc:"Malaysia Flag"},{code:"1f1f2-1f1ff",desc:"Mozambique Flag"},{code:"1f1f3-1f1e6",desc:"Namibia Flag"},{code:"1f1f3-1f1e8",desc:"New Caledonia Flag"},{code:"1f1f3-1f1ea",desc:"Niger Flag"},{code:"1f1f3-1f1eb",desc:"Norfolk Island Flag"},{code:"1f1f3-1f1ec",desc:"Nigeria Flag"},{code:"1f1f3-1f1ee",desc:"Nicaragua Flag"},{code:"1f1f3-1f1f1",desc:"Netherlands Flag"},{code:"1f1f3-1f1f4",desc:"Norway Flag"},{code:"1f1f3-1f1f5",desc:"Nepal Flag"},{code:"1f1f3-1f1f7",desc:"Nauru Flag"},{code:"1f1f3-1f1fa",desc:"Niue Flag"},{code:"1f1f3-1f1ff",desc:"New Zealand Flag"},{code:"1f1f4-1f1f2",desc:"Oman Flag"},{code:"1f1f8-1f1ff",desc:"Swaziland Flag"},{code:"1f1f5-1f1e6",desc:"Panama Flag"},{code:"1f1f5-1f1ea",desc:"Peru Flag"},{code:"1f1f5-1f1eb",desc:"French Polynesia Flag"},{code:"1f1f5-1f1ec",desc:"Papua New Guinea Flag"},{code:"1f1f5-1f1ed",desc:"Philippines Flag"},{code:"1f1f5-1f1f0",desc:"Pakistan Flag"},{code:"1f1f5-1f1f1",desc:"Poland Flag"},{code:"1f1f5-1f1f2",desc:"St. Pierre & Miquelon Flag"},{code:"1f1f5-1f1f3",desc:"Pitcairn Islands Flag"},{code:"1f1f5-1f1f7",desc:"Puerto Rico Flag"},{code:"1f1f5-1f1f8",desc:"Palestinian Territories Flag"},{code:"1f1f5-1f1f9",desc:"Portugal Flag"},{code:"1f1f5-1f1fc",desc:"Palau Flag"},{code:"1f1f5-1f1fe",desc:"Paraguay Flag"},{code:"1f1f6-1f1e6",desc:"Qatar Flag"},{code:"1f1f7-1f1ea",desc:"R\xe9union Flag"},{code:"1f1f7-1f1f4",desc:"Romania Flag"},{code:"1f1f7-1f1f8",desc:"Serbia Flag"},{code:"1f1f7-1f1fc",desc:"Rwanda Flag"},{code:"1f1f8-1f1e6",desc:"Saudi Arabia Flag"},{code:"1f1f8-1f1e7",desc:"Solomon Islands Flag"},{code:"1f1f8-1f1e8",desc:"Seychelles Flag"},{code:"1f1f8-1f1e9",desc:"Sudan Flag"},{code:"1f1f8-1f1ea",desc:"Sweden Flag"},{code:"1f1f8-1f1ec",desc:"Singapore Flag"},{code:"1f1f8-1f1ee",desc:"Slovenia Flag"},{code:"1f1f8-1f1ed",desc:"St. Helena Flag"},{code:"1f1f8-1f1ef",desc:"Svalbard & Jan Mayen Flag"},{code:"1f1f8-1f1f1",desc:"Sierra Leone Flag"},{code:"1f1f8-1f1f2",desc:"San Marino Flag"},{code:"1f1f8-1f1f3",desc:"Senegal Flag"},{code:"1f1f8-1f1f4",desc:"Somalia Flag"},{code:"1f1f8-1f1f7",desc:"Suriname Flag"},{code:"1f1f8-1f1f8",desc:"South Sudan Flag"},{code:"1f1f8-1f1f9",desc:"S\xe3o Tom\xe9 & Pr\xedncipe Flag"},{code:"1f1f8-1f1fb",desc:"El Salvador Flag"},{code:"1f1f8-1f1fd",desc:"Sint Maarten Flag"},{code:"1f1f8-1f1fe",desc:"Syria Flag"},{code:"1f1f9-1f1e6",desc:"Tristan Da Cunha Flag"},{code:"1f1f9-1f1e8",desc:"Turks & Caicos Islands Flag"},{code:"1f1f9-1f1eb",desc:"French Southern Territories Flag"},{code:"1f1f9-1f1ec",desc:"Togo Flag"},{code:"1f1f9-1f1ed",desc:"Thailand Flag"},{code:"1f1f9-1f1ef",desc:"Tajikistan Flag"},{code:"1f1f9-1f1f0",desc:"Tokelau Flag"},{code:"1f1f9-1f1f1",desc:"Timor-Leste Flag"},{code:"1f1f9-1f1f2",desc:"Turkmenistan Flag"},{code:"1f1f9-1f1f3",desc:"Tunisia Flag"},{code:"1f1f9-1f1f4",desc:"Tonga Flag"},{code:"1f1f9-1f1f7",desc:"Turkey Flag"},{code:"1f1f9-1f1f9",desc:"Trinidad & Tobago Flag"},{code:"1f1f9-1f1fb",desc:"Tuvalu Flag"},{code:"1f1f9-1f1fc",desc:"Taiwan Flag"},{code:"1f1f9-1f1ff",desc:"Tanzania Flag"},{code:"1f1fa-1f1e6",desc:"Ukraine City Flag"},{code:"1f1fa-1f1ec",desc:"Uganda Flag"},{code:"1f1fa-1f1f2",desc:"U.s. Outlying Islands Flag"},{code:"1f1fa-1f1fe",desc:"Uruguay Flag"},{code:"1f1fa-1f1ff",desc:"Uzbekistan Flag"},{code:"1f1fb-1f1e6",desc:"Vatican City Flag"},{code:"1f1fb-1f1e8",desc:"St. Vincent & Grenadines Flag"},{code:"1f1fb-1f1ea",desc:"Venezuela Flag"},{code:"1f1fb-1f1ec",desc:"British Virgin Islands Flag"},{code:"1f1fb-1f1ee",desc:"U.s. Virgin Islands Flag"},{code:"1f1fb-1f1f3",desc:"Vietnam Flag"},{code:"1f1fc-1f1f8",desc:"Samoa Flag"},{code:"1f1fb-1f1fa",desc:"Vanuatu Flag"},{code:"1f1fc-1f1eb",desc:'"Wallis & Futuna Flag'},{code:"1f1fd-1f1f0",desc:"Kosovo Flag"},{code:"1f1fe-1f1ea",desc:"Yemen Flag"},{code:"1f1fe-1f1f9",desc:"Mayotte Flag"},{code:"1f1ff-1f1e6",desc:"South Africa Flag"},{code:"1f1ff-1f1f2",desc:"Zambia Flag"},{code:"1f1ff-1f1fc",desc:"Zimbabwe Flag"},{code:"1f1eb-1f1f7",desc:"France Flag"},{code:"1f1ec-1f1e7",desc:"United Kingdom Flag"},{code:"1f1ee-1f1f9",desc:"Italy Flag"},{code:"1f1ef-1f1f5",desc:"Japan Flag"},{code:"1f1f0-1f1f7",desc:"South Korea Flag"},{code:"1f1f7-1f1fa",desc:"Russia Flag"},{code:"1F6A9",desc:"Triangular Flag on Post"},{code:"1f1fa-1f1f8",desc:"United States Flag"}]}],emoticonsButtons:["emoticonsBack","|"],emoticonsUseImage:!0}),St.PLUGINS.emoticons=function(E){var _=E.$,r=E.opts.emoticonsSet,i=r&&r[0],o="";function s(){if(!E.selection.isCollapsed())return!1;var e=E.selection.element(),t=E.selection.endElement();if(e&&E.node.hasClass(e,"fr-emoticon"))return e;if(t&&E.node.hasClass(t,"fr-emoticon"))return t;var a=E.selection.ranges(0),n=a.startContainer;if(n.nodeType==Node.ELEMENT_NODE&&0<n.childNodes.length&&0<a.startOffset){var r=n.childNodes[a.startOffset-1];if(E.node.hasClass(r,"fr-emoticon"))return r}return!1}function l(){return"".concat(function n(e,t){return'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function a(e,n){var r="";return e.forEach(function(e){var t={image:e.code.toLowerCase()},a={elementClass:e.id===n.id?"fr-active fr-active-tab":"",emoticonsUnicodeClass:E.opts.emoticonsUseImage?"":"fr-tabs-unicode",title:E.language.translate(e.name),dataCmd:"setEmoticonCategory",dataParam1:e.id,image:E.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(t.image,'.svg"/>'):"&#x".concat(t.image,";")};r+='<button class="fr-command fr-btn '.concat(a.elementClass," ").concat(a.emoticonsUnicodeClass,'" \n title="').concat(a.title,'" data-cmd="').concat(a.dataCmd,'" data-param1="').concat(a.dataParam1,'">\n ').concat(a.image," </button>")}),r}(e,t),"\n </div>")}(r,i),"\n ").concat(function a(e){return'\n <div class="fr-icon-container fr-emoticon-container">\n '.concat(function t(e){var r="";return e.emoticons.forEach(function(e){var t=e.code.split("-").reduce(function(e,t){return e?"".concat(e,"&zwj;&#x").concat(t.toLowerCase(),";"):"&#x".concat(t.toLowerCase(),";")},""),a={image:e.code.toLowerCase(),compiledCode:e.uCode?e.uCode:t},n={dataParam1:e.code.toLowerCase(),dataParam2:a.compiledCode,title:E.language.translate(e.desc),image:E.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(a.image,'.svg"/>'):"".concat(a.compiledCode),desc:E.language.translate(e.desc)};r+='<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(n.dataParam1,'" tabindex="0"\n data-param2="').concat(n.dataParam2,'" title="').concat(n.title,'" >\n ').concat(n.image,'<span class="fr-sr-only">').concat(n.desc,"&nbsp;&nbsp;&nbsp;</span></span>")}),r}(e),"\n </div>\n ")}(i),"\n ").concat(function e(){return E.opts.emoticonsUseImage?'<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>':""}())}return{_init:function e(){var a=function a(){for(var e=E.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),t=0;t<e.length;t++)e[t].className+=" fr-deletable"};a(),E.events.on("html.set",a),E.events.on("keydown",function(e){if(E.keys.isCharacter(e.which)&&E.selection.inEditor()){var t=E.selection.ranges(0),a=s();E.node.hasClass(a,"fr-emoticon-img")&&a&&(0===t.startOffset&&E.selection.element()===a?_(a).before(St.MARKERS+St.INVISIBLE_SPACE):_(a).after(St.INVISIBLE_SPACE+St.MARKERS),E.selection.restore())}}),E.events.on("keyup",function(e){for(var t=E.el.querySelectorAll(".fr-emoticon"),a=0;a<t.length;a++)"undefined"!=typeof t[a].textContent&&0===t[a].textContent.replace(/\u200B/gi,"").length&&_(t[a]).remove();if(!(e.which>=St.KEYCODE.ARROW_LEFT&&e.which<=St.KEYCODE.ARROW_DOWN)){var n=s();E.node.hasClass(n,"fr-emoticon-img")&&(_(n).append(St.MARKERS),E.selection.restore())}})},insert:function c(e,t){var a=s(),n=E.selection.ranges(0);a?(0===n.startOffset&&E.selection.element()===a?_(a).before(St.MARKERS+St.INVISIBLE_SPACE):0<n.startOffset&&E.selection.element()===a&&n.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&_(a).after(St.INVISIBLE_SPACE+St.MARKERS),E.selection.restore(),E.html.insert('<span class="fr-emoticon fr-deletable'.concat(t?" fr-emoticon-img":"",'"').concat(t?' style="background: url('.concat(t,');"'):"",">").concat(t?"&nbsp;":e,"</span>&nbsp;").concat(St.MARKERS),!0)):E.html.insert('<span class="fr-emoticon fr-deletable'.concat(t?" fr-emoticon-img":"",'"').concat(t?' style="background: url('.concat(t,');"'):"",">").concat(t?"&nbsp;":e,"</span>").concat(St.INVISIBLE_SPACE),!0)},setEmoticonCategory:function n(t){i=r.filter(function(e){return e.id===t})[0],function a(){E.popups.get("emoticons").html(o+l());var e=E.popups.get("emoticons").children().not(".fr-buttons");E.accessibility.registerPopup("emoticons"),E.accessibility.focusContent(e)}()},showEmoticonsPopup:function d(){var e=E.popups.get("emoticons");if(e||(e=function i(){E.opts.toolbarInline&&0<E.opts.emoticonsButtons.length&&(o='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(E.button.buildList(E.opts.emoticonsButtons),"</div>"));var e={buttons:o,custom_layer:l()},t=E.popups.create("emoticons",e);return function a(b){E.events.on("popup.tab",function(e){var t=_(e.currentTarget);if(!E.popups.isVisible("emoticons")||!t.is("span, a"))return!0;var a,n,r,i=e.which,o=window.getComputedStyle(b.find(".fr-icon-container")[0]),s=o.getPropertyValue("grid-template-columns").split(" ").length;if(St.KEYCODE.TAB==i){var l=b.find("span.fr-emoticon");if(t.is(l.first())&&e.shiftKey||t.is("a")&&!e.shiftKey){var c=b.find(".fr-buttons");a=!E.accessibility.focusToolbar(c,!!e.shiftKey)}if(!1!==a){var d=b.find("span.fr-emoticon");d.add(b.find("a.fr-link")),d.add(b.find("button.fr-btn")),n=d.index(t),n=e.shiftKey?((n-1)%d.length+d.length)%d.length:(n+1)%d.length,r=d.get(n),E.events.disableBlur(),r.focus(),a=!1}}else if(St.KEYCODE.ARROW_UP==i||St.KEYCODE.ARROW_DOWN==i||St.KEYCODE.ARROW_LEFT==i||St.KEYCODE.ARROW_RIGHT==i){if(t.is("span.fr-emoticon")){var f=t.parent().find("span.fr-emoticon");n=f.index(t);var p=s,u=Math.ceil(f.length/p),g=n%p,h=Math.floor(n/p),m=h*p+g,v=u*p;St.KEYCODE.ARROW_UP==i?m=((m-p)%v+v)%v:St.KEYCODE.ARROW_DOWN==i?m=(m+p)%v:St.KEYCODE.ARROW_LEFT==i?m=((m-1)%v+v)%v:St.KEYCODE.ARROW_RIGHT==i&&(m=(m+1)%v),r=_(f.get(m)),E.events.disableBlur(),r.focus(),a=!1}}else St.KEYCODE.ENTER==i&&(t.is("a")?t[0].click():E.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){E.popups.refresh("emoticons"),E.popups.setContainer("emoticons",E.$tb);var t=E.$tb.find('.fr-command[data-cmd="emoticons"]'),a=E.button.getPosition(t),n=a.left,r=a.top;E.popups.show("emoticons",n,r,t.outerHeight()),E.popups.get("emoticons").css("overflow","hidden")}},back:function t(){E.popups.hide("emoticons"),E.toolbar.showInline()}}},St.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),St.RegisterCommand("emoticons",{title:"Emoticons",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("emoticons")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("emoticons")):this.emoticons.showEmoticonsPopup()},plugin:"emoticons"}),St.RegisterCommand("insertEmoticon",{callback:function(e,t,a){this.emoticons.insert(a,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(t,".svg"):null),this.popups.hide("emoticons")}}),St.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,t){this.emoticons.setEmoticonCategory(t)}}),St.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}}),Object.assign(St.DEFAULTS,{entities:"&quot;&#39;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&OElig;&oelig;&Scaron;&scaron;&Yuml;&fnof;&circ;&tilde;&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&Omega;&alpha;&beta;&gamma;&delta;&epsilon;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsilon;&phi;&chi;&psi;&omega;&thetasym;&upsih;&piv;&ensp;&emsp;&thinsp;&zwnj;&zwj;&lrm;&rlm;&ndash;&mdash;&lsquo;&rsquo;&sbquo;&ldquo;&rdquo;&bdquo;&dagger;&Dagger;&bull;&hellip;&permil;&prime;&Prime;&lsaquo;&rsaquo;&oline;&frasl;&euro;&image;&weierp;&real;&trade;&alefsym;&larr;&uarr;&rarr;&darr;&harr;&crarr;&lArr;&uArr;&rArr;&dArr;&hArr;&forall;&part;&exist;&empty;&nabla;&isin;&notin;&ni;&prod;&sum;&minus;&lowast;&radic;&prop;&infin;&ang;&and;&or;&cap;&cup;&int;&there4;&sim;&cong;&asymp;&ne;&equiv;&le;&ge;&sub;&sup;&nsub;&sube;&supe;&oplus;&otimes;&perp;&sdot;&lceil;&rceil;&lfloor;&rfloor;&lang;&rang;&loz;&spades;&clubs;&hearts;&diams;"}),St.PLUGINS.entities=function(r){var i,o,s=r.$;function n(e){var t=e.textContent;if(t.match(i)){for(var a="",n=0;n<t.length;n++)o[t[n]]?a+=o[t[n]]:a+=t[n];e.textContent=a}}function l(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var t=r.node.contents(e),a=0;a<t.length;a++)t[a].nodeType===Node.TEXT_NODE?n(t[a]):l(t[a]);return e.nodeType===Node.TEXT_NODE&&n(e),!1}var c=function c(e){return 0===e.length?"":r.clean.exec(e,l).replace(/\&amp;/g,"&")};return{_init:function d(){r.opts.htmlSimpleAmpersand||(r.opts.entities="".concat(r.opts.entities,"&amp;"));var e=s(document.createElement("div")).html(r.opts.entities).text(),t=r.opts.entities.split(";");o={},i="";for(var a=0;a<e.length;a++){var n=e.charAt(a);o[n]="".concat(t[a],";"),i+="\\".concat(n+(a<e.length-1?"|":""))}i=new RegExp("(".concat(i,")"),"g"),r.events.on("html.get",c,!0)}}},Object.assign(St.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(St.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadToAzure:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),St.PLUGINS.file=function(w){var n,p=w.$,y="https://i.froala.com/upload",u=2,g=3,h=4,A=5,C=6,a={};function T(){var e=w.popups.get("file.insert");e||(e=l()),e.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),e.find(".fr-file-progress-bar-layer").addClass("fr-active"),e.find(".fr-buttons").hide(),r(w.language.translate("Uploading"),0)}function i(e){var t=w.popups.get("file.insert");t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-file-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e&&(w.events.focus(),w.popups.hide("file.insert")))}function r(e,t){var a=w.popups.get("file.insert");if(a){var n=a.find(".fr-file-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function m(e,t,a,n){var r;w.edit.on(),w.events.focus(!0),w.selection.restore(),w.opts.fileUseSelectedText&&w.selection.text().length&&(t=w.selection.text());var i='<a href="'.concat(e,'" id="fr-inserted-file" ');if(void 0!==n)for(r in n)n.hasOwnProperty(r)&&"link"!=r&&(i+="".concat(r,'="').concat(n[r],'" '));-1==i.indexOf(' class="')&&(i+='class="fr-file" '),i+=">".concat(t,"</a>"),w.html.insert(i);var o=w.$el.find("#fr-inserted-file");o.removeAttr("id"),w.popups.hide("file.insert"),w.undo.saveStep(),d(),w.events.trigger("file.inserted",[o,a])}function k(e,t,a){var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(w.opts.fileUploadToS3||w.opts.fileUploadToAzure)if(201===n){var s;if(w.opts.fileUploadToAzure){if(!1===w.events.trigger("file.uploadedToAzure",[this.responseURL,a,r],!0))return w.edit.on(),!1;s=t}else s=function c(e){try{var t=p(e).find("Location").text(),a=p(e).find("Key").text();return!1===w.events.trigger("file.uploadedToS3",[t,a,e],!0)?(w.edit.on(),!1):t}catch(n){return L(h,e),!1}}(i);s&&m(s,e,r||i)}else L(h,r||i);else if(200<=n&&n<300){var l=function d(e){try{if(!1===w.events.trigger("file.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(L(u,e),!1)}catch(a){return L(h,e),!1}}(o);l&&m(l.link,e,r||o,l)}else L(g,r||o)}catch(f){L(h,r||o)}}function S(){L(h,this.response||this.responseText||this.responseXML)}function R(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;r(w.language.translate("Uploading"),t)}}function L(e,t){w.edit.on(),function n(e){T();var t=w.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),w.events.disableBlur(),a.focus()}(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("file.error",[{code:e,message:a[e]},t])}function x(){w.edit.on(),i(!0)}function o(e){if(void 0!==e&&0<e.length){var t=e[0].type;if(e[0].name&&e[0].name.endsWith(".msg")&&(t="application/vnd.ms-outlook"),!1===w.events.trigger("file.beforeUpload",[e]))return!1;var a,n=e[0];if(!(null!==w.opts.fileUploadURL&&w.opts.fileUploadURL!==y||w.opts.fileUploadToS3||w.opts.fileUploadToAzure))return function _(i){var o=new FileReader;o.onload=function(){for(var e=o.result,t=atob(o.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));var r=i.type;i.name&&i.name.endsWith(".msg")&&(r="application/vnd.ms-outlook"),e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r})),w.file.insert(e,i.name,null)},T(),o.readAsDataURL(i)}(n),!1;if(n.size>w.opts.fileMaxSize)return L(A),!1;if(w.opts.fileAllowedTypes.indexOf("*")<0&&w.opts.fileAllowedTypes.indexOf(t.replace(/file\//g,""))<0)return L(C),!1;if(w.drag_support.formdata&&(a=w.drag_support.formdata?new FormData:null),a){var r;if(!1!==w.opts.fileUploadToS3)for(r in a.append("key",w.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(n.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",t),w.opts.fileUploadToS3.params)w.opts.fileUploadToS3.params.hasOwnProperty(r)&&a.append(r,w.opts.fileUploadToS3.params[r]);for(r in w.opts.fileUploadParams)w.opts.fileUploadParams.hasOwnProperty(r)&&a.append(r,w.opts.fileUploadParams[r]);a.append(w.opts.fileUploadParam,n);var i,o,s=w.opts.fileUploadURL;w.opts.fileUploadToS3&&(s=w.opts.fileUploadToS3.uploadURL?w.opts.fileUploadToS3.uploadURL:"https://".concat(w.opts.fileUploadToS3.region,".amazonaws.com/").concat(w.opts.fileUploadToS3.bucket));var l=w.opts.fileUploadMethod;w.opts.fileUploadToAzure&&(s=w.opts.fileUploadToAzure.uploadURL?"".concat(w.opts.fileUploadToAzure.uploadURL,"/").concat(n.name):encodeURI("https://".concat(w.opts.fileUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.fileUploadToAzure.container,"/").concat(n.name)),i=s,w.opts.fileUploadToAzure.SASToken&&(s+=w.opts.fileUploadToAzure.SASToken),l="PUT");var c=w.core.getXHR(s,l);if(w.opts.fileUploadToAzure){var d=(new Date).toUTCString();if(!w.opts.fileUploadToAzure.SASToken&&w.opts.fileUploadToAzure.accessKey){var f=w.opts.fileUploadToAzure.account,p=w.opts.fileUploadToAzure.container;if(w.opts.fileUploadToAzure.uploadURL){var u=w.opts.fileUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+n.name),m=l+"\n\n\n"+n.size+"\n\n"+t+"\n\n\n\n\n\n\n"+g+"\n"+h,v=w.cryptoJSPlugin.cryptoJS.HmacSHA256(m,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.fileUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;o=v,c.setRequestHeader("Authorization",b)}for(r in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",t),c.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.fileUploadParams)w.opts.fileUploadParams.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.fileUploadParams[r]);for(r in w.opts.fileUploadToAzure.params)w.opts.fileUploadToAzure.params.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.fileUploadToAzure.params[r])}c.onload=function(){k.call(c,n.name,i,o)},c.onerror=S,c.upload.onprogress=R,c.onabort=x,T();var E=w.popups.get("file.insert");E&&(E.off("abortUpload"),E.on("abortUpload",function(){4!==c.readyState&&c.abort()})),c.send(w.opts.fileUploadToAzure?n:a)}}}function s(){i()}function l(e){if(e)return w.popups.onHide("file.insert",s),!0;var t;w.opts.fileUpload||w.opts.fileInsertButtons.splice(w.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.fileInsertButtons),"</div>");var a="";w.opts.fileUpload&&(a='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'.concat(w.id,'"><strong>').concat(w.language.translate("Drop file"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" name="').concat(w.opts.fileUploadParam,'" accept="').concat(0<=w.opts.fileAllowedTypes.indexOf("*")?"/":"").concat(w.opts.fileAllowedTypes.join(", ").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-').concat(w.id,'" role="button"></div></div>'));var n={buttons:t,upload_layer:a,progress_bar:'<div class="fr-file-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="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'},r=w.popups.create("file.insert",n);return function i(a){w.events.$on(a,"dragover dragenter",".fr-file-upload-layer",function(){return p(this).addClass("fr-drop"),!1},!0),w.events.$on(a,"dragleave dragend",".fr-file-upload-layer",function(){return p(this).removeClass("fr-drop"),!1},!0),w.events.$on(a,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),p(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(a.data("instance")||w).file.upload(t.files)},!0),w.helpers.isIOS()&&w.events.$on(a,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){p(this).trigger("click")}),w.events.$on(a,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=a.data("instance")||w;e.events.disableBlur(),a.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}p(this).val("")},!0)}(r),r}function t(e){w.node.hasClass(e,"fr-file")}function c(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&"undefined"!=typeof a.type){if(a.type.indexOf("image")<0){if(!w.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(St.MARKERS),w.popups.hideAll();var n=w.popups.get("file.insert");return n||(n=l()),w.popups.setContainer("file.insert",w.$sc),w.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),T(),o(t.files),e.preventDefault(),e.stopPropagation(),!1}}else a.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function d(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("a.fr-file")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("href"));if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("href"))<0&&w.events.trigger("file.unlink",[n[e]]);n=t}return a[1]="File cannot be loaded from the passed link.",a[u]="No link in upload response.",a[g]="Error during file upload.",a[h]="Parsing response failed.",a[A]="File is too large.",a[C]="File file type is invalid.",a[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function f(){!function e(){w.events.on("drop",c),w.events.$on(w.$win,"keydown",function(e){var t=e.which,a=w.popups.get("file.insert");a&&t===St.KEYCODE.ESC&&a.trigger("abortUpload")}),w.events.on("destroy",function(){var e=w.popups.get("file.insert");e&&e.trigger("abortUpload")})}(),w.events.on("link.beforeRemove",t),w.$wp&&(d(),w.events.on("contentChanged",d)),l(!0)},showInsertPopup:function v(){var e=w.$tb.find('.fr-command[data-cmd="insertFile"]'),t=w.popups.get("file.insert");if(t||(t=l()),i(),!t.hasClass("fr-active"))if(w.popups.refresh("file.insert"),w.popups.setContainer("file.insert",w.$tb),e.isVisible){var a=w.button.getPosition(e),n=a.left,r=a.top;w.popups.show("file.insert",n,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("file.insert")},upload:o,insert:m,back:function e(){w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("file.insert"),w.toolbar.showInline()},hideProgressBar:i}},St.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),St.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()},plugin:"file"}),St.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(e){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"))}}),St.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}}),Object.assign(St.POPUP_TEMPLATES,{"filesManager.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_PROGRESS_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(St.DEFAULTS,{filesInsertButtons:["imageBack","|","filesUpload","filesByURL","filesEmbed"],filesInsertButtons2:["deleteAll","insertAll","cancel","minimize"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,filesManagerUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,filesManagerUploadParam:"file",filesManagerUploadParams:{},googleOptions:{},filesManagerUploadToS3:!1,filesManagerUploadToAzure:!1,filesManagerUploadMethod:"POST",filesManagerMaxSize:10485760,filesManagerAllowedTypes:["*"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),St.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" 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"}],St.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,St.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,St.IMAGE_TYPE="image/png",St.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,St.PLUGINS.filesManager=function(R){var w,o,L,l,c,d,s,f,x=R.$,y="https://i.froala.com/upload",p=!1,t=!1,I=new Map,O=new Map,A=new Map,C=new Map,F=new Map,T=new Map,i=0,r=[],u=-1,M=[],g=0,h=["file","image","imageTUI","video"],D=1,m=2,k=3,S=4,P=5,N=6,B=10,U=["video/avi","video/mpeg","video/x-ms-wmv"],v={};function b(){var e=R.popups.get("filesManager.insert"),t=e.find(".fr-files-by-url-layer input");t.val(""),e.find(".fr-files-embed-layer textarea").val("").trigger("change"),t.trigger("change")}function E(e){var t;R.hasOwnProperty("imageTUI")||(s="fr-disabled"),T.forEach(function(e,t){X(t)}),_()?(t=R.popups.get("filesManager.insert"))||(t=He()):(t=R.popups.get("filesManager.insert"))||(t=function o(){var e="<div style= 'padding:10px'>\n <div class = 'fr-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>".concat(R.language.translate(function n(){var e="",t=function a(){var t=[];return h.forEach(function(e){R.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();e=t.join(", "),1<t.length?e+=" plugin are":e+=" plugin is";return e}()+" not enabled. Do you want to enable?"),"</h3></div>\n <div style='text-align:right;'>\n <button class='fr-trim-button fr-plugins-enable'>").concat(R.language.translate("Enable"),"</button> \n <button class='fr-trim-button fr-plugins-cancel'>").concat(R.language.translate("Cancel"),"</button>\n </div>"),t={buttons:'<div class="fr-buttons fr-tabs"></div>',upload_layer:e,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},a=R.popups.create("filesManager.insert",t);return Fe(a),a}());var a=R.$tb.find('.fr-command[data-cmd="insertFiles"]');if(J(),e||!t.hasClass("fr-active"))if(e||Z(),R.popups.refresh("filesManager.insert"),R.popups.setContainer("filesManager.insert",R.$tb),a.isVisible()){var n=R.button.getPosition(a,I.size),r=n.left,i=n.top;R.popups.show("filesManager.insert",r,i,a.outerHeight())}else R.position.forSelection(t),R.popups.show("filesManager.insert");R.popups.setPopupDimensions(t),_()&&R.popups.setFileListHeight(t),t.find(".fr-upload-progress")&&0==I.size&&t.find(".fr-upload-progress").addClass("fr-none")}function _(){var t=!0;return h.forEach(function(e){R.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}function H(){J()}function $(){if(l||function o(){var e;R.shared.$image_resizer?(l=R.shared.$image_resizer,d=R.shared.$img_overlay,R.events.on("destroy",function(){x("body").first().append(l.removeClass("fr-active"))},!0)):(R.shared.$image_resizer=x(document.createElement("div")).attr("class","fr-image-resizer"),l=R.shared.$image_resizer,R.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),R.opts.imageResize&&(l.append(z("nw")+z("ne")+z("sw")+z("se")),R.shared.$img_overlay=x(document.createElement("div")).attr("class","fr-image-overlay"),d=R.shared.$img_overlay,e=l.get(0).ownerDocument,x(e).find("body").first().append(d)));R.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,R.opts.imageResize&&(d.remove(),d=null)},!0),R.helpers.isMobile()||R.events.$on(x(R.o_win),"resize",function(){w&&!w.hasClass("fr-uploading")?at(!0):w&&($(),replace(),Q(!1))});if(R.opts.imageResize){e=l.get(0).ownerDocument,R.events.$on(l,R._mousedown,".fr-handler",W),R.events.$on(x(e),R._mousemove,G),R.events.$on(x(e.defaultView||e.parentWindow),R._mouseup,V),R.events.$on(d,"mouseleave",V);var n=1,r=null,i=0;R.events.on("keydown",function(e){if(w){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==St.KEYCODE.EQUALS||R.browser.mozilla&&a==St.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=je.call(this,e,1,1,n):(a==St.KEYCODE.HYPHEN||R.browser.mozilla&&a==St.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=je.call(this,e,2,-1,n):R.keys.ctrlKey(e)||a!=St.KEYCODE.ENTER||(w.before("<br>"),Ae(w)),r=a,i=e.timeStamp}},!0),R.events.on("keyup",function(){n=1})}}(),!w)return!1;var e=R.$wp||R.$sc;e.append(l),l.data("instance",R);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=R.helpers.getPX(e.css("border-left-width")),t-=R.helpers.getPX(e.css("border-top-width")),R.$el.is("img")&&R.$sc.is("body")&&(a=t=0);var n=lt();ct()&&(n=n.find(".fr-img-wrap"));var r=0,i=0;R.opts.iframe&&(r=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(R.opts.iframe?n.offset().top+r:n.offset().top+t)-1).css("left",(R.opts.iframe?n.offset().left+i:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function z(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function K(e){ct()?w.parents(".fr-img-caption").css("width",e):w.css("width",e)}function W(e){if(!R.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),R.$el.find("img.fr-error").left)return!1;R.undo.canDo()||R.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=R.$oel.get(0).ownerDocument,n=a.defaultView||a.parentWindow,r=!1;try{r=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(s){}r&&n.frameElement&&(t+=R.helpers.getPX(x(n.frameElement).offset().left)+n.frameElement.clientLeft)}(c=x(this)).data("start-x",t),c.data("start-width",w.width()),c.data("start-height",w.height());var i=w.width();if(R.opts.imageResizeWithPercent){var o=w.parentsUntil(R.$el,R.html.blockTagsQuery()).get(0)||R.el;i=(i/x(o).outerWidth()*100).toFixed(2)+"%"}K(i),d.show(),R.popups.hideAll(),it()}function G(e){if(!R.core.sameInstance(l))return!0;var t;if(c&&w){if(e.preventDefault(),R.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var n=a-c.data("start-x"),r=c.data("start-width");if((c.hasClass("fr-hnw")||c.hasClass("fr-hsw"))&&(n=0-n),R.opts.imageResizeWithPercent){var i=w.parentsUntil(R.$el,R.html.blockTagsQuery()).get(0)||R.el;r=((r+n)/x(i).outerWidth()*100).toFixed(2),R.opts.imageRoundPercent&&(r=Math.round(r)),K("".concat(r,"%")),(t=ct()?(R.helpers.getPX(w.parents(".fr-img-caption").css("width"))/x(i).outerWidth()*100).toFixed(2):(R.helpers.getPX(w.css("width"))/x(i).outerWidth()*100).toFixed(2))===r||R.opts.imageRoundPercent||K("".concat(t,"%")),w.css("height","").removeAttr("height")}else r+n>=R.opts.imageMinWidth&&(K(r+n),t=ct()?R.helpers.getPX(w.parents(".fr-img-caption").css("width")):R.helpers.getPX(w.css("width"))),t!==r+n&&K(t),((w.attr("style")||"").match(/(^height:)|(; *height:)/)||w.attr("height"))&&(w.css("height",c.data("start-height")*w.width()/c.data("start-width")),w.removeAttr("height"));$(),R.events.trigger("image.resize",[st()])}}function V(e){if(!R.core.sameInstance(l))return!0;if(c&&w){if(e&&e.stopPropagation(),R.$el.find("img.fr-error").left)return!1;c=null,d.hide(),$(),R.undo.saveStep(),R.events.trigger("image.resizeEnd",[st()])}else l.removeClass("fr-active")}function Y(){T.forEach(function(e,t){var a=R.popups.get("filesManager.insert");a.find(".fr-checkbox-file-"+t).get(0).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t)&&(document.getElementById("fr-file-autoplay-button-"+t).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.add("fr-checkbox-disabled"),document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.remove("fr-files-checkbox")),a.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),a.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled")})}function j(e,t,a,n){R.edit.on(),w&&w.addClass("fr-error"),v[e]?(e!=k&&e!=m&&e!=S||_e(100,n,!0),T.set(n,v[e]),Y(),function r(){T.forEach(function(e,t){R.popups.get("filesManager.insert"),document.getElementById("fr-file-edit-button-".concat(t))&&(document.getElementById("fr-file-edit-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-view-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-insert-button-".concat(t)).classList.add("fr-disabled"))})}(),ae(R.language.translate(v[e]),n)):ae(R.language.translate("Something went wrong. Please try again."),n),!w&&a&&qe(a),R.events.trigger("filesManager.error",[{code:e,message:v[e]},t,a])}function q(){var e=R.popups.get("filesManager.insert"),t=e.find('.fr-command[data-cmd="insertAll"]'),a=e.find('.fr-command[data-cmd="deleteAll"]'),n=!0;F.forEach(function r(e,t,a){F.get(t)&&(n=!1)}),n?t.addClass("fr-disabled"):t.removeClass("fr-disabled"),n?a.addClass("fr-disabled"):a.removeClass("fr-disabled")}function X(e){O.get(e)&&O.get(e).link&&R.events.trigger("filesManager.removed",[O.get(e).link]);var t=R.popups.get("filesManager.insert");t.find(".fr-file-"+e).get(0)!==undefined&&(t.find(".fr-file-"+e).get(0).outerHTML=""),O["delete"](e),I["delete"](e),F["delete"](e),q(),0==I.size&&(g=0),T["delete"](e),R.popups.setPopupDimensions(t,!0),R.opts.toolbarBottom?E(!0):R.popups.setPopupDimensions(t),t.find(".fr-upload-progress")&&0==I.size&&t.find(".fr-upload-progress").addClass("fr-none")}function Z(){for(var e=R.popups.get("filesManager.insert"),t=e.find(".fr-insert-checkbox"),a=0;a<t.length;a++)t.get(a).children.target.checked=!1,e.find(".fr-file-"+t.get(a).id.split("-").pop()).get(0).classList.add("fr-unchecked");if(L)document.getElementById("fr-file-autoplay-button-".concat(L))&&(document.getElementById("fr-file-autoplay-button-".concat(L)).checked=!1),M=M.filter(function(e){return e!=L});else{for(var n=e.find(".fr-file-autoplay-button"),r=0;r<n.length;r++)n.get(r).checked=!1;M=[]}F=new Map,q()}function Q(e){var t=R.popups.get("filesManager.insert");if(t||(t=He()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),w){var a=lt();R.popups.setContainer("filesManager.insert",R.$sc);var n=a.offset().left,r=a.offset().top+a.height();R.popups.show("filesManager.insert",n,r,a.outerHeight())}void 0===e&&ee(R.language.translate("Uploading"),0)}function J(e){var t=R.popups.get("filesManager.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||R.$el.find("img.fr-error").length)){if(R.events.focus(),R.$el.find("img.fr-error").length&&(R.$el.find("img.fr-error").remove(),R.undo.saveStep(),R.undo.run(),R.undo.dropRedo()),!R.$wp&&w){var a=w;at(!0),R.selection.setAfter(a.get(0)),R.selection.restore()}R.popups.hide("filesManager.insert")}}function ee(e,t){var a=R.popups.get("filesManager.insert");if(a){var n=a.find(".fr-files-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function te(e){Q();var t=R.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),R.events.disableBlur(),a.focus()}function ae(e,t){var a=R.popups.get("filesManager.insert"),n=a.find(".fr-upload-progress-layer"),r=a.find(".fr-file-".concat(t));n.addClass("fr-error"),r.find("h5").text(e)}v[D]="File cannot be loaded from the passed link.",v[m]="No link in upload response.",v[k]="Error during file upload.",v[S]="Parsing response failed.",v[P]="File is too large.",v[N]="File type is invalid.",v[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",v[8]="File is corrupted.",v[9]="Error during file loading.",v[B]="File upload cancelled";var a,ne,re,ie,oe,se,n,le,ce,de,fe="";function pe(e){fe=e,a=document.getElementsByClassName(e),Array.prototype.map.call(a,function(e){!function n(e){if(e.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),ne=e.pageX,re=e.pageY;var t=document.getElementById("filesList");re+20>t.getBoundingClientRect().bottom&&ue(t,0,10),re-20<t.getBoundingClientRect().top&&ue(t,0,-10)},!1),R.helpers.isMobile()){var t=e.getElementsByClassName("dot");t[0].addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;t&&!t.classList.contains(fe);)t=t.parentElement;for(var a=document.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);a&&!a.classList.contains(fe);)a=a.parentElement;var n=document.getElementsByClassName("fr-hovered-over-file");Array.prototype.forEach.call(n,function(e){e.classList.remove("fr-hovered-over-file")}),a&&!t.classList.contains("fr-unchecked")&&a.classList.add("fr-hovered-over-file");var r=document.getElementById("filesList");e.targetTouches[0].clientY+5>r.getBoundingClientRect().bottom&&ue(r,0,5),e.targetTouches[0].clientY-5<r.getBoundingClientRect().top&&ue(r,0,-5)},!1)}if(e.ondrag=ge,e.ondragend=he,R.helpers.isMobile()){var a=e.getElementsByClassName("dot");a[0].addEventListener("touchmove",ge,!1),a[0].addEventListener("touchend",he,!1)}}(e)})}function ue(e,t,a){e.scrollLeft+=t,e.scrollTop+=a}function ge(e){for(R.helpers.isMobile()&&(oe=event.touches[0].clientX,se=event.touches[0].clientY),ie=e.target;!ie.classList.contains(fe);)ie=ie.parentElement;ie.classList.contains(fe)&&!ie.classList.contains("fr-unchecked")?R.helpers.isMobile()&&ie.classList.add("drag-sort-active"):ie=undefined}function he(e){var t;if(ie!==undefined){var a,n;if(R.helpers.isMobile())for(a=oe,n=se,t=event.target;!t.classList.contains(fe);)t=t.parentElement;else a=event.clientX,n=event.clientY;R.helpers.isMobile()||!R.browser.safari&&!R.browser.mozilla||(a=ne,n=re);for(var r=document.elementFromPoint(a,n);r&&!r.classList.contains(fe);)r=r.parentElement;r&&!r.classList.contains(fe)?r=undefined:r&&ie!==r&&function s(e,t){var a,n,r=e.parentNode,i=t.parentNode;if(!r||!i||r.isEqualNode(t)||i.isEqualNode(e))return;for(var o=0;o<r.children.length;o++)r.children[o].isEqualNode(e)&&(a=o);for(var o=0;o<i.children.length;o++)i.children[o].isEqualNode(t)&&(n=o);r.isEqualNode(i)&&a<n&&n++;r.insertBefore(t,r.children[a]),i.insertBefore(e,i.children[n])}(ie,r),R.helpers.isMobile()&&(t.classList.remove("fr-hovered-over-file"),r.classList.remove("fr-hovered-over-file"))}}function me(e){var n=R.popups.get("filesManager.insert");n.find(".fr-upload-progress-layer").hasClass("fr-active")||n.find(".fr-upload-progress-layer").addClass("fr-active"),n.find(".fr-upload-progress").removeClass("fr-none");var t=I.get(e),a=function o(e){var t,a={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{t=e.toLocaleDateString(R.opts.language?R.opts.language:undefined,a)}catch(n){t=e.toLocaleDateString(undefined,a)}return t+""}(new Date),r=F.get(e)?"":"fr-unchecked ",i="\n <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(r,"' draggable = \"").concat(!r,'" >\n <div class=\'fr-file-item-left\' >\n\n \n <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n ').concat(R.helpers.isMobile()?"<div id='fr-pick-".concat(e,"}' class='dot'>\n </div>"):"",'\n <div id="checkbox-key-').concat(e,'" class="fr-files-checkbox fr-insert-checkbox fr-checkbox-').concat(e,'">\n <input name="target" class="fr-insert-attr fr-checkbox-file-').concat(e,' fr-file-insert-check" data-cmd="fileInsertCheckbox"\n data-checked="_blank" type="checkbox" id="fr-link-target-').concat(R.id,'" tabIndex="0" />\n <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>','\n </span>\n </div>\n <label id="fr-label-target-').concat(R.id,"\"></label>\n </div>\n \n <div class='fr-file-item-icon fr-file-item-icon-").concat(e,"' >\n <img src='https://secure.webtoolhub.com/static/resources/icons/set112/f2afb6f7.png' alt='Image preview' class='fr-thumbnail-padding' height='36px' width='36px' />\n </div>\n\n <div class='fr-file-item-description' >\n <div class='fr-file-name fr-files-manager-tooltip'>\n ").concat(function s(e,t,a){null==t&&(t=100);null==a&&(a="...");return e.length>t?e.substring(0,t-a.length)+a:e}(t.name,20),'\n <span class="').concat(20<t.name.length?"tooltiptext":"fr-none",'">').concat(t.name,"\n </span>\n </div>\n <div class='fr-file-details'>\n <div class='fr-file-date'>").concat(a,"\n </div>\n \n <div class='fr-file-size'>\n ").concat(function l(e){if(0==e)return"0 Bytes";var t=Math.floor(Math.log(e)/Math.log(1024));return" | "+1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][t]}(t.size),"\n </div>\n </div>\n\n <div class='fr-file-error'>\n <h5 class='fr-file-error-h5'></h5>\n </div>\n </div>\n \n </div>\n\n <div class='fr-file-item-right fr-file-item-right-").concat(e,"'>")+Ee(e)+"</div>\n </div>";n.find(".fr-upload-progress-layer")[0].innerHTML=i+n.find(".fr-upload-progress-layer")[0].innerHTML,I.forEach(function c(e,t,a){F.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)}),M.forEach(function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0}),be(e,t),J(),R.opts.toolbarBottom?E(!0):R.popups.setPopupDimensions(n),pe("fr-file-list-item")}function ve(e){switch(e){case"application/msword":return R.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return R.icon.getFileIcon("docxIcon");case"image/gif":return R.icon.getFileIcon("gifIcon");case"image/jpeg":return R.icon.getFileIcon("jpegIcon");case"image/jpeg":return R.icon.getFileIcon("jpgIcon");case"type/text":return R.icon.getFileIcon("logIcon");case"video/quicktime":return R.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return R.icon.getFileIcon("mp3Icon");case"video/mp4":return R.icon.getFileIcon("mp4Icon");case"audio/ogg":return R.icon.getFileIcon("oggIcon");case"video/ogg":return R.icon.getFileIcon("ogvIcon");case"application/pdf":return R.icon.getFileIcon("pdfIcon");case"image/png":return R.icon.getFileIcon("pngIcon");case"text/plain":return R.icon.getFileIcon("txtIcon");case"video/webm":return R.icon.getFileIcon("webmIcon");case"image/webp":return R.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return R.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return R.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return R.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return R.icon.getFileIcon("zipIcon");default:return R.icon.getFileIcon("defaultIcon")}}function be(n,r,e){var i=R.popups.get("filesManager.insert"),t=i.find(".fr-file-item-icon-"+n).get(0);if(De(Re(r))&&"image/gif"!=Re(r)&&"image/webp"!=Re(r)){"a"!=t.children[0].localName&&(t.innerHTML="<a target='_blank' href=''>"+t.innerHTML+"</a>");i.find(".fr-file-item-icon-"+n).get(0).children[0].children[0];var o=new FileReader;if(null!=e&&e){var a=I.get(n);r.name=a.name,I.set(n,r)}if(o.onloadend=function(){i.find(".fr-file-item-icon-"+n).get(0).children[0].children[0].src=o.result;for(var e=atob(o.result.split(",")[1]),t=[],a=0;a<e.length;a++)t.push(e.charCodeAt(a));i.find(".fr-file-item-icon-"+n).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:Re(r)})),i.find(".fr-file-item-icon-"+n).get(0).classList.add("fr-file-item-thumbnail-hover")},r)o.readAsDataURL(r);else{var s=ve(Re(r));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(s.path,"\n </svg>")}}else{var l=ve(Re(r));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(l.path,"\n </svg>")}}function Ee(e){var t="";if(Ne(Re(I.get(e)))){var a="fr-files-checkbox",n="";Ue(Re(I.get(e)))||(a="fr-checkbox-disabled",n="disabled");t='\n <div class="fr-files-checkbox-line align-autoplay">\n <div id="checkbox-key-'.concat(e,'" class="').concat(a," fr-autoplay-checkbox fr-checkbox-").concat(e,'"> \n \n <input type="checkbox" id="fr-file-autoplay-button-').concat(e,'" class="fr-file-button-').concat(e,' fr-file-autoplay-button" data-title="Edit" data-param1="').concat(e,'" role="button" ').concat(n,"/>\n\n <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>\n </div> \n <label class='fr-autoplay-checkbox-label'>Autoplay </label>\n </div>")}var r="application/msword",i="application/vnd.openxmlformats-officedocument.wordprocessingml.document",o="";return!Be(Re(I.get(e)))&&Ue(Re(I.get(e)))||(s="fr-disabled"),Ne(Re(I.get(e)))&&(s="fr-disabled"),Pe(Re(I.get(e)))&&(s="fr-disabled",Re(I.get(e))!=r&&Re(I.get(e))!=i||R.opts.googleOptions&&!R.helpers.isMobile()&&R.opts.googleOptions.API_KEY&&R.opts.googleOptions.CLIENT_ID&&(s=""),"text/plain"!=Re(I.get(e))&&Re(I.get(e))!=r&&"application/pdf"!=Re(I.get(e))&&Re(I.get(e))!=i&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=Re(I.get(e))&&"application/vnd.ms-excel"!=Re(I.get(e))&&"type/text"!=Re(I.get(e))||(o="")),"video/url"===Re(I.get(e))&&(s="fr-disabled"),t+='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-insert-button-'.concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-").concat(e," fr-file-insert-button-").concat(e,' fr-file-insert-button" data-cmd="imageInsertByUpload" data-title="Insert" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-5 0 28 28" xlmns = "http://w3.org/200/svg"><path d = \'M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 \'></path></svg>\n </button>\n\n <button type="button" id="fr-file-edit-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(s," fr-img-icon fr-btn fr-command fr-submit \n fr-file-action-icons fr-file-edit-button-").concat(e," fr-file-button-").concat(e,' fr-file-edit-button" data-cmd="editImage" data-title="Edit" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "0 4 25 25" xlmns = "http://w3.org/200/svg"><path d = \'M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z\'></path></svg>\n </button>\n \n <span class="fr-file-view-').concat(e,'"><button type="button" id="fr-file-view-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(o," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-view-button-").concat(e,' fr-file-view-button" data-cmd="viewImage" data-title="View" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "15 19 21 21" xlmns = "http://w3.org/200/svg"> <path style="fill:none;stroke-width:0.9077;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 19.086094 16.541466 C 16.185625 16.541466 14.318281 19.447115 14.318281 19.447115 L 14.318281 19.555288 C 14.318281 19.555288 16.176719 22.475962 19.077187 22.475962 C 21.977656 22.475962 23.847969 19.576322 23.847969 19.576322 L 23.847969 19.465144 C 23.847969 19.465144 21.989531 16.541466 19.086094 16.541466 Z M 19.07125 21.024639 C 18.248906 21.024639 17.583906 20.357572 17.583906 19.53726 C 17.583906 18.716947 18.248906 18.04988 19.07125 18.04988 C 19.890625 18.04988 20.555625 18.716947 20.555625 19.53726 C 20.555625 20.357572 19.890625 21.024639 19.07125 21.024639 Z M 19.07125 21.024639 " transform="matrix(1.315789,0,0,1.3,0,0)"/></svg></button></span>\n\n <button type="button" id="fr-file-delete-button-').concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons\n fr-file-button-").concat(e,' fr-file-delete-button" data-cmd="deleteImage" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n \n </div>\n <div id="user_area-').concat(e,"\" style=\"display: none;\">\n \n <div id=\"file_container\"></div>\n\n <div style='display:block;text-align: center; margin-left:50%; id='edit-file-loader' class='fr-file-loader'></div>\n\n </div> \n ")}function _e(e,t,a){var n=R.popups.get("filesManager.insert");if(!a&&e<=100){n.find(".fr-checkbox-file-"+t).get(0).disabled=!0,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled");var r=n.find(".fr-file-progress-circle-"+t),i=n.find(".fr-file-upload-percent-"+t);return 50<e?r.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)+" over50"):r.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)),i.get(0).innerHTML=Math.floor(e)+"%",void we(t,e,a)}a&&(n.find(".fr-checkbox-file-"+t).get(0).disabled=!1,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-checkbox-disabled"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-files-checkbox"),n.find(".fr-file-item-right-"+t).get(0).innerHTML=Ee(t),we(t,100,a))}function we(e,t,a){var n=R.popups.get("filesManager.insert");n.find(".fr-progress-bar").removeClass("fr-none").addClass("fr-display-block"),n.find(".fr-upload-progress").hasClass("fr-height-set")&&R.popups.setFileListHeight(n);var r=0;C.set(e,t),C.forEach(function(e,t){r+=e}),r/=C.size,100==t&&a&&i++,n.find('.fr-command[data-cmd="filesUpload"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').addClass("fr-disabled"),n.find(".fr-progress-bar").get(0).style.width=r+"%",i==C.size&&(n.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),C=new Map,i=0,n.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"))}function ye(a,n){J(),R.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),a.forEach(function(e,t){De(Re(e))&&R.opts.imageUploadRemoteUrls&&R.opts.imageCORSProxy&&R.opts.imageUpload?Oe(e,a,w,n[t]):O.set(n[t],e)})}function Ae(e){e&&e.get&&function a(e){if("false"==x(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&de)return!0;if(e&&R.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<St.INSTANCES.length;t++)St.INSTANCES[t]!=R&&St.INSTANCES[t].events.trigger("image.hideResizer");R.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault());R.helpers.isMobile()&&(R.events.disableBlur(),R.$el.blur(),R.events.enableBlur());R.opts.iframe&&R.size.syncIframe();w=x(this),$(),R.browser.msie?(R.popups.areVisible()&&R.events.disableBlur(),R.win.getSelection&&(R.win.getSelection().removeAllRanges(),R.win.getSelection().addRange(R.doc.createRange()))):R.selection.clear();R.helpers.isIOS()&&(R.events.disableBlur(),R.$el.blur());R.button.bulkRefresh(),R.events.trigger("video.hideResizer")}.call(e.get(0))}function Ce(){var e=x(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==r.length||0<r.length&&r.length==u)&&(f=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?R.selection.setAfter(e.parent()):R.selection.setAfter(e),R.undo.saveStep(),R.events.trigger("filesManager.loaded",[e]),ke(r)}function Te(){var e,t=Array.prototype.slice.call(R.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),x(t[e]).toggleClass("fr-draggable",R.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("src"))<0&&R.events.trigger("video.removed",[x(n[e])]);n=t}function ke(e){if(null!=e){if(0==e.length)return void(null!=f&&("VIDEO"==f.get(0).tagName?R.video._editVideo(f.parent()):"IMG"==f.get(0).tagName?R.image.edit(f):f.trigger("click"),R.toolbar.disable()));Le(e.shift(),e)}}function Se(e){var t=!1;if(Ne(Re(O.get(e))))R.trimVideoPlugin.trimVideo(I.get(e),e,I),t=!0;else if(De(Re(O.get(e)))){var a=O.get(e).link,n=R.o_doc.createElement("img");n.src=a,w=n,o=e,R.imageTUI.launch(R,!1,e),t=!0}else if(Pe(Re(O.get(e)))){var r={apiKey:R.opts.googleOptions.API_KEY,clientId:R.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:I.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};ce=function d(p){var i,e=["https://www.googleapis.com/discovery/v1/apis/drive/v2/rest"],u="id,title,mimeType,userPermission,editable,copyable,shared,fileSize",g="-------314159265358979323846",h="\r\n--"+g+"\r\n",m="\r\n--"+g+"--",t=(document.getElementById(p.authorizeButton),document.getElementById(p.userArea));p.events||(p.events={});function a(){gapi.client.init({apiKey:p.apiKey,clientId:p.clientId,discoveryDocs:e,scope:"https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata"}).then(function(){gapi.auth2.getAuthInstance().isSignedIn.listen(n),n(gapi.auth2.getAuthInstance().isSignedIn.get()),function t(e){!gapi.auth2.getAuthInstance().isSignedIn.get()||gapi.auth.getToken()!==undefined&&gapi.auth.getToken().access_token===undefined?Promise.resolve(gapi.auth2.getAuthInstance().signIn()).then(function(){o()}):o()}()},function(e){p.events.onError(e)})}function n(e){e&&(t.style.display="block")}function r(e){var t=gapi.auth.getToken().access_token,a=i,n="https://docs.google.com/feeds/download/documents/export/Export?id="+a+"&format=docx&access_token="+t,r=new XMLHttpRequest;r.open("get",n),r.responseType="arraybuffer",r.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),t=I.get(p.fileIndex);e.name=t.name,e.lastModified=t.lastModified,e.lastModifiedDate=t.lastModifiedDate,I.set(p.fileIndex,e),R.filesManager.upload(e,O,w,p.fileIndex),l()},r.send()}function o(e){!function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),a=0;a<t.length;a++)t[a].setAttribute("disabled",!0),t[a].classList.add("fr-disabled")}(p.fileIndex);var t=p.file;t?function a(c,d){var f=new FileReader;f.readAsArrayBuffer(c),f.onload=function(e){for(var t={title:c.name,mimeType:"application/vnd.google-apps.document"},a="",n=new Uint8Array(f.result),r=n.byteLength,i=0;i<r;i++)a+=String.fromCharCode(n[i]);var o=btoa(a),s=h+"Content-Type: application/json; charset=UTF-8\r\n\r\n"+JSON.stringify(t)+h+"Content-Type: application/octet-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+o+m,l=gapi.client.request({path:"/upload/drive/v2/files",method:"POST",params:{uploadType:"multipart",fields:u},headers:{"Content-Type":'multipart/related; boundary="'+g+'"',"Content-Length":s.Length},body:s});d||(d=function(e){}),l.execute(function(e,t){e.error?p.events.onError(e.error):d(e)})}}(t,s):p.events.onInvalidFile("File is not selected")}function s(e){i=e.id;var t="https://docs.google.com/document/d/"+e.id+"/edit",a=R.o_doc.body,n=R.o_doc.createElement("div");n.setAttribute("id","editDocContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;width: 100%;height: 100%;background: rgba(255,255,255,1);z-index: 9998;display:block",n.innerHTML='<div style="margin-top:25px; text-align:center"><label>Sign Out : </label><input type="checkbox" id ="markSignOut" role="button"/> <button id="signout_button" class="fr-trim-button" >Save </button> <button id="cancel_file_edit" class="fr-trim-button">Cancel</button></div> <iframe title="Edit your file" frameBorder="0" width="100%" height="700px" src="'+t+'"></iframe>',a.appendChild(n),document.getElementById("signout_button").onclick=r,document.getElementById("cancel_file_edit").onclick=l}function l(){document.getElementById("markSignOut").checked&&gapi.auth2.getAuthInstance().signOut().then(function(){gapi.auth.getToken()&&(gapi.auth.getToken().access_token=undefined)});var e=document.getElementById("editDocContainer");e.parentNode.removeChild(e),document.getElementById("user_area-".concat(p.fileIndex))&&(document.getElementById("user_area-".concat(p.fileIndex)).style.display="none"),function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),a=0;a<t.length;a++)t[a].removeAttribute("disabled"),t[a].classList.remove("fr-disabled")}(p.fileIndex)}p.events.onInvalidFile=p.events.onInvalidFile||function(e){},p.events.onError=p.events.onError||function(e){};var c={};return c.handleClientLoad=function(){gapi.load("client:auth2",a)},c}(r),function i(e,t){var n=function n(e,t){var a=document.createElement("script");a.src=e,a.onload=function(){this.onload=function(){},ce.handleClientLoad()},a.onreadystatechange=function(){"complete"===this.readyState&&this.onload()},(document.getElementsByTagName("head")[0]||document.body).appendChild(a)};!function a(){0!=e.length?n(e.shift(),a):t&&t()}()}(["https://apis.google.com/js/api.js"],function(){})}t&&(p=!0)}function Re(e){var a;if(""!=e.type)return e.type;if(e.name&&e.name.endsWith(".msg"))return a="application/vnd.ms-outlook";var n=/(?:\.([^.]+))?$/.exec(e.name)[1];return[[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".txt","text/plain"],[".log","type/text"],[".mov","video/quicktime"],[".mp3","audio/mpeg"],[".mp4","video/mp4"],[".ogg","audio/ogg"],[".ogv","video/ogg"],[".pdf","application/pdf"],[".png","image/png"],[".webm","video/webm"],[".webp","image/webp"],[".wmv","video/x-ms-wmv"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".zip","application/x-zip-compressed"]].forEach(function(e,t){e[0]==".".concat(n)&&(a=e[1])}),a}function Le(s,e){if(Pe(Re(O.get(s)))||!Ue(Re(O.get(s)))){var t,a=O.get(s).link,n=O.get(s).text,r=O.get(s).data;!n&&I.get(s)&&I.get(s).name&&(n=I.get(s).name);var i=O.get(s).response;R.edit.on(),R.events.focus(!0),R.selection.restore(),R.opts.fileUseSelectedText&&R.selection.text().length&&(n=R.selection.text());var o='<a href="'.concat(a,'" target="_blank" id="fr-inserted-file" ');if(void 0!==r)for(t in r)r.hasOwnProperty(t)&&"link"!=t&&(o+="".concat(t,'="').concat(r[t],'" '));-1==o.indexOf(' class="')&&(o+='class="fr-file" '),o+=">".concat(n,"</a>"),R.html.insert(o);var l=R.$el.find("#fr-inserted-file");l.removeAttr("id"),R.undo.saveStep(),function T(){var e,t=Array.prototype.slice.call(R.el.querySelectorAll("a.fr-file")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("href"));if(le)for(e=0;e<le.length;e++)a.indexOf(le[e].getAttribute("href"))<0&&R.events.trigger("file.unlink",[le[e]]);le=t}(),R.selection.clear(),R.selection.setAfter(l),R.events.trigger("file.inserted",[l,i]),ke(e)}if(De(Re(O.get(s)))&&Ue(Re(O.get(s)))){var c=O.get(s).link,d=O.get(s).sanitize,f=O.get(s).data,p=O.get(s).$existing_img,u=O.get(s).response;p&&"string"==typeof p&&(p=R.$(p)),R.edit.off(),ee(R.language.translate("Loading image")),d&&(c=R.helpers.sanitizeURL(c));var g=new Image;g.onload=function(){var e,t;if(p){R.undo.canDo()||p.hasClass("fr-uploading")||R.undo.saveStep();var a=p.data("fr-old-src");p.data("fr-image-pasted")&&(a=null),R.$wp?((e=p.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&p.attr("src",a),p.replaceWith(e)):e=p;for(var n=e.get(0).attributes,r=0;r<n.length;r++){var i=n[r];0===i.nodeName.indexOf("data-")&&e.removeAttr(i.nodeName)}if(void 0!==f)for(t in f)f.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),f[t]);e.on("load",Ce),e.attr("src",c),R.edit.on(),R.undo.saveStep(),R.events.disableBlur(),R.$el.blur(),R.events.trigger(a?"image.replaced":"image.inserted",[e,u])}else e=function s(e,t,a){var n,r=x(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),r.attr("data-".concat(n),t[n]));var i=R.opts.imageDefaultWidth;i&&"auto"!=i&&(i=R.opts.imageResizeWithPercent?"100%":"".concat(i,"px"));r.attr("style",i?"width: ".concat(i,";"):""),ot(r,R.opts.imageDefaultDisplay,R.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),R.edit.on(),R.events.focus(!0),R.selection.restore(),R.undo.saveStep(),R.opts.imageSplitHTML?R.markers.split():R.markers.insert();R.html.wrap();var o=R.$el.find(".fr-marker");o.length?(o.parent().is("hr")&&o.parent().after(o),R.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r)):R.$el.append(r);return r}(c,f,Ce),R.undo.saveStep(),R.events.disableBlur(),R.$el.blur(),R.events.trigger("image.inserted",[e,u])},g.onerror=function(){j(D,null,null,s),ke(e)},g.src=c}if((Ne(Re(O.get(s)))||Be(Re(O.get(s))))&&Ue(Re(O.get(s))))if(L=s,"video/url"==Re(O.get(s))){var h=!1;if(document.getElementById("fr-file-autoplay-button-"+s)!==undefined&&(h=document.getElementById("fr-file-autoplay-button-"+s).checked),h&&O.get(s)!==undefined&&-1<O.get(s).video.indexOf("iframe")&&O.get(s).video.indexOf("autoplay=1")<0){var m=O.get(s).video.substring(O.get(s).video.indexOf("src")+3),v="&";(m=(m=m.substring(m.indexOf('"')+1)).substring(0,m.indexOf('"'))).indexOf("?")<0&&(v="?"),O.get(s).video=O.get(s).video.replace(m,m+=v+"autoplay=1&mute=1")}else!h&&O.get(s).video.indexOf(!1)&&(-1<O.get(s).video.indexOf("&autoplay=1")&&(O.get(s).video=O.get(s).video.replace("&autoplay=1","")),-1<O.get(s).video.indexOf("?autoplay=1")&&(O.get(s).video=O.get(s).video.replace("?autoplay=1","")));R.events.focus(!0),R.selection.restore(),R.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(O.get(s).video,"</span>"),!1,R.opts.videoSplitHTML),R.popups.hide("filesManager.insert");var b=R.$el.find(".fr-jiv");b.removeClass("fr-jiv"),b.toggleClass("fr-rv",R.opts.videoResponsive),function k(e,t,a){!R.opts.htmlUntouched&&R.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(b,R.opts.videoDefaultDisplay,R.opts.videoDefaultAlign),b.toggleClass("fr-draggable",R.opts.videoMove),R.events.trigger("video.inserted",[b]),Ce.call(b)}else{var E=O.get(s).link,_=O.get(s).sanitize,w=O.get(s).data,y=O.get(s).$existing_img,A=O.get(s).response;R.edit.off(),_&&(E=R.helpers.sanitizeURL(E)),function S(){var e,t;if(y){R.undo.canDo()||y.find("video").hasClass("fr-uploading")||R.undo.saveStep();var a=y.find("video").data("fr-old-src"),n=y.data("fr-replaced");y.data("fr-replaced",!1),R.$wp?((e=y.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&y.find("video").attr("src",a),y.replaceWith(e)):e=y;for(var r=e.find("video").get(0).attributes,i=0;i<r.length;i++){var o=r[i];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==w)for(t in w)w.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),w[t]);e.find("video").on("canplay",Ce),e.find("video").attr("src",E),R.edit.on(),Te(),R.undo.saveStep(),R.$el.blur(),R.events.trigger(n?"video.replaced":"video.inserted",[e,A])}else e=function u(e,t,a,n,r){var i,o="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(o+=" data-".concat(i,'="').concat(t[i],'"'));var s,l=R.opts.videoDefaultWidth;l&&"auto"!=l&&(l="".concat(l,"px"));if(Be(n))s=x(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+R.opts.videoDefaultDisplay[0]+("center"!=R.opts.videoDefaultAlign?" fr-fv"+R.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+o+" controls>"+R.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var c="",d=document.getElementById("fr-file-autoplay-button-"+r).checked;d&&(c="autoplay"),s=x(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+R.opts.videoDefaultDisplay[0]+("center"!=R.opts.videoDefaultAlign?" fr-fv"+R.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+o+(l?' style="width: '+l+';" ':"")+c+" controls>"+R.language.translate("Your browser does not support HTML5 video.")+"</video>")}s.toggleClass("fr-draggable",R.opts.videoMove),R.edit.on(),R.events.focus(!0),R.selection.restore(),R.undo.saveStep(),R.opts.videoSplitHTML?R.markers.split():R.markers.insert();R.html.wrap();var f=R.$el.find(".fr-marker");R.node.isLastSibling(f)&&f.parent().hasClass("fr-deletable")&&f.insertAfter(f.parent());f.replaceWith(s);var p="";p=Be(n)?"audio":"video",s.find(p).get(0).readyState>s.find(p).get(0).HAVE_FUTURE_DATA||R.helpers.isIOS()?a.call(s.find(p).get(0)):(s.find(p).on("canplaythrough load",a),s.find(p).on("error",a));return s}(E,w,Ce,Re(O.get(s)),s),Te(),R.undo.saveStep(),R.events.trigger("video.inserted",[e,A])}()}R.popups.hide("filesManager.insert"),F["delete"](s);var C=R.popups.get("filesManager.insert");C.find("input.fr-insert-attr.fr-checkbox-file-".concat(s))[0].checked=!1,C.find(".fr-file-"+s).get(0).classList.add("fr-unchecked"),q(),document.getElementById("fr-file-autoplay-button-"+s)&&(document.getElementById("fr-file-autoplay-button-"+s).checked=!1),M=M.filter(function(e){return e!=s})}function xe(e,t){try{if(!1===R.events.trigger("filesManager.uploaded",[e],!0))return R.edit.on(),!1;var a=JSON.parse(e);return a.link?a:(j(m,e,null,t),!1)}catch(n){return j(S,e,null,t),!1}}function Ie(e,t){try{var a=x(e).find("Location").text(),n=x(e).find("Key").text();return!1===R.events.trigger("filesManager.uploadedToS3",[a,n,e],!0)?(R.edit.on(),!1):a}catch(r){return j(S,e,null,t),!1}}function Oe(e,t,a,n){if(-1<U.indexOf(Re(e))||!Re(e))return j(N,null,null,n),!1;if(!1===R.events.trigger("filesManager.beforeUpload",[t]))return!1;if(!(null!==R.opts.filesManagerUploadURL&&R.opts.filesManagerUploadURL!=y||R.opts.filesManagerUploadToS3||R.opts.filesManagerUploadToAzure))return function E(s,l,c){var d=new FileReader;d.onload=function(){var e=d.result;if(d.result.indexOf("svg+xml")<0){for(var t=atob(d.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));if(e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:Re(l)})),De(Re(l))){var r={link:e,sanitize:!1,data:null,$existing_img:c,response:null,type:Re(l)};O.set(s,r)}if(Pe(Re(l))){var i={link:e,text:l.name,response:null,type:Re(l)};O.set(s,i)}if(Ne(Re(l))||Be(Re(l))){var o={link:e,sanitize:!1,data:null,$existing_img:c,type:Re(l)};O.set(s,o)}}},d.readAsDataURL(l)}(n,e),!1;if(De(Re(e))&&(e.name||(e.name=(new Date).getTime()+"."+(Re(e)||"image/jpeg").replace(/image\//g,""))),e.size>R.opts.filesManagerMaxSize)return j(P,null,null,n),!1;if(R.opts.filesManagerAllowedTypes.indexOf("*")<0&&R.opts.filesManagerAllowedTypes.indexOf(Re(e))<0)return j(N,null,null,n),!1;var r;if(function _(e){isNaN(e)||(R.popups.get("filesManager.insert").find(".fr-file-item-right-"+e).get(0).innerHTML='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-cancel-upload-button-'.concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-file-cancel-upload-button" data-cmd="cancelUpload" data-title="Cancel" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z\'></path></svg>\n </button>\n\n <button type="button" id="fr-upload-delete-button-').concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-upload-delete-button" data-cmd="deleteUpload" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n\n <div class=\'progress-circle p0 fr-file-progress-circle-').concat(e,"'>\n <span class='fr-file-upload-percent-").concat(e," fr-file-upload-percent'>0%</span>\n <div class='left-half-clipper'>\n <div class='first50-bar'></div>\n <div class='value-bar'></div>\n </div>\n </div>\n </div>"),C.set(e,0))}(n),R.drag_support.formdata&&(r=R.drag_support.formdata?new FormData:null),r){var i;if(!1!==R.opts.filesManagerUploadToS3)for(i in r.append("key",R.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),r.append("success_action_status","201"),r.append("X-Requested-With","xhr"),r.append("Content-Type",Re(e)),R.opts.filesManagerUploadToS3.params)R.opts.filesManagerUploadToS3.params.hasOwnProperty(i)&&r.append(i,R.opts.filesManagerUploadToS3.params[i]);for(i in R.opts.filesManagerUploadParams)R.opts.filesManagerUploadParams.hasOwnProperty(i)&&r.append(i,R.opts.filesManagerUploadParams[i]);r.append(R.opts.filesManagerUploadParam,e,e.name);var o,s,l=R.opts.filesManagerUploadURL;R.opts.filesManagerUploadToS3&&(l=R.opts.filesManagerUploadToS3.uploadURL?R.opts.filesManagerUploadToS3.uploadURL:"https://".concat(R.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(R.opts.filesManagerUploadToS3.bucket)),R.opts.filesManagerUploadToAzure&&(l=R.opts.filesManagerUploadToAzure.uploadURL?"".concat(R.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(R.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(R.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),o=l,R.opts.filesManagerUploadToAzure.SASToken&&(l+=R.opts.filesManagerUploadToAzure.SASToken),R.opts.filesManagerUploadMethod="PUT");var c=R.core.getXHR(l,R.opts.filesManagerUploadMethod);if(R.opts.filesManagerUploadToAzure){var d=(new Date).toUTCString();if(!R.opts.filesManagerUploadToAzure.SASToken&&R.opts.filesManagerUploadToAzure.accessKey){var f=R.opts.filesManagerUploadToAzure.account,p=R.opts.filesManagerUploadToAzure.container;if(R.opts.filesManagerUploadToAzure.uploadURL){var u=R.opts.filesManagerUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+e.name),m=R.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+Re(e)+"\n\n\n\n\n\n\n"+g+"\n"+h,v=R.cryptoJSPlugin.cryptoJS.HmacSHA256(m,R.cryptoJSPlugin.cryptoJS.enc.Base64.parse(R.opts.filesManagerUploadToAzure.accessKey)).toString(R.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;s=v,c.setRequestHeader("Authorization",b)}for(i in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",Re(e)),c.setRequestHeader("x-ms-blob-type","BlockBlob"),R.opts.filesManagerUploadParams)R.opts.filesManagerUploadParams.hasOwnProperty(i)&&c.setRequestHeader(i,R.opts.filesManagerUploadParams[i]);for(i in R.opts.filesManagerUploadToAzure.params)R.opts.filesManagerUploadToAzure.params.hasOwnProperty(i)&&c.setRequestHeader(i,R.opts.filesManagerUploadToAzure.params[i])}c.onload=function(){Pe(Re(e))?function g(e,t,a,n,r){var i=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(R.opts.filesManagerUploadToS3||R.opts.filesManagerUploadToAzure)if(201===i){var c;if(R.opts.filesManagerUploadToAzure){if(!1===R.events.trigger("filesManager.uploadedToAzure",[this.responseURL,r,o],!0))return R.edit.on(),!1;c=n}else c=Ie(s,t);if(c){var d={link:c,text:e,response:o,type:a};O.set(t,d)}}else j(S,o||s,null,t);else if(200<=i&&i<300){var f=xe(l,t);if(f){var p={link:f.link,text:e,response:o,type:a,data:f};O.set(t,p)}}else j(k,o||l,null,t)}catch(u){j(S,o||l,null,t)}}.call(c,e.name,n,Re(e),o,s):function h(e,t,a,n,r){var i=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(R.opts.filesManagerUploadToS3||R.opts.filesManagerUploadToAzure)if(201==i){var c;if(R.opts.filesManagerUploadToAzure){if(!1===R.events.trigger("filesManager.uploadedToAzure",[this.responseURL,r,o],!0))return R.edit.on(),!1;c=n}else c=Ie(s,t);if(c){var d={link:c,sanitize:!1,data:[],$existing_img:e,response:o||s,type:a};O.set(t,d)}}else j(S,o||s,e,t);else if(200<=i&&i<300){var f=xe(l,t);if(f){var p={link:f.link,sanitize:!1,data:f,$existing_img:e,response:o||s,type:a};O.set(t,p)}}else j(k,o||l,e,t)}catch(u){j(S,o||l,e,t)}}.call(c,w,n,Re(e),o,s),T.has(n)||_e(100,n,!0)},c.onerror=function(){j(S,this.response||this.responseText||this.responseXML,null,n)},c.upload.onprogress=function(e){!function a(e,t){e.lengthComputable&&_e(e.loaded/e.total*100|0,t,!1)}(e,n)},c.onabort=function(e){!function a(e,t){j(B,t,w,e)}(n,e)},c.send(R.opts.filesManagerUploadToAzure?e:r),A.set(n,c)}}function Fe(l){R.events.$on(l,"click",".fr-upload-progress-layer",function(e){if(R.helpers.isMobile())return e.stopPropagation(),!1},!0),R.events.$on(l,"dragover dragenter",".fr-upload-progress-layer",function(e){e.preventDefault();for(var t=0;t<e.originalEvent.dataTransfer.types.length;t++)"Files"==e.originalEvent.dataTransfer.types[t]&&(e.originalEvent.dataTransfer.dropEffect="none");return!1},!0),R.events.$on(l,"dragleave dragend",".fr-upload-progress-layer",function(e){return e.preventDefault(),!1},!0),R.events.$on(l,"dragover dragenter",".fr-files-upload-layer",function(e){return x(this).addClass("fr-drop"),(R.browser.msie||R.browser.edge)&&e.preventDefault(),!1},!0),R.events.$on(l,"dragleave dragend",".fr-files-upload-layer",function(e){return x(this).removeClass("fr-drop"),(R.browser.msie||R.browser.edge)&&e.preventDefault(),!1},!0),R.events.$on(l,"click",".fr-insert-checkbox",function(e){if(this.classList.contains("fr-checkbox-disabled"))return this.children.target.disabled=!0,void(this.children.target.checked=!1);var t=parseInt(this.id.split("-").pop());F.set(t,this.children.target.checked);for(var a=l.find('.fr-command[data-cmd="insertAll"]'),n=l.find('.fr-command[data-cmd="deleteAll"]'),r=l.find('input.fr-file-insert-check[type="checkbox"]'),i=r.length,o=!0,s=0;s<i;s++)1==r[s].checked&&(o=!1);if(o?a.addClass("fr-disabled"):a.removeClass("fr-disabled"),o?n.addClass("fr-disabled"):n.removeClass("fr-disabled"),this.children.target.checked)l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","true"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.remove("fr-unchecked");else{this.id.split("-").pop();l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","false"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.add("fr-unchecked")}}),R.events.$on(l,"click",".fr-file-insert-button",function(e){this.classList.contains("fr-disabled")||Le(parseInt(this.id.split("-").pop()))}),R.events.$on(l,"click",".fr-file-autoplay-button",function(e){if(this.parentNode.classList.contains("fr-checkbox-disabled"))return this.disabled=!0,void(this.checked=!1);Me(parseInt(this.id.split("-").pop()))}),R.events.$on(l,"click",".fr-file-edit-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-edit-button-".concat(t)).hasClass("fr-disabled")||Se(t)}),R.events.$on(l,"click",".fr-file-view-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-view-button-".concat(t)).hasClass("fr-disabled")||function v(e){if(!Ue(Re(O.get(e)))){var t=O.get(e).link,a=O.get(e).link;if(I.get(e)&&I.get(e).name?a=I.get(e).name:O.get(e).text&&(a=O.get(e).text),0===t.indexOf("blob:")&&R.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(I.get(e),a);else{var n=document.createElement("a");n.href=t,n.download=a,n.click()}return!1}var r=R.popups.get("filesManager.insert");if(0<r.find(".fr-file-view-image-"+e).length)r.find(".fr-file-view-image-"+e)[0].remove();else{for(var i=r.find(".fr-file-view"),o=0;o<i.length;o++)i.get(o).remove();var s=r.find(".fr-file-view-"+e);if(De(Re(O.get(e)))){var l='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content">\n <div class="fr-file-view-close">&times;</div> \n <img src="'+O.get(e).link+"\" class ='fr-file-view-image'/>\n </div>\n </div>";s[0].innerHTML=l+s[0].innerHTML}else if(Ne(Re(O.get(e)))){var c;if(O.get(e).hasOwnProperty("video")){var d=O.get(e).video.substring(O.get(e).video.indexOf("src")+3),f=d.substring(d.indexOf('"')+1);f=f.substring(0,f.indexOf('"')),c='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <iframe width="640" height="360" src="'.concat(f+"&autoplay=1&mute=1",'" allow="autoplay" frameborder="0" class = "fr-file-view-image"></iframe>\n </div>\n </div>')}else c='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <video controls src="'+O.get(e).link+"\" class ='fr-file-view-image' autoplay></video>\n </div>\n </div>";s[0].innerHTML=c+s[0].innerHTML}else if(Be(Re(O.get(e)))){var p='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <audio controls="controls" class =\'fr-file-view-image\' autoplay>\n\n <source src="'.concat(O.get(e).link,'" type="').concat(Re(O.get(e)),'" />\n\n Your browser does not support the audio element.\n </audio>\n </div>\n </div>');s[0].innerHTML=p+s[0].innerHTML}else if(Pe(Re(O.get(e)))){var u=O.get(e).link,g=O.get(e).text;if(u.endsWith(".pdf")||u.endsWith(".txt")){var h='<div class="fr-file-view-modal">\t\n <div class="fr-file-view-modal-content " >\t\n <div class="fr-file-view-close">&times;</div> \t\n <iframe src="'.concat(u,"\" style='background-color: white;' height='50%' width='50%' title=\"").concat(g,'" class="fr-file fr-file-view-image"></iframe>\t\n </div>\t\n </div>');s[0].innerHTML=h+s[0].innerHTML}else if(0===u.indexOf("blob:")&&R.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(I.get(e),g);else{var m=document.createElement("a");m.href=u,m.download=g,m.click()}}}}(t)}),R.events.$on(l,"click",".fr-file-delete-button",function(e){X(parseInt(this.id.split("-").pop()))}),R.events.$on(l,"click",".fr-file-cancel-upload-button",function(e){!function a(e){var t=R.popups.get("filesManager.insert");t.find(".fr-file-item-right-"+e).get(0).innerHTML=Ee(e),A.get(e).abort(),we(e,100,!0),t.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))}),R.events.$on(l,"click",".fr-upload-delete-button",function(e){!function t(e){0!=A.get(e).readyState&&(A.get(e).abort(),we(e,100,!0),A["delete"](e)),X(e)}(parseInt(this.id.split("-").pop()))}),R.events.$on(l,"click",".fr-file-view-close",function(e){l.find(".fr-file-view-modal").get(0).outerHTML=""}),R.events.$on(l,"click",".fr-plugins-enable",function(e){!function t(){h.forEach(function(e){R.opts.pluginsEnabled.indexOf(e)<0&&R.opts.pluginsEnabled.push(e)})}(),function a(e){for(var t in e)if(!R[t]){if(St.PLUGINS[t]&&R.opts.pluginsEnabled.indexOf(t)<0)continue;R[t]=new e[t](R),R[t]._init&&R[t]._init()}}(St.PLUGINS),R.popups.get("filesManager.insert").get(0).outerHTML="",He(),E(!0)}),R.events.$on(l,"click",".fr-plugins-cancel",function(e){R.popups.hide("filesManager.insert")}),R.events.$on(l,"drop",".fr-upload-progress",function(e){e.preventDefault(),e.stopPropagation()}),R.events.$on(l,"drop",".fr-files-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),x(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=l.data("instance")||R;a.events.disableBlur();for(var n=[],r=0;r<t.files.length;r++){var i=g;I.set(i,t.files[r]),me(i),F.set(i,!1),n.push(i),g++}for(var o=0;o<n.length;o++)a.filesManager.upload(I.get(n[o]),t.files,w,n[o]);a.events.enableBlur()}},!0),R.helpers.isIOS()&&R.events.$on(l,"touchstart",'.fr-files-upload-layer input[type="file"]',function(){x(this).trigger("click")},!0),R.events.$on(l,"change",'.fr-files-upload-layer input[type="file"]',function(){if(this.files){var e=l.data("instance")||R;e.events.disableBlur(),l.find("input:focus").blur(),e.events.enableBlur();var t=[];if("undefined"!=typeof this.files&&0<this.files.length){for(var a=0;a<this.files.length;a++){var n=g;I.set(n,this.files[a]),me(n),F.set(n,!1),++g,t.push(n)}for(var r=0;r<t.length;r++)e.filesManager.upload(I.get(t[r]),this.files,w,t[r])}}x(this).val("")},!0)}function Me(t){document.getElementById("fr-file-autoplay-button-"+t).checked?M.push(t):M=M.filter(function(e){return e!=t})}function De(e){return e&&"image"===e.split("/")[0]}function Pe(e){return e&&"image"!=e.split("/")[0]&&e&&"video"!=e.split("/")[0]&&e&&"audio"!=e.split("/")[0]}function Ne(e){return e&&"video"===e.split("/")[0]}function Be(e){return e&&"audio"===e.split("/")[0]}function Ue(e){var t="audio/ogg",a="video/ogg";if(e==t||e==a||"image/webp"==e||"video/webm"==e){if(R.browser.msie||R.browser.edge||R.browser.safari)return!1;if(R.helpers.isMobile()){if(e==t||e==a)return!1;if(!R.helpers.isAndroid()&&!R.browser.chrome)return!1}}return!0}function He(e){if(e)return R.popups.onRefresh("filesManager.insert",b),R.popups.onHide("filesManager.insert",H),!0;var t,a,n="";R.opts.imageUpload||-1===R.opts.filesInsertButtons.indexOf("filesUpload")||R.opts.imageInsertButtons.splice(R.opts.filesInsertButtons.indexOf("filesUpload"),1);var r=R.button.buildList(R.opts.filesInsertButtons),i=R.button.buildList(R.opts.filesInsertButtons2);""!==r&&(n='<div class="fr-buttons fr-tabs">'.concat(r,'<span class="fr-align-right">').concat(i,"</span></div>"));var o=R.opts.filesInsertButtons.indexOf("filesUpload"),s=R.opts.filesInsertButtons.indexOf("filesByURL"),l=R.opts.filesInsertButtons.indexOf("filesEmbed"),c="";0<=o&&(t=" fr-active",0<=s&&s<o&&(t=""),c='<div class="fr-files-upload-layer'.concat(t,' fr-layer " id="fr-files-upload-layer-').concat(R.id,'"><div style="display:flex"><div class="fr-upload-section"><div class = \'fr-blue-decorator\'><div class = \'fr-cloud-icon\'><svg class = "fr-svg" focusable="false" width="26px" height="26px" viewBox = "0 0 24 24" xlmns = "http://w3.org/200/svg"><path d = \'M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z\'></path></svg></div>Drag & Drop One or More Files<br><div class="fr-decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(R.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(R.id,'"role="button" multiple></div> </div></div>'));var d="";0<=l&&(t=" fr-active",(o<l&&0<=o||s<l&&0<=s)&&(t=""),d='<div class="fr-files-embed-layer fr-layer'.concat(t,'" id="fr-files-embed-layer-').concat(R.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(R.id,'" type="text" placeholder="').concat(R.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="insertEmbed" tabIndex="2" role="button">').concat(R.language.translate("Insert"),"</button></div></div>"));var f="";0<=s&&(t=" fr-active",0<=o&&o<s&&(t=""),f='<div class="fr-files-by-url-layer'.concat(t,' fr-layer" id="fr-files-by-url-layer-').concat(R.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-by-url-layer-text-').concat(R.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="filesInsertByURL" tabIndex="2" role="button">').concat(R.language.translate("Add"),"</button></div></div>"));var p={buttons:n,upload_layer:c,by_url_layer:f,embed_layer:d,upload_progress_layer:"<div class = ' fr-margin-16 fr-upload-progress' id=\"fr-upload-progress-layer-".concat(R.id,"\" ><div class='fr-progress-bar-style'><div class='fr-progress-bar fr-none'></div></div><div id='filesList' class = 'fr-upload-progress-layer fr-layer'></div></div>"),progress_bar:'<div class="fr-files-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="filesDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=R.opts.imageInsertButtons.length&&(a=R.popups.create("filesManager.insert",p)),R.$wp&&R.events.$on(R.$wp,"scroll",function(){w&&R.popups.isVisible("filesManager.insert")&&replace()}),Fe(a),R.popups.setPopupDimensions(a),a}function $e(e){var t=e.split("/").pop();if(t.split(".").length<2){var a=new Date;return t+"-"+a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear()}return t}function ze(){w&&R.popups.get("image.alt").find("input").val(w.attr("alt")||"").trigger("change")}function Ke(){var e=R.popups.get("image.alt");e||(e=We()),J(),R.popups.refresh("image.alt"),R.popups.setContainer("image.alt",R.$sc);var t=lt();ct()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();R.popups.show("image.alt",a,n,t.outerHeight(),!0)}function We(e){if(e)return R.popups.onRefresh("image.alt",ze),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(R.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(R.id,'" type="text" placeholder="').concat(R.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(R.language.translate("Update"),"</button></div></div>")},a=R.popups.create("image.alt",t);return R.$wp&&R.events.$on(R.$wp,"scroll.image-alt",function(){w&&R.popups.isVisible("image.alt")&&Ke()}),a}function Ge(){var e=R.popups.get("image.size");if(w)if(ct()){var t=w.parent();t.get(0).style.width||(t=w.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(w.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(w.get(0).style.height).trigger("change")}function Ve(){var e=R.popups.get("image.size");e||(e=Ye()),J(),R.popups.refresh("image.size"),R.popups.setContainer("image.size",R.$sc);var t=lt();ct()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();R.popups.show("image.size",a,n,t.outerHeight(),!0)}function Ye(e){if(e)return R.popups.onRefresh("image.size",Ge),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(R.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(R.id,'" type="text" name="width" placeholder="').concat(R.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(R.id,'" type="text" name="height" placeholder="').concat(R.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(R.language.translate("Update"),"</button></div></div>")},a=R.popups.create("image.size",t);return R.$wp&&R.events.$on(R.$wp,"scroll.image-size",function(){w&&R.popups.isVisible("image.size")&&Ve()}),a}function je(e,t,a,n){return e.pageX=t,W.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),G.call(this,e),V.call(this,e),++n}function qe(e){(e=e||lt())&&!1!==R.events.trigger("image.beforeRemove",[e])&&(R.popups.hideAll(),at(!0),R.undo.canDo()||R.undo.saveStep(),e.get(0)==R.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(R.selection.setBefore(e.get(0).parentNode)||R.selection.setAfter(e.get(0).parentNode)||e.parent().after(St.MARKERS),x(e.get(0).parentNode).remove()):(R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0))||e.after(St.MARKERS),e.remove()),R.html.fillEmptyBlocks(),R.selection.restore()),R.undo.saveStep())}function Xe(e){var t=e.which;if(w&&(t==St.KEYCODE.BACKSPACE||t==St.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),qe(),!1;if(w&&t==St.KEYCODE.ESC){var a=w;return at(!0),R.selection.setAfter(a.get(0)),R.selection.restore(),e.preventDefault(),!1}if(!w||t!=St.KEYCODE.ARROW_LEFT&&t!=St.KEYCODE.ARROW_RIGHT)return w&&t===St.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),at(!0),!1):w&&t!=St.KEYCODE.F10&&!R.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=w.get(0);return at(!0),t==St.KEYCODE.ARROW_LEFT?R.selection.setBefore(n):R.selection.setAfter(n),R.selection.restore(),e.preventDefault(),!1}function Ze(e){if(e&&"IMG"==e.tagName){var t;if(R.node.hasClass(e,"fr-uploading")||R.node.hasClass(e,"fr-error"))null===(t=e.parentNode)||void 0===t||t.removeChild(e);else R.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable");if(e.parentNode&&e.parentNode.parentNode&&R.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var a=e.parentNode.parentNode;a.removeAttribute("contenteditable"),a.removeAttribute("draggable"),a.classList.remove("fr-draggable");var n=e.nextSibling;n&&n.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var r=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),i=0;i<r.length;i++)Ze(r[i])}function Qe(e){var t=e.target.result,a=R.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=R.opts.imageResizeWithPercent?"%":"px"),R.undo.saveStep(),R.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var n=R.$el.find('img[data-fr-image-pasted="true"]');n&&ot(n,R.opts.imageDefaultDisplay,R.opts.imageDefaultAlign),R.events.trigger("paste.after")}function Je(e,t){var a=new FileReader;a.onload=function n(e){var t=R.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=R.opts.imageResizeWithPercent?"%":"px"),R.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=R.$el.find('img[data-fr-image-pasted="true"]');a&&ot(a,R.opts.imageDefaultDisplay,R.opts.imageDefaultAlign),R.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function et(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a&&!R.opts.imageUploadURL){if(!a)return!1;var n=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var i=0;i<e.clipboardData.items.length;i++)if(r=e.clipboardData.items[i].getAsFile()){St.IMAGE_TYPE=r.type;break}if(r)return Je(r,n),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=Qe,t.readAsDataURL(e)}(o),!1}}}function tt(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function at(e){w&&(function t(){return nt}()||!0===e)&&(R.toolbar.enable(),l&&l.removeClass("fr-active"),R.popups.hide("image.edit"),w=null,it(),c=null,d&&d.hide())}var nt=!1;function rt(){nt=!0}function it(){nt=!1}function ot(e,t,a){!R.opts.htmlUntouched&&R.opts.useClasses?(x(e).removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&x(e).addClass("fr-fi".concat(a[0])),t&&x(e).addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:R.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*R.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(R.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(R.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(R.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function st(){return w}function lt(){return ct()?w.parents(".fr-img-caption").first():w}function ct(){return!!w&&0<w.parents(".fr-img-caption").length}return{_init:function dt(){var i;(function e(){R.events.$on(R.$el,R._mousedown,"IMG"==R.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==x(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;R.helpers.isMobile()||R.selection.clear(),t=!0,R.popups.areVisible()&&R.events.disableBlur(),R.browser.msie&&(R.events.disableBlur(),R.$el.attr("contenteditable",!1)),R.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),R.events.$on(R.$el,R._mousedown,".fr-img-caption .fr-inner",function(e){R.core.hasFocus()||R.events.focus(),e.stopPropagation()}),R.events.$on(R.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===R.opts.toolbarInline&&(R.toolbar.hide(),e.stopPropagation())}),R.events.$on(R.$el,R._mouseup,"IMG"==R.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==x(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),R.browser.msie&&(R.$el.attr("contenteditable",!0),R.events.enableBlur()))}),R.events.on("keyup",function(e){if(e.shiftKey&&""===R.selection.text().replace(/\n/g,"")&&R.keys.isArrow(e.which)){var t=R.selection.element(),a=R.selection.endElement();t&&"IMG"==t.tagName?Ae(x(t)):a&&"IMG"==a.tagName&&Ae(x(a))}},!0),R.events.on("window.mousedown",rt),R.events.on("window.touchmove",it),R.events.on("mouseup window.mouseup",function(){if(w)return at(),!1;it()}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&at()}),R.events.on("image.resizeEnd",function(){R.opts.iframe&&R.size.syncIframe()}),R.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){at(!(t=!1))}),R.events.on("modals.hide",function(){w&&R.selection.clear()}),R.events.on("image.resizeEnd",function(){R.win.getSelection&&Ae(w)}),R.opts.imageAddNewLine&&R.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!R.node.isElement(t);)t=R.node.isLastSibling(t)?t.parentNode:null;R.node.isElement(t)&&(R.opts.enter===St.ENTER_BR?e.after("<br>"):x(R.node.blockParent(e.get(0))).after("<".concat(R.html.defaultTag(),"><br></").concat(R.html.defaultTag(),">")))})})(),"IMG"==R.el.tagName&&R.$el.addClass("fr-view"),R.helpers.isMobile()&&(R.events.$on(R.$el,"touchstart","IMG"==R.el.tagName?null:'img:not([contenteditable="false"])',function(){de=!1}),R.events.$on(R.$el,"touchmove",function(){de=!0})),R.opts.pluginsEnabled.includes("filestack")&&R.events.on("filestack.pluginsEnabled",function(){He()}),R.$wp?(R.events.on("window.keydown keydown",Xe,!0),R.events.on("keyup",function(e){if(w&&e.which==St.KEYCODE.ENTER)return!1},!0),R.events.$on(R.$el,"keydown",function(){var e=R.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&R.node.isLastSibling(e))&&(e=e.parentNode),R.node.hasClass(e,"fr-inner")||(R.node.hasClass(e,"fr-img-caption")||(e=x(e).parents(".fr-img-caption").get(0)),R.node.hasClass(e,"fr-img-caption")&&(R.opts.trackChangesEnabled||x(e).after(St.INVISIBLE_SPACE+St.MARKERS),R.selection.restore()))})):R.events.$on(R.$win,"keydown",Xe),R.events.on("toolbar.esc",function(){if(w){if(R.$wp)R.events.disableBlur(),R.events.focus();else{var e=w;at(!0),R.selection.setAfter(e.get(0)),R.selection.restore()}return!1}},!0),R.events.on("toolbar.focusEditor",function(){if(w)return!1},!0),R.events.on("window.cut window.copy",function(e){if(w&&R.popups.isVisible("image.edit")&&!R.popups.get("image.edit").find(":focus").length){var t=lt();ct()?(t.before(St.START_MARKER),t.after(St.END_MARKER),R.selection.restore(),R.paste.saveCopiedText(t.get(0).outerHTML,t.text())):R.paste.saveCopiedText(w.get(0).outerHTML,w.attr("alt")),"copy"==e.type?setTimeout(function(){Ae(w)}):(at(!0),R.undo.saveStep(),setTimeout(function(){R.undo.saveStep()},0))}},!0),R.browser.msie&&R.events.on("keydown",function(e){if(!R.selection.isCollapsed()||!w)return!0;var t=e.which;t==St.KEYCODE.C&&R.keys.ctrlKey(e)?R.events.trigger("window.copy"):t==St.KEYCODE.X&&R.keys.ctrlKey(e)&&R.events.trigger("window.cut")}),R.events.$on(x(R.o_win),"keydown",function(e){var t=e.which;if(w&&t==St.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),R.events.$on(R.$win,"keydown",function(e){var t=e.which;w&&w.hasClass("fr-uploading")&&t==St.KEYCODE.ESC&&w.trigger("abortUpload")}),R.events.on("destroy",function(){w&&w.hasClass("fr-uploading")&&w.trigger("abortUpload")}),R.events.on("paste.before",et),R.events.on("paste.beforeCleanup",tt),R.events.on("html.processGet",Ze),R.opts.imageOutputSize&&R.events.on("html.beforeGet",function(){i=R.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=parseFloat(x(i[e]).css("padding-left"))+parseFloat(x(i[e]).css("padding-right")),a=x(i[e]).width()-t,n=i[e].style.width||a,r=i[e].style.height||x(i[e]).height();n&&i[e].setAttribute("width","".concat(n).replace(/px/,"")),r&&i[e].setAttribute("height","".concat(r).replace(/px/,""))}}),R.opts.iframe&&R.events.on("image.loaded",R.size.syncIframe),R.events.$on(x(R.o_win),"orientationchange.image",function(){setTimeout(function(){w&&Ae(w)},100)}),function n(e){if(e)return R.$wp&&R.events.$on(R.$wp,"scroll.image-edit",function(){w&&R.popups.isVisible("image.edit")&&R.events.disableBlur()}),!0;var t="";if(0<R.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(R.button.buildList(R.opts.imageEditButtons),"\n </div>")};return R.popups.create("image.edit",a)}return!1}(!0),He(!0),Ye(!0),We(!0),R.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return qe(e),!1}),R.events.on("popups.hide.filesManager.insert",function(e){R.filesManager.minimizePopup(L)})},showInsertPopup:E,showLayer:function ft(e){var t,a,n=R.popups.get("filesManager.insert");if(w||R.opts.toolbarInline){if(w){var r=lt();ct()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var i=R.$tb.find('.fr-command[data-cmd="insertFiles"]');t=i.offset().left,a=i.offset().top+(R.opts.toolbarBottom?10:i.outerHeight()-10)}!w&&R.opts.toolbarInline&&(a=n.offset().top-R.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),n.find(".fr-upload-progress-layer").addClass("fr-active"),R.popups.show("filesManager.insert",t,a,w?w.outerHeight():0),R.accessibility.focusPopup(n)},refreshUploadButton:function pt(e){var t=R.popups.get("filesManager.insert");t&&t.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function ut(e){var t=R.popups.get("filesManager.insert");t&&t.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Oe,insertByURL:function gt(){for(var e,t=R.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),a=t.val().trim().split(/[ ,]+/),n=[],r=0,i=0;i<a.length;i++)e=a[i],new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)&&(n[r]=a[i],r++);if(0!=n.length){if(0<t.val().trim().length&&0<n.length){var s=[],l=[],c=g,d=n.length;n.forEach(function(e,a){if(0==e.trim().length)g==c+--d&&ye(s,l);else{J(),Q(),ee(R.language.translate("Loading file(s)"));var n=e.trim(),t=function o(e){if(void 0===e)return e;var t=null;if(/^http/.test(e)||(e="https://".concat(e)),R.helpers.isURL(e))for(var a=0;a<St.VIDEO_PROVIDERS.length;a++){var n=St.VIDEO_PROVIDERS[a];if(n.test_regex.test(e)&&new RegExp(R.opts.videoAllowedProviders.join("|")).test(n.provider)){t=e.replace(n.url_regex,n.url_text),t=n.html.replace(/\{url\}/,t);break}}return t}(n);if(t){var r={link:n,name:n,type:"video/url",size:2,video:t};I.set(c+a,r),me(c+a),J(),Q(),ee(R.language.translate("Loading file(s)")),O.set(c+a,r),++g==c+d&&ye(s,l)}else{var i=new XMLHttpRequest;i.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=$e(n),e.link=n,De(this.response.type)?(e.sanitize=!0,e.existing_image=w):Pe(this.response.type)&&(e.text=$e(n)),s.push(e),l.push(c+a),I.set(c+a,e),me(c+a),(-1<U.indexOf(Re(e))||!Re(e))&&j(N,null,null,c+a)}else{var t=new Blob([this.response],{type:this.response.type||" "});t.name=$e(n),t.link=n,I.set(c+a,t),me(c+a),j(D,this.response,w,c+a)}J(),Q(),ee(R.language.translate("Loading file(s)")),++g==c+d&&ye(s,l)},i.onerror=function(){var e={link:n,name:$e(n),size:0,type:""};j(9,this.response,w,c+a);var t=g;I.set(t,e),me(t),J(),Q(),ee(R.language.translate("Loading file(s)")),++g==c+d&&ye(s,l)},i.open("GET","".concat(R.opts.imageCORSProxy,"/").concat(n),!0),i.responseType="blob",i.send()}}}),t.val(""),t.blur()}}else te(R.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function ht(){r=[];var e=R.popups.get("filesManager.insert");u=-1,f=null,e.find(".fr-insert-checkbox").toArray().forEach(function n(e,t,a){e.children.target.checked&&(r.push(parseInt(e.id.split("-").pop())),De(O.get(parseInt(e.id.split("-").pop())).type)&&-1==u&&(u=t))}),ke(r),q()},deleteAllFiles:function e(){R.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach(function r(e,t,a){if(e.children.target.checked){var n=parseInt(e.id.split("-").pop());A.has(n)&&A["delete"](n),X(n)}}),q()},get:st,getEl:lt,insert:Le,showProgressBar:Q,remove:qe,hideProgressBar:J,applyStyle:function mt(e,t,a){if(void 0===t&&(t=R.opts.imageStyles),void 0===a&&(a=R.opts.imageMultipleStyles),!w)return!1;var n=lt();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),n.removeClass(r.join(" "))}"object"==Rt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),Ae(w)},showAltPopup:Ke,showSizePopup:Ve,setAlt:function vt(e){if(w){var t=R.popups.get("image.alt");w.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),Ae(w)}},setSize:function bt(e,t){if(w){var a=R.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;w.removeAttr("width").removeAttr("height"),e.match(n)?w.css("width",e):w.css("width",""),t.match(n)?w.css("height",t):w.css("height",""),ct()&&(w.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?w.parents(".fr-img-caption").css("width",e):w.parents(".fr-img-caption").css("width",""),t.match(n)?w.parents(".fr-img-caption").css("height",t):w.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),Ae(w)}},toggleCaption:function Et(){var e;if(w&&!ct()){(e=w).parent().is("a")&&(e=w.parent());var t,a,n=w.parents("ul")&&0<w.parents("ul").length?w.parents("ul"):w.parents("ol")&&0<w.parents("ol").length?w.parents("ol"):[];if(0<n.length){var r=n.find("li").length,i=w.parents("li"),o=document.createElement("li");r-1===i.index()&&(n.append(o),o.innerHTML="&nbsp;")}e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var s=R.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":w.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(R.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+w.attr("class")+'" style="'+(R.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),w.after('<span class="fr-inner"'.concat(R.browser.mozilla?"":' contenteditable="true"',">").concat(St.START_MARKER).concat(R.language.translate("Image Caption")).concat(St.END_MARKER,"</span>")),w.removeAttr("class").removeAttr("style").removeAttr("width"),w.parents(".fr-img-caption").css("width",s),at(!0),R.selection.restore()}else e=lt(),w.insertAfter(e),w.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Ae(w)},refreshEmbedButton:function _t(e){var t=R.popups.get("filesManager.insert");t&&t.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function wt(e){void 0===e&&(e=R.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!St.VIDEO_EMBED_REGEX.test(e)&&!St.IMAGE_EMBED_REGEX.test(e)?(te(R.language.translate("Something went wrong. Please try again.")),St.VIDEO_EMBED_REGEX.test(e)&&R.events.trigger("video.codeError",[e])):function s(e,t){var a,n;St.VIDEO_EMBED_REGEX.test(e)?(a="video",n=R.opts.videoSplitHTML):St.IMAGE_EMBED_REGEX.test(e)&&(a="image",n=R.opts.imageSplitHTML),R.events.focus(!0),R.selection.restore();var r=!1;w&&(qe(),r=!0),R.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(a,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,n),R.popups.hide("filesManager.insert");var i=R.$el.find(".fr-jiv");i.removeClass("fr-jiv"),"video"==a&&(i.toggleClass("fr-rv",R.opts.videoResponsive),function o(e,t,a){!R.opts.htmlUntouched&&R.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(i,R.opts.videoDefaultDisplay,R.opts.videoDefaultAlign),i.toggleClass("fr-draggable",R.opts.videoMove),R.events.trigger(r?"video.replaced":"video.inserted",[i])),"image"==a&&(ot(i,R.opts.imageDefaultDisplay,R.opts.imageDefaultAlign),i.find("img").removeClass("fr-dii"),i.find("img").addClass("fr-dib"),i.toggleClass("fr-draggable",R.opts.imageMove),R.events.trigger(r?"image.replaced":"image.inserted",[i])),t&&(f=i,R.selection.clear(),R.toolbar.disable(),R.video._editVideo(f))}(e)},hasCaption:ct,exitEdit:at,edit:Ae,cancelFileInsert:function yt(){this.file_manager_dialog_open=!1,A.forEach(function(e,t){4!=e.readyState&&(e.abort(),X(t))});var e=R.popups.get("filesManager.insert");e.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),e.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"),i=0,A=new Map,C=new Map,Z(),R.popups.hide("filesManager.insert")},minimizePopup:function At(e){this.file_manager_dialog_open=!1,R.popups.hide("filesManager.insert"),Z()},editImage:Se,saveImage:function Ct(e){var t=O.get(o);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),O.set(o,t)},_showErrorMessage:te,_showFileErrorMessage:ae,getFileThumbnail:be,deleteFile:X,checkAutoplay:Me,checkInsertAllState:q,_disableInsertCheckbox:Y,_getFileType:Re,isChildWindowOpen:function Tt(){return p},setChildWindowState:function kt(e){e!==undefined&&(p=e)},resetAllFilesCheckbox:Z}},St.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),St.RegisterShortcut(St.KEYCODE.P,"insertFiles",null,"P"),St.RegisterCommand("insertFiles",{title:"Insert Files",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("filesManager.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("filesManager.insert")):this.filesManager.showInsertPopup()},plugin:"filesManager"}),St.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),St.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),St.RegisterCommand("filesUpload",{title:"Upload Files",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-upload")},refresh:function(e){this.filesManager.refreshUploadButton(e)}}),St.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),St.RegisterCommand("filesByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-by-url")},refresh:function(e){this.filesManager.refreshByURLButton(e)}}),St.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),St.RegisterCommand("filesEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-embed")},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),St.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),St.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),St.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),St.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),St.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),St.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),St.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),St.RegisterCommand("minimize",{title:"Minimize",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.minimizePopup("image.insert",!0)},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),St.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),St.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),St.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),St.RegisterCommand("insertEmbed",{undo:!0,focus:!0,callback:function(){this.filesManager.insertEmbed(),this.popups.get("filesManager.insert").find("textarea")[0].value="",this.popups.get("filesManager.insert").find("textarea").removeClass("fr-not-empty")}}),St.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}}),St.PLUGINS.cryptoJSPlugin=function(e){var t,d,a,n,r,i,o,f,s,l,c,p,u,g,h,v,m,b,E,_,w,y,A,C,T,k,S,R,L,x,I,O,F,M,D,P,N,B,U,H,$,z,K,W,G,V,Y,j,q,X,Z,Q,J,ee,te,ae,ne,re,ie,oe,se,le,ce,de,fe,pe,ue,ge,he,me,ve=ve||function(d,e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&"undefined"!=typeof global&&global.crypto&&(t=global.crypto),!t&&"function"==typeof require)try{t=require("crypto")}catch(h){}var n=function n(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(h){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(h){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function a(){}return function(e){var t;return a.prototype=e,t=new a,a.prototype=null,t}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},f=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,a=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<r;i++){var o=a[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=o<<24-(n+i)%4*8}else for(i=0;i<r;i+=4)t[n+i>>>2]=a[i>>>2];return this.sigBytes+=r,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=d.ceil(t/4)},clone:function e(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],a=0;a<e;a+=4)t.push(n());return new f.init(t,e)}}),s=r.enc={},l=s.Hex={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n+=2)a[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new f.init(a,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new f.init(a,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,a=this._data,n=a.words,r=a.sigBytes,i=this.blockSize,o=r/(4*i),s=(o=e?d.ceil(o):d.max((0|o)-this._minBufferSize,0))*i,l=d.min(4*s,r);if(s){for(var c=0;c<s;c+=i)this._doProcessBlock(n,c);t=n.splice(0,s),a.sigBytes-=l}return new f.init(t,l)},clone:function e(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(i.Hasher=u.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(e,t){return new a.init(t).finalize(e)}},_createHmacHelper:function(a){return function(e,t){return new g.HMAC.init(a,t).finalize(e)}}}),r.algo={});return r}(Math);return d=(t=ve).lib.WordArray,t.enc.Base64={stringify:function(e){var t=e.words,a=e.sigBytes,n=this._map;e.clamp();for(var r=[],i=0;i<a;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<a;s++)r.push(n.charAt(o>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r<a.length;r++)n[a.charCodeAt(r)]=r}var i=a.charAt(64);if(i){var o=e.indexOf(i);-1!==o&&(t=o)}return function c(e,t,a){for(var n=[],r=0,i=0;i<t;i++)if(i%4){var o=a[e.charCodeAt(i-1)]<<i%4*2,s=a[e.charCodeAt(i)]>>>6-i%4*2,l=o|s;n[r>>>2]|=l<<24-r%4*8,r++}return d.create(n,r)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(d){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,r=e.algo,k=[];!function(){for(var e=0;e<64;e++)k[e]=4294967296*d.abs(d.sin(e+1))|0}();var i=r.MD5=n.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var n=t+a,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i=this._hash.words,o=e[t+0],s=e[t+1],l=e[t+2],c=e[t+3],d=e[t+4],f=e[t+5],p=e[t+6],u=e[t+7],g=e[t+8],h=e[t+9],m=e[t+10],v=e[t+11],b=e[t+12],E=e[t+13],_=e[t+14],w=e[t+15],y=i[0],A=i[1],C=i[2],T=i[3];A=x(A=x(A=x(A=x(A=L(A=L(A=L(A=L(A=R(A=R(A=R(A=R(A=S(A=S(A=S(A=S(A,C=S(C,T=S(T,y=S(y,A,C,T,o,7,k[0]),A,C,s,12,k[1]),y,A,l,17,k[2]),T,y,c,22,k[3]),C=S(C,T=S(T,y=S(y,A,C,T,d,7,k[4]),A,C,f,12,k[5]),y,A,p,17,k[6]),T,y,u,22,k[7]),C=S(C,T=S(T,y=S(y,A,C,T,g,7,k[8]),A,C,h,12,k[9]),y,A,m,17,k[10]),T,y,v,22,k[11]),C=S(C,T=S(T,y=S(y,A,C,T,b,7,k[12]),A,C,E,12,k[13]),y,A,_,17,k[14]),T,y,w,22,k[15]),C=R(C,T=R(T,y=R(y,A,C,T,s,5,k[16]),A,C,p,9,k[17]),y,A,v,14,k[18]),T,y,o,20,k[19]),C=R(C,T=R(T,y=R(y,A,C,T,f,5,k[20]),A,C,m,9,k[21]),y,A,w,14,k[22]),T,y,d,20,k[23]),C=R(C,T=R(T,y=R(y,A,C,T,h,5,k[24]),A,C,_,9,k[25]),y,A,c,14,k[26]),T,y,g,20,k[27]),C=R(C,T=R(T,y=R(y,A,C,T,E,5,k[28]),A,C,l,9,k[29]),y,A,u,14,k[30]),T,y,b,20,k[31]),C=L(C,T=L(T,y=L(y,A,C,T,f,4,k[32]),A,C,g,11,k[33]),y,A,v,16,k[34]),T,y,_,23,k[35]),C=L(C,T=L(T,y=L(y,A,C,T,s,4,k[36]),A,C,d,11,k[37]),y,A,u,16,k[38]),T,y,m,23,k[39]),C=L(C,T=L(T,y=L(y,A,C,T,E,4,k[40]),A,C,o,11,k[41]),y,A,c,16,k[42]),T,y,p,23,k[43]),C=L(C,T=L(T,y=L(y,A,C,T,h,4,k[44]),A,C,b,11,k[45]),y,A,w,16,k[46]),T,y,l,23,k[47]),C=x(C,T=x(T,y=x(y,A,C,T,o,6,k[48]),A,C,u,10,k[49]),y,A,_,15,k[50]),T,y,f,21,k[51]),C=x(C,T=x(T,y=x(y,A,C,T,b,6,k[52]),A,C,c,10,k[53]),y,A,m,15,k[54]),T,y,s,21,k[55]),C=x(C,T=x(T,y=x(y,A,C,T,g,6,k[56]),A,C,w,10,k[57]),y,A,p,15,k[58]),T,y,E,21,k[59]),C=x(C,T=x(T,y=x(y,A,C,T,d,6,k[60]),A,C,v,10,k[61]),y,A,l,15,k[62]),T,y,h,21,k[63]),i[0]=i[0]+y|0,i[1]=i[1]+A|0,i[2]=i[2]+C|0,i[3]=i[3]+T|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32;var r=d.floor(a/4294967296),i=a;t[15+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,s=o.words,l=0;l<4;l++){var c=s[l];s[l]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},clone:function e(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function S(e,t,a,n,r,i,o){var s=e+(t&a|~t&n)+r+o;return(s<<i|s>>>32-i)+t}function R(e,t,a,n,r,i,o){var s=e+(t&n|a&~n)+r+o;return(s<<i|s>>>32-i)+t}function L(e,t,a,n,r,i,o){var s=e+(t^a^n)+r+o;return(s<<i|s>>>32-i)+t}function x(e,t,a,n,r,i,o){var s=e+(a^(t|~n))+r+o;return(s<<i|s>>>32-i)+t}e.MD5=n._createHelper(i),e.HmacMD5=n._createHmacHelper(i)}(Math),n=(a=ve).lib,r=n.WordArray,i=n.Hasher,o=a.algo,f=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=0;l<80;l++){if(l<16)f[l]=0|e[t+l];else{var c=f[l-3]^f[l-8]^f[l-14]^f[l-16];f[l]=c<<1|c>>>31}var d=(n<<5|n>>>27)+s+f[l];d+=l<20?1518500249+(r&i|~r&o):l<40?1859775393+(r^i^o):l<60?(r&i|r&o|i&o)-1894007588:(r^i^o)-899497514,s=o,o=i,i=r<<30|r>>>2,r=n,n=d}a[0]=a[0]+n|0,a[1]=a[1]+r|0,a[2]=a[2]+i|0,a[3]=a[3]+o|0,a[4]=a[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(a/4294967296),t[15+(n+64>>>9<<4)]=a,e.sigBytes=4*t.length,this._process(),this._hash},clone:function e(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),a.SHA1=i._createHelper(s),a.HmacSHA1=i._createHmacHelper(s),function(r){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,i=e.algo,o=[],E=[];!function(){function e(e){for(var t=r.sqrt(e),a=2;a<=t;a++)if(!(e%a))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var a=2,n=0;n<64;)e(a)&&(n<8&&(o[n]=t(r.pow(a,.5))),E[n]=t(r.pow(a,1/3)),n++),a++}();var _=[],s=i.SHA256=n.extend({_doReset:function(){this._hash=new a.init(o.slice(0))},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=a[5],c=a[6],d=a[7],f=0;f<64;f++){if(f<16)_[f]=0|e[t+f];else{var p=_[f-15],u=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=_[f-2],h=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;_[f]=u+_[f-7]+h+_[f-16]}var m=n&r^n&i^r&i,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&c)+E[f]+_[f];d=c,c=l,l=s,s=o+b|0,o=i,i=r,r=n,n=b+(v+m)|0}a[0]=a[0]+n|0,a[1]=a[1]+r|0,a[2]=a[2]+i|0,a[3]=a[3]+o|0,a[4]=a[4]+s|0,a[5]=a[5]+l|0,a[6]=a[6]+c|0,a[7]=a[7]+d|0},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=r.floor(a/4294967296),t[15+(n+64>>>9<<4)]=a,e.sigBytes=4*t.length,this._process(),this._hash},clone:function e(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA256=n._createHelper(s),e.HmacSHA256=n._createHmacHelper(s)}(Math),function(){var e=ve,r=e.lib.WordArray,t=e.enc;t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r+=2){var i=t[r>>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>1]|=e.charCodeAt(n)<<16-n%2*16;return r.create(a,2*t)}};function o(e){return e<<8&4278255360|e>>>8&16711935}t.Utf16LE={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],r=0;r<a;r+=2){var i=o(t[r>>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>1]|=o(e.charCodeAt(n)<<16-n%2*16);return r.create(a,2*t)}}}(),function(){if("function"==typeof ArrayBuffer){var e=ve.lib.WordArray,r=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,a=[],n=0;n<t;n++)a[n>>>2]|=e[n]<<24-n%4*8;r.call(this,a,t)}else r.apply(this,arguments)}).prototype=e}}(),function(e){var t=ve,a=t.lib,n=a.WordArray,r=a.Hasher,i=t.algo,A=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),C=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),T=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),k=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),S=n.create([0,1518500249,1859775393,2400959708,2840853838]),R=n.create([1352829926,1548603684,1836072691,2053994217,0]),o=i.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var n=t+a,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i,o,s,l,c,d,f,p,u,g,h,m=this._hash.words,v=S.words,b=R.words,E=A.words,_=C.words,w=T.words,y=k.words;d=i=m[0],f=o=m[1],p=s=m[2],u=l=m[3],g=c=m[4];for(a=0;a<80;a+=1)h=i+e[t+E[a]]|0,h+=a<16?L(o,s,l)+v[0]:a<32?x(o,s,l)+v[1]:a<48?I(o,s,l)+v[2]:a<64?O(o,s,l)+v[3]:F(o,s,l)+v[4],h=(h=M(h|=0,w[a]))+c|0,i=c,c=l,l=M(s,10),s=o,o=h,h=d+e[t+_[a]]|0,h+=a<16?F(f,p,u)+b[0]:a<32?O(f,p,u)+b[1]:a<48?I(f,p,u)+b[2]:a<64?x(f,p,u)+b[3]:L(f,p,u)+b[4],h=(h=M(h|=0,y[a]))+g|0,d=g,g=u,u=M(p,10),p=f,f=h;h=m[1]+s+u|0,m[1]=m[2]+l+g|0,m[2]=m[3]+c+d|0,m[3]=m[4]+i+f|0,m[4]=m[0]+o+p|0,m[0]=h},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,i=r.words,o=0;o<5;o++){var s=i[o];i[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function e(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function L(e,t,a){return e^t^a}function x(e,t,a){return e&t|~e&a}function I(e,t,a){return(e|~t)^a}function O(e,t,a){return e&a|t&~a}function F(e,t,a){return e^(t|~a)}function M(e,t){return e<<t|e>>>32-t}t.RIPEMD160=r._createHelper(o),t.HmacRIPEMD160=r._createHmacHelper(o)}(Math),c=(l=ve).lib.Base,p=l.enc.Utf8,l.algo.HMAC=c.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=p.parse(t));var a=e.blockSize,n=4*a;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),o=r.words,s=i.words,l=0;l<a;l++)o[l]^=1549556828,s[l]^=909522486;r.sigBytes=i.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,a=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(a))}}),g=(u=ve).lib,h=g.Base,v=g.WordArray,m=u.algo,b=m.SHA1,E=m.HMAC,_=m.PBKDF2=h.extend({cfg:h.extend({keySize:4,hasher:b,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var a=this.cfg,n=E.create(a.hasher,e),r=v.create(),i=v.create([1]),o=r.words,s=i.words,l=a.keySize,c=a.iterations;o.length<l;){var d=n.update(t).finalize(i);n.reset();for(var f=d.words,p=f.length,u=d,g=1;g<c;g++){u=n.finalize(u),n.reset();for(var h=u.words,m=0;m<p;m++)f[m]^=h[m]}r.concat(d),s[0]++}return r.sigBytes=4*l,r}}),u.PBKDF2=function(e,t,a){return _.create(a).compute(e,t)},y=(w=ve).lib,A=y.Base,C=y.WordArray,T=w.algo,k=T.MD5,S=T.EvpKDF=A.extend({cfg:A.extend({keySize:4,hasher:k,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var a,n=this.cfg,r=n.hasher.create(),i=C.create(),o=i.words,s=n.keySize,l=n.iterations;o.length<s;){a&&r.update(a),a=r.update(e).finalize(t),r.reset();for(var c=1;c<l;c++)a=r.finalize(a),r.reset();i.concat(a)}return i.sigBytes=4*s,i}}),w.EvpKDF=function(e,t,a){return S.create(a).compute(e,t)},L=(R=ve).lib.WordArray,x=R.algo,I=x.SHA256,O=x.SHA224=I.extend({_doReset:function(){this._hash=new L.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=I._doFinalize.call(this);return e.sigBytes-=4,e}}),R.SHA224=I._createHelper(O),R.HmacSHA224=I._createHmacHelper(O),M=(F=ve).lib,D=M.Base,P=M.WordArray,(N=F.x64={}).Word=D.extend({init:function(e,t){this.high=e,this.low=t}}),N.WordArray=D.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,a=[],n=0;n<t;n++){var r=e[n];a.push(r.high),a.push(r.low)}return P.create(a,this.sigBytes)},clone:function e(){for(var e=D.clone.call(this),t=e.words=this.words.slice(0),a=t.length,n=0;n<a;n++)t[n]=t[n].clone();return e}}),function(p){var e=ve,t=e.lib,u=t.WordArray,n=t.Hasher,d=e.x64.Word,a=e.algo,L=[],x=[],I=[];!function(){for(var e=1,t=0,a=0;a<24;a++){L[e+5*t]=(a+1)*(a+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)x[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,i=0;i<24;i++){for(var o=0,s=0,l=0;l<7;l++){if(1&r){var c=(1<<l)-1;c<32?s^=1<<c:o^=1<<c-32}128&r?r=r<<1^113:r<<=1}I[i]=d.create(o,s)}}();var O=[];!function(){for(var e=0;e<25;e++)O[e]=d.create()}();var r=a.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var a=this._state,n=this.blockSize/2,r=0;r<n;r++){var i=e[t+2*r],o=e[t+2*r+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(C=a[r]).high^=o,C.low^=i}for(var s=0;s<24;s++){for(var l=0;l<5;l++){for(var c=0,d=0,f=0;f<5;f++){c^=(C=a[l+5*f]).high,d^=C.low}var p=O[l];p.high=c,p.low=d}for(l=0;l<5;l++){var u=O[(l+4)%5],g=O[(l+1)%5],h=g.high,m=g.low;for(c=u.high^(h<<1|m>>>31),d=u.low^(m<<1|h>>>31),f=0;f<5;f++){(C=a[l+5*f]).high^=c,C.low^=d}}for(var v=1;v<25;v++){var b=(C=a[v]).high,E=C.low,_=L[v];d=_<32?(c=b<<_|E>>>32-_,E<<_|b>>>32-_):(c=E<<_-32|b>>>64-_,b<<_-32|E>>>64-_);var w=O[x[v]];w.high=c,w.low=d}var y=O[0],A=a[0];y.high=A.high,y.low=A.low;for(l=0;l<5;l++)for(f=0;f<5;f++){var C=a[v=l+5*f],T=O[v],k=O[(l+1)%5+5*f],S=O[(l+2)%5+5*f];C.high=T.high^~k.high&S.high,C.low=T.low^~k.low&S.low}C=a[0];var R=I[s];C.high^=R.high,C.low^=R.low}},_doFinalize:function(){var e=this._data,t=e.words,a=(this._nDataBytes,8*e.sigBytes),n=32*this.blockSize;t[a>>>5]|=1<<24-a%32,t[(p.ceil((a+1)/n)*n>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();for(var r=this._state,i=this.cfg.outputLength/8,o=i/8,s=[],l=0;l<o;l++){var c=r[l],d=c.high,f=c.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),s.push(f),s.push(d)}return new u.init(s,i)},clone:function e(){for(var e=n.clone.call(this),t=e._state=this._state.slice(0),a=0;a<25;a++)t[a]=t[a].clone();return e}});e.SHA3=n._createHelper(r),e.HmacSHA3=n._createHmacHelper(r)}(Math),function(){var e=ve,t=e.lib.Hasher,a=e.x64,n=a.Word,r=a.WordArray,i=e.algo;function o(){return n.create.apply(n,arguments)}var Ae=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],Ce=[];!function(){for(var e=0;e<80;e++)Ce[e]=o()}();var s=i.SHA512=t.extend({_doReset:function(){this._hash=new r.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],r=a[1],i=a[2],o=a[3],s=a[4],l=a[5],c=a[6],d=a[7],f=n.high,p=n.low,u=r.high,g=r.low,h=i.high,m=i.low,v=o.high,b=o.low,E=s.high,_=s.low,w=l.high,y=l.low,A=c.high,C=c.low,T=d.high,k=d.low,S=f,R=p,L=u,x=g,I=h,O=m,F=v,M=b,D=E,P=_,N=w,B=y,U=A,H=C,$=T,z=k,K=0;K<80;K++){var W,G,V=Ce[K];if(K<16)G=V.high=0|e[t+2*K],W=V.low=0|e[t+2*K+1];else{var Y=Ce[K-15],j=Y.high,q=Y.low,X=(j>>>1|q<<31)^(j>>>8|q<<24)^j>>>7,Z=(q>>>1|j<<31)^(q>>>8|j<<24)^(q>>>7|j<<25),Q=Ce[K-2],J=Q.high,ee=Q.low,te=(J>>>19|ee<<13)^(J<<3|ee>>>29)^J>>>6,ae=(ee>>>19|J<<13)^(ee<<3|J>>>29)^(ee>>>6|J<<26),ne=Ce[K-7],re=ne.high,ie=ne.low,oe=Ce[K-16],se=oe.high,le=oe.low;G=(G=(G=X+re+((W=Z+ie)>>>0<Z>>>0?1:0))+te+((W+=ae)>>>0<ae>>>0?1:0))+se+((W+=le)>>>0<le>>>0?1:0),V.high=G,V.low=W}var ce,de=D&N^~D&U,fe=P&B^~P&H,pe=S&L^S&I^L&I,ue=R&x^R&O^x&O,ge=(S>>>28|R<<4)^(S<<30|R>>>2)^(S<<25|R>>>7),he=(R>>>28|S<<4)^(R<<30|S>>>2)^(R<<25|S>>>7),me=(D>>>14|P<<18)^(D>>>18|P<<14)^(D<<23|P>>>9),ve=(P>>>14|D<<18)^(P>>>18|D<<14)^(P<<23|D>>>9),be=Ae[K],Ee=be.high,_e=be.low,we=$+me+((ce=z+ve)>>>0<z>>>0?1:0),ye=he+ue;$=U,z=H,U=N,H=B,N=D,B=P,D=F+(we=(we=(we=we+de+((ce=ce+fe)>>>0<fe>>>0?1:0))+Ee+((ce=ce+_e)>>>0<_e>>>0?1:0))+G+((ce=ce+W)>>>0<W>>>0?1:0))+((P=M+ce|0)>>>0<M>>>0?1:0)|0,F=I,M=O,I=L,O=x,L=S,x=R,S=we+(ge+pe+(ye>>>0<he>>>0?1:0))+((R=ce+ye|0)>>>0<ce>>>0?1:0)|0}p=n.low=p+R,n.high=f+S+(p>>>0<R>>>0?1:0),g=r.low=g+x,r.high=u+L+(g>>>0<x>>>0?1:0),m=i.low=m+O,i.high=h+I+(m>>>0<O>>>0?1:0),b=o.low=b+M,o.high=v+F+(b>>>0<M>>>0?1:0),_=s.low=_+P,s.high=E+D+(_>>>0<P>>>0?1:0),y=l.low=y+B,l.high=w+N+(y>>>0<B>>>0?1:0),C=c.low=C+H,c.high=A+U+(C>>>0<H>>>0?1:0),k=d.low=k+z,d.high=T+$+(k>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,a=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(a/4294967296),t[31+(n+128>>>10<<5)]=a,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function e(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),U=(B=ve).x64,H=U.Word,$=U.WordArray,z=B.algo,K=z.SHA512,W=z.SHA384=K.extend({_doReset:function(){this._hash=new $.init([new H.init(3418070365,3238371032),new H.init(1654270250,914150663),new H.init(2438529370,812702999),new H.init(355462360,4144912697),new H.init(1731405415,4290775857),new H.init(2394180231,1750603025),new H.init(3675008525,1694076839),new H.init(1203062813,3204075428)])},_doFinalize:function(){var e=K._doFinalize.call(this);return e.sigBytes-=16,e}}),B.SHA384=K._createHelper(W),B.HmacSHA384=K._createHmacHelper(W),ve.lib.Cipher||(V=(G=ve).lib,Y=V.Base,j=V.WordArray,q=V.BufferedBlockAlgorithm,(X=G.enc).Utf8,Z=X.Base64,Q=G.algo.EvpKDF,J=V.Cipher=q.extend({cfg:Y.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,a){this.cfg=this.cfg.extend(a),this._xformMode=e,this._key=t,this.reset()},reset:function(){q.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function r(e){return"string"==typeof e?le:oe}return function(n){return{encrypt:function(e,t,a){return r(t).encrypt(n,e,t,a)},decrypt:function(e,t,a){return r(t).decrypt(n,e,t,a)}}}}()}),V.StreamCipher=J.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ee=G.mode={},te=V.BlockCipherMode=Y.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),ae=ee.CBC=function(){var e=te.extend();function i(e,t,a){var n,r=this._iv;r?(n=r,this._iv=void 0):n=this._prevBlock;for(var i=0;i<a;i++)e[t+i]^=n[i]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;i.call(this,e,t,n),a.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),e.Decryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=e.slice(t,t+n);a.decryptBlock(e,t),i.call(this,e,t,n),this._prevBlock=r}}),e}(),ne=(G.pad={}).Pkcs7={pad:function(e,t){for(var a=4*t,n=a-e.sigBytes%a,r=n<<24|n<<16|n<<8|n,i=[],o=0;o<n;o+=4)i.push(r);var s=j.create(i,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},V.BlockCipher=J.extend({cfg:J.cfg.extend({mode:ae,padding:ne}),reset:function(){var e;J.reset.call(this);var t=this.cfg,a=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,a&&a.words):(this._mode=e.call(n,this,a&&a.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),re=V.CipherParams=Y.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),ie=(G.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,a=e.salt;return(a?j.create([1398893684,1701076831]).concat(a).concat(t):t).toString(Z)},parse:function(e){var t,a=Z.parse(e),n=a.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=j.create(n.slice(2,4)),n.splice(0,4),a.sigBytes-=16),re.create({ciphertext:a,salt:t})}},oe=V.SerializableCipher=Y.extend({cfg:Y.extend({format:ie}),encrypt:function(e,t,a,n){n=this.cfg.extend(n);var r=e.createEncryptor(a,n),i=r.finalize(t),o=r.cfg;return re.create({ciphertext:i,key:a,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,a,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(a,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),se=(G.kdf={}).OpenSSL={execute:function(e,t,a,n){n||(n=j.random(8));var r=Q.create({keySize:t+a}).compute(e,n),i=j.create(r.words.slice(t),4*a);return r.sigBytes=4*t,re.create({key:r,iv:i,salt:n})}},le=V.PasswordBasedCipher=oe.extend({cfg:oe.cfg.extend({kdf:se}),encrypt:function(e,t,a,n){var r=(n=this.cfg.extend(n)).kdf.execute(a,e.keySize,e.ivSize);n.iv=r.iv;var i=oe.encrypt.call(this,e,t,r.key,n);return i.mixIn(r),i},decrypt:function(e,t,a,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(a,e.keySize,e.ivSize,t.salt);return n.iv=r.iv,oe.decrypt.call(this,e,t,r.key,n)}})),ve.mode.CFB=function(){var e=ve.lib.BlockCipherMode.extend();function i(e,t,a,n){var r,i=this._iv;i?(r=i.slice(0),this._iv=undefined):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o<a;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;i.call(this,e,t,n,a),this._prevBlock=e.slice(t,t+n)}}),e.Decryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=e.slice(t,t+n);i.call(this,e,t,n,a),this._prevBlock=r}}),e}(),ve.mode.ECB=((ce=ve.lib.BlockCipherMode.extend()).Encryptor=ce.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),ce.Decryptor=ce.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),ce),ve.pad.AnsiX923={pad:function(e,t){var a=e.sigBytes,n=4*t,r=n-a%n,i=a+r-1;e.clamp(),e.words[i>>>2]|=r<<24-i%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso10126={pad:function(e,t){var a=4*t,n=a-e.sigBytes%a;e.concat(ve.lib.WordArray.random(n-1)).concat(ve.lib.WordArray.create([n<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso97971={pad:function(e,t){e.concat(ve.lib.WordArray.create([2147483648],1)),ve.pad.ZeroPadding.pad(e,t)},unpad:function(e){ve.pad.ZeroPadding.unpad(e),e.sigBytes--}},ve.mode.OFB=(de=ve.lib.BlockCipherMode.extend(),fe=de.Encryptor=de.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._keystream;r&&(i=this._keystream=r.slice(0),this._iv=undefined),a.encryptBlock(i,0);for(var o=0;o<n;o++)e[t+o]^=i[o]}}),de.Decryptor=fe,de),ve.pad.NoPadding={pad:function(){},unpad:function(){}},ue=(pe=ve).lib.CipherParams,ge=pe.enc.Hex,pe.format.Hex={stringify:function(e){return e.ciphertext.toString(ge)},parse:function(e){var t=ge.parse(e);return ue.create({ciphertext:t})}},function(){var e=ve,t=e.lib.BlockCipher,a=e.algo,c=[],d=[],f=[],p=[],u=[],g=[],h=[],m=[],v=[],b=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var a=0,n=0;for(t=0;t<256;t++){var r=n^n<<1^n<<2^n<<3^n<<4;r=r>>>8^255&r^99,c[a]=r;var i=e[d[r]=a],o=e[i],s=e[o],l=257*e[r]^16843008*r;f[a]=l<<24|l>>>8,p[a]=l<<16|l>>>16,u[a]=l<<8|l>>>24,g[a]=l;l=16843009*s^65537*o^257*i^16843008*a;h[r]=l<<24|l>>>8,m[r]=l<<16|l>>>16,v[r]=l<<8|l>>>24,b[r]=l,a?(a=i^e[e[e[s^i]]],n^=e[e[n]]):a=n=1}}();var E=[0,1,2,4,8,16,32,64,128,27,54],n=a.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,a=e.sigBytes/4,n=4*((this._nRounds=a+6)+1),r=this._keySchedule=[],i=0;i<n;i++)i<a?r[i]=t[i]:(l=r[i-1],i%a?6<a&&i%a==4&&(l=c[l>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l]):(l=c[(l=l<<8|l>>>24)>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l],l^=E[i/a|0]<<24),r[i]=r[i-a]^l);for(var o=this._invKeySchedule=[],s=0;s<n;s++){i=n-s;if(s%4)var l=r[i];else l=r[i-4];o[s]=s<4||i<=4?l:h[c[l>>>24]]^m[c[l>>>16&255]]^v[c[l>>>8&255]]^b[c[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,f,p,u,g,c)},decryptBlock:function(e,t){var a=e[t+1];e[t+1]=e[t+3],e[t+3]=a,this._doCryptBlock(e,t,this._invKeySchedule,h,m,v,b,d);a=e[t+1];e[t+1]=e[t+3],e[t+3]=a},_doCryptBlock:function(e,t,a,n,r,i,o,s){for(var l=this._nRounds,c=e[t]^a[0],d=e[t+1]^a[1],f=e[t+2]^a[2],p=e[t+3]^a[3],u=4,g=1;g<l;g++){var h=n[c>>>24]^r[d>>>16&255]^i[f>>>8&255]^o[255&p]^a[u++],m=n[d>>>24]^r[f>>>16&255]^i[p>>>8&255]^o[255&c]^a[u++],v=n[f>>>24]^r[p>>>16&255]^i[c>>>8&255]^o[255&d]^a[u++],b=n[p>>>24]^r[c>>>16&255]^i[d>>>8&255]^o[255&f]^a[u++];c=h,d=m,f=v,p=b}h=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^a[u++],m=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^a[u++],v=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^a[u++],b=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^a[u++];e[t]=h,e[t+1]=m,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(n)}(),function(){var e=ve,t=e.lib,r=t.WordArray,a=t.BlockCipher,n=e.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],i=n.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],a=0;a<56;a++){var n=c[a]-1;t[a]=e[n>>>5]>>>31-n%32&1}for(var r=this._subKeys=[],i=0;i<16;i++){var o=r[i]=[],s=f[i];for(a=0;a<24;a++)o[a/6|0]|=t[(d[a]-1+s)%28]<<31-a%6,o[4+(a/6|0)]|=t[28+(d[a+24]-1+s)%28]<<31-a%6;o[0]=o[0]<<1|o[0]>>>31;for(a=1;a<7;a++)o[a]=o[a]>>>4*(a-1)+3;o[7]=o[7]<<5|o[7]>>>27}var l=this._invSubKeys=[];for(a=0;a<16;a++)l[a]=r[15-a]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,a){this._lBlock=e[t],this._rBlock=e[t+1],g.call(this,4,252645135),g.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),g.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=a[n],i=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=p[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=i^s}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,g.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function g(e,t){var a=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=a,this._lBlock^=a<<e}function h(e,t){var a=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=a,this._rBlock^=a<<e}e.DES=a._createHelper(i);var o=n.TripleDES=a.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),a=e.length<4?e.slice(0,2):e.slice(2,4),n=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=i.createEncryptor(r.create(t)),this._des2=i.createEncryptor(r.create(a)),this._des3=i.createEncryptor(r.create(n))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=a._createHelper(o)}(),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,n=a.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,a=e.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var i=0;r<256;r++){var o=r%a,s=t[o>>>2]>>>24-o%4*8&255;i=(i+n[r]+s)%256;var l=n[r];n[r]=n[i],n[i]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0});function r(){for(var e=this._S,t=this._i,a=this._j,n=0,r=0;r<4;r++){a=(a+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[a],e[a]=i,n|=e[(e[t]+e[a])%256]<<24-8*r}return this._i=t,this._j=a,n}e.RC4=t._createHelper(n);var i=a.RC4Drop=n.extend({cfg:n.cfg.extend({drop:192}),_doReset:function(){n._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)r.call(this)}});e.RC4Drop=t._createHelper(i)}(),ve.mode.CTRGladman=function(){var e=ve.lib.BlockCipherMode.extend();function c(e){if(255==(e>>24&255)){var t=e>>16&255,a=e>>8&255,n=255&e;255===t?(t=0,255===a?(a=0,255===n?n=0:++n):++a):++t,e=0,e+=t<<16,e+=a<<8,e+=n}else e+=1<<24;return e}var t=e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=undefined),function l(e){return 0===(e[0]=c(e[0]))&&(e[1]=c(e[1])),e}(i);var o=i.slice(0);a.encryptBlock(o,0);for(var s=0;s<n;s++)e[t+s]^=o[s]}});return e.Decryptor=t,e}(),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,r=[],l=[],c=[],n=a.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,a=0;a<4;a++)e[a]=16711935&(e[a]<<8|e[a]>>>24)|4278255360&(e[a]<<24|e[a]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(a=this._b=0;a<4;a++)p.call(this);for(a=0;a<8;a++)r[a]^=n[a+4&7];if(t){var i=t.words,o=i[0],s=i[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=c,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=c,r[7]^=f;for(a=0;a<4;a++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),r[0]=a[0]^a[5]>>>16^a[3]<<16,r[1]=a[2]^a[7]>>>16^a[5]<<16,r[2]=a[4]^a[1]>>>16^a[7]<<16,r[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,a=0;a<8;a++)l[a]=t[a];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<l[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<l[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<l[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<l[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<l[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<l[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<l[6]>>>0?1:0)|0,this._b=t[7]>>>0<l[7]>>>0?1:0;for(a=0;a<8;a++){var n=e[a]+t[a],r=65535&n,i=n>>>16,o=((r*r>>>17)+r*i>>>15)+i*i,s=((4294901760&n)*n|0)+((65535&n)*n|0);c[a]=o^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.Rabbit=t._createHelper(n)}(),ve.mode.CTR=(he=ve.lib.BlockCipherMode.extend(),me=he.Encryptor=he.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=undefined);var o=i.slice(0);a.encryptBlock(o,0),i[n-1]=i[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=o[s]}}),he.Decryptor=me,he),function(){var e=ve,t=e.lib.StreamCipher,a=e.algo,r=[],l=[],c=[],n=a.RabbitLegacy=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,a=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],r=this._b=0;r<4;r++)p.call(this);for(r=0;r<8;r++)n[r]^=a[r+4&7];if(t){var i=t.words,o=i[0],s=i[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=c,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=c,n[7]^=f;for(r=0;r<4;r++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),r[0]=a[0]^a[5]>>>16^a[3]<<16,r[1]=a[2]^a[7]>>>16^a[5]<<16,r[2]=a[4]^a[1]>>>16^a[7]<<16,r[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,a=0;a<8;a++)l[a]=t[a];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<l[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<l[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<l[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<l[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<l[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<l[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<l[6]>>>0?1:0)|0,this._b=t[7]>>>0<l[7]>>>0?1:0;for(a=0;a<8;a++){var n=e[a]+t[a],r=65535&n,i=n>>>16,o=((r*r>>>17)+r*i>>>15)+i*i,s=((4294901760&n)*n|0)+((65535&n)*n|0);c[a]=o^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.RabbitLegacy=t._createHelper(n)}(),ve.pad.ZeroPadding={pad:function(e,t){var a=4*t;e.clamp(),e.sigBytes+=a-(e.sigBytes%a||a)},unpad:function(e){var t=e.words,a=e.sigBytes-1;for(a=e.sigBytes-1;0<=a;a--)if(t[a>>>2]>>>24-a%4*8&255){e.sigBytes=a+1;break}}},{init:function be(){},cryptoJS:ve}},Object.assign(St.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),St.PLUGINS.fontFamily=function(r){var i=r.$;function o(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return i(this).grep(t,function(e){return 0<e.length})}function s(e,t){for(var a=0;a<e.length;a++)for(var n=0;n<t.length;n++)if(e[a].toLowerCase()===t[n].toLowerCase())return[a,n];return null}function a(){var e=o(i(r.selection.element()).css("font-family")),t=[];for(var a in r.opts.fontFamily)if(r.opts.fontFamily.hasOwnProperty(a)){var n=s(e,o(a));n&&t.push([a,n])}return 0===t.length?null:(t.sort(function(e,t){var a=e[1][0]-t[1][0];return 0===a?e[1][1]-t[1][1]:a}),t[0][0])}return{apply:function t(e){r.format.applyStyle("font-family",e)},refreshOnShow:function n(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(a(),'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function l(e){if(r.opts.fontFamilySelection){var t=i(r.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(r.opts.fontFamily[a()]||t[0]||r.language.translate(r.opts.fontFamilyDefaultSelection))}}}},St.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'.concat(a,'" \n style="font-family: ').concat(a,'" title="').concat(t[a],'">').concat(t[a],"</a></li>"));return e+="</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),St.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"}),Object.assign(St.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"Font Size",fontSizeUnit:"px"}),St.PLUGINS.fontSize=function(n){var r=n.$;return{apply:function t(e){n.format.applyStyle("font-size",e)},refreshOnShow:function i(e,t){var a=r(n.selection.element()).css("font-size");"pt"===n.opts.fontSizeUnit&&(a="".concat(Math.round(72*parseFloat(a,10)/96),"pt")),t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(a,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function a(e){if(n.opts.fontSizeSelection){var t=n.helpers.getPX(r(n.selection.element()).css("font-size"));"pt"===n.opts.fontSizeUnit&&(t="".concat(Math.round(72*parseFloat(t,10)/96),"pt")),e.find("> span").text(t)}}}},St.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(e){return e.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(e){return e.opts.fontSizeDefaultSelection},html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontSize,a=0;a<t.length;a++){var n=t[a];e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'.concat(n).concat(this.opts.fontSizeUnit,'" title="').concat(n,'">').concat(n,"</a></li>")}return e+="</ul>"},callback:function(e,t){this.fontSize.apply(t)},refresh:function(e){this.fontSize.refresh(e)},refreshOnShow:function(e,t){this.fontSize.refreshOnShow(e,t)},plugin:"fontSize"}),St.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"}),Object.assign(St.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(St.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),St.PLUGINS.forms=function(o){var s,l=o.$;function t(e){o.selection.clear(),l(this).data("mousedown",!0)}function a(e){l(this).data("mousedown")&&(e.stopPropagation(),l(this).removeData("mousedown"),d(s=this)),e.preventDefault()}function n(){o.$el.find("input, textarea, button").removeData("mousedown")}function r(){l(this).removeData("mousedown")}function c(){return s||null}function d(e){if(-1==["checkbox","radio"].indexOf(e.type)){var t=o.popups.get("forms.edit");t||(t=function i(){var e="";0<o.opts.formEditButtons.length&&(e='<div class="fr-buttons">'.concat(o.button.buildList(o.opts.formEditButtons),"</div>"));var t={buttons:e},a=o.popups.create("forms.edit",t);return o.$wp&&o.events.$on(o.$wp,"scroll.link-edit",function(){c()&&o.popups.isVisible("forms.edit")&&d(c())}),a}());var a=l(s=e);o.popups.refresh("forms.edit"),o.popups.setContainer("forms.edit",o.$sc);var n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();o.popups.show("forms.edit",n,r,a.outerHeight())}}function i(){var e=o.popups.get("forms.update"),t=c();if(t){var a=l(t);a.is("button")?e.find('input[type="text"][name="text"]').val(a.text()):a.is("input[type=button]")||a.is("input[type=submit]")||a.is("input[type=reset]")?e.find('input[type="text"][name="text"]').val(a.val()):e.find('input[type="text"][name="text"]').val(a.attr("placeholder"))}e.find('input[type="text"][name="text"]').trigger("change")}function f(){s=null}function p(e){if(e)return o.popups.onRefresh("forms.update",i),o.popups.onHide("forms.update",f),!0;var t="";1<=o.opts.formUpdateButtons.length&&(t='<div class="fr-buttons">'.concat(o.button.buildList(o.opts.formUpdateButtons),"</div>"));var a=0,n={buttons:t,text_layer:'<div class="fr-forms-text-layer fr-layer fr-active"> \n <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++a,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(o.language.translate("Update"),"</button></div></div>")};return o.popups.create("forms.update",n)}return{_init:function u(){!function e(){o.events.$on(o.$el,o._mousedown,"input, textarea, button",t),o.events.$on(o.$el,o._mouseup,"input, textarea, button",a),o.events.$on(o.$el,"touchmove","input, textarea, button",r),o.events.$on(o.$el,o._mouseup,n),o.events.$on(o.$win,o._mouseup,n),p(!0)}(),o.events.$on(o.$el,"submit","form",function(e){return e.preventDefault(),!1})},updateInput:function g(){var e=o.popups.get("forms.update"),t=c();if(t){var a=l(t),n=e.find('input[type="text"][name="text"]').val()||"";a.is("button")?n.length?a.text(n):a.text("\u200b"):-1!=["button","submit","reset"].indexOf(t.type)?a.attr("value",n):a.attr("placeholder",n),o.popups.hide("forms.update"),d(t)}},getInput:c,applyStyle:function h(e,t,a){void 0===t&&(t=o.opts.formStyles),void 0===a&&(a=o.opts.formMultipleStyles);var n=c();if(!n)return!1;if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),l(n).removeClass(r.join(" "))}l(n).toggleClass(e)},showUpdatePopup:function m(){var e=c();if(e){var t=l(e),a=o.popups.get("forms.update");a||(a=p()),o.popups.isVisible("forms.update")||o.popups.refresh("forms.update"),o.popups.setContainer("forms.update",o.$sc);var n=t.offset().left+t.outerWidth()/2,r=t.offset().top+t.outerHeight();o.popups.show("forms.update",n,r,t.outerHeight())}},showEditPopup:d,back:function v(){o.events.disableBlur(),o.selection.restore(),o.events.enableBlur();var e=c();e&&o.$wp&&("BUTTON"===e.tagName&&o.selection.restore(),d(e))}}},St.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),St.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),St.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list">',t=this.opts.formStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(a,'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){var a=this.forms.getInput();a&&(this.forms.applyStyle(t),this.forms.showEditPopup(a))},refreshOnShow:function(e,t){var a=this.$,n=this.forms.getInput();if(n){var r=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1");a(this).toggleClass("fr-active",r.hasClass(e))})}}}),St.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),St.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),St.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),St.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),St.PLUGINS.fullscreen=function(r){var t,a,n,i,o=r.$,s=function s(){return r.$box.hasClass("fr-fullscreen")};function l(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(d,250),!1;t=r.helpers.scrollTop(),r.opts.iframe&&r.markdown&&r.markdown.isEnabled()&&(r.$box=r.$oel),r.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),r.helpers.isMobile()&&(r.opts.toolbarBottom?r.$tb[0].removeAttribute("style"):(r.$tb.data("parent",r.$tb.parent()),r.$box.prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")))),a=r.opts.height,n=r.opts.heightMax,i=r.opts.zIndex,r.opts.height=r.o_win.innerHeight-(r.opts.toolbarInline?0:r.$tb.outerHeight()+(r.$second_tb?r.$second_tb.outerHeight():0)),r.opts.zIndex=2147483641,r.opts.heightMax=null,r.size.refresh(),r.opts.toolbarInline&&r.toolbar.showInline();for(var e=r.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&r.$box.prepend(r.$tb),r.events.trigger("charCounter.update"),r.events.trigger("codeView.update"),r.$win.trigger("scroll")}function c(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(d,250),!1;r.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),r.$tb.data("parent")&&r.$tb.data("parent").prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")),r.opts.height=a,r.opts.heightMax=n,r.opts.zIndex=i,r.size.refresh(),r.o_win.scroll(0,t),r.opts.toolbarInline&&r.toolbar.showInline(),r.events.trigger("charCounter.update"),r.opts.toolbarSticky&&r.opts.toolbarStickyOffset&&(r.opts.toolbarBottom?r.$tb.css("bottom",r.opts.toolbarStickyOffset).data("bottom",r.opts.toolbarStickyOffset):r.$tb.css("top",r.opts.toolbarStickyOffset).data("top",r.opts.toolbarStickyOffset));for(var e=r.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&o(r.opts.toolbarContainer).append(r.$tb),o(r.o_win).trigger("scroll"),r.events.trigger("codeView.update")}function d(){s()?c():l(),f(r.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=r.$tb.find('.fr-command[data-cmd="moreText"]'),t=r.$tb.find('.fr-command[data-cmd="moreParagraph"]'),a=r.$tb.find('.fr-command[data-cmd="moreRich"]'),n=r.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&r.refresh.moreText(e),t.length&&r.refresh.moreParagraph(t),a.length&&r.refresh.moreRich(a),n.length&&r.refresh.moreMisc(n)}function f(e){var t=s();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?r.icon.create("fullscreenCompress"):r.icon.create("fullscreen"))}return{_init:function e(){if(!r.$wp)return!1;r.events.$on(o(r.o_win),"resize",function(){s()&&(c(),l())}),r.events.on("toolbar.hide",function(){if(s()&&r.helpers.isMobile())return!1}),r.events.on("position.refresh",function(){if(r.helpers.isIOS())return!s()}),r.events.on("destroy",function(){s()&&c()},!0)},toggle:d,refresh:f,isActive:s}},St.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),St.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),St.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"}),Object.assign(St.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),St.PLUGINS.help=function(s){var n,r=s.$,i="help";return{_init:function e(){},show:function l(){if(!n){var e="<h4>".concat(s.language.translate("Shortcuts"),"</h4>"),t=function o(){for(var e='<div class="fr-help-modal">',t=0;t<s.opts.helpSets.length;t++){var a=s.opts.helpSets[t],n="<table>";n+="<thead><tr><th>".concat(s.language.translate(a.title),"</th></tr></thead>"),n+="<tbody>";for(var r=0;r<a.commands.length;r++){var i=a.commands[r];n+="<tr>",n+="<td>".concat(s.language.translate(i.desc),"</td>"),n+="<td>".concat(i.val.replace("OSkey",s.helpers.isMac()?"&#8984;":"Ctrl+"),"</td>"),n+="</tr>"}e+=n+="</tbody></table>"}return e+="</div>"}(),a=s.modals.create(i,e,t);n=a.$modal,s.events.$on(r(s.o_win),"resize",function(){s.modals.resize(i)})}s.modals.show(i),s.modals.resize(i)},hide:function t(){s.modals.hide(i)}}},St.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),St.RegisterShortcut(St.KEYCODE.SLASH,"help",null,"/"),St.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1}),Object.assign(St.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(St.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),St.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,St.PLUGINS.image=function(w){var y,c,d,f,s,a,A=w.$,C="https://i.froala.com/upload",t=!1,n=1,p=2,u=3,g=4,T=5,k=6,r={};function h(){var e=w.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),y&&e.val(y.attr("src")),e.trigger("change")}function o(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function i(){var e=w.popups.get("image.edit");if(e||(e=O()),e){var t=y;w.popups.setContainer("image.edit",w.$sc),w.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,n=t&&o(t),r=w.$wp&&o(w.$wp);r||(r=n);var i=0;w.opts.iframe?((i=w.$wp.scrollTop()+e.outerHeight())<t.get(0).getBoundingClientRect().top&&(i=t.get(0).getBoundingClientRect().top),i>t.get(0).getBoundingClientRect().top+t.height()&&(i=t.get(0).getBoundingClientRect().top+t.height())):i=r<n?n:w.$wp&&n+t.height()<r+w.$wp.height()?n+t.height():r+e.outerHeight(),y.hasClass("fr-uploading")?F():w.popups.show("image.edit",a,i,1,!0)}}function m(){M()}function l(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ve(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function v(){for(var e,t="IMG"==w.el.tagName?[w.el]:w.el.querySelectorAll("img"),a=0;a<t.length;a++){var n=A(t[a]);!w.opts.htmlUntouched&&w.opts.useClasses?((w.opts.imageDefaultAlign||w.opts.imageDefaultDisplay)&&(0<(e=n).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ve(e)[0])),e.addClass("fr-di".concat(be(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),w.opts.imageTextNear||(0<n.parents(".fr-img-caption").length?n.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):n.removeClass("fr-dii").addClass("fr-dib"))):w.opts.htmlUntouched||w.opts.useClasses||(w.opts.imageDefaultAlign||w.opts.imageDefaultDisplay)&&l(n),w.opts.iframe&&n.on("load",w.size.syncIframe)}}function b(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(w.el.querySelectorAll("img")),n=[];for(t=0;t<a.length;t++)if(n.push(a[t].getAttribute("src")),A(a[t]).toggleClass("fr-draggable",w.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&w.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;w.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var i=a[t].nextSibling;i&&!w.browser.mozilla&&i.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)n.indexOf(s[t].getAttribute("src"))<0&&w.events.trigger("image.removed",[A(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&w.events.trigger("image.loaded",[A(a[t])])}s=a}function S(){if(c||function o(){var e;w.shared.$image_resizer?(c=w.shared.$image_resizer,f=w.shared.$img_overlay,w.events.on("destroy",function(){A("body").first().append(c.removeClass("fr-active"))},!0)):(w.shared.$image_resizer=A(document.createElement("div")).attr("class","fr-image-resizer"),c=w.shared.$image_resizer,w.events.$on(c,"mousedown",function(e){e.stopPropagation()},!0),w.opts.imageResize&&(c.append(E("nw")+E("ne")+E("sw")+E("se")),w.shared.$img_overlay=A(document.createElement("div")).attr("class","fr-image-overlay"),f=w.shared.$img_overlay,e=c.get(0).ownerDocument,A(e).find("body").first().append(f)));w.events.on("shared.destroy",function(){c.html("").removeData().remove(),c=null,w.opts.imageResize&&(f.remove(),f=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize",function(){y&&!y.hasClass("fr-uploading")?pe(!0):y&&(S(),Ee(),F(!1))});if(w.opts.imageResize){e=c.get(0).ownerDocument,w.events.$on(c,w._mousedown,".fr-handler",R),w.events.$on(A(e),w._mousemove,L),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,x),w.events.$on(f,"mouseleave",x);var n=1,r=null,i=0;w.events.on("keydown",function(e){if(y){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==St.KEYCODE.EQUALS||w.browser.mozilla&&a==St.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=te.call(this,e,1,1,n):(a==St.KEYCODE.HYPHEN||w.browser.mozilla&&a==St.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=te.call(this,e,2,-1,n):w.keys.ctrlKey(e)||a!=St.KEYCODE.ENTER||(y.before("<br>"),N(y)),r=a,i=e.timeStamp}},!0),w.events.on("keyup",function(){n=1})}}(),!y)return!1;var e=w.$wp||w.$sc;e.append(c),c.data("instance",w);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=w.helpers.getPX(e.css("border-left-width")),t-=w.helpers.getPX(e.css("border-top-width")),w.$el.is("img")&&w.$sc.is("body")&&(a=t=0);var n=ye();Ae()&&(n=n.find(".fr-img-wrap"));var r=0,i=0;w.opts.iframe&&(r=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),i=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),c.css("top",(w.opts.iframe?n.offset().top+r:n.offset().top+t)-1).css("left",(w.opts.iframe?n.offset().left+i:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function E(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function _(e){Ae()&&y.parents(".fr-img-caption").css("width",e),y.css("width",e)}function R(e){if(!w.core.sameInstance(c))return!0;if(e.preventDefault(),e.stopPropagation(),w.$el.find("img.fr-error").left)return!1;w.undo.canDo()||w.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=w.$oel.get(0),n=a.ownerDocument,r=n.defaultView||n.parentWindow,i=!1;try{i=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(l){}i&&r.frameElement&&(t+=w.helpers.getPX(A(a).offset().left)+r.frameElement.clientLeft)}(d=A(this)).data("start-x",t),d.data("start-width",y.width()),d.data("start-height",y.height());var o=y.width();if(w.opts.imageResizeWithPercent){var s=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;o=(o/A(s).outerWidth()*100).toFixed(2)+"%"}_(o),f.show(),w.popups.hideAll(),he()}function L(e){if(!w.core.sameInstance(c))return!0;var t;if(d&&y){if(e.preventDefault(),w.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var n=a-d.data("start-x"),r=d.data("start-width");if((d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(n=0-n),w.opts.imageResizeWithPercent){var i=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;r=((r+n)/A(i).outerWidth()*100).toFixed(2),w.opts.imageRoundPercent&&(r=Math.round(r)),_("".concat(r,"%")),(t=Ae()?(w.helpers.getPX(y.parents(".fr-img-caption").css("width"))/A(i).outerWidth()*100).toFixed(2):(w.helpers.getPX(y.css("width"))/A(i).outerWidth()*100).toFixed(2))===r||w.opts.imageRoundPercent||_("".concat(t,"%")),y.css("height","").removeAttr("height")}else r+n>=w.opts.imageMinWidth&&(_(r+n),t=Ae()?w.helpers.getPX(y.parents(".fr-img-caption").css("width")):w.helpers.getPX(y.css("width"))),t!==r+n&&_(t),((y.attr("style")||"").match(/(^height:)|(; *height:)/)||y.attr("height"))&&(y.css("height",d.data("start-height")*y.width()/d.data("start-width")),y.removeAttr("height"));S(),w.events.trigger("image.resize",[we()])}}function x(e){if(!w.core.sameInstance(c))return!0;if(d&&y){if(e&&e.stopPropagation(),w.$el.find("img.fr-error").left)return!1;d=null,f.hide(),S(),i(),w.undo.saveStep(),w.events.trigger("image.resizeEnd",[we()])}else c.removeClass("fr-active")}function I(e,t,a){w.edit.on(),y&&y.addClass("fr-error"),r[e]?P(w.language.translate(r[e])):P(w.language.translate("Something went wrong. Please try again.")),!y&&a&&ae(a),w.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function O(e){if(e)return w.$wp&&w.events.$on(w.$wp,"scroll.image-edit",function(){y&&w.popups.isVisible("image.edit")&&(w.events.disableBlur(),i())}),!0;var t="";if(0<w.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(w.button.buildList(w.opts.imageEditButtons),"\n </div>")};return w.popups.create("image.edit",a)}return!1}function F(e){var t=w.popups.get("image.insert");if(t||(t=j()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),y){var a=ye();w.popups.setContainer("image.insert",w.$sc);var n=a.offset().left,r=a.offset().top+a.height();w.popups.show("image.insert",n,r,a.outerHeight())}void 0===e&&D(w.language.translate("Uploading"),0)}function M(e){var t=w.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("img.fr-error").length)){if(w.events.focus(),w.$el.find("img.fr-error").length&&(w.$el.find("img.fr-error").remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&y){var a=y;pe(!0),w.selection.setAfter(a.get(0)),w.selection.restore()}w.popups.hide("image.insert")}}function D(e,t){var a=w.popups.get("image.insert");if(a){var n=a.find(".fr-image-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function P(e){F();var t=w.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),w.events.disableBlur(),a.focus()}function N(e){fe.call(e.get(0))}function B(){var e=A(this);w.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),N(e),w.events.trigger("image.loaded",[e])}function U(o,e,s,l,c){l&&"string"==typeof l&&(l=w.$(l)),w.edit.off(),D(w.language.translate("Loading image")),e&&(o=w.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){w.undo.canDo()||l.hasClass("fr-uploading")||w.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),w.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!w.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||w.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var n=e.get(0).attributes,r=0;r<n.length;r++){var i=n[r];0===i.nodeName.indexOf("data-")?e.removeAttr(i.nodeName):s&&s.hasOwnProperty(i.nodeName)&&e.removeAttr(i.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",B),e.attr("src",o),w.edit.on(),b(!1),l[0].src!=o&&w.selection.restore(),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger(a?"image.replaced":"image.inserted",[e,c])}else(e=K(o,s,B))&&(b(!1),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger("image.inserted",[e,c]))},t.onerror=function(){I(n)},F(w.language.translate("Loading image")),t.src=o}function H(e,t,a){D(w.language.translate("Loading image"));var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(w.opts.imageUploadToS3||w.opts.imageUploadToAzure)if(201==n){var s;if(w.opts.imageUploadToAzure){if(!1===w.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return w.edit.on(),!1;s=t}else s=function c(e){try{var t=A(e).find("Location").text(),a=A(e).find("Key").text();return!1===w.events.trigger("image.uploadedToS3",[t,a,e],!0)?(w.edit.on(),!1):t}catch(n){return I(g,e),!1}}(i);s&&U(s,!1,[],e,r||i)}else I(g,r||i,e);else if(200<=n&&n<300){var l=function d(e){try{if(!1===w.events.trigger("image.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(p,e),!1)}catch(a){return I(g,e),!1}}(o);l&&U(l.link,!1,l,e,r||o)}else I(u,r||o,e)}catch(f){I(g,r||o,e)}}function $(){I(g,this.response||this.responseText||this.responseXML)}function z(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;D(w.language.translate("Uploading"),t)}}function K(e,t,a){var n,r=A(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),r.attr("".concat(n),t[n]));var i=w.opts.imageDefaultWidth;i&&"auto"!=i&&(i=w.opts.imageResizeWithPercent?"100%":"".concat(i,"px")),r.attr("style",i?"width: ".concat(i,";"):""),me(r,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.imageSplitHTML?w.markers.split():w.markers.insert(),w.html.wrap();var o=w.$el.find(".fr-marker");if(o.length)(o.parent().is("hr")||o.parent().is("IMG"))&&o.parent().after(o),w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(w.opts.trackChangesEnabled)return M(!0),!1;w.$el.append(r)}return w.selection.clear(),r}function W(){w.edit.on(),M(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("image.beforeUpload",[e,t]))return!1;var a,n=e[0];if(!(null!==w.opts.imageUploadURL&&w.opts.imageUploadURL!=C||w.opts.imageUploadToS3||w.opts.imageUploadToAzure))return function E(r,i){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),i&&i.data("fr-old-src",i.attr("src")),w.image.insert(e,!1,null,i)}else w.image.insert(e,null,null,w.image.get())},F(),o.readAsDataURL(r)}(n,t||y),!1;if(n.name||(n.name=(new Date).getTime()+"."+(n.type||"image/jpeg").replace(/image\//g,"")),n.size>w.opts.imageMaxSize)return I(T),!1;if(w.opts.imageAllowedTypes.indexOf(n.type.replace(/image\//g,""))<0)return I(k),!1;if(w.drag_support.formdata&&(a=w.drag_support.formdata?new FormData:null),a){var r;if(!1!==w.opts.imageUploadToS3)for(r in a.append("key",w.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(n.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",n.type),w.opts.imageUploadToS3.params)w.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,w.opts.imageUploadToS3.params[r]);for(r in w.opts.imageUploadParams)w.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,w.opts.imageUploadParams[r]);a.append(w.opts.imageUploadParam,n,n.name);var i,o,s=w.opts.imageUploadURL,l=w.opts.imageUploadMethod;w.opts.imageUploadToS3&&(s=w.opts.imageUploadToS3.uploadURL?w.opts.imageUploadToS3.uploadURL:"https://".concat(w.opts.imageUploadToS3.region,".amazonaws.com/").concat(w.opts.imageUploadToS3.bucket)),w.opts.imageUploadToAzure&&(i=s=w.opts.imageUploadToAzure.uploadURL?"".concat(w.opts.imageUploadToAzure.uploadURL,"/").concat(n.name):encodeURI("https://".concat(w.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.imageUploadToAzure.container,"/").concat(n.name)),w.opts.imageUploadToAzure.SASToken&&(s+=w.opts.imageUploadToAzure.SASToken),l="PUT");var c=w.core.getXHR(s,l);if(w.opts.imageUploadToAzure){var d=(new Date).toUTCString();if(!w.opts.imageUploadToAzure.SASToken&&w.opts.imageUploadToAzure.accessKey){var f=w.opts.imageUploadToAzure.account,p=w.opts.imageUploadToAzure.container;if(w.opts.imageUploadToAzure.uploadURL){var u=w.opts.imageUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var g="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+f+"/"+p+"/"+n.name),m=l+"\n\n\n"+n.size+"\n\n"+n.type+"\n\n\n\n\n\n\n"+g+"\n"+h,v=w.cryptoJSPlugin.cryptoJS.HmacSHA256(m,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.imageUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;o=v,c.setRequestHeader("Authorization",b)}for(r in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",n.type),c.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.imageUploadParams)w.opts.imageUploadParams.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.imageUploadParams[r]);for(r in w.opts.imageUploadToAzure.params)w.opts.imageUploadToAzure.params.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.imageUploadToAzure.params[r])}!function _(t,a,n,r,i,o){function s(){var e=A(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),w.placeholder.refresh(),N(e),S(),F(),w.edit.off(),t.onload=function(){H.call(t,e,i,o)},t.onerror=$,t.upload.onprogress=z,t.onabort=W,A(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(w.opts.imageUploadToAzure?n:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],n=0;n<t.length;n++)a.push(t.charCodeAt(n));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),A(this).off("error")}),w.edit.on(),w.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):K(e,null,s)},l.readAsDataURL(n)}(c,a,n,t||y,i,o)}}}function V(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function Y(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=w.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!w.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(St.MARKERS),0===w.$el.find(".fr-marker").length&&w.selection.setAtEnd(w.el),w.popups.hideAll();var n=w.popups.get("image.insert");n||(n=j()),w.popups.setContainer("image.insert",w.$sc);var r=e.originalEvent.pageX,i=e.originalEvent.pageY;if(w.opts.iframe){var o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),s=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"));i+=w.$iframe.offset().top+o,r+=w.$iframe.offset().left+s}return w.popups.show("image.insert",r,i),F(),0<=w.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(k),e.preventDefault(),e.stopPropagation(),!1}}}function j(e){if(e)return w.popups.onRefresh("image.insert",h),w.popups.onHide("image.insert",m),!0;var t,a,n="";w.opts.imageUpload||-1===w.opts.imageInsertButtons.indexOf("imageUpload")||w.opts.imageInsertButtons.splice(w.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=w.button.buildList(w.opts.imageInsertButtons);""!==r&&(n='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var i=w.opts.imageInsertButtons.indexOf("imageUpload"),o=w.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=i&&(t=" fr-active",0<=o&&o<i&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop image"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(w.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(w.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=i&&i<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(w.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var c={buttons:n,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-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="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=w.opts.imageInsertButtons.length&&(a=w.popups.create("image.insert",c)),w.$wp&&w.events.$on(w.$wp,"scroll",function(){y&&w.popups.isVisible("image.insert")&&Ee()}),function d(n){w.events.$on(n,"dragover dragenter",".fr-image-upload-layer",function(e){return A(this).addClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.events.$on(n,"dragleave dragend",".fr-image-upload-layer",function(e){return A(this).removeClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.events.$on(n,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||w;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(n,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0),w.events.$on(n,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||w;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,y)}A(this).val("")},!0)}(a),a}function q(){y&&w.popups.get("image.alt").find("input").val(y.attr("alt")||"").trigger("change")}function X(){var e=w.popups.get("image.alt");e||(e=Z()),M(),w.popups.refresh("image.alt"),w.popups.setContainer("image.alt",w.$sc);var t=ye(),a=t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n=t.offset().left+a,r=t.offset().top+t.outerHeight(),i=t.outerHeight();w.opts.iframe&&Ae()&&(i=y?y.outerHeight():0),w.popups.show("image.alt",n,r,i,!0)}function Z(e){if(e)return w.popups.onRefresh("image.alt",q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(w.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},a=w.popups.create("image.alt",t);return w.$wp&&w.events.$on(w.$wp,"scroll.image-alt",function(){y&&w.popups.isVisible("image.alt")&&X()}),a}function Q(){var e=w.popups.get("image.size"),t=y.get(0).style.height?y.get(0).style.height:"auto",a=y.get(0).style.width?y.get(0).style.width:"auto";if(y)if(Ae()){var n=y.parent();n.get(0).style.width||(n=y.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function J(){var e=w.popups.get("image.size");e||(e=ee()),M(),w.popups.refresh("image.size"),w.popups.setContainer("image.size",w.$sc);var t=ye(),a=t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n=t.outerHeight();w.opts.iframe&&Ae()&&(n=y?y.outerHeight():0);var r=t.offset().left+a,i=t.offset().top+t.outerHeight();w.popups.show("image.size",r,i,n,!0)}function ee(e){if(e)return w.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(w.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-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-image-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="imageSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},a=w.popups.create("image.size",t);return w.$wp&&w.events.$on(w.$wp,"scroll.image-size",function(){y&&w.popups.isVisible("image.size")&&J()}),a}function te(e,t,a,n){return e.pageX=t,R.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),L.call(this,e),x.call(this,e),++n}function ae(e){if(e=e||ye(),w.opts.trackChangesEnabled&&!w.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return w.track_changes.removeSpecialItem(e),w.popups.hideAll(),void pe(!0);e&&!1!==w.events.trigger("image.beforeRemove",[e])&&(w.popups.hideAll(),_e(),pe(!0),w.undo.canDo()||w.undo.saveStep(),e.get(0)==w.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(w.selection.setBefore(e.get(0).parentNode)||w.selection.setAfter(e.get(0).parentNode)||e.parent().after(St.MARKERS),A(e.get(0).parentNode).remove()):(w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0))||e.after(St.MARKERS),e.remove()),w.html.fillEmptyBlocks(),w.selection.restore()),w.undo.saveStep())}function ne(e){var t=e.which,a=document.getElementsByClassName("fs-transforms-container"),n=!1;if(a&&a.length){var r,i=He(a);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.childNodes&&o.childNodes.length&&(n=!0)}}catch(c){i.e(c)}finally{i.f()}}if(n&&(y=null),y&&(t==St.KEYCODE.BACKSPACE||t==St.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ae(),!1;if(y&&t==St.KEYCODE.ESC){var s=y;return pe(!0),w.selection.setAfter(s.get(0)),w.selection.restore(),e.preventDefault(),!1}if(!y||t!=St.KEYCODE.ARROW_LEFT&&t!=St.KEYCODE.ARROW_RIGHT)return y&&t===St.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):y&&t!=St.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var l=y.get(0);return pe(!0),t==St.KEYCODE.ARROW_LEFT?w.selection.setBefore(l):w.selection.setAfter(l),w.selection.restore(),e.preventDefault(),!1}function re(e){if(e&&"IMG"==e.tagName){if(w.node.hasClass(e,"fr-uploading")||w.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):w.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&w.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<n.length;r++)re(n[r])}function ie(e){if(!1===w.events.trigger("image.beforePasteUpload",[e]))return A(e).removeAttr("data-fr-image-pasted"),!1;y=A(e),S(),i(),F(),y.on("load",function(){var t=[];S(),A(w.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&F(),A(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&A(this).off("load")});for(var t=A(e).attr("src").split(","),a=atob(t[1]),n=[],r=0;r<a.length;r++)n.push(a.charCodeAt(r));G([w.browser.safari&&!w.opts.imageUploadURL?new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"")}):new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],y)}function oe(){w.opts.imagePaste?w.$el.find("img[data-fr-image-pasted]").each(function(e,a){if(w.opts.imagePasteProcess){var t=w.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=w.opts.imageResizeWithPercent?"%":"px"),A(a).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(A(a),w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign)}if(0===a.src.indexOf("data:"))ie(a);else if(0===a.src.indexOf("blob:")||0===a.src.indexOf("http")&&w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var e=w.o_doc.createElement("CANVAS"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.drawImage(this,0,0),setTimeout(function(){ie(a)},0),a.src=e.toDataURL(St.IMAGE_TYPE)},w.browser.msie&&St.IMAGE_ALLOW_REGEX.test(a.src)&&(St.IMAGE_TYPE="image/"+a.src.split(St.IMAGE_ALLOW_REGEX)[1]),n.src=(0===a.src.indexOf("blob:")?"":"".concat(w.opts.imageCORSProxy,"/"))+a.src,0!==a.src.indexOf("blob:")&&w.undo.saveStep()}else 0!==a.src.indexOf("http")||0===a.src.indexOf("https://mail.google.com/mail")?(w.selection.save(),A(a).remove(),w.selection.restore()):A(a).removeAttr("data-fr-image-pasted")}):w.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=w.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=w.opts.imageResizeWithPercent?"%":"px"),w.undo.saveStep(),w.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var n=w.$el.find('img[data-fr-image-pasted="true"]');n&&me(n,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),w.events.trigger("paste.after")}function le(e,t){var a=new FileReader;a.onload=function n(e){var t=w.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=w.opts.imageResizeWithPercent?"%":"px"),w.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=w.$el.find('img[data-fr-image-pasted="true"]');a&&me(a,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),w.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function ce(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"";w.browser.mozilla&&(""===t||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(t))&&(t=w.win.localStorage.getItem("fr-copied-html"));var a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a&&!w.opts.imageUploadURL){if(!a)return!1;var n=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var i=0;i<e.clipboardData.items.length;i++)if(r=e.clipboardData.items[i].getAsFile()){St.IMAGE_TYPE=r.type;break}if(r)return le(r,n),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(o),!1}}}function de(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<St.INSTANCES.length;t++)St.INSTANCES[t]!=w&&St.INSTANCES[t].events.trigger("image.hideResizer");w.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.opts.iframe&&w.size.syncIframe(),y=A(this),_e(),S(),i(),w.browser.msie?(w.popups.areVisible()&&w.events.disableBlur(),w.win.getSelection&&(w.win.getSelection().removeAllRanges(),w.win.getSelection().addRange(w.doc.createRange()))):w.selection.clear(),w.helpers.isIOS()&&(w.events.disableBlur(),w.$el.blur()),w.button.bulkRefresh(),w.events.trigger("video.hideResizer")}function pe(e){y&&(function t(){return ue}()||!0===e)&&(w.toolbar.enable(),c.removeClass("fr-active"),w.popups.hideAll(),y=null,he(),d=null,f&&f.hide())}r[n]="Image cannot be loaded from the passed link.",r[p]="No link in upload response.",r[u]="Error during file upload.",r[g]="Parsing response failed.",r[T]="File is too large.",r[k]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ue=!(r[8]="Image file is corrupted.");function ge(){ue=!0}function he(){ue=!1}function me(e,t,a){if(!w.opts.htmlUntouched&&w.opts.useClasses)e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]));else if("inline"==t)if(e.css({display:"inline-block",verticalAlign:"bottom",margin:w.opts.imageDefaultMargin}),"center"==a)e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*w.opts.imageDefaultMargin,"px)"),textAlign:"center"});else if("left"==a){var n="0px",r=e.parent("span.fr-img-caption").get(0);r||(r=e.parent().get(0)),r&&"li"===r.tagName.toLowerCase()?n="20px":r&&"p"===r.tagName.toLowerCase()&&(n="15px"),e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"left",marginRight:n})}else e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"right"});else"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(w.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ve(e){if(void 0===e&&(e=ye()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function be(e){void 0===e&&(e=ye());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 Ee(){var e=w.popups.get("image.insert");e||(e=j()),w.popups.isVisible("image.insert")||(M(),w.popups.refresh("image.insert"),w.popups.setContainer("image.insert",w.$sc));var t=ye(),a=t&&t.outerWidth()/2;Ae()&&(t=t.find(".fr-img-wrap"),a=y.outerWidth()/2);var n,r=t.offset().left+a,i=t.outerHeight(!0);w.opts.iframe&&Ae()&&(i=y?y.outerHeight():0),n=0<w.$el.find("img[data-fr-image-pasted]").length?w.$wp.offset().top-w.helpers.scrollTop()+w.$wp.height():t.offset().top+t.outerHeight(),w.popups.show("image.insert",r,n,i,!0)}function _e(){if(y){w.events.disableBlur(),w.selection.clear();var e=w.doc.createRange();e.selectNode(y.get(0)),w.browser.msie&&e.collapse(!0),w.selection.get().addRange(e),w.events.enableBlur()}}function we(){return y}function ye(){return Ae()?y.parents(".fr-img-caption").first():y}function Ae(){return!!y&&0<y.parents(".fr-img-caption").length}function Ce(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Te(){var i;(function e(){w.events.$on(w.$el,w._mousedown,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==A(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;w.helpers.isMobile()||w.selection.clear(),t=!0,w.popups.areVisible()&&w.events.disableBlur(),w.browser.msie&&(w.events.disableBlur(),w.$el.attr("contenteditable",!1)),w.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),w.events.$on(w.$el,w._mousedown,".fr-img-caption .fr-inner",function(e){w.core.hasFocus()||w.events.focus(),e.stopPropagation()}),w.events.$on(w.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===w.opts.toolbarInline&&(w.toolbar.hide(),e.stopPropagation())}),w.events.$on(w.$el,w._mousedown,'img:not([contenteditable="false"])',function(e){var t=this;w.browser.mozilla&&3==e.which&&(A(this).attr("contenteditable",!1),setTimeout(function(){A(t).removeAttr("contenteditable")},200))}),w.events.$on(w.$el,w._mouseup,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==A(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),w.browser.msie&&(w.$el.attr("contenteditable",!0),w.events.enableBlur()))}),w.events.on("keyup",function(e){if(e.shiftKey&&""===w.selection.text().replace(/\n/g,"")&&w.keys.isArrow(e.which)){var t=w.selection.element(),a=w.selection.endElement();t&&"IMG"==t.tagName?N(A(t)):a&&"IMG"==a.tagName&&N(A(a))}},!0),w.events.on("drop",Y),w.events.on("element.beforeDrop",V),w.events.on("mousedown window.mousedown",ge),w.events.on("window.touchmove",he),w.events.on("mouseup window.mouseup",function(){if(y&&!w.helpers.isMobile())return pe(),!1;he()}),w.events.on("touchstart touchend",function(){if(y&&w.helpers.isMobile())return pe(),!1;he()}),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),w.events.on("image.resizeEnd",function(){w.opts.iframe&&w.size.syncIframe()}),w.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),w.events.on("modals.hide",function(){y&&(_e(),w.selection.clear())}),w.events.on("image.resizeEnd",function(){w.win.getSelection&&N(y)}),w.events.on("filestack-init",function(){j()}),w.events.on("filestack-init-edit",function(){for(var e=w.$(".fr-popup"),t=e.length-1;0<=t;t--)e[t].parentElement.removeChild(e[t]);O()}),w.opts.imageAddNewLine&&w.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!w.node.isElement(t);)t=w.node.isLastSibling(t)?t.parentNode:null;w.node.isElement(t)&&(w.opts.enter===St.ENTER_BR?e.after("<br>"):A(w.node.blockParent(e.get(0))).after("<".concat(w.html.defaultTag(),"><br></").concat(w.html.defaultTag(),">")))})})(),"IMG"==w.el.tagName&&w.$el.addClass("fr-view"),w.events.$on(w.$el,w.helpers.isMobile()&&!w.helpers.isWindowsPhone()?"touchend":"click","IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',fe),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),w.events.$on(w.$el,"touchmove",function(){a=!0})),w.$wp?(w.events.on("window.keydown keydown",ne,!0),w.events.on("keyup",function(e){if(y&&e.which==St.KEYCODE.ENTER)return!1},!0),w.events.$on(w.$el,"keydown",function(){var e=w.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&w.node.isLastSibling(e))&&(e=e.parentNode),w.node.hasClass(e,"fr-inner")||(w.node.hasClass(e,"fr-img-caption")||(e=A(e).parents(".fr-img-caption").get(0)),w.node.hasClass(e,"fr-img-caption")&&(w.opts.trackChangesEnabled||A(e).after(St.INVISIBLE_SPACE+St.MARKERS),w.selection.restore()))})):w.events.$on(w.$win,"keydown",ne),w.events.on("toolbar.esc",function(){if(y){if(w.$wp)w.events.disableBlur(),w.events.focus();else{var e=y;pe(!0),w.selection.setAfter(e.get(0)),w.selection.restore()}return!1}},!0),w.events.on("toolbar.focusEditor",function(){if(y)return!1},!0),w.events.on("window.cut window.copy",function(e){if(y&&w.popups.isVisible("image.edit")&&!w.popups.get("image.edit").find(":focus").length){var t=ye();Ae()?(t.before(St.START_MARKER),t.after(St.END_MARKER),w.selection.restore(),w.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(_e(),w.paste.saveCopiedText(y.get(0).outerHTML,y.attr("alt"))),"copy"==e.type?setTimeout(function(){N(y)}):(pe(!0),w.undo.saveStep(),setTimeout(function(){w.undo.saveStep()},0))}},!0),w.browser.msie&&w.events.on("keydown",function(e){if(!w.selection.isCollapsed()||!y)return!0;var t=e.which;t==St.KEYCODE.C&&w.keys.ctrlKey(e)?w.events.trigger("window.copy"):t==St.KEYCODE.X&&w.keys.ctrlKey(e)&&w.events.trigger("window.cut")}),w.events.$on(A(w.o_win),"keydown",function(e){if(w.opts.pluginsEnabled.includes("filestack")&&w.opts.iframe){var t=document.getElementsByClassName("fs-transforms-container"),a=!1;if(t&&t.length){var n,r=He(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.childNodes&&i.childNodes.length&&(a=!0)}}catch(s){r.e(s)}finally{r.f()}}a&&(y=null)}var o=e.which;if(y&&o==St.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),w.events.$on(w.$win,"keydown",function(e){var t=e.which;y&&y.hasClass("fr-uploading")&&t==St.KEYCODE.ESC&&y.trigger("abortUpload")}),w.events.on("destroy",function(){y&&y.hasClass("fr-uploading")&&y.trigger("abortUpload")}),w.events.on("paste.before",ce),w.events.on("paste.beforeCleanup",de),w.events.on("paste.after",oe),w.events.on("html.set",v),w.events.on("html.inserted",v),v(),w.events.on("destroy",function(){s=[]}),w.events.on("html.processGet",re),w.opts.imageOutputSize&&w.events.on("html.beforeGet",function(){i=w.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=parseFloat(A(i[e]).css("padding-left"))+parseFloat(A(i[e]).css("padding-right")),a=A(i[e]).width()-t,n=i[e].style.width||a,r=i[e].style.height||A(i[e]).height();n&&i[e].setAttribute("width","".concat(n).replace(/px/,"")),r&&i[e].setAttribute("height","".concat(r).replace(/px/,""))}}),w.opts.iframe&&w.events.on("image.loaded",w.size.syncIframe),w.$wp&&(b(),w.events.on("contentChanged",b)),w.events.$on(A(w.o_win),"orientationchange.image",function(){setTimeout(function(){y&&N(y)},100)}),O(!0),j(!0),ee(!0),Z(!0),w.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return ae(e),!1})},showInsertPopup:function ke(){var e=w.$tb.find('.fr-command[data-cmd="insertImage"]'),t=w.popups.get("image.insert");if(t||(t=j()),M(),!t.hasClass("fr-active"))if(w.popups.refresh("image.insert"),w.popups.setContainer("image.insert",w.$tb),e.isVisible()){var a=w.button.getPosition(e),n=a.left,r=a.top;w.popups.show("image.insert",n,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("image.insert")},showLayer:function Se(e){var t,a,n=w.popups.get("image.insert");if(y||w.opts.toolbarInline){if(y){var r=ye(),i=0;Ae()&&(r=r.find(".fr-img-wrap"),i=y.outerWidth()/2),a=r.offset().top+r.outerHeight(),t=r.offset().left+i}}else{var o=w.$tb.find('.fr-command[data-cmd="insertImage"]');t=o.offset().left,a=o.offset().top+(w.opts.toolbarBottom?10:o.outerHeight()-10)}!y&&w.opts.toolbarInline&&(a=n.offset().top-w.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("image.insert",t,a,y?y.outerHeight():0,Ae()),w.accessibility.focusPopup(n)},refreshUploadButton:function Re(e){var t=w.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Le(e){var t=w.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=w.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){F(),D(w.language.translate("Loading image"));var t=e.val().trim();if(w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy&&w.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],y):I(n)},a.onerror=function(){U(t,!0,[],y)},a.open("GET","".concat(w.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else U(t,!0,[],y);e.val(""),e.blur()}},align:function Ie(e){var t=ye();t.removeClass("fr-fir fr-fil"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,be(),e),_e(),S(),i(),w.selection.clear()},refreshAlign:function Oe(e){y&&e.find("> *").first().replaceWith(w.icon.create("image-align-".concat(ve())))},refreshAlignOnShow:function Fe(e,t){y&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Me(e){var t=ye();t.removeClass("fr-dii fr-dib"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ve()),_e(),S(),i(),w.selection.clear()},refreshDisplayOnShow:function De(e,t){y&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:Ee,back:function e(){y?(w.events.disableBlur(),A(".fr-popup input:focus").blur(),N(y)):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("image.insert"),w.toolbar.showInline())},get:we,getEl:ye,insert:U,showProgressBar:F,remove:ae,hideProgressBar:M,applyStyle:function Pe(e,t,a){if(void 0===t&&(t=w.opts.imageStyles),void 0===a&&(a=w.opts.imageMultipleStyles),!y)return!1;var n=ye();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),n.removeClass(r.join(" "))}"object"==Rt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):(n.toggleClass(e),Ae()&&y.hasClass(e)&&y.removeClass(e)),N(y)},showAltPopup:X,showSizePopup:J,setAlt:function Ne(e){if(y){var t=w.popups.get("image.alt");y.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),N(y)}},setSize:function Be(e,t){if(y){var a=w.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;y.removeAttr("width").removeAttr("height"),e.match(n)?y.css("width",e):y.css("width",""),t.match(n)?y.css("height",t):y.css("height",""),Ae()&&(y.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?y.parents(".fr-img-caption").css("width",e):y.parents(".fr-img-caption").css("width",""),t.match(n)?y.parents(".fr-img-caption").css("height",t):y.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),N(y)}},toggleCaption:function Ue(){var e;if(y&&!Ae()){(e=y).parent().is("a")&&(e=y.parent());var t,a,n=y.parents("ul")&&0<y.parents("ul").length?y.parents("ul"):y.parents("ol")&&0<y.parents("ol").length?y.parents("ol"):[];if(0<n.length){var r=n.find("li").length,i=y.parents("li"),o=document.createElement("li");r-1===i.index()&&(n.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=w.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":y.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(w.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+y.attr("class")+'" style="'+(w.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),y.after('<span class="fr-inner"'.concat(w.browser.mozilla?"":' contenteditable="true"',">").concat(St.START_MARKER).concat(w.language.translate("Image Caption")).concat(St.END_MARKER,"</span>")),y.parents(".fr-img-caption").css("width",s);var l=y.parents(".fr-img-space-wrap").length;1==l?Ce(document.querySelector(".fr-img-space-wrap")):1<l&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),pe(!0),w.selection.restore()}else{if(e=ye(),y.insertBefore(e),null!==e[0].querySelector("a")){for(var c,d=e[0].querySelector("a"),f=document.createElement("a"),p=0,u=d.attributes,g=u.length;p<g;p++)c=u[p],f.setAttribute(c.nodeName,c.nodeValue);y.wrap(f)}y.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove();var h=y.parents(".fr-img-space-wrap").length;1==h?Ce(document.querySelector(".fr-img-space-wrap")):1<h&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),N(y)}},hasCaption:Ae,exitEdit:pe,edit:N}},St.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),St.RegisterShortcut(St.KEYCODE.P,"insertImage",null,"P"),St.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),St.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),St.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),St.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),St.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),St.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),St.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),St.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),St.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),St.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),St.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),St.RegisterCommand("imageAlign",{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=St.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),St.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),St.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),St.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),St.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),St.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.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"))}}),St.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),St.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),St.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var n=t[a];"object"==Rt(n)&&(n=n.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(n),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,n=this.image.getEl();n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),St.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),St.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),St.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),St.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),St.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),St.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),St.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),St.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}}),Object.assign(St.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),St.PLUGINS.imageManager=function(s){var l,c,i,o,d,f,p,u,g,h,m,v=s.$,b="image_manager",e=10,E=11,_=12,w=13,y=14,A=15,a=21,n=22,r={};function C(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function T(){d.empty();for(var e=0;e<m;e++)d.append('<div class="fr-list-column"></div>')}function k(){if(g<p.length&&i[0].scrollTop>=i[0].scrollHeight-s.opts.imageManagerScrollOffset-i.outerHeight()){u++;for(var e=s.opts.imageManagerPageSize*(u-1);e<Math.min(p.length,s.opts.imageManagerPageSize*u);e++)t(p[e])}}function t(r){var i=new Image,o=v(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+h++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");x(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var a=v(document.createElement("img"));if(r.thumb)a.attr("src",r.thumb);else{if(M(y,r),!r.url)return M(A,r),!1;a.attr("src",r.url)}if(r.url&&a.attr("data-url",r.url),r.tag)if(c.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),c.find(".fr-modal-tags").show(),0<=r.tag.indexOf(",")){for(var e=r.tag.split(","),t=0;t<e.length;t++)e[t]=e[t].trim(),0===f.find('a[title="'.concat(e[t],'"]')).length&&f.append('<a role="button" title="'.concat(e[t],'">').concat(e[t],"</a>"));a.attr("data-tag",e.join())}else 0===f.find('a[title="'.concat(r.tag.trim(),'"]')).length&&f.append('<a role="button" title="'.concat(r.tag.trim(),'">').concat(r.tag.trim(),"</a>")),a.attr("data-tag",r.tag.trim());for(var n in r.name&&a.attr("alt",r.name),r)r.hasOwnProperty(n)&&"thumb"!==n&&"url"!==n&&"tag"!==n&&a.attr("data-".concat(n),r[n]);o.append(a).append(v(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(v(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),f.find(".fr-selected-tag").each(function(e,t){B(a,t.text)||o.hide()}),a.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),g++,L(R(parseInt(a.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),x(!1),g%s.opts.imageManagerPageSize==0&&k()}),s.events.trigger("imageManager.imageLoaded",[a])},i.onerror=function(){g++,o.remove(),L(R(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),M(e,r),g%s.opts.imageManagerPageSize==0&&k()},i.src=r.thumb||r.url,S().append(o)}function S(){var n,r;return d.find(".fr-list-column").each(function(e,t){var a=v(t);0===e?(r=a.outerHeight(),n=a):a.outerHeight()<r&&(r=a.outerHeight(),n=a)}),n}function R(e){e===undefined&&(e=0);for(var t=[],a=h-1;e<=a;a--){var n=d.find(".fr-image-".concat(a));n.length&&(t.push(n),v(document.createElement("div")).attr("id","fr-image-hidden-container").append(n),d.find(".fr-image-".concat(a)).remove())}return t}function L(e){for(var t=e.length-1;0<=t;t--)S().append(e[t])}function x(e){if(e===undefined&&(e=!0),!l.isVisible())return!0;var t=C();if(t!==m){m=t;var a=R();T(),L(a)}s.modals.resize(b),e&&k()}function I(e){for(var t,a=e[0].attributes,n=a.length,r={};n--;)a[n]&&"src"!==(t=a[n].name)&&(r[t]=a[n].value);return r}function O(e){var t=v(e.currentTarget).siblings("img"),a=l.data("instance")||s,n=l.data("current-image");if(s.modals.hide(b),a.image.showProgressBar(),n)n.data("fr-old-src",n.attr("src")),n.trigger("click");else{a.events.focus(!0),a.selection.restore();var r=a.position.getBoundingRect(),i=r.left+r.width/2+v(s.doc).scrollLeft(),o=r.top+r.height+v(s.doc).scrollTop();a.popups.setContainer("image.insert",s.$sc),a.popups.show("image.insert",i,o)}a.image.insert(t.data("url"),!1,I(t),n)}function F(e){var i=v(e.currentTarget).siblings("img"),t=s.language.translate("Are you sure? Image will be deleted.");confirm(t)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[i])&&(i.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:i.attr("src")},I(i)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){s.events.trigger("imageManager.imageDeleted",[e]);var n=R(parseInt(i.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);i.parent().remove(),L(n),function r(){l.find("#fr-modal-tags > a").each(function(){0===l.find('#fr-image-list [data-tag*="'.concat(v(this).text(),'"]')).length&&v(this).removeClass("fr-selected-tag").hide()}),P()}(),x(!0)},fail:function(e){M(a,e.response||e.responseText)}})):M(n))}function M(e,t){10<=e&&e<20?o.hide():20<=e&&e<30&&v(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:r[e]},t])}function D(){var e=c.find(".fr-modal-head-line").outerHeight(),t=f.outerHeight();c.toggleClass("fr-show-tags"),c.hasClass("fr-show-tags")?(c.css("height",e+t),i.css("marginTop",e+t),f.find("a").css("opacity",1)):(c.css("height",e),i.css("marginTop",e),f.find("a").css("opacity",0))}function P(){var e=f.find(".fr-selected-tag");0<e.length?(d.find("img").parents().show(),e.each(function(e,n){d.find("img").each(function(e,t){var a=v(t);B(a,n.text)||a.parent().hide()})})):d.find("img").parents().show(),L(R()),k()}function N(e){e.preventDefault();var t=v(e.currentTarget);t.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&t.siblings("a").removeClass("fr-selected-tag"),P()}function B(e,t){for(var a=(e.attr("data-tag")||"").split(","),n=0;n<a.length;n++)if(a[n]===t)return!0;return!1}return r[e]="Image cannot be loaded from the passed link.",r[E]="Error during load images request.",r[_]="Missing imageManagerLoadURL option.",r[w]="Parsing load response failed.",r[y]="Missing image thumb.",r[A]="Missing image URL.",r[a]="Error during delete image request.",r[n]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function U(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function H(){if(!l){var e,t='<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid,'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat(St.SVG.tags,'"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"),'</h4></div>\n <div class="fr-modal-tags" id="fr-modal-tags">');e=s.opts.imageManagerPreloader?'<img class="fr-preloader" id="fr-preloader" alt="'.concat(s.language.translate("Loading"),'.." src="').concat(s.opts.imageManagerPreloader,'" style="display: none;">'):'<span class="fr-preloader" id="fr-preloader" style="display: none;">'.concat(s.language.translate("Loading"),"</span>"),e+='<div class="fr-image-list" id="fr-image-list"></div>';var a=s.modals.create(b,t,e);l=a.$modal,c=a.$head,i=a.$body}l.data("current-image",s.image.get()),s.modals.show(b),o||function n(){o=l.find("#fr-preloader"),d=l.find("#fr-image-list"),f=l.find("#fr-modal-tags"),m=C(),T(),c.css("height",c.find(".fr-modal-head-line").outerHeight()),s.events.$on(v(s.o_win),"resize",function(){x(!!p)}),s.events.bindClick(d,".fr-insert-img",O),s.events.bindClick(d,".fr-delete-img",F),s.helpers.isMobile()&&(s.events.bindClick(d,"div.fr-image-container",function(e){l.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),v(e.currentTarget).addClass("fr-mobile-selected")}),l.on(s._mousedown,function(){l.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),l.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),l.on(s._mousedown,"*",function(){s.events.disableBlur()}),i.on("scroll",k),s.events.bindClick(l,"button#fr-modal-more-".concat(s.sid),D),s.events.bindClick(f,"a",N)}(),function r(){o.show(),d.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?v(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){s.events.trigger("imageManager.imagesLoaded",[e]),function n(e,t){try{d.find(".fr-list-column").empty(),h=g=u=0,p=JSON.parse(e),k()}catch(a){M(w,t)}}(e,a.response),o.hide()},fail:function(e){M(E,e.response||e.responseText)}}):M(_)}()},hide:function $(){s.modals.hide(b)}}},!St.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");function n(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `\xab\xab\xab` and `\xbb\xbb\xbb` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var a={};for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n].defaultValue);return a}St.DEFAULTS.imageInsertButtons.push("imageManager"),St.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),St.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),St.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),St.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"}),Object.assign(St.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),St.PLUGINS.inlineClass=function(a){var n=a.$;return{apply:function t(e){a.format.toggle("span",{"class":e})},refreshOnShow:function r(e,t){t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=a.format.is("span",{"class":e});n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}},St.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineClasses;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'.concat(a,'" title="').concat(t[a],'">').concat(t[a],"</a></li>"));return e+="</ul>"},callback:function(e,t){this.inlineClass.apply(t)},refreshOnShow:function(e,t){this.inlineClass.refreshOnShow(e,t)},plugin:"inlineClass"}),St.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"}),Object.assign(St.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),St.PLUGINS.inlineStyle=function(r){return{apply:function i(e){for(var t=e.split(";"),a=0;a<t.length;a++){var n=t[a].split(":");t[a].length&&2==n.length&&r.format.applyStyle(n[0].trim(),n[1].trim())}}}},St.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var a in t)if(t.hasOwnProperty(a)){var n=t[a]+(-1===t[a].indexOf("display:block;")?" display:block;":"");e+='<li role="presentation"><span style="'.concat(n,'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="').concat(t[a],'" title="').concat(this.language.translate(a),'">').concat(this.language.translate(a),"</a></span></li>")}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),St.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"}),Object.assign(St.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),St.PLUGINS.lineBreaker=function(g){var h,t,r,m=g.$;function l(e,t){var a,n,r,i,o,s,l,c;if(null==e)o=(i=t.parent()).offset().top,a=(l=t.offset().top)-Math.min((l-o)/2,g.opts.lineBreakerOffset),r=i.outerWidth(),n=i.offset().left;else if(null==t)(s=(i=e.parent()).offset().top+i.outerHeight())<(c=e.offset().top+e.outerHeight())&&(s=(i=m(i).parent()).offset().top+i.outerHeight()),a=c+Math.min(Math.abs(s-c)/2,g.opts.lineBreakerOffset),r=i.outerWidth(),n=i.offset().left;else{i=e.parent();var d=e.offset().top+e.height(),f=t.offset().top;if(f<d)return!1;a=(d+f)/2,r=i.outerWidth(),n=i.offset().left}if(g.opts.iframe){var p=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),u=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().left-g.helpers.scrollLeft()+u,a+=g.$iframe.offset().top-g.helpers.scrollTop()+p}g.$box.append(h),h.css("top",a-g.win.pageYOffset),h.css("left",n-g.win.pageXOffset),h.css("width",r),h.data("tag1",e),h.data("tag2",t),h.addClass("fr-visible").data("instance",g)}function c(e){if(e){var t=m(e);if(0===g.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(g.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(g.opts.lineBreakerTags.join(",")).length)return e=t.parents(g.opts.lineBreakerTags.join(",")).get(0),0!==g.$el.find(m(e)).length&&m(e).is(g.opts.lineBreakerTags.join(","))?m(e):null}return null}function i(e,t){var a=g.doc.elementFromPoint(e,t);return a&&!m(a).closest(".fr-line-breaker").length&&!g.node.isElement(a)&&a!=g.$wp.get(0)&&function n(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==g.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==g.$wp.get(0),t.inFroalaWrapper}(a)?a:null}function o(e,t,a){for(var n=a,r=null;n<=g.opts.lineBreakerOffset&&!r;)(r=i(e,t-n))||(r=i(e,t+n)),n+=a;return r}function d(e,t,a){for(var n=null,r=100;!n&&e>g.$box.offset().left&&e<g.$box.offset().left+g.$box.outerWidth()&&0<r;)(n=i(e,t))||(n=o(e,t,5)),"left"==a?e-=g.opts.lineBreakerHorizontalOffset:e+=g.opts.lineBreakerHorizontalOffset,r-=g.opts.lineBreakerHorizontalOffset;return n}function a(e){var t=r=null,a=null,n=g.doc.elementFromPoint(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset);(t=n&&("HTML"==n.tagName||"BODY"==n.tagName||g.node.isElement(n)||0<=(n.getAttribute("class")||"").indexOf("fr-line-breaker"))?((a=o(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset,1))||(a=d(e.pageX-g.win.pageXOffset-g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"left")),a||(a=d(e.pageX-g.win.pageXOffset+g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"right")),c(a)):c(n))?function s(e,t){var a,n,r=e.offset().top,i=e.offset().top+e.outerHeight();if(Math.abs(i-t)<=g.opts.lineBreakerOffset||Math.abs(t-r)<=g.opts.lineBreakerOffset)if(Math.abs(i-t)<Math.abs(t-r)){var o=null;for((n=e.get(0)).nextSibling&&(o=n.nextSibling.offsetParent?n.nextSibling:null);o&&o.nodeType==Node.TEXT_NODE&&0===o.textContent.length;)o=o.nextSibling;if(!o)return l(e,null),!0;if(a=c(o))return l(e,a),!0}else{if(!(n=e.get(0)).previousSibling)return l(null,e),!0;if(a=c(n.previousSibling))return l(a,e),!0}h.removeClass("fr-visible").removeData("instance")}(t,e.pageY):g.core.sameInstance(h)&&h.removeClass("fr-visible").removeData("instance")}function n(e){return!(h.hasClass("fr-visible")&&!g.core.sameInstance(h))&&(g.popups.areVisible()||g.el.querySelector(".fr-selected-cell")?(h.removeClass("fr-visible"),!0):void(!1!==t||g.edit.isDisabled()||(r&&clearTimeout(r),r=setTimeout(a,30,e))))}function s(){r&&clearTimeout(r),h&&h.hasClass("fr-visible")&&h.removeClass("fr-visible").removeData("instance")}var f=function f(){t=!0,s()},p=function p(){t=!1};function u(e){e.preventDefault();var t=h.data("instance")||g;h.removeClass("fr-visible").removeData("instance");var a=h.data("tag1"),n=h.data("tag2"),r=g.html.defaultTag();if(null==a)if(g.opts.keepTextFormatOnTable&&n.children().get(0)!=undefined&&"TBODY"==n.children().get(0).tagName){var i=n.find("span"),o=null!=i[i.length-1]?i[i.length-1].getAttribute("style"):null,s=null!=o?"<"+i[i.length-1].nodeName.toLowerCase()+' style="'+o+'">':"<"+n.parent().get(0).nodeName.toLowerCase()+">",l=null!=o?"</"+i[i.length-1].nodeName.toLowerCase()+">":"</"+n.parent().get(0).nodeName.toLowerCase()+">";r?n.before("<".concat(r,">").concat(s).concat(St.MARKERS,"<br>").concat(l,"</").concat(r,">")):n.before("".concat(s).concat(St.MARKERS,"<br>").concat(l))}else r&&"TD"!=n.parent().get(0).tagName&&0===n.parents(r).length?n.before("<".concat(r,">").concat(St.MARKERS,"<br></").concat(r,">")):n.before("".concat(St.MARKERS,"<br>"));else if(g.opts.keepTextFormatOnTable&&a.children().get(0)!=undefined&&"TBODY"==a.children().get(0).tagName){var c=a.find("span"),d=null!=c[c.length-1]?c[c.length-1].getAttribute("style"):null,f=null!=d?"<"+c[c.length-1].nodeName.toLowerCase()+' style="'+d+'">':"<"+a.parent().get(0).nodeName.toLowerCase()+">",p=null!=d?"</"+c[c.length-1].nodeName.toLowerCase()+">":"</"+a.parent().get(0).nodeName.toLowerCase()+">";r?a.after("<".concat(r,">").concat(f).concat(St.MARKERS,"<br>").concat(p,"</").concat(r,">")):a.after("".concat(f).concat(St.MARKERS,"<br>").concat(p))}else r&&"TD"!=a.parent().get(0).tagName&&0===a.parents(r).length?a.after("<".concat(r,">").concat(St.MARKERS,"<br></").concat(r,">")):a.after("".concat(St.MARKERS,"<br>"));t.selection.restore(),g.toolbar.enable()}return{_init:function v(){if(!g.$wp)return!1;!function e(){g.shared.$line_breaker||(g.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(g.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),h=g.shared.$line_breaker,g.events.on("shared.destroy",function(){h.html("").removeData().remove(),h=null},!0),g.events.on("destroy",function(){h.removeData("instance").removeClass("fr-visible"),m("body").first().append(h),clearTimeout(r)},!0),g.events.$on(h,"mousemove",function(e){e.stopPropagation()},!0),g.events.bindClick(h,"a",u)}(),t=!1,g.events.$on(g.$win,"mousemove",n),g.events.$on(m(g.win),"scroll",s),g.events.on("popups.show.table.edit",s),g.events.on("commands.after",s),g.events.$on(m(g.win),"mousedown",f),g.events.$on(m(g.win),"mouseup",p)}}},Object.assign(St.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),St.PLUGINS.lineHeight=function(n){var s=n.$;return{_init:function e(){},apply:function r(e){n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var t=n.selection.blocks();t.length&&s(t[0]).parent().is("td")&&n.format.applyStyle("line-height",e.toString()),n.selection.save();for(var a=0;a<t.length;a++)s(t[a]).css("line-height",e),n.opts.enter!==St.ENTER_BR||t.length&&s(t[0]).parent().is("td")||(s(t[a]).hasClass("fr-temp-div")&&s(t[a]).removeClass("fr-temp-div"),""===s(t[a]).attr("class")&&s(t[a]).removeAttr("class")),""===s(t[a]).attr("style")&&s(t[a]).removeAttr("style");n.html.unwrap(),n.selection.restore()},refreshOnShow:function i(e,t){var a=n.selection.blocks();if(a.length){var o=s(a[0]);t.find(".fr-command").each(function(){var e=s(this).data("param1"),t=o.attr("style"),a=0<=(t||"").indexOf("line-height: "+e+";");if(t){var n=t.substring(t.indexOf("line-height")),r=n.substr(0,n.indexOf(";")),i=r&&r.split(":")[1];i&&i.length||"Default"!==o.text()||(a=!0)}t&&-1!==t.indexOf("line-height")||""!==e||(a=!0),s(this).toggleClass("fr-active",a).attr("aria-selected",a)})}}}},St.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command '.concat(a,'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="').concat(t[a],'" title="').concat(this.language.translate(a),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),St.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"}),Object.assign(St.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(St.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),St.PLUGINS.link=function(m){var v=m.$;function b(){var e=m.image?m.image.get():null;if(e||!m.$wp)return"A"==m.el.tagName?m.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=m.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(m.el)||!m.el.contains(t)||m.el==t)&&(t=null)}catch(o){t=null}if(t&&"A"===t.tagName)return t;var a,n,r=m.selection.element(),i=m.selection.endElement();"A"==r.tagName||m.node.isElement(r)||(r=m.opts.iframe&&null!==(a=m.markdown)&&void 0!==a&&a.isEnabled?null:v(r).parentsUntil(m.$el,"a").first().get(0));"A"==i.tagName||m.node.isElement(i)||(i=m.opts.iframe&&null!==(n=m.markdown)&&void 0!==n&&n.isEnabled?null:v(i).parentsUntil(m.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(m.el)||!m.el.contains(i)||m.el==i)&&(i=null)}catch(o){i=null}try{r&&(r.contains&&r.contains(m.el)||!m.el.contains(r)||m.el==r)&&(r=null)}catch(o){r=null}return i&&i==r&&"A"==i.tagName?(m.browser.msie||m.helpers.isMobile())&&(m.selection.info(r).atEnd||m.selection.info(r).atStart)?null:r:null}function E(){var e,t,a,n,r=m.image?m.image.get():null,i=[];if(r)"A"==r.get(0).parentNode.tagName&&i.push(r.get(0).parentNode);else if(m.win.getSelection){var o=m.win.getSelection();if(o.getRangeAt&&o.rangeCount){n=m.doc.createRange();for(var s=0;s<o.rangeCount;++s)if((t=(e=o.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())i.push(t);else{a=t.getElementsByTagName("a");for(var l=0;l<a.length;++l)n.selectNodeContents(a[l]),n.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<n.compareBoundaryPoints(e.START_TO_END,e)&&i.push(a[l])}}}else if(m.doc.selection&&"Control"!=m.doc.selection.type)if("a"==(t=(e=m.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())i.push(t);else{a=t.getElementsByTagName("a"),n=m.doc.body.createTextRange();for(var c=0;c<a.length;++c)n.moveToElementText(a[c]),-1<n.compareEndPoints("StartToEnd",e)&&n.compareEndPoints("EndToStart",e)<1&&i.push(a[c])}return i}function _(r){if(m.core.hasFocus()||m.opts.iframe&&(!document.hasFocus||document.hasFocus())){if(i(),r&&"keyup"===r.type&&(r.altKey||r.which==St.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=b(),t=m.image?m.image.get():null;if(e&&!t){if(m.image){var a=m.node.contents(e);if(1==a.length&&"IMG"==a[0].tagName){var n=m.selection.ranges(0);return 0===n.startOffset&&0===n.endOffset?v(e).before(St.INVISIBLE_SPACE+St.MARKERS):v(e).after(St.INVISIBLE_SPACE+St.MARKERS),m.selection.restore(),!1}}r&&r.stopPropagation(),o(e)}}},m.helpers.isIOS()?100:0)}}function o(e){var t=m.popups.get("link.edit");t||(t=function i(){var e="";1<=m.opts.linkEditButtons.length&&("A"==m.el.tagName&&0<=m.opts.linkEditButtons.indexOf("linkRemove")&&m.opts.linkEditButtons.splice(m.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(m.button.buildList(m.opts.linkEditButtons),"</div>"));var t={buttons:e},a=m.popups.create("link.edit",t);m.$wp&&m.events.$on(m.$wp,"scroll.link-edit",function(){b()&&m.popups.isVisible("link.edit")&&o(b())});return a}());var a=v(e);m.popups.isVisible("link.edit")||m.popups.refresh("link.edit"),m.popups.setContainer("link.edit",m.$sc);var n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();m.popups.show("link.edit",n,r,a.outerHeight(),!0)}function i(){m.popups.hide("link.edit")}function l(){var e=m.popups.get("link.insert"),t=b();if(t){var a,n,r=v(t),i=e.find('input.fr-link-attr[type="text"]'),o=e.find('input.fr-link-attr[type="checkbox"]');for(a=0;a<i.length;a++)(n=v(i[a])).val(r.attr(n.attr("name")||""));for(o.attr("checked",!1),a=0;a<o.length;a++)n=v(o[a]),r.attr(n.attr("name"))==n.data("checked")&&n.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(m.selection.text());e.find("input.fr-link-attr").trigger("change"),(m.image?m.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return m.popups.onRefresh("link.insert",l),!0;var t="";1<=m.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(m.button.buildList(m.opts.linkInsertButtons),"</div>"));var a="",n=0;for(var r in a='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(m.id,'">'),a+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(m.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate("URL"),'" tabIndex="').concat(++n,'"></div>'),m.opts.linkText&&(a+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(m.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate("Text"),'" tabIndex="').concat(++n,'"></div>')),m.opts.linkAttributes)if(m.opts.linkAttributes.hasOwnProperty(r)){var i=m.opts.linkAttributes[r];a+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(m.language.translate(i),'" tabIndex="').concat(++n,'"></div>')}m.opts.linkAlwaysBlank||(a+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(m.id,'" tabIndex="').concat(++n,'"><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(m.id,'">').concat(m.language.translate("Open in new tab"),"</label></div>"));var o={buttons:t,input_layer:a+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++n,'" type="button">').concat(m.language.translate("Insert"),"</button></div></div>")},s=m.popups.create("link.insert",o);return m.$wp&&m.events.$on(m.$wp,"scroll.link-insert",function(){(m.image?m.image.get():null)&&m.popups.isVisible("link.insert")&&f(),m.popups.isVisible("link.insert")&&d()}),s}function c(e,t,a){if(m.opts.trackChangesEnabled){if(m.edit.on(),m.events.focus(!0),m.undo.saveStep(),m.markers.insert(),m.html.wrap(),!m.$el.find(".fr-marker").length)return void m.popups.hide("link.insert");m.markers.remove()}if(void 0===a&&(a={}),!1===m.events.trigger("link.beforeInsert",[e,t,a]))return!1;var n=m.image?m.image.get():null;n||"A"==m.el.tagName?"A"==m.el.tagName&&m.$el.focus():(m.selection.restore(),m.popups.hide("link.insert"));var r=e;m.opts.linkConvertEmailAddress&&m.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===m.opts.linkAutoPrefix||new RegExp("^("+St.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(",".",'"',"\\"].indexOf((e||"")[0])<0&&(e=m.opts.linkAutoPrefix+e),e=m.helpers.sanitizeURL(e),m.opts.linkAlwaysBlank&&(a.target="_blank"),m.opts.linkAlwaysNoFollow&&(a.rel="nofollow"),m.helpers.isEmail(r)&&(a.target=null,a.rel=null),"_blank"==a.target?(m.opts.linkNoOpener&&(a.rel?a.rel+=" noopener":a.rel="noopener"),m.opts.linkNoReferrer&&(a.rel?a.rel+=" noreferrer":a.rel="noreferrer")):null==a.target&&(a.rel?a.rel=a.rel.replace(/noopener/,"").replace(/noreferrer/,""):a.rel=null),t=t||"",e===m.opts.linkAutoPrefix)return m.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),m.events.trigger("link.bad",[r]),!1;var i,o=b();if(o){if((i=v(o)).attr("href",e),0<t.length&&i.text()!=t&&!n){if(m.opts.trackChangesEnabled){var s=v(i.get(0).outerHTML);s.insertBefore(i.parent());var l=m.track_changes.wrapLinkInTracking(s,m.track_changes.getPendingChanges().length-1),c=m.track_changes.wrapInDelete(l);i.parent().append(c)}for(var d=i.get(0);1===d.childNodes.length&&d.childNodes[0].nodeType==Node.ELEMENT_NODE;)d=d.childNodes[0];v(d).text(t)}for(var f in n||i.prepend(St.START_MARKER).append(St.END_MARKER),a)a[f]?i.attr(f,a[f]):i.removeAttr(f);n||m.selection.restore()}else{n?(n.wrap('<a href="'.concat(e,'"></a>')),m.image.hasCaption()&&n.parent().append(n.parents(".fr-img-caption").find(".fr-inner"))):(m.format.remove("a"),m.selection.isCollapsed()?(t=0===t.length?r:t,m.html.insert('<a href="'.concat(e,'">').concat(St.START_MARKER).concat(t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")).concat(St.END_MARKER,"</a>")),m.selection.restore()):0<t.length&&t!=m.selection.text().replace(/\n/g,"")?(m.selection.remove(),m.html.insert('<a href="'.concat(e,'">').concat(St.START_MARKER).concat(t.replace(/&/g,"&amp;")).concat(St.END_MARKER,"</a>")),m.selection.restore()):(!function h(){if(!m.selection.isCollapsed()){m.selection.save();for(var e=m.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=v(e.pop());t.removeClass("fr-unprocessed");var a=m.node.deepestParent(t.get(0));if(a){for(var n=t.get(0),r="",i="";n=n.parentNode,m.node.isBlock(n)||(r+=m.node.closeTagString(n),i=m.node.openTagString(n)+i),n!=a;);var o=m.node.openTagString(t.get(0))+t.html()+m.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=a.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+o+i)).replace(i+r,""),a.outerHTML=s}e=m.$el.find(".fr-marker.fr-unprocessed").toArray()}m.html.cleanEmptyTags(),m.selection.restore()}}(),m.format.apply("a",{href:e})));for(var p=E(),u=0;u<p.length;u++)(i=v(p[u])).attr(a),i.removeAttr("_moz_dirty");1==p.length&&m.$wp&&!n&&(v(p[0]).prepend(St.START_MARKER).append(St.END_MARKER),m.selection.restore())}if(n){var g=m.popups.get("link.insert");g&&g.find("input:focus").blur(),m.image.edit(n)}else _()}function d(){i();var e=b();if(e){var t=m.popups.get("link.insert");t||(t=s()),m.popups.isVisible("link.insert")||(m.popups.refresh("link.insert"),m.selection.save(),m.helpers.isMobile()&&(m.events.disableBlur(),m.$el.blur(),m.events.enableBlur())),m.popups.setContainer("link.insert",m.$sc);var a=(m.image?m.image.get():null)||v(e),n=a.offset().left+a.outerWidth()/2,r=a.offset().top+a.outerHeight();m.popups.show("link.insert",n,r,a.outerHeight(),!0)}}function f(){var e=m.image?m.image.getEl():null;if(e){var t=m.popups.get("link.insert"),a=e.outerWidth()/2;m.image.hasCaption()&&(e=e.find(".fr-img-wrap"),v(e)&&v(e).find("img")&&(a=v(e).find("img").outerWidth()/2)),t||(t=s()),l(),m.popups.setContainer("link.insert",m.$sc);var n=e.offset().left+a,r=e.offset().top+e.outerHeight(),i=e.outerHeight();m.opts.iframe&&m.image.hasCaption()&&v(e)&&v(e).find("img")&&(i=v(e).find("img").outerHeight()),m.popups.show("link.insert",n,r,i,!0)}}return{_init:function e(){m.events.on("keyup",function(e){e.which!=St.KEYCODE.ESC&&_(e)}),m.events.on("window.mouseup",_),m.events.$on(m.$el,"click","a",function(e){m.edit.isDisabled()&&e.preventDefault()}),m.helpers.isMobile()&&m.events.$on(m.$doc,"selectionchange",_),s(!0),"A"==m.el.tagName&&m.$el.addClass("fr-view"),m.events.on("toolbar.esc",function(){if(m.popups.isVisible("link.edit"))return m.events.disableBlur(),m.events.focus(),!1},!0)},remove:function n(){var e=b(),t=m.image?m.image.get():null;if(!1===m.events.trigger("link.beforeRemove",[e]))return!1;if(t&&e)if(m.image.hasCaption()){t.addClass("img-link-caption"),v(e).replaceWith(v(e).html());var a=document.querySelectorAll("img.img-link-caption");m.image.edit(v(a[0])),v(a[0]).removeClass("img-link-caption")}else t.unwrap(),m.image.edit(t);else e&&(m.selection.save(),v(e).replaceWith(v(e).html()),m.selection.restore(),i())},showInsertPopup:function p(){var e=m.$tb.find('.fr-command[data-cmd="insertLink"]'),t=m.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(m.popups.refresh("link.insert"),m.popups.setContainer("link.insert",m.$tb||m.$sc),e.isVisible()){var a=m.button.getPosition(e),n=a.left,r=a.top;m.popups.show("link.insert",n,r,e.outerHeight())}else m.position.forSelection(t),m.popups.show("link.insert")},usePredefined:function u(e){var t,a,n=m.opts.linkList[e],r=m.popups.get("link.insert"),i=r.find('input.fr-link-attr[type="text"]'),o=r.find('input.fr-link-attr[type="checkbox"]');for(n.rel&&(r.rel=n.rel),a=0;a<i.length;a++)n[(t=v(i[a])).attr("name")]?(t.val(n[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(a=0;a<o.length;a++)(t=v(o[a])).attr("checked",t.data("checked")==n[t.attr("name")]);m.accessibility.focusPopup(r)},insertCallback:function g(){var e,t,a=m.popups.get("link.insert"),n=a.find('input.fr-link-attr[type="text"]'),r=a.find('input.fr-link-attr[type="checkbox"]'),i=(n.filter('[name="href"]').val()||"").trim(),o=m.opts.linkText?n.filter('[name="text"]').val():"",s={};for(t=0;t<n.length;t++)e=v(n[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=v(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;a.rel&&(s.rel=a.rel);var l=m.helpers.scrollTop();c(i,o,s),v(m.o_win).scrollTop(l)},insert:c,update:d,get:b,allSelected:E,back:function t(){m.image&&m.image.get()?m.image.back():(m.events.disableBlur(),m.selection.restore(),m.events.enableBlur(),b()&&m.$wp?(m.selection.restore(),i(),_()):"A"==m.el.tagName?(m.$el.focus(),_()):(m.popups.hide("link.insert"),m.toolbar.showInline()))},imageLink:f,applyStyle:function h(e,t,a){void 0===a&&(a=m.opts.linkMultipleStyles),void 0===t&&(t=m.opts.linkStyles);var n=b();if(!n)return!1;if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),v(n).removeClass(r.join(" "))}v(n).toggleClass(e),_()}}},St.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),St.RegisterShortcut(St.KEYCODE.K,"insertLink",null,"K"),St.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),St.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),St.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),St.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),St.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),St.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),St.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),St.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||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"))},plugin:"link"}),St.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),St.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,a=0;a<t.length;a++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(a,'">').concat(t[a].displayText||t[a].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),St.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),St.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),St.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),St.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),St.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(a,'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,n=this.link.get();if(n){var r=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=r.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),Object.assign(St.DEFAULTS,{listAdvancedTypes:!0}),St.PLUGINS.lists=function(u){var g=u.$;function f(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function p(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function c(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var i=a.length-1;0<=i;i--){var o=g(a[i]);o.replaceWith("<".concat(t.toLowerCase()," ").concat(u.node.attributes(o.get(0)),">").concat(o.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=u.html.defaultTag(),r=null;e.length&&(a="rtl"==u.opts.direction||"rtl"==g(e[0]).css("direction")?"margin-right":"margin-left");for(var i=0;i<e.length;i++)if("TD"!=e[i].tagName&&"TH"!=e[i].tagName&&"LI"!=e[i].tagName){var o=u.helpers.getPX(g(e[i]).css(a))||0;(e[i].style.marginLeft=null)===r&&(r=o);var s=0<r?"<".concat(t,' style="').concat(a,": ").concat(r,'px ">'):"<".concat(t,">"),l="</".concat(t,">");for(o-=r;0<o/u.opts.indentMargin;)s+="</".concat(t,">"),l+=l,o-=u.opts.indentMargin;n&&e[i].tagName.toLowerCase()==n?g(e[i]).replaceWith("".concat(s,"<li").concat(u.node.attributes(e[i]),">").concat(g(e[i]).html(),"</li>").concat(l)):g(e[i]).wrap("".concat(s,"<li></li>").concat(l))}u.clean.lists()}function d(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--){if(g(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}if(g(e[a]).contains(e[t])){e.splice(a,1);break}}var n=[];for(t=0;t<e.length;t++){var r=g(e[t]),i=e[t].parentNode,o=r.attr("class");if(r.before(p(i.tagName)),"LI"==i.parentNode.tagName)r.before(p("LI")),r.after(f("LI"));else if("OL"==i.parentNode.tagName)r.before(p("OL")),r.after(f("OL"));else if("UL"==i.parentNode.tagName)r.before(p("UL")),r.after(f("UL"));else{var s="";o&&(s+=' class="'.concat(o,'"'));var l="rtl"==u.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";u.helpers.getPX(g(i).css(l))&&0<=(g(i).attr("style")||"").indexOf("".concat(l,":"))&&(s+=' style="'.concat(l,":").concat(u.helpers.getPX(g(i).css(l)),'px;"')),u.html.defaultTag()&&0===r.find(u.html.blockTagsQuery()).length&&r.wrapInner(u.html.defaultTag()+s),u.node.isEmpty(r.get(0),!0)||0!==r.find(u.html.blockTagsQuery()).length||("DIV"==i.parentNode.tagName&&u.html.defaultTag()?(r.prepend(f(u.html.defaultTag())),r.append(p(u.html.defaultTag()))):r.append("<br>")),r.append(f("LI")),r.prepend(p("LI"))}r.after(f(i.tagName)),"LI"==i.parentNode.tagName&&(i=i.parentNode.parentNode),n.indexOf(i)<0&&n.push(i)}for(t=0;t<n.length;t++){var c=g(n[t]),d=c.html();d=(d=d.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(u.node.openTagString(c.get(0))+d+u.node.closeTagString(c.get(0)))}u.$el.find("li:empty").remove(),u.$el.find("ul:empty, ol:empty").remove(),u.clean.lists(),u.$el.find("ul:empty, ol:empty").remove(),u.html.wrap()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=u.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("UL"!=a[0].parentNode.tagName&&"UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!a[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function o(e){for(u.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);u.clean.lists(),u.selection.restore()}(r)}else{if("UL"!=a[0].parentElement.tagName&&"OL"!=a[0].parentElement.tagName&&"LI"!=a[0].parentElement.tagName)return;if(u.node.isBlock(a[0])&&"LI"!==a[0].tagName&&0<g(a[0]).parentsUntil(u.$el,"LI").length&&(a[0]=a[0].parentElement,r=a[0].parentElement),!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return void function s(e){u.selection.save();for(var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");0<e.childNodes.length;)t.append(e.childNodes[0]);var a=document.createElement("li");t.append(a),e.append(t),u.clean.lists(),u.selection.restore()}(r)}for(var i=0;i<a.length;i++)"LI"==a[i].tagName?(t=!0,n.push(a[i])):"LI"==a[i].parentNode.tagName&&(t=!0,n.push(a[i].parentNode));t&&("indent"==e?function p(e){u.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=g(e[t]).find("> ul, > ol").last().get(0);if(n){var r=g(document.createElement("li"));if(n.childNodes.length)for(var i=n.childNodes[0].attributes,o=0;o<i.length;o++){var s=i[o];"style"===s.name&&(r[0].style.cssText+=s.value)}g(n).prepend(r);for(var l=u.node.contents(e[t])[0];l&&!u.node.isList(l);){var c=l.nextSibling;r.append(l),l=c}g(a).append(g(n)),g(e[t]).remove()}else{var d=g(a).find("> ul, > ol").last().get(0);if(d)g(d).append(g(e[t]));else{var f=g("<".concat(e[t].parentNode.tagName,">"));g(a).append(f),f.append(g(e[t]))}}}}u.clean.lists(),u.selection.restore()}(n):function l(e){u.selection.save(),d(e),u.selection.restore()}(n))}}return{_init:function t(){u.events.on("commands.after",e),u.events.on("keydown",function(e){if(e.which==St.KEYCODE.TAB){for(var t=u.selection.blocks(),a=[],n=0;n<t.length;n++)"LI"==t[n].tagName?a.push(t[n]):"LI"==t[n].parentNode.tagName&&a.push(t[n].parentNode);if(1<=a.length||a.length&&(u.selection.info(a[0]).atStart||u.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?u.commands.outdent():u.commands.indent(),!1}},!0)},format:function h(e,t){var a,n,r=1<(n=u.selection.blocks(!0)).length&&n[n.length-1],i=u.selection.ranges();if(r&&i.length&&u.node.isEmpty(r)&&!i[0].endOffset&&i[0].setEndAfter(r.firstChild,1),u.html.syncInputs(),u.selection.save(),u.browser.safari&&u.helpers.getSafariVersion()<17){var o=u.selection.ranges();if(i&&i[0].endContainer&&o&&o[0].endContainer&&!i[0].endContainer.isSameNode(o[0].endContainer)&&i[0].endContainer.previousSibling&&i[0].endContainer.previousSibling.isSameNode(o[0].endContainer)){var s=g(o[0].endContainer).find('.fr-marker[data-type="false"]');g(i[0].endContainer).append(s[0])}}for(u.html.wrap(!0,!0,!0,!0),u.selection.restore(),n=u.selection.blocks(!0),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(u.selection.save(),function l(e,t){for(var a=!0,n=0;n<e.length;n++){if("LI"!=e[n].tagName)return!1;e[n].parentNode.tagName!=t&&(a=!1)}return a}(n,e)?t||d(n):c(n,e),u.html.unwrap(),u.selection.restore(),t=t||"default"){for(n=u.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);for(a=0;a<n.length;a++)"LI"==n[a].tagName&&(g(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(g(n[a].parentNode).attr("style")||"").length&&g(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=g(u.selection.element());if(a.get(0)!=u.el){var n=a.get(0);(n="LI"!=n.tagName&&n.firstElementChild&&"LI"!=n.firstElementChild.tagName?a.parents("li").get(0):"LI"==n.tagName||n.firstElementChild?n.firstElementChild&&"LI"==n.firstElementChild.tagName?a.get(0).firstChild:a.get(0):a.parents("li").get(0))&&n.parentNode.tagName==t&&u.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},St.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),St.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),St.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),St.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),St.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),St.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"}),Object.assign(St.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),St.PLUGINS.paragraphFormat=function(u){var g=u.$;function h(e,t){var a=u.html.defaultTag();if(t&&t.toLowerCase()!=a)if(0<e.find("ul, ol").length){var n=g("<"+t+">");e.prepend(n);for(var r=u.node.contents(e.get(0))[0];r&&["UL","OL"].indexOf(r.tagName)<0;){var i=r.nextSibling;n.append(r),r=i}}else e.html("<"+t+">"+e.html()+"</"+t+">")}return{apply:function m(e){"N"==e&&(e=u.html.defaultTag()),u.selection.save(),u.html.wrap(!0,!0,!u.opts.paragraphFormat.BLOCKQUOTE,!0,!0),u.selection.restore();var t,a,n,r,i,o,s,l,c=u.selection.blocks();u.selection.save(),u.$el.find("pre").attr("skip",!0);for(var d=0;d<c.length;d++)if(c[d].tagName!=e&&!u.node.isList(c[d])){var f=g(c[d]);if("LI"==c[d].tagName)h(f,e);else if("LI"==c[d].parentNode.tagName&&c[d])o=f,s=e,l=u.html.defaultTag(),s&&s.toLowerCase()!=l||(s='div class="fr-temp-div"'),o.replaceWith(g("<"+s+">").html(o.html()));else if(0<=["TD","TH"].indexOf(c[d].parentNode.tagName))n=f,r=e,i=u.html.defaultTag(),r||(r='div class="fr-temp-div"'+(u.node.isEmpty(n.get(0),!0)?' data-empty="true"':"")),r.toLowerCase()==i?(u.node.isEmpty(n.get(0),!0)||n.append("<br/>"),n.replaceWith(n.html())):n.replaceWith(g("<"+r+">").html(n.html()));else{if("PRE"===e&&null===f[0].nextSibling){var p=g("<br>");f[0].after(p[0])}t=f,(a=e)||(a='div class="fr-temp-div"'+(u.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),("H1"==a||"H2"==a||"H3"==a||"H4"==a||"H5"==a)&&-1<u.node.attributes(t.get(0)).indexOf("font-size:")?t.replaceWith(g("<"+a+" "+u.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(g("<"+a+" "+u.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty"))}}u.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){g(this).prev().append("<br>"+g(this).html()),g(this).remove()}),u.$el.find("pre").removeAttr("skip"),u.html.unwrap(),u.selection.restore()},refreshOnShow:function o(e,t){var a=u.selection.blocks();if(a.length){var n=a[0],r="N",i=u.html.defaultTag();n.tagName.toLowerCase()!=i&&n!=u.el&&(r=n.tagName),t.find('.fr-command[data-param1="'+r+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function i(e){if(u.opts.paragraphFormatSelection){var t=u.selection.blocks();if(t.length){var a=t[0],n="N",r=u.html.defaultTag();a.tagName.toLowerCase()!=r&&a!=u.el&&(n=a.tagName),0<=["LI","TD","TH"].indexOf(n)&&(n="N"),e.find(">span").text(u.language.translate(u.opts.paragraphFormat[n]))}else e.find(">span").text(u.language.translate(u.opts.paragraphFormat.N))}}}},St.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(e){return e.opts.paragraphFormatSelection},defaultSelection:function(e){return e.language.translate(e.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var a in t)if(t.hasOwnProperty(a)){var n=this.shortcuts.get("paragraphFormat."+a);n=n?'<span class="fr-shortcut">'+n+"</span>":"",e+='<li role="presentation"><'+("N"==a?this.html.defaultTag()||"DIV":a)+' style="padding: 0 !important; margin: 0 !important; border: 0 !important; background-color: transparent !important; '+("PRE"==a||"N"==a?"font-size: 15px":"font-weight: bold !important; ")+("H1"==a?"font-size: 2em !important; ":"")+("H2"==a?"font-size: 1.5em !important; ":"")+("H3"==a?"font-size: 1.17em !important; ":"")+("H4"==a?"font-size: 15px !important;":"")+'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></"+("N"==a?this.html.defaultTag()||"DIV":a)+"></li>"}return e+="</ul>"},title:"Paragraph Format",callback:function(e,t){this.paragraphFormat.apply(t)},refresh:function(e){this.paragraphFormat.refresh(e)},refreshOnShow:function(e,t){this.paragraphFormat.refreshOnShow(e,t)},plugin:"paragraphFormat"}),St.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"}),Object.assign(St.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),St.PLUGINS.paragraphStyle=function(l){var c=l.$;return{_init:function e(){},apply:function d(e,t,a){void 0===t&&(t=l.opts.paragraphStyles),void 0===a&&(a=l.opts.paragraphMultipleStyles);var n="";a||((n=Object.keys(t)).splice(n.indexOf(e),1),n=n.join(" ")),l.selection.save(),l.html.wrap(!0,!0,!0,!0),l.selection.restore();var r=l.selection.blocks();l.selection.save();for(var i=c(r[0]).hasClass(e),o=0;o<r.length;o++)c(r[o]).removeClass(n).toggleClass(e,!i),c(r[o]).hasClass("fr-temp-div")&&c(r[o]).removeClass("fr-temp-div"),""===c(r[o]).attr("class")&&c(r[o]).removeAttr("class");if(1===r.length&&"fr-text-bordered"===e&&null===r[0].nextSibling){var s=c("<br>");r[0].after(s[0])}l.html.unwrap(),l.selection.restore()},refreshOnShow:function r(e,t){var a=l.selection.blocks();if(a.length){var n=c(a[0]);t.find(".fr-command").each(function(){var e=c(this).data("param1"),t=n.hasClass(e);c(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},St.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command '.concat(a,'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="').concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},title:"Paragraph Style",callback:function(e,t){this.paragraphStyle.apply(t)},refreshOnShow:function(e,t){this.paragraphStyle.refreshOnShow(e,t)},plugin:"paragraphStyle"}),St.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"}),Object.assign(St.DEFAULTS,{html2pdf:window.html2pdf}),St.PLUGINS.print=function(l){return{run:function e(){!function s(e){var t=l.html.get(),a=null;l.shared.print_iframe?a=l.shared.print_iframe:((a=document.createElement("iframe")).name="fr-print",a.style.position="fixed",a.style.top="0",a.style.left="-9999px",a.style.height="100%",a.style.width="0",a.style.overflow="hidden",a.style["z-index"]="2147483647",a.style.tabIndex="-1",l.events.on("shared.destroy",function(){a.remove()}),l.shared.print_iframe=a);try{document.body.removeChild(a)}catch(o){}document.body.appendChild(a);var n=function n(){e(),a.removeEventListener("load",n)};a.addEventListener("load",n);var r=a.contentWindow;r.document.open(),r.document.write("<!DOCTYPE html><html "+(l.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),r.document.write(e.outerHTML)});var i=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(i,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",r.document.write(t.outerHTML)}),r.document.write('</head><body style="height:auto;text-align: '+("rtl"==l.opts.direction?"right":"left")+"; direction: "+l.opts.direction+"; "+(l.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),r.document.write(t),r.document.write("</div></body></html>"),r.document.close()}(function(){setTimeout(function(){l.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),l.$win.get(0).focus(),l.events.disableBlur(),l.events.focus()},0)})},toPDF:function t(){l.opts.html2pdf&&(l.$el.css("text-align","left"),l.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(l.el).save(),setTimeout(function(){l.$el.css("text-align","")},100))}}},St.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),St.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),St.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),St.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}}),Object.assign(St.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),St.QUICK_INSERT_BUTTONS={},St.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),St.RegisterQuickInsertButton=function(e,t){St.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},St.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")},!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),St.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),St.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),St.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),St.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),St.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),St.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),St.PLUGINS.quickInsert=function(o){var s,l,c=o.$,d=!1;function a(e){var t,a,n;(t=e.offset().top-o.$box.offset().top,a=(o.$iframe&&o.$iframe.offset().left||0)+e.offset().left-e.position().left-4<s.outerWidth()?e.offset().left+s.outerWidth():0-s.outerWidth(),o.opts.enter!=St.ENTER_BR)?n=(s.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(St.INVISIBLE_SPACE).insertAfter(e),n=(s.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(o.opts.iframe){var r=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top"));t+=o.$iframe.offset().top+r}s.hasClass("fr-on")&&0<=t&&l.css("top",t-n),0<=t&&t-Math.abs(n)<=o.$box.outerHeight()-e.outerHeight()?(s.hasClass("fr-hidden")&&(s.hasClass("fr-on")&&f(),s.removeClass("fr-hidden")),s.css("top",t-n)):s.hasClass("fr-visible")&&!o.opts.toolbarInline&&(s.addClass("fr-hidden"),p()),s.css("left",a)}function r(e){o.markdown&&o.markdown.isEnabled()||(s||function t(){o.shared.$quick_insert||(o.shared.$quick_insert=c(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(o.language.translate("Quick Insert"),'">').concat(o.icon.create("quickInsert"),"</a>")));s=o.shared.$quick_insert,o.tooltip.bind(o.$box,".fr-quick-insert > a.fr-floating-btn"),o.events.on("destroy",function(){c("body").first().append(s.removeClass("fr-on")),l&&(p(),c("body").first().append(l.css("left",-9999).css("top",-9999)))},!0),o.events.on("shared.destroy",function(){s.html("").removeData().remove(),s=null,l&&(l.html("").removeData().remove(),l=null)},!0),o.events.on("commands.before",i),o.events.on("commands.after",function(){o.popups.areVisible()||n()}),o.events.bindClick(o.$box,".fr-quick-insert > a",f),o.events.bindClick(o.$box,".fr-qi-helper > a.fr-btn",function(e){var t=c(e.currentTarget).data("cmd");if(!1===o.events.trigger("quickInsert.commands.before",[t]))return!1;St.QUICK_INSERT_BUTTONS[t].callback.apply(o,[e.currentTarget]),St.QUICK_INSERT_BUTTONS[t].undo&&o.undo.saveStep(),o.events.trigger("quickInsert.commands.after",[t]),o.quickInsert.hide()}),o.events.$on(o.$wp,"scroll",u),o.events.$on(o.$tb,"transitionend",".fr-more-toolbar",u)}(),s.hasClass("fr-on")&&p(),o.$box.append(s),a(e),s.data("tag",e),s.addClass("fr-visible"))}function n(){if(o.core.hasFocus()){var e=o.selection.element();if(o.opts.enter==St.ENTER_BR||o.node.isBlock(e)||(e=o.node.blockParent(e)),o.opts.enter==St.ENTER_BR&&!o.node.isBlock(e)){var t=o.node.deepestParent(e);t&&(e=t)}var a=function a(){return o.opts.enter!=St.ENTER_BR&&o.node.isEmpty(e)&&0<=o.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},n=function n(){return o.opts.enter==St.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||o.node.isBlock(e.previousSibling))||o.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||o.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||o.node.isBlock(e.nextSibling)))};e&&(a()||n())?s&&s.data("tag").is(c(e))&&s.hasClass("fr-on")?p():o.selection.isCollapsed()&&r(c(e)):i()}}function i(){s&&!d&&(s.hasClass("fr-on")&&p(),s.removeClass("fr-visible fr-on"),s.css("left",-9999).css("top",-9999))}function f(e){if(e&&e.preventDefault(),s.hasClass("fr-on")&&!s.hasClass("fr-hidden"))p();else{if(!o.shared.$qi_helper){for(var t=o.opts.quickInsertButtons,a='<div class="fr-qi-helper">',n=0,r=0;r<t.length;r++){var i=St.QUICK_INSERT_BUTTONS[t[r]];i&&(!i.requiredPlugin||St.PLUGINS[i.requiredPlugin]&&0<=o.opts.pluginsEnabled.indexOf(i.requiredPlugin))&&(a+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(o.language.translate(i.title),'" tabIndex="-1" data-cmd="').concat(t[r],'" style="transition-delay: ').concat(.025*n++,'s;">').concat(o.icon.create(i.icon),"</a>"))}a+="</div>",o.shared.$qi_helper=c(a),o.tooltip.bind(o.shared.$qi_helper,"a.fr-btn"),o.events.$on(o.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=o.shared.$qi_helper,o.$box.append(l),d=!0,setTimeout(function(){d=!1,l.css("top",parseFloat(s.css("top"))),l.css("left",parseFloat(s.css("left"))+s.outerWidth()),l.find("a").addClass("fr-size-1"),s.addClass("fr-on")},10)}}function p(){var t=o.$box.find(".fr-qi-helper");if(t.length){for(var a=t.find("a"),e=0;e<a.length;e++)!function(e){setTimeout(function(){t.children().eq(a.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){t.css("left",-9999),s&&!s.hasClass("fr-hidden")&&s.removeClass("fr-on")},25*e)}}function u(){s.hasClass("fr-visible")&&a(s.data("tag"))}return{_init:function e(){if(!o.$wp||!o.opts.quickInsertEnabled)return!1;o.popups.onShow("image.edit",i),o.events.on("mouseup",n),o.helpers.isMobile()&&o.events.$on(c(o.o_doc),"selectionchange",n),o.events.on("blur",i),o.events.on("keyup",n),o.events.on("keydown",function(){setTimeout(function(){n()},0)})},hide:i}},St.PLUGINS.quote=function(i){var o=i.$;function s(e){for(;e.parentNode&&e.parentNode!=i.el;)e=e.parentNode;return e}return{apply:function t(e){i.selection.save(),i.html.wrap(!0,!0,!0,!0),i.selection.restore(),"increase"==e?function n(){var e,t=i.selection.blocks();for(e=0;e<t.length;e++)t[e]=s(t[e]);i.selection.save();var a=o(document.createElement("blockquote"));for(a.insertBefore(t[0]),e=0;e<t.length;e++)a.append(t[e]);i.opts.trackChangesEnabled&&i.track_changes.addQuote(a),i.html.unwrap(),i.selection.restore()}():"decrease"==e&&function r(){var e,t=i.opts.trackChangesEnabled,a=i.selection.blocks();for(e=0;e<a.length;e++)"BLOCKQUOTE"!=a[e].tagName&&(a[e]=t&&o(a[e]).parentsUntil(i.$el,"[data-track-id^=pending]").get(0)||o(a[e]).parentsUntil(i.$el,"BLOCKQUOTE").get(0));for(i.selection.save(),e=0;e<a.length;e++)a[e]&&(t?i.track_changes.removeQuote(o(a[e]),e):o(a[e]).replaceWith(a[e].innerHTML));i.html.unwrap(),i.selection.restore()}()}}},St.RegisterShortcut(St.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),St.RegisterShortcut(St.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),St.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var a in t)if(t.hasOwnProperty(a)){var n=this.shortcuts.get("quote.".concat(a));e+='<li role="presentation"><a class="fr-command fr-active '.concat(a,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(a,'" title="').concat(t[a],'">').concat(this.language.translate(t[a])).concat(n?'<span class="fr-shortcut">'.concat(n,"</span>"):"","</a></li>")}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),St.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"}),Object.assign(St.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),St.PLUGINS.save=function(s){var l=s.$,n=null,c=null,t=!1,d=1,f=2,a={};function p(e,t){s.events.trigger("save.error",[{code:e,message:a[e]},t])}function r(e){void 0===e&&(e=s.html.get());var n=e,t=s.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),s.opts.saveURL){var a={};for(var r in s.opts.saveParams)if(s.opts.saveParams.hasOwnProperty(r)){var i=s.opts.saveParams[r];a[r]="function"==typeof i?i.call(this):i}var o={};o[s.opts.saveParam]=e,l(this).ajax({method:s.opts.saveMethod,url:s.opts.saveURL,data:Object.assign(o,a),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,a){c=n,s.events.trigger("save.after",[e])},fail:function(e){p(f,e.response||e.responseText)}})}else p(d)}function i(){clearTimeout(n),n=setTimeout(function(){var e=s.html.get();(c!=e||t)&&(t=!1,r(c=e))},0)}return a[d]="Missing saveURL option.",a[f]="Something went wrong during save.",{_init:function o(){if(s.opts.letteringClass)for(var e=s.opts.letteringClass,t=s.$el.find(".".concat(e)).length,a=0;a<t;a++)s.$el.find(".".concat(e))[a].innerHTML=s.$el.find(".".concat(e))[a].innerText.replace(/([\w'-]+|[?.",])/g,"<span class = 'fr-word-select'>$1</span>");s.opts.saveInterval&&(c=s.html.get(),s.events.on("contentChanged",function(){setTimeout(i,s.opts.saveInterval)}),s.events.on("keydown destroy",function(){clearTimeout(n)}))},save:r,reset:function e(){i(),t=!1},force:function u(){t=!0}}},St.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),St.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"}),Object.assign(St.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"&iexcl;",list:[{"char":"&iexcl;",desc:"INVERTED EXCLAMATION MARK"},{"char":"&cent;",desc:"CENT SIGN"},{"char":"&pound;",desc:"POUND SIGN"},{"char":"&curren;",desc:"CURRENCY SIGN"},{"char":"&yen;",desc:"YEN SIGN"},{"char":"&brvbar;",desc:"BROKEN BAR"},{"char":"&sect;",desc:"SECTION SIGN"},{"char":"&uml;",desc:"DIAERESIS"},{"char":"&copy;",desc:"COPYRIGHT SIGN"},{"char":"&trade;",desc:"TRADEMARK SIGN"},{"char":"&ordf;",desc:"FEMININE ORDINAL INDICATOR"},{"char":"&laquo;",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&not;",desc:"NOT SIGN"},{"char":"&reg;",desc:"REGISTERED SIGN"},{"char":"&macr;",desc:"MACRON"},{"char":"&deg;",desc:"DEGREE SIGN"},{"char":"&plusmn;",desc:"PLUS-MINUS SIGN"},{"char":"&sup2;",desc:"SUPERSCRIPT TWO"},{"char":"&sup3;",desc:"SUPERSCRIPT THREE"},{"char":"&acute;",desc:"ACUTE ACCENT"},{"char":"&micro;",desc:"MICRO SIGN"},{"char":"&para;",desc:"PILCROW SIGN"},{"char":"&middot;",desc:"MIDDLE DOT"},{"char":"&cedil;",desc:"CEDILLA"},{"char":"&sup1;",desc:"SUPERSCRIPT ONE"},{"char":"&ordm;",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"&raquo;",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&frac14;",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"&frac12;",desc:"VULGAR FRACTION ONE HALF"},{"char":"&frac34;",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"&iquest;",desc:"INVERTED QUESTION MARK"},{"char":"&Agrave;",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"&Aacute;",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"&Acirc;",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"&Atilde;",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"&Auml;",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"&Aring;",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"&AElig;",desc:"LATIN CAPITAL LETTER AE"},{"char":"&Ccedil;",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"&Egrave;",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"&Eacute;",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"&Ecirc;",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"&Euml;",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"&Igrave;",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"&Iacute;",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"&Icirc;",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"&Iuml;",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"&ETH;",desc:"LATIN CAPITAL LETTER ETH"},{"char":"&Ntilde;",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"&Ograve;",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"&Oacute;",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"&Ocirc;",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"&Otilde;",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"&Ouml;",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"&times;",desc:"MULTIPLICATION SIGN"},{"char":"&Oslash;",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"&Ugrave;",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"&Uacute;",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"&Ucirc;",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"&Uuml;",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"&Yacute;",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"&THORN;",desc:"LATIN CAPITAL LETTER THORN"},{"char":"&szlig;",desc:"LATIN SMALL LETTER SHARP S"},{"char":"&agrave;",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"&aacute;",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"&acirc;",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"&atilde;",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"&auml;",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"&aring;",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"&aelig;",desc:"LATIN SMALL LETTER AE"},{"char":"&ccedil;",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"&egrave;",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"&eacute;",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"&ecirc;",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"&euml;",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"&igrave;",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"&iacute;",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"&icirc;",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"&iuml;",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"&eth;",desc:"LATIN SMALL LETTER ETH"},{"char":"&ntilde;",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"&ograve;",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"&oacute;",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"&ocirc;",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"&otilde;",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"&ouml;",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"&divide;",desc:"DIVISION SIGN"},{"char":"&oslash;",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"&ugrave;",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"&uacute;",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"&ucirc;",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"&uuml;",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"&yacute;",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"&thorn;",desc:"LATIN SMALL LETTER THORN"},{"char":"&yuml;",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"&Alpha;",list:[{"char":"&Alpha;",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"&Beta;",desc:"GREEK CAPITAL LETTER BETA"},{"char":"&Gamma;",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"&Delta;",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"&Epsilon;",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"&Zeta;",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"&Eta;",desc:"GREEK CAPITAL LETTER ETA"},{"char":"&Theta;",desc:"GREEK CAPITAL LETTER THETA"},{"char":"&Iota;",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"&Kappa;",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"&Lambda;",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"&Mu;",desc:"GREEK CAPITAL LETTER MU"},{"char":"&Nu;",desc:"GREEK CAPITAL LETTER NU"},{"char":"&Xi;",desc:"GREEK CAPITAL LETTER XI"},{"char":"&Omicron;",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"&Pi;",desc:"GREEK CAPITAL LETTER PI"},{"char":"&Rho;",desc:"GREEK CAPITAL LETTER RHO"},{"char":"&Sigma;",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"&Tau;",desc:"GREEK CAPITAL LETTER TAU"},{"char":"&Upsilon;",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"&Phi;",desc:"GREEK CAPITAL LETTER PHI"},{"char":"&Chi;",desc:"GREEK CAPITAL LETTER CHI"},{"char":"&Psi;",desc:"GREEK CAPITAL LETTER PSI"},{"char":"&Omega;",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"&alpha;",desc:"GREEK SMALL LETTER ALPHA"},{"char":"&beta;",desc:"GREEK SMALL LETTER BETA"},{"char":"&gamma;",desc:"GREEK SMALL LETTER GAMMA"},{"char":"&delta;",desc:"GREEK SMALL LETTER DELTA"},{"char":"&epsilon;",desc:"GREEK SMALL LETTER EPSILON"},{"char":"&zeta;",desc:"GREEK SMALL LETTER ZETA"},{"char":"&eta;",desc:"GREEK SMALL LETTER ETA"},{"char":"&theta;",desc:"GREEK SMALL LETTER THETA"},{"char":"&iota;",desc:"GREEK SMALL LETTER IOTA"},{"char":"&kappa;",desc:"GREEK SMALL LETTER KAPPA"},{"char":"&lambda;",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"&mu;",desc:"GREEK SMALL LETTER MU"},{"char":"&nu;",desc:"GREEK SMALL LETTER NU"},{"char":"&xi;",desc:"GREEK SMALL LETTER XI"},{"char":"&omicron;",desc:"GREEK SMALL LETTER OMICRON"},{"char":"&pi;",desc:"GREEK SMALL LETTER PI"},{"char":"&rho;",desc:"GREEK SMALL LETTER RHO"},{"char":"&sigmaf;",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"&sigma;",desc:"GREEK SMALL LETTER SIGMA"},{"char":"&tau;",desc:"GREEK SMALL LETTER TAU"},{"char":"&upsilon;",desc:"GREEK SMALL LETTER UPSILON"},{"char":"&phi;",desc:"GREEK SMALL LETTER PHI"},{"char":"&chi;",desc:"GREEK SMALL LETTER CHI"},{"char":"&psi;",desc:"GREEK SMALL LETTER PSI"},{"char":"&omega;",desc:"GREEK SMALL LETTER OMEGA"},{"char":"&thetasym;",desc:"GREEK THETA SYMBOL"},{"char":"&upsih;",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"&straightphi;",desc:"GREEK PHI SYMBOL"},{"char":"&piv;",desc:"GREEK PI SYMBOL"},{"char":"&Gammad;",desc:"GREEK LETTER DIGAMMA"},{"char":"&gammad;",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"&varkappa;",desc:"GREEK KAPPA SYMBOL"},{"char":"&varrho;",desc:"GREEK RHO SYMBOL"},{"char":"&straightepsilon;",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"&backepsilon;",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"&#x400",list:[{"char":"&#x400",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"&#x401",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"&#x402",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"&#x403",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"&#x404",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"&#x405",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"&#x406",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x407",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"&#x408",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"&#x409",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"&#x40A",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"&#x40B",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"&#x40C",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"&#x40D",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"&#x40E",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"&#x40F",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"&#x410",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"&#x411",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"&#x412",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"&#x413",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"&#x414",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"&#x415",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"&#x416",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"&#x417",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"&#x418",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"&#x419",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"&#x41A",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"&#x41B",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"&#x41C",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"&#x41D",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"&#x41E",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"&#x41F",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"&#x420",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"&#x421",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"&#x422",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"&#x423",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"&#x424",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"&#x425",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"&#x426",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"&#x427",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"&#x428",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"&#x429",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"&#x42A",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"&#x42B",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"&#x42C",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"&#x42D",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"&#x42E",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"&#x42F",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"&#x430",desc:"CYRILLIC SMALL LETTER A"},{"char":"&#x431",desc:"CYRILLIC SMALL LETTER BE"},{"char":"&#x432",desc:"CYRILLIC SMALL LETTER VE"},{"char":"&#x433",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"&#x434",desc:"CYRILLIC SMALL LETTER DE"},{"char":"&#x435",desc:"CYRILLIC SMALL LETTER IE"},{"char":"&#x436",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"&#x437",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"&#x438",desc:"CYRILLIC SMALL LETTER I"},{"char":"&#x439",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"&#x43A",desc:"CYRILLIC SMALL LETTER KA"},{"char":"&#x43B",desc:"CYRILLIC SMALL LETTER EL"},{"char":"&#x43C",desc:"CYRILLIC SMALL LETTER EM"},{"char":"&#x43D",desc:"CYRILLIC SMALL LETTER EN"},{"char":"&#x43E",desc:"CYRILLIC SMALL LETTER O"},{"char":"&#x43F",desc:"CYRILLIC SMALL LETTER PE"},{"char":"&#x440",desc:"CYRILLIC SMALL LETTER ER"},{"char":"&#x441",desc:"CYRILLIC SMALL LETTER ES"},{"char":"&#x442",desc:"CYRILLIC SMALL LETTER TE"},{"char":"&#x443",desc:"CYRILLIC SMALL LETTER U"},{"char":"&#x444",desc:"CYRILLIC SMALL LETTER EF"},{"char":"&#x445",desc:"CYRILLIC SMALL LETTER HA"},{"char":"&#x446",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"&#x447",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"&#x448",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"&#x449",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"&#x44A",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"&#x44B",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"&#x44C",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"&#x44D",desc:"CYRILLIC SMALL LETTER E"},{"char":"&#x44E",desc:"CYRILLIC SMALL LETTER YU"},{"char":"&#x44F",desc:"CYRILLIC SMALL LETTER YA"},{"char":"&#x450",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"&#x451",desc:"CYRILLIC SMALL LETTER IO"},{"char":"&#x452",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"&#x453",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"&#x454",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"&#x455",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"&#x456",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x457",desc:"CYRILLIC SMALL LETTER YI"},{"char":"&#x458",desc:"CYRILLIC SMALL LETTER JE"},{"char":"&#x459",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"&#x45A",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"&#x45B",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"&#x45C",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"&#x45D",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"&#x45E",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"&#x45F",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"&ndash;",list:[{"char":"&ndash;",desc:"EN DASH"},{"char":"&mdash;",desc:"EM DASH"},{"char":"&lsquo;",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"&rsquo;",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"&sbquo;",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"&ldquo;",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"&rdquo;",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"&bdquo;",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"&dagger;",desc:"DAGGER"},{"char":"&Dagger;",desc:"DOUBLE DAGGER"},{"char":"&bull;",desc:"BULLET"},{"char":"&hellip;",desc:"HORIZONTAL ELLIPSIS"},{"char":"&permil;",desc:"PER MILLE SIGN"},{"char":"&prime;",desc:"PRIME"},{"char":"&Prime;",desc:"DOUBLE PRIME"},{"char":"&lsaquo;",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"&rsaquo;",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"&oline;",desc:"OVERLINE"},{"char":"&frasl;",desc:"FRACTION SLASH"}]},{title:"Currency","char":"&#x20A0",list:[{"char":"&#x20A0",desc:"EURO-CURRENCY SIGN"},{"char":"&#x20A1",desc:"COLON SIGN"},{"char":"&#x20A2",desc:"CRUZEIRO SIGN"},{"char":"&#x20A3",desc:"FRENCH FRANC SIGN"},{"char":"&#x20A4",desc:"LIRA SIGN"},{"char":"&#x20A5",desc:"MILL SIGN"},{"char":"&#x20A6",desc:"NAIRA SIGN"},{"char":"&#x20A7",desc:"PESETA SIGN"},{"char":"&#x20A8",desc:"RUPEE SIGN"},{"char":"&#x20A9",desc:"WON SIGN"},{"char":"&#x20AA",desc:"NEW SHEQEL SIGN"},{"char":"&#x20AB",desc:"DONG SIGN"},{"char":"&#x20AC",desc:"EURO SIGN"},{"char":"&#x20AD",desc:"KIP SIGN"},{"char":"&#x20AE",desc:"TUGRIK SIGN"},{"char":"&#x20AF",desc:"DRACHMA SIGN"},{"char":"&#x20B0",desc:"GERMAN PENNY SYMBOL"},{"char":"&#x20B1",desc:"PESO SIGN"},{"char":"&#x20B2",desc:"GUARANI SIGN"},{"char":"&#x20B3",desc:"AUSTRAL SIGN"},{"char":"&#x20B4",desc:"HRYVNIA SIGN"},{"char":"&#x20B5",desc:"CEDI SIGN"},{"char":"&#x20B6",desc:"LIVRE TOURNOIS SIGN"},{"char":"&#x20B7",desc:"SPESMILO SIGN"},{"char":"&#x20B8",desc:"TENGE SIGN"},{"char":"&#x20B9",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"&#x2190",list:[{"char":"&#x2190",desc:"LEFTWARDS ARROW"},{"char":"&#x2191",desc:"UPWARDS ARROW"},{"char":"&#x2192",desc:"RIGHTWARDS ARROW"},{"char":"&#x2193",desc:"DOWNWARDS ARROW"},{"char":"&#x2194",desc:"LEFT RIGHT ARROW"},{"char":"&#x2195",desc:"UP DOWN ARROW"},{"char":"&#x2196",desc:"NORTH WEST ARROW"},{"char":"&#x2197",desc:"NORTH EAST ARROW"},{"char":"&#x2198",desc:"SOUTH EAST ARROW"},{"char":"&#x2199",desc:"SOUTH WEST ARROW"},{"char":"&#x219A",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"&#x219B",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"&#x219C",desc:"LEFTWARDS WAVE ARROW"},{"char":"&#x219D",desc:"RIGHTWARDS WAVE ARROW"},{"char":"&#x219E",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"&#x219F",desc:"UPWARDS TWO HEADED ARROW"},{"char":"&#x21A0",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"&#x21A1",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"&#x21A2",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"&#x21A3",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"&#x21A4",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"&#x21A5",desc:"UPWARDS ARROW FROM BAR"},{"char":"&#x21A6",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"&#x21A7",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"&#x21A8",desc:"UP DOWN ARROW WITH BASE"},{"char":"&#x21A9",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"&#x21AA",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"&#x21AB",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"&#x21AC",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"&#x21AD",desc:"LEFT RIGHT WAVE ARROW"},{"char":"&#x21AE",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"&#x21AF",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"&#x21B0",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B1",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B2",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B3",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B4",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"&#x21B5",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"&#x21B6",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B7",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B8",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"&#x21B9",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"&#x21BA",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BB",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BC",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21BD",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21BE",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21BF",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C0",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21C1",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21C2",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21C3",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C4",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"&#x21C5",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"&#x21C6",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"&#x21C7",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"&#x21C8",desc:"UPWARDS PAIRED ARROWS"},{"char":"&#x21C9",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"&#x21CA",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"&#x21CB",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"&#x21CC",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"&#x21CD",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21CE",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"&#x21CF",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21D0",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"&#x21D1",desc:"UPWARDS DOUBLE ARROW"},{"char":"&#x21D2",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"&#x21D3",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"&#x21D4",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"&#x21D5",desc:"UP DOWN DOUBLE ARROW"},{"char":"&#x21D6",desc:"NORTH WEST DOUBLE ARROW"},{"char":"&#x21D7",desc:"NORTH EAST DOUBLE ARROW"},{"char":"&#x21D8",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"&#x21D9",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"&#x21DA",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"&#x21DB",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"&#x21DC",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"&#x21DD",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"&#x21DE",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21DF",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21E0",desc:"LEFTWARDS DASHED ARROW"},{"char":"&#x21E1",desc:"UPWARDS DASHED ARROW"},{"char":"&#x21E2",desc:"RIGHTWARDS DASHED ARROW"},{"char":"&#x21E3",desc:"DOWNWARDS DASHED ARROW"},{"char":"&#x21E4",desc:"LEFTWARDS ARROW TO BAR"},{"char":"&#x21E5",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"&#x21E6",desc:"LEFTWARDS WHITE ARROW"},{"char":"&#x21E7",desc:"UPWARDS WHITE ARROW"},{"char":"&#x21E8",desc:"RIGHTWARDS WHITE ARROW"},{"char":"&#x21E9",desc:"DOWNWARDS WHITE ARROW"},{"char":"&#x21EA",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"&#x21EB",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"&#x21EC",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"&#x21ED",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"&#x21EE",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"&#x21EF",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"&#x21F0",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"&#x21F1",desc:"NORTH WEST ARROW TO CORNER"},{"char":"&#x21F2",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"&#x21F3",desc:"UP DOWN WHITE ARROW"},{"char":"&#x21F4",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"&#x21F5",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"&#x21F6",desc:"THREE RIGHTWARDS ARROWS"},{"char":"&#x21F7",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F8",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F9",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"&#x21FA",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FB",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FC",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FD",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FE",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FF",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"&forall;",list:[{"char":"&forall;",desc:"FOR ALL"},{"char":"&part;",desc:"PARTIAL DIFFERENTIAL"},{"char":"&exist;",desc:"THERE EXISTS"},{"char":"&empty;",desc:"EMPTY SET"},{"char":"&nabla;",desc:"NABLA"},{"char":"&isin;",desc:"ELEMENT OF"},{"char":"&notin;",desc:"NOT AN ELEMENT OF"},{"char":"&ni;",desc:"CONTAINS AS MEMBER"},{"char":"&prod;",desc:"N-ARY PRODUCT"},{"char":"&sum;",desc:"N-ARY SUMMATION"},{"char":"&minus;",desc:"MINUS SIGN"},{"char":"&lowast;",desc:"ASTERISK OPERATOR"},{"char":"&radic;",desc:"SQUARE ROOT"},{"char":"&prop;",desc:"PROPORTIONAL TO"},{"char":"&infin;",desc:"INFINITY"},{"char":"&ang;",desc:"ANGLE"},{"char":"&and;",desc:"LOGICAL AND"},{"char":"&or;",desc:"LOGICAL OR"},{"char":"&cap;",desc:"INTERSECTION"},{"char":"&cup;",desc:"UNION"},{"char":"&int;",desc:"INTEGRAL"},{"char":"&there4;",desc:"THEREFORE"},{"char":"&sim;",desc:"TILDE OPERATOR"},{"char":"&cong;",desc:"APPROXIMATELY EQUAL TO"},{"char":"&asymp;",desc:"ALMOST EQUAL TO"},{"char":"&ne;",desc:"NOT EQUAL TO"},{"char":"&equiv;",desc:"IDENTICAL TO"},{"char":"&le;",desc:"LESS-THAN OR EQUAL TO"},{"char":"&ge;",desc:"GREATER-THAN OR EQUAL TO"},{"char":"&sub;",desc:"SUBSET OF"},{"char":"&sup;",desc:"SUPERSET OF"},{"char":"&nsub;",desc:"NOT A SUBSET OF"},{"char":"&sube;",desc:"SUBSET OF OR EQUAL TO"},{"char":"&supe;",desc:"SUPERSET OF OR EQUAL TO"},{"char":"&oplus;",desc:"CIRCLED PLUS"},{"char":"&otimes;",desc:"CIRCLED TIMES"},{"char":"&perp;",desc:"UP TACK"}]},{title:"Misc","char":"&spades;",list:[{"char":"&spades;",desc:"BLACK SPADE SUIT"},{"char":"&clubs;",desc:"BLACK CLUB SUIT"},{"char":"&hearts;",desc:"BLACK HEART SUIT"},{"char":"&diams;",desc:"BLACK DIAMOND SUIT"},{"char":"&#x2669",desc:"QUARTER NOTE"},{"char":"&#x266A",desc:"EIGHTH NOTE"},{"char":"&#x266B",desc:"BEAMED EIGHTH NOTES"},{"char":"&#x266C",desc:"BEAMED SIXTEENTH NOTES"},{"char":"&#x266D",desc:"MUSIC FLAT SIGN"},{"char":"&#x266E",desc:"MUSIC NATURAL SIGN"},{"char":"&#x2600",desc:"BLACK SUN WITH RAYS"},{"char":"&#x2601",desc:"CLOUD"},{"char":"&#x2602",desc:"UMBRELLA"},{"char":"&#x2603",desc:"SNOWMAN"},{"char":"&#x2615",desc:"HOT BEVERAGE"},{"char":"&#x2618",desc:"SHAMROCK"},{"char":"&#x262F",desc:"YIN YANG"},{"char":"&#x2714",desc:"HEAVY CHECK MARK"},{"char":"&#x2716",desc:"HEAVY MULTIPLICATION X"},{"char":"&#x2744",desc:"SNOWFLAKE"},{"char":"&#x275B",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275C",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275D",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275E",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x2764",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(St.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),St.PLUGINS.specialCharacters=function(E){var _=E.$,e=E.opts.specialCharactersSets,r=E.opts.specialCharactersSets[0],o="";function s(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function t(e,a){var n="";return e.forEach(function(e){var t={elementClass:e.title===a.title?"fr-active fr-active-tab":"",title:e.title,dataParam1:e.title,desc:e["char"]};n+='<button class="fr-command fr-btn fr-special-character-category '.concat(t.elementClass,'" title="').concat(t.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(t.dataParam1,'"><span>').concat(t.desc,"</span></button>")}),n}(e,r),'\n </div>\n <div class="fr-icon-container fr-sc-container" style="outline: none;">\n ').concat(function n(e){var a="";return e.list.forEach(function(e){var t={dataParam1:e["char"],title:e.desc,splCharValue:e["char"]};a+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(t.dataParam1,'" tabindex="0"\n title="').concat(t.title,'">').concat(t.splCharValue,"</span>")}),a}(r),"\n </div>")}return{setSpecialCharacterCategory:function n(t){r=e.filter(function(e){return e.title===t})[0],function a(){E.popups.get("specialCharacters").html(o+s());var e=E.popups.get("specialCharacters").children().not(".fr-buttons");E.accessibility.registerPopup("specialCharacters"),E.accessibility.focusContent(e)}()},showSpecialCharsPopup:function l(){var e=E.popups.get("specialCharacters");if(e||(e=function i(){E.opts.toolbarInline&&0<E.opts.specialCharButtons.length&&(o='<div class="fr-buttons fr-tabs">'.concat(E.button.buildList(E.opts.specialCharButtons),"</div>"));var e={buttons:o,custom_layer:s()},t=E.popups.create("specialCharacters",e);return function a(b){E.events.on("popup.tab",function(e){var t=_(e.currentTarget);if(!E.popups.isVisible("specialCharacters")||!t.is("span, a"))return!0;var a,n,r,i=e.which,o=window.getComputedStyle(b.find(".fr-icon-container")[0]),s=o.getPropertyValue("grid-template-columns").split(" ").length;if(St.KEYCODE.TAB==i){var l=b.find("span.fr-special-character");if(t.is(l.first())&&e.shiftKey||t.is(l.last())&&!e.shiftKey){var c=b.find(".fr-buttons");a=!E.accessibility.focusToolbar(c,!!e.shiftKey)}if(!1!==a){var d=b.find("span.fr-special-character");d.add(b.find("button.fr-btn")),n=d.index(t),n=e.shiftKey?((n-1)%d.length+d.length)%d.length:(n+1)%d.length,r=d.get(n),E.events.disableBlur(),r.focus(),a=!1}}else if(St.KEYCODE.ARROW_UP==i||St.KEYCODE.ARROW_DOWN==i||St.KEYCODE.ARROW_LEFT==i||St.KEYCODE.ARROW_RIGHT==i){if(t.is("span.fr-icon")){var f=t.parent().find("span.fr-icon");n=f.index(t);var p=s,u=Math.ceil(f.length/p),g=n%p,h=Math.floor(n/p),m=h*p+g,v=u*p;St.KEYCODE.ARROW_UP==i?m=((m-p)%v+v)%v:St.KEYCODE.ARROW_DOWN==i?m=(m+p)%v:St.KEYCODE.ARROW_LEFT==i?m=((m-1)%v+v)%v:St.KEYCODE.ARROW_RIGHT==i&&(m=(m+1)%v),r=_(f.get(m)),E.events.disableBlur(),r.focus(),a=!1}}else St.KEYCODE.ENTER==i&&(t.is("a")?t[0].click():E.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){E.popups.refresh("specialCharacters"),E.popups.setContainer("specialCharacters",E.$tb);var t=E.$tb.find('.fr-command[data-cmd="specialCharacters"]'),a=E.button.getPosition(t),n=a.left,r=a.top;E.popups.show("specialCharacters",n,r,outerHeight)}},back:function t(){E.popups.hide("specialCharacters"),E.toolbar.showInline()}}},St.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),St.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),St.RegisterCommand("insertSpecialCharacter",{callback:function(e,t){this.undo.saveStep(),this.html.insert(t),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),St.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(e,t){this.specialCharacters.setSpecialCharacterCategory(t)}}),St.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}}),Object.assign(St.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(St.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableFooter","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,keepTextFormatOnTable:!1,tableInsertHelperOffset:15}),St.PLUGINS.table=function(C){var T,c,r,i,n,o,y,k=C.$;function h(){var e=S();if(e){var t=C.popups.get("table.edit");if(t||(t=p()),t){C.popups.setContainer("table.edit",C.$sc);var a=M(e),n=a.left+(a.right-a.left)/2,r=a.bottom;C.popups.show("table.edit",n,r,a.bottom-a.top,!0),C.edit.isDisabled()&&(C.$el.removeClass("fr-no-selection"),C.edit.on(),C.button.bulkRefresh(),C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)),C.selection.restore())}}}function s(){var e=S();if(e){var t=C.popups.get("table.colors");t||(t=function o(){var e="";0<C.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.tableColorsButtons),"</div>"));var t="";C.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(C.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(C.id,'" type="text" placeholder="').concat(C.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(C.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function r(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<C.opts.tableColors.length;t++)0!==t&&t%C.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=C.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(C.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(C.opts.tableColors[t],'"><span class="fr-sr-only">').concat(C.language.translate("Color")," ").concat(C.opts.tableColors[t],"&nbsp;&nbsp;&nbsp;</span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(C.language.translate("Clear Formatting"),'">').concat(C.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(C.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},n=C.popups.create("table.colors",a);return C.events.$on(C.$wp,"scroll.table-colors",function(){C.popups.isVisible("table.colors")&&s()}),function i(g){C.events.on("popup.tab",function(e){var t=k(e.currentTarget);if(!C.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,n=!0;if(St.KEYCODE.TAB==a){var r=g.find(".fr-buttons");n=!C.accessibility.focusToolbar(r,!!e.shiftKey)}else if(St.KEYCODE.ARROW_UP==a||St.KEYCODE.ARROW_DOWN==a||St.KEYCODE.ARROW_LEFT==a||St.KEYCODE.ARROW_RIGHT==a){var i=t.parent().find("span.fr-command"),o=i.index(t),s=C.opts.colorsStep,l=Math.floor(i.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;St.KEYCODE.ARROW_UP==a?f=((f-s)%p+p)%p:St.KEYCODE.ARROW_DOWN==a?f=(f+s)%p:St.KEYCODE.ARROW_LEFT==a?f=((f-1)%p+p)%p:St.KEYCODE.ARROW_RIGHT==a&&(f=(f+1)%p);var u=k(i.get(f));C.events.disableBlur(),u.focus(),n=!1}else St.KEYCODE.ENTER==a&&(C.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(n),n}()),C.popups.setContainer("table.colors",C.$sc);var a=M(e),n=(a.left+a.right)/2,r=a.bottom;!function i(){var e=C.popups.get("table.colors"),t=C.$el.find(".fr-selected-cell").first(),a=C.helpers.RGBToHex(t.css("background-color")),n=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),n.val(a).trigger("change")}(),C.popups.show("table.colors",n,r,a.bottom-a.top,!0)}}function l(){0===te().length&&C.toolbar.enable()}function d(e){if(e)return C.popups.onHide("table.insert",function(){C.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<C.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function i(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">',t=1;t<=C.opts.tableInsertMaxSize;t++){for(var a=1;a<=C.opts.tableInsertMaxSize;a++){var n="inline-block";2<t&&!C.helpers.isMobile()&&(n="none");var r="fr-table-cell ";1==t&&1==a&&(r+=" hover"),e+='<span class="fr-command '.concat(r,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(n,';" role="button"><span></span><span class="fr-sr-only">').concat(t," &times; ").concat(a,"&nbsp;&nbsp;&nbsp;</span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},n=C.popups.create("table.insert",a);return C.events.$on(n,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){f(k(e.currentTarget))},!0),function r(e){C.events.$on(e,"focus","[tabIndex]",function(e){var t=k(e.currentTarget);f(t)}),C.events.on("popup.tab",function(e){var t=k(e.currentTarget);if(!C.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,n=e.which;if(St.KEYCODE.ARROW_UP==n||St.KEYCODE.ARROW_DOWN==n||St.KEYCODE.ARROW_LEFT==n||St.KEYCODE.ARROW_RIGHT==n){if(t.is("span.fr-table-cell")){var r=t.parent().find("span.fr-table-cell"),i=r.index(t),o=C.opts.tableInsertMaxSize,s=i%o,l=Math.floor(i/o);St.KEYCODE.ARROW_UP==n?l=Math.max(0,l-1):St.KEYCODE.ARROW_DOWN==n?l=Math.min(C.opts.tableInsertMaxSize-1,l+1):St.KEYCODE.ARROW_LEFT==n?s=Math.max(0,s-1):St.KEYCODE.ARROW_RIGHT==n&&(s=Math.min(C.opts.tableInsertMaxSize-1,s+1));var c=l*o+s,d=k(r.get(c));f(d),C.events.disableBlur(),d.focus(),a=!1}}else St.KEYCODE.ENTER==n&&(C.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(n),n}function f(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var n=e.parent();n.siblings(".fr-table-size-info").html("".concat(t," &times; ").concat(a)),n.find("> span").removeClass("hover fr-active-item");for(var r=1;r<=C.opts.tableInsertMaxSize;r++)for(var i=0;i<=C.opts.tableInsertMaxSize;i++){var o=n.find('> span[data-row="'.concat(r,'"][data-col="').concat(i,'"]'));r<=t&&i<=a?o.addClass("hover"):r<=t+1||r<=2&&!C.helpers.isMobile()?o.css("display","inline-block"):2<r&&!C.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return C.popups.onHide("table.edit",l),!0;if(0<C.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(C.button.buildList(C.opts.tableEditButtons),"</div>")},a=C.popups.create("table.edit",t);return C.events.$on(C.$wp,"scroll.table-edit",function(){C.popups.isVisible("table.edit")&&h()}),a}return!1}function m(e){var t={startTag:"",closeTag:""};return C.opts.keepTextFormatOnTable&&(t=u(function s(e){var t=new Set,a=e.textContent,n=0,r=[e.firstChild];for(;0<r.length;){var i=r.pop();if(i&&(t.has(i)||(0===n&&a!==i.textContent&&(a=i.textContent,n++),t.add(i)),i.hasChildNodes()))for(var o=0;o<i.childNodes.length;){if(3===i.childNodes[o].nodeType)return ye(t);if(i.childNodes[o].textContent){if(0===n&&i.childNodes[o].textContent!==a){a=i.childNodes[o].textContent,r.push(i.childNodes[o]),n++;break}i.childNodes[o].textContent===a&&r.push(i.childNodes[o])}o++}}return ye(t)}(e).reverse())),{startTag:t.startTag,closeTag:t.closeTag}}function u(e){var t="",a="",n=["br","#text","#comment","font"];if(0<e.length)for(var r=e.length-1;0<=r;r--){var i=e[r],o=C.node.isBlock(i),s=n.indexOf(i.nodeName.toLowerCase());if(!o&&s<0){var l=i.style,c="";if(l&&l.length){for(var d=0;d<l.length;d++)c+=l[d]+": "+l[l[d]].replace(/"/gi,"")+"; ";c=c.trim()}t+=c?"<"+i.nodeName.toLowerCase()+' style="'+c+'">':"<"+i.nodeName.toLowerCase()+">",a="</"+i.nodeName.toLowerCase()+">"+a}}return{startTag:t,closeTag:a}}function g(){if(0<te().length){var e=ae();C.selection.setBefore(e.get(0))||C.selection.setAfter(e.get(0)),C.selection.restore(),C.popups.hide("table.edit"),C.opts.trackChangesEnabled?(C.track_changes.removedTable(e),I()):e.remove(),C.toolbar.enable()}}function v(e){var t=ae();if(0<t.length){if(0<C.$el.find("thead .fr-selected-cell").length&&"above"==e||0<C.$el.find("tfoot td.fr-selected-cell").length&&"below"==e)return;var a,n,r,i=S(),o=F(i);if(null==o)return;n="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<i[n].length;a++)if("below"==e&&n<i.length-1&&i[n][a]==i[n+1][a]||"above"==e&&0<n&&i[n][a]==i[n-1][a]){if(0===a||0<a&&i[n][a]!=i[n][a-1]){var l=k(i[n][a]);l.attr("rowspan",parseInt(l.attr("rowspan"),10)+1)}}else{var c=k(i[n][a]);if("TH"==c.attr("tagName").toUpperCase())s+='<th style="'+c.attr("style")+'" ><br></th>';else{var d=m(i[n][a]);s+='<td style="'+c.attr("style")+'" >'+d.startTag+"<br>"+d.closeTag+"</td>"}}s+="</tr>",r=0<C.$el.find("thead .fr-selected-cell").length&&"below"==e||0<C.$el.find("tfoot td.fr-selected-cell").length&&"above"==e?k(t.find("tbody").not(t.find("> table tbody"))):k(t.find("tr").not(t.find("> table tr")).get(n)),"below"==e?"TBODY"==r.attr("tagName")?r.prepend(s):r[0].parentNode&&r[0].insertAdjacentHTML("afterend",s):"above"==e&&("TBODY"==r.attr("tagName")?r.append(s):r.before(s),C.popups.isVisible("table.edit")&&h())}}function b(e,t,a){var n,r,i,o,s,l=0,c=S(a);if(e<(t=Math.min(t,c[0].length-1)))for(r=e;r<=t;r++)if(!(e<r&&c[0][r]==c[0][r-1])&&1<(o=Math.min(parseInt(c[0][r].getAttribute("colspan"),10)||1,t-e+1))&&c[0][r]==c[0][r+1])for(l=o-1,n=1;n<c.length;n++)if(c[n][r]!=c[n-1][r]){for(i=r;i<r+o;i++)if(c[n][i]!==undefined)if(1<(s=parseInt(c[n][i].getAttribute("colspan"),10)||1)&&c[n][i]==c[n][i+1])i+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&_(c,l,"colspan",0,c.length-1,e,t)}function E(e,t,a){var n,r,i,o,s,l=0,c=S(a);if(e<(t=Math.min(t,c.length-1)))for(n=e;n<=t;n++)if(!(e<n&&c[n][0]==c[n-1][0])&&c[n][0]!==undefined&&1<(o=Math.min(parseInt(c[n][0].getAttribute("rowspan"),10)||1,t-e+1))&&c[n][0]==c[n+1][0])for(l=o-1,r=1;r<c[0].length;r++)if(c[n][r]!=c[n][r-1]){for(i=n;i<n+o;i++)if(c[i][r]!==undefined)if(1<(s=parseInt(c[i][r].getAttribute("rowspan"),10)||1)&&c[i][r]==c[i+1][r])i+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&_(c,l,"rowspan",e,t,0,c[0].length-1)}function _(e,t,a,n,r,i,o){var s,l,c;for(s=n;s<=r;s++)for(l=i;l<=o;l++)n<s&&e[s][l]==e[s-1][l]||i<l&&e[s][l]==e[s][l-1]||e[s][l]!==undefined&&1<(c=parseInt(e[s][l].getAttribute(a),10)||1)&&(1<c-t?e[s][l].setAttribute(a,c-t):e[s][l].removeAttribute(a))}function w(e,t,a,n,r){E(e,t,r),b(a,n,r)}function t(e){var t=C.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",C.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function A(e){e.style.removeProperty("border"),e.style.removeProperty("border-top"),e.style.removeProperty("border-bottom"),e.style.removeProperty("border-left"),e.style.removeProperty("border-right")}function S(e){var c=[];if(null==(e=e||null)&&0<te().length&&(e=ae()),e){if(!e.find("tr").html().match(/xl[0-9]+/gi))for(var t=e.find("tr:empty"),a=t.length-1;0<=a;a--)k(t[a]).remove();e.find("tr").not(e.find("> table tr")).each(function(s,e){var t=k(e),l=0;t.find("> th, > td").each(function(e,t){for(var a=k(t),n=parseInt(a.attr("colspan"),10)||1,r=parseInt(a.attr("rowspan"),10)||1,i=s;i<s+r;i++)for(var o=l;o<l+n;o++)c[i]||(c[i]=[]),c[i][o]?l++:c[i][o]=t;l+=n})})}return c}function R(e,t){for(var a=0;a<t.length;a++)for(var n=0;n<t[a].length;n++)if(t[a][n]==e)return{row:a,col:n}}function L(e,t,a){for(var n=e+1,r=t+1;n<a.length;){if(a[n][t]!=a[e][t]){n--;break}n++}for(n==a.length&&n--;r<a[e].length;){if(a[e][r]!=a[e][t]){r--;break}r++}return r==a[e].length&&r--,{row:n,col:r}}function x(){C.el.querySelector(".fr-cell-fixed")&&C.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),C.el.querySelector(".fr-cell-handler")&&C.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function I(){var e=C.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=k(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),x()}function O(){C.events.disableBlur(),C.selection.clear(),C.$el.addClass("fr-no-selection"),C.$el.blur(),C.events.enableBlur()}function F(e){var t=C.$el.find(".fr-selected-cell");if(0<t.length){var a,n=e.length,r=0,i=e[0].length,o=0;for(a=0;a<t.length;a++){var s=R(t[a],e),l=L(s.row,s.col,e);n=Math.min(s.row,n),r=Math.max(l.row,r),i=Math.min(s.col,i),o=Math.max(l.col,o)}return{min_i:n,max_i:r,min_j:i,max_j:o}}return null}function M(e){var t=F(e);if(null!=t){var a=k(e[t.min_i][t.min_j]),n=k(e[t.min_i][t.max_j]),r=k(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:n.length&&n.offset().left+n.outerWidth(),top:a.length&&a.offset().top,bottom:r.length&&r.offset().top+r.outerHeight()}}}function D(e,t){if(k(e).is(t))I(),k(e).addClass("fr-selected-cell");else{O(),C.edit.off();var a=S(),n=R(e,a),r=R(t,a);if(!n||!r)return;var i=function u(e,t,a,n,r){var i,o,s,l,c=e,d=t,f=a,p=n;for(i=c;i<=d;i++)(1<(parseInt(k(r[i][f]).attr("rowspan"),10)||1)||1<(parseInt(k(r[i][f]).attr("colspan"),10)||1))&&(l=L((s=R(r[i][f],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p)),(1<(parseInt(k(r[i][p]).attr("rowspan"),10)||1)||1<(parseInt(k(r[i][p]).attr("colspan"),10)||1))&&(l=L((s=R(r[i][p],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p));for(o=f;o<=p;o++)(1<(parseInt(k(r[c][o]).attr("rowspan"),10)||1)||1<(parseInt(k(r[c][o]).attr("colspan"),10)||1))&&(l=L((s=R(r[c][o],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p)),(1<(parseInt(k(r[d][o]).attr("rowspan"),10)||1)||1<(parseInt(k(r[d][o]).attr("colspan"),10)||1))&&(l=L((s=R(r[d][o],r)).row,s.col,r),c=Math.min(s.row,c),d=Math.max(l.row,d),f=Math.min(s.col,f),p=Math.max(l.col,p));return c==e&&d==t&&f==a&&p==n?{min_i:e,max_i:t,min_j:a,max_j:n}:u(c,d,f,p,r)}(Math.min(n.row,r.row),Math.max(n.row,r.row),Math.min(n.col,r.col),Math.max(n.col,r.col),a);I(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=i.min_i;o<=i.max_i;o++)for(var s=i.min_j;s<=i.max_j;s++)k(e).closest("table").is(k(a[o][s]).closest("table"))&&k(a[o][s]).addClass("fr-selected-cell")}}function P(e){var t=null,a=k(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===C.$el.html.toString().search(t)?null:t}function N(){I(),C.popups.hide("table.edit")}function e(e){var t=P(e);if("false"==k(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<te().length&&!t&&N(),!C.edit.isDisabled()||C.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)&&t&&N();else if(i=!0,t){0<te().length&&!e.shiftKey&&N(),e.stopPropagation(),C.events.trigger("image.hideResizer"),C.events.trigger("video.hideResizer"),r=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<C.$el.find("".concat(a,".fr-selected-cell")).length?k(C.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(k(t).closest("table"))?D(n,t):O():((C.keys.ctrlKey(e)||e.shiftKey)&&"TD"===e.currentTarget.tagName&&(1<te().length||0===k(t).find(C.selection.element()).length&&!k(t).is(C.selection.element()))&&O(),n=t,0<C.opts.tableEditButtons.length&&D(n,n))}}function a(e){if(!C.edit.isDisabled()&&C.popups.areVisible())return!0;var t=P(e);if(1===te().length&&null===t&&(C.toolbar.enable(),I()),(1===te().length&&t&&"TD"!==t.tagName&&"TH"!==t.tagName||!r&&!C.$tb.is(e.target)&&!C.$tb.is(k(e.target).closest(".fr-toolbar")))&&(C.toolbar.enable(),I()),("BODY"===e.target.tagName||"HTML"===e.target.tagName)&&!t&&0<te().length&&C.toolbar.enable(),!(1!=e.which||1==e.which&&C.helpers.isMac()&&e.ctrlKey)){if(i=!1,r)r=!1,P(e)||1!=te().length?0<te().length?C.selection.isCollapsed()?(h(),C.toolbar.enable()):(I(),C.edit.on()):te().length||(C.$el.removeClass("fr-no-selection"),C.edit.on()):I();if(y){y=!1,T.removeClass("fr-moving"),C.$el.removeClass("fr-no-selection"),C.edit.on();var a=parseFloat(T.css("left"))+C.opts.tableResizerOffset+C.$wp.offset().left;C.opts.iframe&&(a-=C.$iframe.offset().left),T.data("release-position",a),T.removeData("max-left"),T.removeData("max-right"),function A(){var e=T.data("origin"),t=T.data("release-position");if(e!==t){var a=T.data("first"),n=T.data("second"),r=T.data("table"),i=r.outerWidth();if(C.undo.canDo()||C.undo.saveStep(),null!=a&&null!=n){var o,s,l,c=S(r),d=[],f=[],p=[],u=[];for(o=0;o<c.length;o++)s=k(c[o][a]),l=k(c[o][n]),d[o]=s.outerWidth(),p[o]=l.outerWidth(),f[o]=d[o]/i*100,u[o]=p[o]/i*100;for(o=0;o<c.length;o++)if(s=k(c[o][a]),l=k(c[o][n]),c[o][a]!=c[o][n]){var g=(f[o]*(d[o]+t-e)/d[o]).toFixed(4);s.css("width",g+"%"),l.css("width",(f[o]+u[o]-g).toFixed(4)+"%")}}else{var h,m=r.parent(),v=parseFloat(m.css("padding-left")),b=parseFloat(m.css("padding-right")),E=v+b,_=i/(m.width()-E)*100,w=(parseInt(r.css("margin-left"),10)||0)/m.width()*100,y=(parseInt(r.css("margin-right"),10)||0)/m.width()*100;"rtl"==C.opts.direction&&0===n||"rtl"!=C.opts.direction&&0!==n?(h=(i+t-e)/i*_,r.css("margin-right","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))):("rtl"==C.opts.direction&&0!==n||"rtl"!=C.opts.direction&&0===n)&&(h=(i-t+e)/i*_,r.css("margin-left","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(y).toFixed(4),"%)"))),r.css("width","".concat(Math.round(h).toFixed(4),"%"))}C.selection.restore(),C.undo.saveStep(),C.events.trigger("table.resized",[r.get(0)])}T.removeData("origin"),T.removeData("release-position"),T.removeData("first"),T.removeData("second"),T.removeData("table")}(),z()}}}function B(e){if((!(k(e.currentTarget).is(k(e.originalEvent.relatedTarget))||e.currentTarget.contains(e.originalEvent.relatedTarget)||e.originalEvent.relatedTarget&&e.originalEvent.relatedTarget.contains(e.currentTarget))||e.currentTarget.querySelector("input, textarea"))&&(C.events.$on(k("input, textarea"),"click",ne),!0===r&&0<C.opts.tableEditButtons.length)){if(k(e.currentTarget).closest("table").is(ae())){if("TBODY"===e.currentTarget.parentElement.parentElement.tagName&&"TD"==e.currentTarget.tagName&&0===C.$el.find("th.fr-selected-cell").length&&0===C.$el.find("tfoot td.fr-selected-cell").length)return void D(n,e.currentTarget);if("TFOOT"===e.currentTarget.parentElement.parentElement.tagName&&"TD"==e.currentTarget.tagName&&0===C.$el.find("tbody td.fr-selected-cell").length)return void D(n,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===C.$el.find("td.fr-selected-cell").length)return void D(n,e.currentTarget)}"TD"!==e.currentTarget.tagName&&"TH"!==e.currentTarget.tagName&&O()}}function U(e,t,a,n){for(var r,i=t;i!=C.el&&"TD"!=i.tagName&&"TH"!=i.tagName&&("up"==n?r=i.previousElementSibling:"down"==n&&(r=i.nextElementSibling),!r);)i=i.parentNode;"TD"==i.tagName||"TH"==i.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=C.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var n=S(k(a));"up"==t?H(R(e,n),a,n):"down"==t&&$(R(e,n),a,n)}}(i,n):r&&("up"==n&&C.selection.setAtEnd(r),"down"==n&&C.selection.setAtStart(r))}function H(e,t,a){0<k(".tribute-container").length&&"none"!=k(".tribute-container").css("display")||(0<e.row?C.selection.setAtEnd(a[e.row-1][e.col]):U(0,t,0,"up"))}function $(e,t,a){if(!(0<k(".tribute-container").length&&"none"!=k(".tribute-container").css("display"))){var n=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-n?C.selection.setAtStart(a[e.row+n][e.col]):U(0,t,0,"down")}}function z(){T&&(T.find("div").css("opacity",0),T.css("top",0),T.css("left",0),T.css("height",0),T.find("div").css("height",0),T.hide())}function K(){c&&c.removeClass("fr-visible").css("left","-9999px")}function W(e,t){var a,n=k(t);n&&(a=n.closest("table"));var r=a.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<n.closest("td").length?t=n.closest("td"):0<n.closest("th").length&&(t=n.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)T&&n.get(0)!=T.get(0)&&n.parent().get(0)!=T.get(0)&&C.core.sameInstance(T)&&z();else{if(n=k(t),0===C.$el.find(n).length)return!1;var i=n.offset().left-1,o=i+n.outerWidth();if(Math.abs(e.pageX-i)<=C.opts.tableResizerOffset||Math.abs(o-e.pageX)<=C.opts.tableResizerOffset){var s,l,c,d,f,p=S(a),u=R(t,p),g=L(u.row,u.col,p),h=a.offset().top,m=a.outerHeight()-1;"rtl"!=C.opts.direction?e.pageX-i<=C.opts.tableResizerOffset?(c=i,0<u.col?(d=i-q(u.col-1,p)+C.opts.tableResizingLimit,f=i+q(u.col,p)-C.opts.tableResizingLimit,s=u.col-1,l=u.col):(s=null,l=0,d=a.offset().left-1-parseInt(a.css("margin-left"),10),f=a.offset().left-1+a.width()-p[0].length*C.opts.tableResizingLimit)):o-e.pageX<=C.opts.tableResizerOffset&&(c=o,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=o-q(g.col,p)+C.opts.tableResizingLimit,f=o+q(g.col+1,p)-C.opts.tableResizingLimit,s=g.col,l=g.col+1):(s=g.col,l=null,d=a.offset().left-1+p[0].length*C.opts.tableResizingLimit,f=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):o-e.pageX<=C.opts.tableResizerOffset?(c=o,0<u.col?(d=o-q(u.col,p)+C.opts.tableResizingLimit,f=o+q(u.col-1,p)-C.opts.tableResizingLimit,s=u.col,l=u.col-1):(s=null,l=0,d=a.offset().left+p[0].length*C.opts.tableResizingLimit,f=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):e.pageX-i<=C.opts.tableResizerOffset&&(c=i,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=i-q(g.col+1,p)+C.opts.tableResizingLimit,f=i+q(g.col,p)-C.opts.tableResizingLimit,s=g.col+1,l=g.col):(s=g.col,l=null,d=r.offset().left+parseFloat(r.css("padding-left")),f=a.offset().left-1+a.width()-p[0].length*C.opts.tableResizingLimit)),T||function w(){C.shared.$table_resizer||(C.shared.$table_resizer=k(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),T=C.shared.$table_resizer,C.events.$on(T,"mousedown",function(e){return!C.core.sameInstance(T)||(0<te().length&&N(),1==e.which?(C.selection.save(),y=!0,T.addClass("fr-moving"),O(),C.edit.off(),T.find("div").css("opacity",1),!1):void 0)}),C.events.$on(T,"mousemove",function(e){if(!C.core.sameInstance(T))return!0;y&&(C.opts.iframe&&(e.pageX-=C.$iframe.offset().left),Z(e))}),C.events.on("shared.destroy",function(){T.html("").removeData().remove(),T=null},!0),C.events.on("destroy",function(){C.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),k("body").first().append(T.hide())},!0)}(),T.data("table",a),T.data("first",s),T.data("second",l),T.data("instance",C),C.$wp.append(T);var v=c-C.win.pageXOffset-C.opts.tableResizerOffset-C.$wp.offset().left,b=h-C.$wp.offset().top+C.$wp.scrollTop();if(C.opts.iframe){var E=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),_=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));v+=C.$iframe.offset().left+_,b+=C.$iframe.offset().top+E,d+=C.$iframe.offset().left,f+=C.$iframe.offset().left}T.data("max-left",d),T.data("max-right",f),T.data("origin",c-C.win.pageXOffset),T.css("top",b),T.css("left",v),T.css("height",m),T.find("div").css("height",m),T.css("padding-left",C.opts.tableResizerOffset),T.css("padding-right",C.opts.tableResizerOffset),T.show()}else C.core.sameInstance(T)&&z()}}function G(e,t){if(C.$box.find(".fr-line-breaker").isVisible())return!1;c||J(),C.$box.append(c),c.data("instance",C);var a,n=k(t).find("tr").first(),r=e.pageX,i=0,o=0;if(C.opts.iframe){var s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),l=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));i+=C.$iframe.offset().left-C.helpers.scrollLeft()+l,o+=C.$iframe.offset().top-C.helpers.scrollTop()+s}n.find("th, td").each(function(){var e=k(this);return e.offset().left<=r&&r<e.offset().left+e.outerWidth()/2?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-C.$box.offset().top-a-5),c.css("left",i+e.offset().left-C.$box.offset().left-a/2),c.data("selected-cell",e),c.data("position","before"),c.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=r&&r<e.offset().left+e.outerWidth()?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-C.$box.offset().top-a-5),c.css("left",i+e.offset().left-C.$box.offset().left+e.outerWidth()-a/2),c.data("selected-cell",e),c.data("position","after"),c.addClass("fr-visible"),!1):void 0})}function V(e,t){if(C.$box.find(".fr-line-breaker").isVisible())return!1;c||J(),C.$box.append(c),c.data("instance",C);var a,n=k(t),r=e.pageY,i=0,o=0;if(C.opts.iframe){var s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),l=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));i+=C.$iframe.offset().left-C.helpers.scrollLeft()+l,o+=C.$iframe.offset().top-C.helpers.scrollTop()+s}n.find("tr").each(function(){var e=k(this);a=parseInt(c.find("a").css("width"),10);var t=i+e.offset().left-C.$box.offset().left;return t=0!==C.$box.offset().left?t-a-5:t+a-5,e.offset().top<=r&&r<e.offset().top+e.outerHeight()/2?(c.css("top",o+e.offset().top-C.$box.offset().top-a/2),c.css("left",t),c.data("selected-cell",e.find("td").first()),c.data("position","above"),c.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=r&&r<e.offset().top+e.outerHeight()?(c.css("top",o+e.offset().top-C.$box.offset().top+e.outerHeight()-a/2),c.css("left",t),c.data("selected-cell",e.find("td").first()),c.data("position","below"),c.addClass("fr-visible"),!1):void 0})}function Y(e){o=null;var t=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset,e.pageY-C.win.pageYOffset);C.opts.tableResizer&&(!C.popups.areVisible()||C.popups.areVisible()&&C.popups.isVisible("table.edit"))&&W(e,t),!C.opts.tableInsertHelper||C.popups.areVisible()||C.$tb.hasClass("fr-inline")&&C.$tb.isVisible()||function i(e,t){if(0===te().length){var a,n,r;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||C.node.isElement(t)))for(a=1;a<=C.opts.tableInsertHelperOffset;a++){if(n=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset,e.pageY-C.win.pageYOffset+a),k(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(k(n).parents(".fr-wrapper").length||C.opts.iframe)&&"false"!=k(n).closest("table").attr("contenteditable"))return G(e,k(n).closest("table")),!0;if(r=C.doc.elementFromPoint(e.pageX-C.win.pageXOffset+a,e.pageY-C.win.pageYOffset),k(r).hasClass("fr-tooltip"))return!0;if(r&&("TH"==r.tagName||"TD"==r.tagName||"TABLE"==r.tagName)&&(k(r).parents(".fr-wrapper").length||C.opts.iframe)&&"false"!=k(r).closest("table").attr("contenteditable"))return V(e,k(r).closest("table")),!0}C.core.sameInstance(c)&&K()}}(e,t)}function j(){if(y){var e=T.data("table").offset().top-C.win.pageYOffset;if(C.opts.iframe){var t=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top"));e+=C.$iframe.offset().top-C.helpers.scrollTop()+t}T.css("top",e)}}function q(e,t){var a,n=k(t[0][e]).outerWidth();for(a=1;a<t.length;a++)n=Math.min(n,k(t[a][e]).outerWidth());return n}function X(e,t,a){var n,r=0;for(n=e;n<=t;n++)r+=q(n,a);return r}function Z(e){if(1<te().length&&i&&O(),!1===i&&!1===r&&!1===y)o&&clearTimeout(o),C.edit.isDisabled()&&!C.popups.isVisible("table.edit")||(o=setTimeout(Y,30,e));else if(y){var t=e.pageX-C.win.pageXOffset;C.opts.iframe&&(t+=C.$iframe.offset().left);var a=T.data("max-left"),n=T.data("max-right");a<=t&&t<=n?T.css("left",t-C.opts.tableResizerOffset-C.$wp.offset().left):t<a&&parseFloat(T.css("left"),10)>a-C.opts.tableResizerOffset?T.css("left",a-C.opts.tableResizerOffset-C.$wp.offset().left):n<t&&parseFloat(T.css("left"),10)<n-C.opts.tableResizerOffset&&T.css("left",n-C.opts.tableResizerOffset-C.$wp.offset().left)}else i&&K()}function Q(e){C.node.isEmpty(e.get(0))?C.opts.keepTextFormatOnTable&&C.browser.mozilla?e.append(St.MARKERS):e.prepend(St.MARKERS):e.prepend(St.START_MARKER).append(St.END_MARKER)}function J(){C.shared.$ti_helper||(C.shared.$ti_helper=k(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(C.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),C.events.bindClick(C.shared.$ti_helper,"a",function(){var e=c.data("selected-cell"),t=c.data("position"),a=c.data("instance")||C;"before"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"after"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"above"==t?(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()):"below"==t&&(C.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),C.undo.saveStep()),K()}),C.events.on("shared.destroy",function(){C.shared.$ti_helper.html("").removeData().remove(),C.shared.$ti_helper=null},!0),C.events.$on(C.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),C.events.$on(k(C.o_win),"scroll",function(){K()},!0),C.events.$on(C.$wp,"scroll",function(){K()},!0)),c=C.shared.$ti_helper,C.events.on("destroy",function(){c=null}),C.tooltip.bind(C.$box,".fr-insert-helper > a.fr-floating-btn")}function ee(){n=null,clearTimeout(o)}function te(){return C.el.querySelectorAll(".fr-selected-cell")}function ae(){var e=te();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=C.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?k(t):k([])}return k([])}function ne(){r=!1}return{_init:function re(){if(!C.$wp)return!1;if(C.helpers.isMobile()&&(C.events.$on(C.$el,"mousedown",e),C.events.$on(C.$win,"mouseup",a)),!C.helpers.isMobile()){y=r=i=!1,C.events.$on(C.$el,"mousedown",e),C.popups.onShow("image.edit",function(){I(),r=i=!1}),C.popups.onShow("link.edit",function(){I(),r=i=!1}),C.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&I()}),C.events.$on(C.$el,"mouseover","th, td",B),C.events.$on(C.$win,"mouseup",a),C.opts.iframe&&C.events.$on(k(C.o_win),"mouseup",a),C.events.$on(C.$win,"mousemove",Z),C.events.$on(k(C.o_win),"scroll",j),C.events.on("contentChanged",function(){0<te().length&&(h(),C.$el.find("img").on("load.selected-cells",function(){k(this).off("load.selected-cells"),0<te().length&&h()}))}),C.events.$on(k(C.o_win),"resize",function(){I()}),C.events.on("toolbar.esc",function(){if(0<te().length)return C.events.disableBlur(),C.events.focus(),!1},!0),C.events.$on(k(C.o_win),"keydown",function(){i&&r&&(r=i=!1,C.$el.removeClass("fr-no-selection"),C.edit.on(),C.selection.setAtEnd(C.$el.find(".fr-selected-cell").last().get(0)),C.selection.restore(),I())}),C.events.$on(C.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=te();if(null!=t&&0<t.length){var a,n=S(),r=e.which,i=R(1==t.length?a=t[0]:(a=C.el.querySelector(".fr-cell-fixed"),C.el.querySelector(".fr-cell-handler")),n);if(St.KEYCODE.ARROW_RIGHT==r){if(i.col<n[0].length-1)return D(a,n[i.row][i.col+1]),!1}else if(St.KEYCODE.ARROW_DOWN==r){if(i.row<n.length-1)return D(a,n[i.row+1][i.col]),!1}else if(St.KEYCODE.ARROW_LEFT==r){if(0<i.col)return D(a,n[i.row][i.col-1]),!1}else if(St.KEYCODE.ARROW_UP==r&&0<i.row)return D(a,n[i.row-1][i.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=C.selection.blocks();if(a.length&&("P"!==(a=a[0]).tagName&&"DIV"!==a.tagName||(a=a.parentNode),"TD"==a.tagName||"TH"==a.tagName)){for(var n=a;n&&"TABLE"!=n.tagName&&n.parentNode!=C.el;)n=n.parentNode;if(n&&"TABLE"==n.tagName&&(St.KEYCODE.ARROW_LEFT==t||St.KEYCODE.ARROW_UP==t||St.KEYCODE.ARROW_RIGHT==t||St.KEYCODE.ARROW_DOWN==t)&&(0<te().length&&N(),C.browser.webkit&&(St.KEYCODE.ARROW_UP==t||St.KEYCODE.ARROW_DOWN==t))){var r=C.selection.ranges(0).startContainer;if(r.nodeType==Node.TEXT_NODE&&(St.KEYCODE.ARROW_UP==t&&(r.previousSibling&&"BR"!==r.previousSibling.tagName||r.previousSibling&&"BR"===r.previousSibling.tagName&&r.previousSibling.previousSibling)||St.KEYCODE.ARROW_DOWN==t&&(r.nextSibling&&"BR"!==r.nextSibling.tagName||r.nextSibling&&"BR"===r.nextSibling.tagName&&r.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var i=S(k(n)),o=R(a,i);return St.KEYCODE.ARROW_UP==t?H(o,n,i):St.KEYCODE.ARROW_DOWN==t&&$(o,n,i),C.selection.restore(),!1}}}(e)}),C.events.on("keydown",function(e){if(!1===function n(e){if(e.which==St.KEYCODE.TAB){var t;if(0<te().length)t=C.$el.find(".fr-selected-cell").last();else{var a=C.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=k(a):a!=C.el&&(0<k(a).parentsUntil(C.$el,"td").length?t=k(a).parents("td").first():0<k(a).parentsUntil(C.$el,"th").length&&(t=k(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===C.selection.get().focusOffset&&0<k(C.selection.element()).parentsUntil(C.$el,"ol, ul").length&&(0<k(C.selection.element()).closest("li").prev().length||k(C.selection.element()).is("li")&&0<k(C.selection.element()).prev().length))||(N(),e.shiftKey?0<t.prev().length?Q(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?Q(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&Q(t.closest("table").find("thead tr th").last()):0<t.next().length?Q(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?Q(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?Q(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),v("below"),I(),Q(t.closest("tr").next().find("td").first())),C.selection.restore(),!1)}}(e))return!1;var t=te();if(0<t.length){if(0<t.length&&C.keys.ctrlKey(e)&&e.which==St.KEYCODE.A)return I(),C.popups.isVisible("table.edit")&&C.popups.hide("table.edit"),t=[],!0;if(e.which==St.KEYCODE.ESC&&C.popups.isVisible("table.edit"))return I(),C.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==St.KEYCODE.BACKSPACE||e.which==St.KEYCODE.DELETE)){C.undo.saveStep();for(var a=0;a<t.length;a++)k(t[a]).html("<br>"),a==t.length-1&&k(t[a]).prepend(St.MARKERS);return C.selection.restore(),C.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=St.KEYCODE.F10&&!C.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function r(e){if(e.altKey&&e.which==St.KEYCODE.SPACE){var t,a=C.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<k(a).closest("td").length?t=k(a).closest("td").get(0):0<k(a).closest("th").length&&(t=k(a).closest("th").get(0)),t)return e.preventDefault(),D(t,t),h(),!1}}(e))return!1},!0);var t=[];C.events.on("html.beforeGet",function(){t=te();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),C.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),d(!0),p(!0)}C.events.on("destroy",ee)},insert:function ie(e,t){var a,n,r=function c(){var e={startTag:"",closeTag:""};if(C.opts.keepTextFormatOnTable){var t=k(C.selection.element().firstChild).parentsUntil(C.$el);e=u(t)}return{startTag:e.startTag,closeTag:e.closeTag}}(),i="<table "+(C.opts.tableDefaultWidth?'style="width: '+C.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',o=100/t;for(a=0;a<e;a++){for(i+="<tr>",n=0;n<t;n++)i+="<td"+(C.opts.tableDefaultWidth?' style="width: '+o.toFixed(4)+'%;"':"")+">"+r.startTag,0===a&&0===n&&(i+=St.MARKERS),i+="<br>"+r.closeTag+"</td>";i+="</tr>"}if(i+="</tbody></table>",C.opts.trackChangesEnabled){C.edit.on(),C.events.focus(!0),C.selection.restore(),C.undo.saveStep(),C.markers.insert(),C.html.wrap();var s=C.$el.find(".fr-marker");C.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(i),C.selection.clear()}else C.html.insert(i);C.selection.restore();var l=C.$el.find(".fr-inserted-table");l.removeClass("fr-inserted-table"),C.events.trigger("table.inserted",[l.get(0)])},remove:g,insertRow:v,deleteRow:function oe(){var e=ae();if(0<e.length){var t,a,n,r=S(),i=F(r);if(null==i)return;if(0===i.min_i&&i.max_i==r.length-1)g();else{for(t=i.max_i;t>=i.min_i;t--){for(n=k(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<r[t].length;a++)if(0===a||r[t][a]!=r[t][a-1]){var o=k(r[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<r.length-1&&r[t][a]==r[t+1][a]&&(0===t||r[t][a]!=r[t-1][a])){for(var l=r[t][a],c=a;0<c&&r[t][c]==r[t][c-1];)c--;0===c?k(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(l):k(r[t+1][c-1])[0].parentNode&&k(r[t+1][c-1])[0].insertAdjacentElement("afterend",l)}}var d=n.parent();n.remove(),0===d.find("tr").length&&d.remove(),r=S(e)}w(0,r.length-1,0,r[0].length-1,e),0<i.min_i?C.selection.setAtEnd(r[i.min_i-1][0]):C.selection.setAtEnd(r[0][0]),C.selection.restore(),C.popups.hide("table.edit")}}},insertColumn:function se(d){var e=ae();if(0<e.length){var f,p=S(),t=F(p);f="before"==d?t.min_j:t.max_j;var a,u=100/p[0].length,g=100/(p[0].length+1);e.find("th, td").each(function(){(a=k(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=k(this),n=0,r=0;n-1<f;){if(!(t=a.find("> th, > td").get(r))){t=null;break}t==p[e][n]?(n+=parseInt(k(t).attr("colspan"),10)||1,r++):(n+=parseInt(k(p[e][n]).attr("colspan"),10)||1,"after"==d&&(t=0===r?-1:a.find("> th, > td").get(r-1)))}var i=k(t);if("after"==d&&f<n-1||"before"==d&&0<f&&p[e][f]==p[e][f-1]){if(0===e||0<e&&p[e][f]!=p[e-1][f]){var o=parseInt(i.attr("colspan"),10)+1;i.attr("colspan",o),i.css("width",(i.data("old-width")*g/u+g).toFixed(4)+"%"),i.removeData("old-width")}}else{var s,l=(i.get(0)||"").tagName;if(0<a.find("th").length&&"TH"===l)s='<th style="width: '.concat(g.toFixed(4),'%;"><br></th>');else{var c=m(p[e][f]);s='<td style="'.concat(i.attr("style"),"; width: ").concat(g.toFixed(4),'%;">')+c.startTag+"<br>"+c.closeTag+"</td>"}k(s).append("<br>"),k(s).css("width","".concat(g.toFixed(4),"%")),-1==t?a.prepend(s):null==t?a.append(s):"before"==d?i.before(s):"after"==d&&i.after(s)}}),e.find("th, td").each(function(){(a=k(this)).data("old-width")&&(a.css("width",(a.data("old-width")*g/u).toFixed(4)+"%"),a.removeData("old-width"))}),C.popups.isVisible("table.edit")&&h()}},deleteColumn:function le(){var e=ae();if(0<e.length){var t,a,n,r=S(),i=F(r);if(null==i)return;if(0===i.min_j&&i.max_j==r[0].length-1)g();else{var o=0;for(t=0;t<r.length;t++)for(a=0;a<r[0].length;a++)(n=k(r[t][a])).hasClass("fr-selected-cell")||(n.data("old-width",n.outerWidth()/e.outerWidth()*100),(a<i.min_j||a>i.max_j)&&(o+=n.outerWidth()/e.outerWidth()*100));for(o/=r.length,a=i.max_j;a>=i.min_j;a--)for(t=0;t<r.length;t++)if(0===t||r[t][a]!=r[t-1][a])if(n=k(r[t][a]),1<(parseInt(n.attr("colspan"),10)||1)){var s=parseInt(n.attr("colspan"),10)-1;1==s?n.removeAttr("colspan"):n.attr("colspan",s),n.css("width",(100*(n.data("old-width")-q(a,r))/o).toFixed(4)+"%"),n.removeData("old-width")}else{var l=k(n.parent().get(0));n.remove(),0===l.find("> th, > td").length&&(0===l.prev().length||0===l.next().length||l.prev().find("> th[rowspan], > td[rowspan]").length<l.prev().find("> th, > td").length)&&l.remove()}w(0,r.length-1,0,r[0].length-1,e),0<i.min_j?C.selection.setAtEnd(r[i.min_i][i.min_j-1]):C.selection.setAtEnd(r[i.min_i][0]),C.selection.restore(),C.popups.hide("table.edit"),e.find("th, td").each(function(){(n=k(this)).data("old-width")&&(n.css("width",(100*n.data("old-width")/o).toFixed(4)+"%"),n.removeData("old-width"))})}}},mergeCells:function ce(){if(1<te().length&&(0===C.$el.find("th.fr-selected-cell").length||0===C.$el.find("td.fr-selected-cell").length)){x();var e,t,a=F(S());if(null==a)return;var n=C.$el.find(".fr-selected-cell"),r=k(n[0]),i=r.parent().find(".fr-selected-cell"),o=r.closest("table"),s=r.html(),l=0;for(e=0;e<i.length;e++)l+=k(i[e]).outerWidth();for(r.css("width",Math.min(100,l/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&r.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&r.attr("rowspan",a.max_i-a.min_i+1),e=1;e<n.length;e++)"<br>"!=(t=k(n[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();r.html(s),C.selection.setAtEnd(r.get(0)),C.selection.restore(),C.toolbar.enable(),E(a.min_i,a.max_i,o);var c=o.find("tr:empty");for(e=c.length-1;0<=e;e--)k(c[e]).remove();b(a.min_j,a.max_j,o),h()}},splitCellVertically:function de(){if(1==te().length){var e=C.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),n=e.outerWidth(),r=e.clone().html("<br>"),i=S(),o=R(e.get(0),i);if(1<t){var s=Math.ceil(t/2);n=X(o.col,o.col+s-1,i)/a*100;var l=X(o.col+s,o.col+t-1,i)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?r.attr("colspan",t-s):r.removeAttr("colspan"),e.css("width",n.toFixed(4)+"%"),r.css("width",l.toFixed(4)+"%")}else{var c;for(c=0;c<i.length;c++)if(0===c||i[c][o.col]!=i[c-1][o.col]){var d=k(i[c][o.col]);if(!d.is(e)){var f=(parseInt(d.attr("colspan"),10)||1)+1;d.attr("colspan",f)}}n=n/a*100/2,e.css("width","".concat(n.toFixed(4),"%")),r.css("width","".concat(n.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",r[0]),I(),C.popups.hide("table.edit")}},splitCellHorizontally:function fe(){if(1==te().length){var e=C.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),n=parseInt(e.attr("rowspan"),10),r=S(),i=R(e.get(0),r),o=e.clone().html("<br>");if(1<n){var s=Math.ceil(n/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<n-s?o.attr("rowspan",n-s):o.removeAttr("rowspan");for(var l=i.row+s,c=0===i.col?i.col:i.col-1;0<=c&&(r[l][c]==r[l][c-1]||0<l&&r[l][c]==r[l-1][c]);)c--;-1==c?k(a.find("tr").not(a.find("> table tr")).get(l)).prepend(o):k(r[l][c])[0].parentNode&&k(r[l][c])[0].insertAdjacentElement("afterend",o[0])}else{var d,f=k(document.createElement("tr")).append(o);for(d=0;d<r[0].length;d++)if(0===d||r[i.row][d]!=r[i.row][d-1]){var p=k(r[i.row][d]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",f[0])}I(),C.popups.hide("table.edit")}},addHeader:function pe(){var e=ae();if(0<e.length&&0===e.find("> th").length){var t,a="<thead><tr>",n=0;for(n=e.find("tr").first().find("> th").length,e.find("tr").first().find("> td").each(function(){var e=k(this);n+=parseInt(e.attr("colspan"),10)||1}),t=0;t<n;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},addFooter:function ue(){var e=ae();if(0<e.length&&0===e.find("tfoot").length){var t,a="<tfoot><tr>",n=0,r="> td";for(0<e.find("thead").length&&(r="> th"),e.find("tr").first().find(r).each(function(){var e=k(this);n+=parseInt(e.attr("colspan"),10)||1}),t=0;t<n;t++)a+="<td><br></td>";a+="</tr></tfoot>",e.append(a),h()}},removeHeader:function ge(){var e=ae(),t=e.find("> thead");if(0<(t=k(t)).length)if(0===e.find("tbody tr").length)g();else if(t.remove(),0<te().length)h();else{C.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(C.selection.setAtEnd(a),C.selection.restore())}},removeFooter:function he(){var e=ae(),t=e.find("tfoot");if(0<t.length)if(0===e.find("tbody tr").length)g();else if(t.remove(),0<te().length)h();else{C.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(C.selection.setAtEnd(a),C.selection.restore())}},setBackground:t,showInsertPopup:function me(){var e=C.$tb.find('.fr-command[data-cmd="insertTable"]'),t=C.popups.get("table.insert");if(t||(t=d()),!t.hasClass("fr-active")){C.popups.refresh("table.insert"),C.popups.setContainer("table.insert",C.$tb);var a=C.button.getPosition(e),n=a.left,r=a.top;C.popups.show("table.insert",n,r,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function ve(){0<te().length?h():(C.popups.hide("table.insert"),C.toolbar.showInline())},verticalAlign:function be(e){C.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function Ee(e){C.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function _e(e,t,a,n){if(0<t.length){if(C.opts.useClasses||("TABLE"===t.get(0).tagName?function i(e,t){var a=e.childNodes;if(0<a.length)for(var n=0;n<a.length;n++)"TD"===a[n].tagName?"fr-dashed-borders"===t||"fr-highlighted"===t||"fr-thick"===t?A(a[n]):"fr-alternate-rows"===t&&a[n].style.removeProperty("background-color"):i(a[n],t)}(t.get(0),e):A(t.get(0))),!a){var r=Object.keys(n);r.splice(r.indexOf(e),1),t.removeClass(r.join(" "))}t.toggleClass(e)}},selectedTable:ae,selectedCells:te,customColor:function we(){var e=C.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:D}},St.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),St.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),St.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),St.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),St.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("> thead").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),St.DefineIcon("tableFooter",{NAME:"table",FA5NAME:"table",SVG_KEY:"tableFooter"}),St.RegisterCommand("tableFooter",{title:"Table Footer",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableFooter"]').hasClass("fr-active")?this.table.removeFooter():this.table.addFooter()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("tfoot").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),St.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),St.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),St.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),St.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),St.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),St.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),St.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),St.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),St.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),St.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,n=this.$el.find(".fr-selected-cell").closest("table");n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),St.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),St.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),St.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),St.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||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"))}}),St.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),St.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),St.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),St.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),St.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),St.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=St.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),St.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),St.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,n=this.$el.find(".fr-selected-cell").first();n&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=n.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),St.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),St.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"}),St.URLRegEx="(^| |\\u00A0)(".concat(St.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),St.PLUGINS.url=function(f){var p=f.$,i=null;function t(e,t,a){for(var n="";a.length&&"."==a[a.length-1];)n+=".",a=a.substring(0,a.length-1);var r=a;if(f.opts.linkConvertEmailAddress)f.helpers.isEmail(r)&&!/^mailto:.*/i.test(r)&&(r="mailto:".concat(r));else if(f.helpers.isEmail(r))return t+a;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(r)||(r="//".concat(r)),(t||"")+"<a".concat(f.opts.linkAlwaysBlank?' target="_blank"':"").concat(i?' rel="'.concat(i,'"'):"",' data-fr-linked="true" href="').concat(r,'">').concat(a.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(n)}var u=function u(){return new RegExp(St.URLRegEx,"gi")};function g(e){return f.opts.linkAlwaysNoFollow&&(i="nofollow"),f.opts.linkAlwaysBlank&&(f.opts.linkNoOpener&&(i?i+=" noopener":i="noopener"),f.opts.linkNoReferrer&&(i?i+=" noreferrer":i="noreferrer")),e.replace(u(),t)}function h(e){var t=e.split(" ");return t[t.length-1]}function a(){var e=f.selection.ranges(0),t=e.startContainer;if(t.nodeType!==Node.TEXT_NODE)return!1;if(!t||e.startOffset!==(t.textContent||"").length){f.markers.insert();var a=f.$el.find(".fr-marker"),n=t.textContent.match(/(^| |\u00A0)(((([a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,})(\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))|((ftp|http|https):\/\/[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,})|(www\.[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,}\.[a-z0-9-]{2,24})|((ftp|http|https):\/\/[\u0021-\uffff]{1,}@[a-z\u0080-\u009f\u00a1-\uffff0-9-_\.]{1,}))((:[0-9]{1,5})|)(((\/|\?|#)[a-z\u00a1-\uffff0-9@?\|!^=%&amp;\/~+#-\'*-_{}]*)|())|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\.[a-z0-9+-_]{1,}))$/gi);if(a.remove(),!n)return!1}if(function d(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==f.el)&&d(e.parentNode))}(t))return!1;if(u().test(h(t.textContent))){var r,i=t.textContent.length;if(0<i&&","===t.textContent.charAt(i-1)){p(t).before(g(t.textContent.substring(0,i-1))),(r=p(t.parentNode).find("a[data-fr-linked]")).removeAttr("data-fr-linked"),t.textContent=",";var o=f.win.getSelection().getRangeAt(0);o.setStart(t,1),o.setEnd(t,1)}else p(t).before(g(t.textContent)),(r=p(t.parentNode).find("a[data-fr-linked]")).removeAttr("data-fr-linked"),t.parentNode.removeChild(t);f.events.trigger("url.linked",[r.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var s=t.previousSibling.innerText+t.textContent,l=t.textContent.length;if(u().test(h(s))&&","!==t.textContent.charAt(l-1)){var c=(new DOMParser).parseFromString(g(s),"text/html").body.childNodes;t.parentNode.replaceChild(c[0],t.previousSibling),c.length&&p(t).before(c[0]),t.parentNode.removeChild(t)}}}return{_init:function e(){f.events.on("keypress",function(e){!f.selection.isCollapsed()||")"!=e.key&&"("!=e.key||a()},!0),f.events.on("keydown",function(e){var t=e.which;!f.selection.isCollapsed()||t!=St.KEYCODE.ENTER&&t!=St.KEYCODE.SPACE||a()},!0),f.events.on("paste.beforeCleanup",function(e){if(f.helpers.isURL(e)&&!f.$el[0].getAttribute("plainpaste")){var t=null;return f.opts.linkAlwaysBlank&&(f.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),f.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(f.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}if(f.$el[0].getAttribute("plainpaste"))return function a(e){if("string"==typeof e)return(e=e.replace(/&amp;/g,"&")).replace(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/gim,g).replace(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gim,g)}(e)})}}},Object.assign(St.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(St.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}),St.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\/?((shorts\/)|(v=))?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/|shorts\/)?([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"}],St.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,St.PLUGINS.video=function(_){var s,d,f,w,n,a,y=_.$,A="https://i.froala.com/upload",p=2,u=3,g=4,C=5,T=6,r={};function h(){var e=_.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 i(){var e=_.popups.get("video.edit");if(e||(e=function o(){var e="";if(0<_.opts.videoEditButtons.length){_.opts.videoResponsive&&(-1<_.opts.videoEditButtons.indexOf("videoSize")&&_.opts.videoEditButtons.splice(_.opts.videoEditButtons.indexOf("videoSize"),1),-1<_.opts.videoEditButtons.indexOf("videoDisplay")&&_.opts.videoEditButtons.splice(_.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<_.opts.videoEditButtons.indexOf("videoAlign")&&_.opts.videoEditButtons.splice(_.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(_.button.buildList(_.opts.videoEditButtons)," \n </div>")},a=_.popups.create("video.edit",t);return _.events.$on(_.$wp,"scroll.video-edit",function(){w&&_.popups.isVisible("video.edit")&&(_.events.disableBlur(),c(w))}),a}return!1}()),e){_.popups.setContainer("video.edit",_.$sc),_.popups.refresh("video.edit");var t=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,i=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||i||w.find("audio").get(0)?(document.getElementById("autoplay-".concat(_.id))&&(document.getElementById("autoplay-".concat(_.id)).style.display="none"),document.getElementById("videoReplace-".concat(_.id))&&(document.getElementById("videoReplace-".concat(_.id)).style.display="none")):(document.getElementById("autoplay-".concat(_.id))&&(document.getElementById("autoplay-".concat(_.id)).style.display=""),document.getElementById("videoReplace-".concat(_.id))&&(document.getElementById("videoReplace-".concat(_.id)).style.display="")),_.popups.show("video.edit",a,n,t.outerHeight(),!0)}}function o(e){if(e)return _.popups.onRefresh("video.insert",h),_.popups.onHide("video.insert",Z),!0;var t="";_.opts.videoUpload||-1===_.opts.videoInsertButtons.indexOf("videoUpload")||_.opts.videoInsertButtons.splice(_.opts.videoInsertButtons.indexOf("videoUpload"),1);var a=_.button.buildList(_.opts.videoInsertButtons);""!==a&&(t='<div class="fr-buttons">'+a+"</div>");var n,r="",i=_.opts.videoInsertButtons.indexOf("videoUpload"),o=_.opts.videoInsertButtons.indexOf("videoByURL"),s=_.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=o){n=" fr-active",(i<o&&0<=i||s<o&&0<=s)&&(n="");r='<div class="fr-video-by-url-layer fr-layer'.concat(n,'" id="fr-video-by-url-layer-').concat(_.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(_.id,'" type="text" placeholder="').concat(_.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(_.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(_.language.translate("Insert"),"</button></div></div>")}var l="";0<=s&&(n=" fr-active",(i<s&&0<=i||o<s&&0<=o)&&(n=""),l='<div class="fr-video-embed-layer fr-layer'.concat(n,'" id="fr-video-embed-layer-').concat(_.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(_.id,'" type="text" placeholder="').concat(_.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(_.language.translate("Insert"),"</button></div></div>"));var c="";0<=i&&(n=" fr-active",(s<i&&0<=s||o<i&&0<=o)&&(n=""),c='<div class="fr-video-upload-layer fr-layer'.concat(n,'" id="fr-video-upload-layer-').concat(_.id,'"><strong>').concat(_.language.translate("Drop video"),"</strong><br>(").concat(_.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(_.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(_.id,'" role="button"></div></div>'));var d={buttons:t,by_url_layer:r,embed_layer:l,upload_layer:c,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=_.popups.create("video.insert",d);return function p(n){_.events.$on(n,"dragover dragenter",".fr-video-upload-layer",function(){return y(this).addClass("fr-drop"),!1},!0),_.events.$on(n,"dragleave dragend",".fr-video-upload-layer",function(){return y(this).removeClass("fr-drop"),!1},!0),_.events.$on(n,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),y(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||_;a.events.disableBlur(),a.video.upload(t.files),a.events.enableBlur()}},!0),_.helpers.isIOS()&&_.events.$on(n,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){y(this).trigger("click")},!0);_.events.$on(n,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||_;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}y(this).val("")},!0)}(f),f}function m(e){_.events.focus(!0),_.selection.restore();var t=!1;if(w&&(X(),t=!0),_.opts.trackChangesEnabled){_.edit.on(),_.events.focus(!0),_.selection.restore(),_.undo.saveStep(),_.markers.insert(),_.html.wrap();var a=_.$el.find(".fr-marker");_.node.isLastSibling(a)&&a.parent().hasClass("fr-deletable")&&a.insertAfter(a.parent()),a.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>")),_.selection.clear()}else _.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,_.opts.videoSplitHTML);_.popups.hide("video.insert");var n=_.$el.find(".fr-jiv");n.removeClass("fr-jiv"),n.toggleClass("fr-rv",_.opts.videoResponsive),Q(n,_.opts.videoDefaultDisplay,_.opts.videoDefaultAlign),n.toggleClass("fr-draggable",_.opts.videoMove),_.events.trigger(t?"video.replaced":"video.inserted",[n])}function v(){var e=y(this);_.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),c(e.parent()),_.events.trigger("video.loaded",[e.parent()])}function k(s,e,l,c,d,f){_.edit.off(),b("Loading video"),e&&(s=_.helpers.sanitizeURL(s));var p=function p(){var e,t;if(c){_.undo.canDo()||c.find("video").hasClass("fr-uploading")||_.undo.saveStep();var a=c.find("video").data("fr-old-src"),n=c.data("fr-replaced");if(c.data("fr-replaced",!1),0<c.find("iframe").length)c.remove(),e=O(s,l,v);else{_.$wp?((e=c.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&c.find("video").attr("src",a),c.replaceWith(e)):e=c;for(var r=e.find("video").get(0).attributes,i=0;i<r.length;i++){var o=r[i];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",v),e.find("video").attr("src",s)}_.edit.on(),B(),_.undo.saveStep(),_.$el.blur(),_.events.trigger(n?"video.replaced":"video.inserted",[e,d])}else e=O(s,l,v,f),B(),_.undo.saveStep(),_.events.trigger("video.inserted",[e,d])};S("Loading video"),p()}function S(e){var t=_.popups.get("video.insert");if(t||(t=o()),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(),w){var a=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video"));_.popups.setContainer("video.insert",_.$sc);var n=a.offset().left,r=a.offset().top+a.height();_.popups.show("video.insert",n,r,a.outerHeight())}void 0===e&&b(_.language.translate("Uploading"),0)}function l(e){var t=_.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||_.$el.find("video.fr-error").length)){if(_.events.focus(),_.$el.find("video.fr-error").length&&(_.$el.find("video.fr-error").parent().remove(),_.undo.saveStep(),_.undo.run(),_.undo.dropRedo()),!_.$wp&&w){var a=w;H(!0),_.selection.setAfter(a.find("video").get(0)),_.selection.restore()}_.popups.hide("video.insert")}}function b(e,t){var a=_.popups.get("video.insert");if(a){var n=a.find(".fr-video-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function E(e){S();var t=_.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),_.events.disableBlur(),a.focus()}function c(e){t.call(e.get(0))}function R(e,t,a){b("Loading video");var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(_.opts.videoUploadToS3||_.opts.videoUploadToAzure)if(201==n){var s;if(_.opts.videoUploadToAzure){if(!1===_.events.trigger("video.uploadedToAzure",[this.responseURL,a,r],!0))return _.edit.on(),!1;s=t}else s=function c(e){try{var t=y(e).find("Location").text(),a=y(e).find("Key").text();return!1===_.events.trigger("video.uploadedToS3",[t,a,e],!0)?(_.edit.on(),!1):t}catch(n){return G(g,e),!1}}(i);s&&k(s,!1,[],e,r||i)}else G(g,r||i);else if(200<=n&&n<300){var l=function d(e){try{if(!1===_.events.trigger("video.uploaded",[e],!0))return _.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(G(p,e),!1)}catch(a){return G(g,e),!1}}(o);l&&k(l.link,!1,l,e,r||o)}else G(u,r||o)}catch(f){G(g,r||o)}}function L(){G(g,this.response||this.responseText||this.responseXML)}function x(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;b(_.language.translate("Uploading"),t)}}function I(){_.edit.on(),l(!0)}function O(e,t,a,n){var r,i,o="";if(t&&void 0!==t)for(r in t)t.hasOwnProperty(r)&&"link"!=r&&(o+=" ".concat(r,'="').concat(t[r],'"'));var s=_.opts.videoDefaultWidth;s&&"auto"!=s&&(s="".concat(s,"px")),_.helpers.isMobile()&&_.browser.safari&&(o+=" autoplay playsinline"),(i="audio"==n?y(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+_.opts.videoDefaultDisplay[0]+("center"!=_.opts.videoDefaultAlign?" fr-fv"+_.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+o+" controls>"+_.language.translate("Your browser does not support HTML5 video.")+"</audio>"):y(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+_.opts.videoDefaultDisplay[0]+("center"!=_.opts.videoDefaultAlign?" fr-fv"+_.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+o+(s?' style="width: '+s+';" ':"")+" controls>"+_.language.translate("Your browser does not support HTML5 video.")+"</video>")).toggleClass("fr-draggable",_.opts.videoMove),_.edit.on(),_.events.focus(!0),_.selection.restore(),_.undo.saveStep(),_.opts.videoSplitHTML?_.markers.split():(_.cursor.enter(),_.markers.insert()),_.html.wrap();var l=_.$el.find(".fr-marker");return _.node.isLastSibling(l)&&l.parent().hasClass("fr-deletable")&&l.insertAfter(l.parent()),l.replaceWith(i),_.selection.clear(),"audio"!==n&&(i.find("video").get(0).readyState>i.find("video").get(0).HAVE_FUTURE_DATA||_.helpers.isIOS()?a.call(i.find("video").get(0)):i.find("video").on("canplaythrough load",a)),i}function F(e){if(!_.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),a=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!a)return!1;if("mousedown"==e.type){var n=_.$oel.get(0).ownerDocument,r=n.defaultView||n.parentWindow,i=!1;try{i=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(o){}i&&r.frameElement&&(t+=_.helpers.getPX(y(r.frameElement).offset().left)+r.frameElement.clientLeft,a=e.clientY+_.helpers.getPX(y(r.frameElement).offset().top)+r.frameElement.clientTop)}_.undo.canDo()||_.undo.saveStep(),(d=y(this)).data("start-x",t),d.data("start-y",a),s.show(),_.popups.hideAll(),z()}function M(e){if(!_.core.sameInstance(f))return!0;if(d){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),a=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!a)return!1;var n=d.data("start-x"),r=d.data("start-y");d.data("start-x",t),d.data("start-y",a);var i=t-n,o=a-r,s=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),l=s.width(),c=s.height();(d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(i=0-i),(d.hasClass("fr-hnw")||d.hasClass("fr-hne"))&&(o=0-o),s.css("width",l+i),s.css("height",c+o),s.removeAttr("width"),s.removeAttr("height"),U()}}function D(e){if(!_.core.sameInstance(f))return!0;d&&w&&(e&&e.stopPropagation(),d=null,s.hide(),U(),i(),_.undo.saveStep())}function P(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function N(e,t,a,n){return e.pageX=t,e.pageY=t,F.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),e.pageY=e.pageY+a*Math.floor(Math.pow(1.1,n)),M.call(this,e),D.call(this,e),++n}function B(){var e,t=Array.prototype.slice.call(_.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),y(t[e]).toggleClass("fr-draggable",_.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("src"))<0&&_.events.trigger("video.removed",[y(n[e])]);n=t}function U(){f||function o(){var e;if(_.shared.$video_resizer?(f=_.shared.$video_resizer,s=_.shared.$vid_overlay,_.events.on("destroy",function(){y("body").first().append(f.removeClass("fr-active"))},!0)):(_.shared.$video_resizer=y(document.createElement("div")).attr("class","fr-video-resizer"),f=_.shared.$video_resizer,_.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),_.opts.videoResize&&(f.append(P("nw")+P("ne")+P("sw")+P("se")),_.shared.$vid_overlay=y(document.createElement("div")).attr("class","fr-video-overlay"),s=_.shared.$vid_overlay,e=f.get(0).ownerDocument,y(e).find("body").first().append(s))),_.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,_.opts.videoResize&&(s.remove(),s=null)},!0),_.helpers.isMobile()||_.events.$on(y(_.o_win),"resize.video",function(){H(!0)}),_.opts.videoResize){e=f.get(0).ownerDocument,_.events.$on(f,_._mousedown,".fr-handler",F),_.events.$on(y(e),_._mousemove,M),_.events.$on(y(e.defaultView||e.parentWindow),_._mouseup,D),_.events.$on(s,"mouseleave",D);var n=1,r=null,i=0;_.events.on("keydown",function(e){if(w){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-i)&&(n=1),(a==St.KEYCODE.EQUALS||_.browser.mozilla&&a==St.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=N.call(this,e,1,1,n):(a==St.KEYCODE.HYPHEN||_.browser.mozilla&&a==St.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(n=N.call(this,e,2,-1,n)),r=a,i=e.timeStamp}}),_.events.on("keyup",function(){n=1})}}(),(_.$wp||_.$sc).append(f),f.data("instance",_);var e=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,a=0;_.opts.iframe&&(a=_.helpers.getPX(_.$wp.find(".fr-iframe").css("padding-top")),t=_.helpers.getPX(_.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(_.opts.iframe?e.offset().top+a-1:e.offset().top-_.$wp.offset().top-1)+_.$wp.scrollTop()).css("left",(_.opts.iframe?e.offset().left+t-1:e.offset().left-_.$wp.offset().left-1)+_.$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&&a)return!0;if(e&&_.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(_.edit.isDisabled())return!1;for(var t=0;t<St.INSTANCES.length;t++)St.INSTANCES[t]!=_&&St.INSTANCES[t].events.trigger("video.hideResizer");_.toolbar.disable(),_.helpers.isMobile()&&(_.events.disableBlur(),_.$el.blur(),_.events.enableBlur()),_.$el.find(".fr-video.fr-active").removeClass("fr-active"),(w=y(this)).addClass("fr-active"),_.opts.iframe&&_.size.syncIframe(),te(),U(),i(),_.selection.clear(),_.button.bulkRefresh(),_.events.trigger("image.hideResizer")}function H(e){w&&(function t(){return _.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),_.toolbar.enable(),w.removeClass("fr-active"),w=null,z())}function $(){_.shared.vid_exit_flag=!0}function z(){_.shared.vid_exit_flag=!1}function K(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("video")){if(!_.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;_.markers.remove(),_.markers.insertAtPoint(e.originalEvent),_.$el.find(".fr-marker").replaceWith(St.MARKERS),_.popups.hideAll();var n=_.popups.get("video.insert");return n||(n=o()),_.popups.setContainer("video.insert",_.$sc),_.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),S(),0<=_.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))?W(t.files):G(T),e.preventDefault(),e.stopPropagation(),!1}}}function W(e){if(void 0!==e&&0<e.length){if(!1===_.events.trigger("video.beforeUpload",[e]))return!1;var t,a=e[0];if(!(null!==_.opts.videoUploadURL&&_.opts.videoUploadURL!=A||_.opts.videoUploadToS3||_.opts.videoUploadToAzure))return function E(n){w&&w.find("iframe")&&w.find("iframe").length&&X();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],a=0;a<e.length;a++)t.push(e.charCodeAt(a));k(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:n.type})),!1,null,w)},S(),r.readAsDataURL(n)}(a),!1;if(a.size>_.opts.videoMaxSize)return G(C),!1;if(_.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))<0)return G(T),!1;if(_.drag_support.formdata&&(t=_.drag_support.formdata?new FormData:null),t){var n;if(!1!==_.opts.videoUploadToS3)for(n in t.append("key",_.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(a.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",a.type),_.opts.videoUploadToS3.params)_.opts.videoUploadToS3.params.hasOwnProperty(n)&&t.append(n,_.opts.videoUploadToS3.params[n]);for(n in _.opts.videoUploadParams)_.opts.videoUploadParams.hasOwnProperty(n)&&t.append(n,_.opts.videoUploadParams[n]);t.append(_.opts.videoUploadParam,a);var r,i,o=_.opts.videoUploadURL;_.opts.videoUploadToS3&&(o=_.opts.videoUploadToS3.uploadURL?_.opts.videoUploadToS3.uploadURL:"https://".concat(_.opts.videoUploadToS3.region,".amazonaws.com/").concat(_.opts.videoUploadToS3.bucket));var s=_.opts.videoUploadMethod;_.opts.videoUploadToAzure&&(o=_.opts.videoUploadToAzure.uploadURL?"".concat(_.opts.videoUploadToAzure.uploadURL,"/").concat(a.name):encodeURI("https://".concat(_.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(_.opts.videoUploadToAzure.container,"/").concat(a.name)),r=o,_.opts.videoUploadToAzure.SASToken&&(o+=_.opts.videoUploadToAzure.SASToken),s="PUT");var l=_.core.getXHR(o,s);if(_.opts.videoUploadToAzure){var c=(new Date).toUTCString();if(!_.opts.videoUploadToAzure.SASToken&&_.opts.videoUploadToAzure.accessKey){var d=_.opts.videoUploadToAzure.account,f=_.opts.videoUploadToAzure.container;if(_.opts.videoUploadToAzure.uploadURL){var p=_.opts.videoUploadToAzure.uploadURL.split("/");f=p.pop(),d=p.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(c,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+d+"/"+f+"/"+a.name),h=s+"\n\n\n"+a.size+"\n\n"+a.type+"\n\n\n\n\n\n\n"+u+"\n"+g,m=_.cryptoJSPlugin.cryptoJS.HmacSHA256(h,_.cryptoJSPlugin.cryptoJS.enc.Base64.parse(_.opts.videoUploadToAzure.accessKey)).toString(_.cryptoJSPlugin.cryptoJS.enc.Base64),v="SharedKey "+d+":"+m;i=m,l.setRequestHeader("Authorization",v)}for(n in l.setRequestHeader("x-ms-version","2019-07-07"),l.setRequestHeader("x-ms-date",c),l.setRequestHeader("Content-Type",a.type),l.setRequestHeader("x-ms-blob-type","BlockBlob"),_.opts.videoUploadParams)_.opts.videoUploadParams.hasOwnProperty(n)&&l.setRequestHeader(n,_.opts.videoUploadParams[n]);for(n in _.opts.videoUploadToAzure.params)_.opts.videoUploadToAzure.params.hasOwnProperty(n)&&l.setRequestHeader(n,_.opts.videoUploadToAzure.params[n])}l.onload=function(){R.call(l,w,r,i)},l.onerror=L,l.upload.onprogress=x,l.onabort=I,S(),_.events.disableBlur(),_.edit.off(),_.events.enableBlur();var b=_.popups.get("video.insert");b&&y(b.off("abortUpload")).on("abortUpload",function(){4!=l.readyState&&l.abort()}),l.send(_.opts.videoUploadToAzure?a:t)}}}function G(e,t){_.edit.on(),w&&w.find("video").addClass("fr-error"),E(_.language.translate("Something went wrong. Please try again.")),_.events.trigger("video.error",[{code:e,message:r[e]},t])}function V(){if(w){var e=_.popups.get("video.size"),t=w.find("iframe, embed, ".concat(w.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 Y(e){if(e)return _.popups.onRefresh("video.size",V),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(_.button.buildList(_.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(_.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(_.id,'" type="text" name="width" placeholder="').concat(_.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(_.id,'" type="text" name="height" placeholder="').concat(_.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(_.language.translate("Update"),"</button></div></div>")},a=_.popups.create("video.size",t);return _.events.$on(_.$wp,"scroll",function(){w&&_.popups.isVisible("video.size")&&(_.events.disableBlur(),c(w))}),a}function j(e){if(void 0===e&&(e=w),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 q(e){void 0===e&&(e=w);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 X(){if(w&&!1!==_.events.trigger("video.beforeRemove",[w])){var e=w;if(_.popups.hideAll(),H(!0),_.opts.trackChangesEnabled&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return void _.track_changes.removeSpecialItem(e);_.selection.setBefore(e.get(0))||_.selection.setAfter(e.get(0)),e.remove(),_.selection.restore(),_.html.fillEmptyBlocks()}}function Z(){l()}function Q(e,t,a){!_.opts.htmlUntouched&&_.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(a[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==a?e.css({"float":"none"}):"left"==a?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==a?e.css({textAlign:"left"}):"right"==a?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=_.$el.find("video").filter(function(){return 0===y(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(y(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),_.$el.find("embed, iframe").filter(function(){if(_.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<y(this).parents("span.fr-video").length)return!1;for(var e=y(this).attr("src"),t=0;t<St.VIDEO_PROVIDERS.length;t++){var a=St.VIDEO_PROVIDERS[t];if(a.test_regex.test(e)&&new RegExp(_.opts.videoAllowedProviders.join("|")).test(a.provider))return!0}return!1}).map(function(){return 0===y(this).parents("object").length?this:y(this).parents("object").get(0)}).wrap(y(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,a,n,r,i=_.$el.find("span.fr-video, video"),o=0;o<i.length;o++){var s=y(i[o]);!_.opts.htmlUntouched&&_.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(j(r)[0])),r.addClass("fr-dv".concat(q(r)[0]))),_.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):_.opts.htmlUntouched||_.opts.useClasses||(void 0,a=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,n=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":j(t),Q(t,a,n),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}i.toggleClass("fr-draggable",_.opts.videoMove)}}function ee(e){document.getElementById("autoplay-".concat(_.id)).style.cssText="background:".concat(e)}function te(){if(w){_.selection.clear();var e=_.doc.createRange();e.selectNode(w.get(0)),_.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[p]="No link in upload response.",r[u]="Error during file upload.",r[g]="Parsing response failed.",r[C]="File is too large.",r[T]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",_.shared.vid_exit_flag=!1,{_init:function ae(){_.opts.videoResponsive&&(_.opts.videoResize=!1),function e(){_.events.on("drop",K,!0),_.events.on("mousedown window.mousedown",$),_.events.on("window.touchmove",z),_.events.on("mouseup window.mouseup",H),_.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&H()}),_.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){H(!0)}),_.events.on("filestack-init-video",function(){o()})}(),_.helpers.isMobile()&&(_.events.$on(_.$el,"touchstart","span.fr-video",function(){a=!1}),_.events.$on(_.$el,"touchmove",function(){a=!0})),_.events.on("html.set",J),J(),_.events.$on(_.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(_.browser.msie||_.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),_.events.$on(_.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==y(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),_.events.on("keydown",function(e){var t=e.which;return!w||t!=St.KEYCODE.BACKSPACE&&t!=St.KEYCODE.DELETE?w&&t==St.KEYCODE.ESC?(H(!0),e.preventDefault(),!1):w&&t!=St.KEYCODE.F10&&!_.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),X(),_.undo.saveStep(),!1)},!0),_.events.on("toolbar.esc",function(){if(w)return _.events.disableBlur(),_.events.focus(),!1},!0),_.events.on("toolbar.focusEditor",function(){if(w)return!1},!0),_.events.on("keydown",function(){_.$el.find("span.fr-video:empty").remove()}),_.$wp&&(B(),_.events.on("contentChanged",B)),o(!0),Y(!0)},showInsertPopup:function ne(){var e=_.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=_.popups.get("video.insert");if(t||(t=o()),l(),!t.hasClass("fr-active"))if(_.popups.refresh("video.insert"),_.popups.setContainer("video.insert",_.$tb),e.isVisible()){var a=_.button.getPosition(e),n=a.left,r=a.top;_.popups.show("video.insert",n,r,e.outerHeight())}else _.position.forSelection(t),_.popups.show("video.insert")},showLayer:function re(e){var t,a,n=_.popups.get("video.insert");if(!w&&!_.opts.toolbarInline){var r=_.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,a=r.offset().top+(_.opts.toolbarBottom?10:r.outerHeight()-10)}_.opts.toolbarInline&&(a=n.offset().top-_.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(a+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),_.popups.show("video.insert",t,a,0),_.accessibility.focusPopup(n)},refreshByURLButton:function ie(e){var t=_.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 oe(e){var t=_.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=_.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function le(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;if(void 0===e){var a=(e=(_.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim()).match(/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/?(showcase\/)*([0-9))([a-z]*\/)*([0-9]{6,11})[?]?.*/);if(a&&7==a.length){var n=a[6],r=e.substring(0,e.lastIndexOf("/")),i=e.substring(e.lastIndexOf("/")+1,e.length);e=i.includes("?h=")||i.includes("?v=")||n===i?("".concat(r,"/").concat(i)||"").trim():("".concat(r,"?h=").concat(i)||"").trim()}}var o=null;if(/^http/.test(e)||(e="https://".concat(e)),_.helpers.isURL(e))for(var s=0;s<St.VIDEO_PROVIDERS.length;s++){var l=St.VIDEO_PROVIDERS[s],c="autoplay=1&mute=1";if(l.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)l.html=l.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var d=l.html.indexOf("{url}")+5;l.html=[l.html.slice(0,d),c,l.html.slice(d)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(l=St.VIDEO_PROVIDERS[s]).html=l.html.replace(c,"");if(l.test_regex.test(e)&&new RegExp(_.opts.videoAllowedProviders.join("|")).test(l.provider)){o=e.replace(l.url_regex,l.url_text),o=l.html.replace(/\{url\}/,o);break}}o?m(o):(E(_.language.translate("Something went wrong. Please try again.")),_.events.trigger("video.linkError",[e]))},insertEmbed:function ce(e){void 0===e&&(e=_.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&St.VIDEO_EMBED_REGEX.test(e)?m(e):(E(_.language.translate("Something went wrong. Please try again.")),_.events.trigger("video.codeError",[e]))},insert:m,align:function de(e){w.removeClass("fr-fvr fr-fvl"),!_.opts.htmlUntouched&&_.opts.useClasses?"left"==e?w.addClass("fr-fvl"):"right"==e&&w.addClass("fr-fvr"):Q(w,q(),e),te(),U(),i(),_.selection.clear()},refreshAlign:function fe(e){if(!w)return!1;e.find(">*").first().replaceWith(_.icon.create("video-align-".concat(j())))},refreshAlignOnShow:function pe(e,t){w&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ue(e){w.removeClass("fr-dvi fr-dvb"),!_.opts.htmlUntouched&&_.opts.useClasses?"inline"==e?w.addClass("fr-dvi"):"block"==e&&w.addClass("fr-dvb"):Q(w,e,j()),te(),U(),i(),_.selection.clear()},refreshDisplayOnShow:function ge(e,t){w&&t.find('.fr-command[data-param1="'.concat(q(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:X,hideProgressBar:l,showSizePopup:function he(){var e=_.popups.get("video.size");e||(e=Y()),l(),_.popups.refresh("video.size"),_.popups.setContainer("video.size",_.$sc);var t=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.height();_.popups.show("video.size",a,n,t.height(),!0)},replace:function me(){var e=_.popups.get("video.insert");e||(e=o()),_.popups.isVisible("video.insert")||(l(),_.popups.refresh("video.insert"),_.popups.setContainer("video.insert",_.$sc));var t=w.offset().left+w.outerWidth()/2,a=w.offset().top+w.height();_.popups.show("video.insert",t,a,w.outerHeight(),!0)},back:function e(){w?(_.events.disableBlur(),w[0].click()):(_.events.disableBlur(),_.selection.restore(),_.events.enableBlur(),_.popups.hide("video.insert"),_.toolbar.showInline())},setSize:function ve(e,t){if(w){var a=_.popups.get("video.size"),n=w.find("iframe, embed, ".concat(w.find("iframe, embed, audio").get(0)?"audio":"video"));n.css("width",e||a.find('input[name="width"]').val()),n.css("height",t||a.find('input[name="height"]').val()),n.get(0).style.width&&n.removeAttr("width"),n.get(0).style.height&&n.removeAttr("height"),a.find("input:focus").blur(),setTimeout(function(){w.trigger("click")},_.helpers.isAndroid()?50:0)}},get:function be(){return w},showProgressBar:S,_editVideo:c,setAutoplay:function Ee(){var e;if(w.find("iframe, embed, audio").get(0))(e=w.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=w.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("")}},insertHtmlVideo:k}},St.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"}),St.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),St.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),St.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)}}),St.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),St.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)}}),St.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),St.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)}}),St.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),St.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),St.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),St.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)}}),St.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),St.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),St.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),St.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),St.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),St.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=St.COMMANDS.videoAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("video-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</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)}}),St.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),St.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),St.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),St.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),St.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),St.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),St.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),St.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),St.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),St.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().hasClass("fr-separator")&&e.next().removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next().hasClass("fr-separator")&&e.next().addClass("fr-hidden"))}}),St.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),St.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}}),Object.assign(St.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}),St.PLUGINS.wordPaste=function(C){var o,r,T,O=C.$,s="word_paste",g={},k=!0,S=0;function t(e){var t=C.opts.wordAllowedStyleProps;e||(C.opts.wordAllowedStyleProps=[]),0===r.indexOf("<colgroup>")&&(r="<table>"+r+"</table>"),r=i(r=r.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var a="",n=0;n++<t.length;)a+="&nbsp;";return a}),C.paste.getRtfClipboard());var a=C.doc.createElement("DIV");a.innerHTML=r,C.html.cleanBlankSpaces(a),r=a.innerHTML,r=(r=C.paste.cleanEmptyTagsAndDivs(r)).replace(/\u200b/g,""),function n(){C.modals.hide(s)}(),C.helpers.isMobile()&&C.events.focus(),C.paste.clean(r,!0,!0),C.opts.wordAllowedStyleProps=t}function R(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e,t){if(t(e))for(var a=e.firstChild;a;){var n=a,r=a.previousSibling;a=a.nextSibling,h(n,t),n.previousSibling||n.nextSibling||n.parentNode||!a||r===a.previousSibling||!a.parentNode?n.previousSibling||n.nextSibling||n.parentNode||!a||a.previousSibling||a.nextSibling||a.parentNode||(r?a=r.nextSibling?r.nextSibling.nextSibling:null:e.firstChild&&(a=e.firstChild.nextSibling)):a=r?r.nextSibling:e.firstChild}}function F(e){return O(e).hasClass("ListContainerWrapper")&&0<O(e).find("ol").length}function M(e){return O(e).hasClass("ListContainerWrapper")&&0<O(e).find("ul").length}function D(e){if(F(e)||M(e))return!0;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 P(e){return F(e)||M(e)?O(e).find("li").attr("data-aria-level"):e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function N(e,n){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var a=document.createElement(e.tagName.toLowerCase());a.setAttribute("style",e.getAttribute("style")),a.innerHTML=t.innerHTML,t.innerHTML=a.outerHTML}h(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(C.browser.msie||C.browser.safari||C.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(a){return!1}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",m(e)),b(e,n)),!0});var r=F(e)?O(e).find("li").get(0).innerHTML:t.innerHTML;if(F(e)||M(e)){r="";for(var i=O(e).find("li"),o=0;o<i.length;o++){var s=O(i.get(o).innerHTML);s.find("span").each(function(){"&nbsp;"===O(this).html()&&(0<O(this).prev().text().trim().length?O(this).remove():O(this).html("&ZeroWidthSpace;"))});var l=i[o].style.marginLeft;l?(l=parseFloat(parseFloat(l).toFixed(2))+l.match(/[a-zA-Z]+/g)[0],r+='<li style = "margin-left: '.concat(l,';">').concat(s.get(0).innerHTML,"</li>")):r+="<li >".concat(s.get(0).innerHTML,"</li>")}}else{var c,d=null===(c=O(e).find("p").get(0))||void 0===c?void 0:c.style.marginLeft;r=d?(d=parseFloat(parseFloat(d).toFixed(2))+d.match(/[a-zA-Z]+/g)[0],'<li style = "margin-left: '.concat(d,';">').concat(r,"</li>")):"<li>".concat(r,"</li>")}return r=r.replace(/<!--[\s\S]*?-->/gi,"")}function m(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,a="",n=["line-height","font-family","font-size","color","background"].concat(ye(t||[])),r=e.getAttribute("style");return r&&n.forEach(function(t){var e=r.split(";").find(function(e){return e.trim().includes(t+":")});e&&(e.includes("mso")&&(e=e.match(new RegExp(t+":.*(;|)"))[0]),e.trim().startsWith(t)&&(a+=e+";"))}),a}function E(e,t){for(var a=document.createElement(t),n=0;n<e.attributes.length;n++){var r=e.attributes[n].name;"FONT"===e.tagName&&(C.browser.msie&&["id","class","style"].indexOf(r)<0||!C.browser.msie&&CSS.supports(r,e.getAttribute(r)))?O(a).css(r,e.getAttribute(r)):a.setAttribute(r,e.getAttribute(r))}return a.innerHTML=e.innerHTML,e.parentNode.replaceChild(a,e),a}function _(e,t){C.node.clearAttributes(e);for(var a=e.firstElementChild,n=0,r=!1,i=null;a;){if(a.firstElementChild&&-1!==a.firstElementChild.tagName.indexOf("W:"))for(var o=0;o<a.children.length;o++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==a.children[o]&&(a.innerHTML+=a.children[o]);(i=a.getAttribute("width"))||(i=a.style.width),i||r||(r=!0),n+=parseInt(i,10),(!a.firstChild||a.firstChild&&a.firstChild.data===St.UNICODE_NBSP)&&(a.firstChild&&R(a.firstChild),a.innerHTML="<br>");for(var s=a.firstElementChild,l=1===a.children.length;s;)"P"!==s.tagName||D(s)||l&&L(s),s=s.nextElementSibling;if(t){var c=a.getAttribute("class");if(c){var d=(c=x(c)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&I(a,t[f])}}t.td&&I(a,t.td)}var p=a.getAttribute("style");p&&(p=x(p))&&";"!==p.slice(-1)&&(p+=";");var u=a.getAttribute("valign");if(!u&&p){var g=p.match(/vertical-align:.+?[; "]{1,1}/gi);g&&(u=g[g.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var h=null;if(p){var m=p.match(/text-align:.+?[; "]{1,1}/gi);m&&(h=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===h&&(h=null)}var v=null;if(p){var b=p.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var E=a.getAttribute("colspan"),_=a.getAttribute("rowspan");E&&a.setAttribute("colspan",E),_&&a.setAttribute("rowspan",_),u&&(a.style["vertical-align"]=u),h&&(a.style["text-align"]=h),v&&(a.style["background-color"]=v),i&&a.setAttribute("width",i),a=a.nextElementSibling}for(a=e.firstElementChild;a;)i=a.getAttribute("width"),r&&a.removeAttribute("width"),a=a.nextElementSibling;e.previousSibling?T!=n&&(k=!1):T=n,!e.nextElementSibling&&k&&function A(e){for(;e;){for(var t=e.firstElementChild,a=null,n=0;t;)a=t.getAttribute("width"),n+=parseInt(a,10),t=t.nextElementSibling;for(t=e.firstElementChild;t;)a=t.getAttribute("width"),t.setAttribute("width",100*parseInt(a,10)/n+"%"),t=t.nextElementSibling;e=e.previousElementSibling}}(e);var w=O(e).parentsUntil("table").parent().last();if(S<n&&(S=n),!e.nextElementSibling&&0<w.length){var y=O(w)[0].width;O(w)[0].style.width=y||S,k=!(S=0)}}function L(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function x(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function I(e,t,a){if(t){var n=e.getAttribute("style");n&&";"!==n.slice(-1)&&(n+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var r=null;r=a?(n||"")+t:t+(n||""),e.setAttribute("style",r)}}var u=null;function c(e,t,a){for(var n=e.split(a),r=1;r<n.length;r++){var i=n[r];if(1<(i=i.split("shplid")).length){i=i[1];for(var o="",s=0;s<i.length&&"\\"!==i[s]&&"{"!==i[s]&&" "!==i[s]&&"\r"!==i[s]&&"\n"!==i[s];)o+=i[s],s++;var l=i.split("bliptag");if(l&&l.length<2)continue;var c=null;if(-1!==l[0].indexOf("pngblip")?c="image/png":-1!==l[0].indexOf("jpegblip")&&(c="image/jpeg"),!c)continue;var d=l[1].split("}");if(d&&d.length<2)continue;var f=void 0;if(2<d.length&&-1!==d[0].indexOf("blipuid"))f=d[1].split(" ");else{if((f=d[0].split(" "))&&f.length<2)continue;f.shift()}var p=f.join("");u[t+o]={image_hex:p,image_type:c}}}}function v(e,t){if(t){var a;if("IMG"===e.tagName){var n=e.getAttribute("src");if(!n||-1===n.indexOf("file://"))return;if(0===n.indexOf("file://")&&C.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(a=g[e.getAttribute("v:shapes")])||(a=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(a=null))}else a=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),a){!function s(e){u={},c(e,"i","\\shppict"),c(e,"s","\\shp{")}(t);var r=u[a.substring(7)];if(r){var i=function l(e){for(var t=e.match(/[0-9a-f]{2}/gi),a=[],n=0;n<t.length;n++)a.push(String.fromCharCode(parseInt(t[n],16)));var r=a.join("");return btoa(r)}(r.image_hex),o="data:"+r.image_type+";base64,"+i;"IMG"===e.tagName?(e.src=o,e.setAttribute("data-fr-image-pasted",!0)):O(e).parent().before('<img data-fr-image-pasted="true" src="'.concat(o,'" style="').concat(e.parentNode.getAttribute("style"),'">')).remove()}}}}function b(e,t){var a=e.tagName,n=a.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?E(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&E(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(a))return R(e),!1;for(var r=["META","LINK","XML","ST1:","O:","W:","FONT"],i=0;i<r.length;i++)if(-1!==a.indexOf(r[i]))return e.innerHTML&&(e.outerHTML=e.innerHTML),R(e),!1;if("TD"!==a){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var s=(o=x(o)).split(" "),l=0;l<s.length;l++){var c=[],d="."+s[l];c.push(d),d=n+d,c.push(d);for(var f=0;f<c.length;f++)t[c[f]]&&I(e,t[c[f]])}e.removeAttribute("class")}t&&t[n]&&I(e,t[n])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(a)){var p=e.getAttribute("class");if(p&&(t&&t[a.toLowerCase()+"."+p]&&I(e,t[a.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var u=x(p);(u=u.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",u):e.removeAttribute("class")}var g=e.getAttribute("style");if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&h[h.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}L(e)}if("TR"===a&&_(e,t),"A"!==a||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==a&&e.getAttribute("href")&&e.querySelector("img"))for(var m=e.querySelectorAll("span"),v=0;v<m.length;v++)m[v].innerText||(m[v].outerHTML=m[v].innerHTML);if("TD"!==a&&"TH"!==a||e.innerHTML||(e.innerHTML="<br>"),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=x(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function i(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"));var l=e.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function f(e){for(var t=e.split("v:shape"),a=1;a<t.length;a++){var n=t[a],r=n.split(' id="')[1];if(r&&1<r.length){r=r.split('"')[0];var i=n.split(' o:spid="')[1];i&&1<i.length&&(i=i.split('"')[0],g[r]=i)}}}(e);var a=(new DOMParser).parseFromString(e,"text/html"),n=a.head,r=a.body,c=function p(e){var t={},a=e.getElementsByTagName("style");if(a.length){var n=a[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(n)for(var r=0;r<n.length;r++){var i=n[r],o=i.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=i.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");o=o.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var l=o.split(", "),c=0;c<l.length;c++)t[l[c]]=s}}return t}(n);h(r,function(e){if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("style")){var t=e.getAttribute("style");t=function a(e){return e.replace(/mso-(bidi|fareast|fareast-theme)-font-family/g,"font-family")}(t),e.setAttribute("style",t)}return!0}),h(r,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===St.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(R(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),h(r,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||v(e,t),!0});for(var i=r.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),o=i.length-1;0<=o;o--)i[o].previousElementSibling&&"LI"===i[o].previousElementSibling.tagName&&i[o].previousElementSibling.appendChild(i[o]);h(r,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(D(e)){var t=e.parentNode,a=e.previousSibling,n=function I(e,t,a,n){var r,i,o,s,l,c,d,f=navigator.userAgent.toLowerCase();-1!=f.indexOf("safari")&&(f=-1<f.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var p,u,g,h,m=/[0-9a-zA-Z]./gi,v="",b=F(e),E=null===(r=O(e).find("ol"))||void 0===r||null===(r=r.attr("style"))||void 0===r||null===(r=r.split(";"))||void 0===r?void 0:r.find(function(e){return e.trim().startsWith("list-style-type")});E==undefined&&M(e)&&(E=null===(u=O(e).find("ul"))||void 0===u||null===(u=u.attr("style"))||void 0===u||null===(u=u.split(";"))||void 0===u?void 0:u.find(function(e){return e.trim().startsWith("list-style-type")}));if(b)c="ol",d=E?"list-style-type: "+E.replace("list-style-type:","").trim()+";":"";else if(M(e))c="ul",d=E?"list-style-type: "+E.replace("list-style-type:","").trim()+";":"";else{var _=e.querySelector('span[style="mso-list:Ignore"]');null==_&&"safari"==f&&(_=e.querySelector('span[lang="PT-BR"]'));var w=!1;_&&(w=w||m.test(_.textContent)),null!==_&&(p=_.textContent.trim().split(".")[0]),c=1==w?(p=(p=_.textContent.trim().split(".")[0]).replace(/\(([^)]+)\)/g,"$1"),isNaN(parseInt(p))?"i"==p?d="lower-roman;":"I"==p?d="upper-roman;":"o"==p?d="circle;":p.match(/^v$/)||(p.match(/^[a-z]$/)||p.match(/^[a-z]\)$/)?d="lower-alpha;":(p.match(/^[A-Z]$/)||p.match(/^[A-Z]\)$/))&&(d="upper-alpha;")):d="decimal;",d="list-style-type: "+d,"ol"):(null!=_&&(p=_.textContent.trim().split(".")[0]),"\xa7"==p?d="square;":"\xb7"==p&&(d="disc;"),d="list-style-type: "+d,"ul"),_==undefined||_.textContent==undefined||isNaN(parseInt(_.textContent.trim().split(".")[1],10))||(v=' class="decimal_type" ')}var y=1,A="",C=(P(e),e.style.marginLeft),T="";C.includes("in")?(T="in",C=parseFloat(C)-.5):C.includes("pt")&&(T="px",C=parseFloat(C)-10),C&&(h=" margin-left: "+C+T+";"),y="list-style-type: upper-alpha;"==d?b?parseInt(O(e).find("ol").attr("start")):p.charCodeAt(0)-64:"list-style-type: lower-alpha;"==d?b?parseInt(O(e).find("ol").attr("start")):p.charCodeAt(0)-96:b?parseInt(O(e).find("ol").attr("start")):parseInt(p),A+=d||"",A+=h||"",g="<"+c,g+=v||"",g+="ol"!=c||1==y||isNaN(y)?"":' start = "'+y+'"',g+=A?' style = "'+A+'"':"",g+=">";for(var k=!1;e;){if(!D(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var S=P(e);if((a=a||S)<S)g+=(l=I(e,t,S,e.style.marginLeft)).el.outerHTML,e=l.currentNode;else{if(S<a)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0),o&&o.firstElementChild&&o.firstElementChild.firstElementChild&&o.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0,i=m.test(o.firstElementChild.firstElementChild.firstChild.data||o.firstElementChild.firstElementChild.firstChild.firstChild&&o.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var R=!1;(!n&&!e.style.marginLeft||n&&e.style.marginLeft&&n===e.style.marginLeft)&&(R=!0),n=e.style.marginLeft,R||i===undefined?(s=N(e,t),e.nextSibling&&e.nextSibling.innerText!=undefined&&e.nextSibling.innerText!=undefined&&!g.includes('class="decimal_type"')&&(isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(g=g.substring(3,0)+' class="decimal_type"'+g.substring(3,g.length))),g+=s):(1==S&&(g+="</"+c+">",k=!0,o=null),g+=(l=I(e,t,S,e.style.marginLeft)).el.outerHTML,e=l.currentNode);var L=e&&e.nextElementSibling;if(L&&(o=L.previousElementSibling),e&&!D(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=L}}k||(g+="</"+c+">");var x=document.createElement("div");return x.innerHTML=g,{el:x,currentNode:e}}(e,c).el,r=null;return(r=a?a.nextSibling:t.firstChild)?t.insertBefore(n,r):t.appendChild(n),!1}return"FONT"===e.tagName&&(l&&"LibreOffice"===l[0]||c["."+e.getAttribute("class")])?e=E(e,"span"):l&&"\x3c!--StartFragment--\x3e"===l[0]&&"UL"===e.tagName&&(O(e).find("li span").each(function(){"&nbsp;"===O(this).html()&&(0<O(this).prev().text().trim().length?O(this).remove():O(this).html("&ZeroWidthSpace;"))}),O(e).is("ul")&&e.setAttribute("style",m(e,["margin","margin-left","list-style-type"])),O(e).find("ul").each(function(){this.setAttribute("style",m(this,["margin","margin-left","list-style-type"]))})),"img"!==e.tagName.toLowerCase()&&function s(t){Array.from(t.attributes).map(function(e){return e.name}).filter(function(e){return e.toLowerCase().startsWith("data-")||e.toLowerCase().startsWith("xml:")}).forEach(function(e){O(t).removeAttr(e)})}(e),b(e,c)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var i=e.nextSibling;i;)(i=e.nextSibling)&&R(i),i.data&&-1<i.data.indexOf("[endif]")&&(i=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var o=document.createElement("input");o.type="checkbox",e.parentNode.insertBefore(o,e.nextSibling)}return R(e),!1}),r.innerHTML=function u(e){var t=O(document.createElement("div")).attr("id","top-level");t.html(e);for(var a=t[0].querySelectorAll("ol, ul"),n=0;n<a.length;n++)if(O(a[n]).parentsUntil("#top-level","ol, ul").length){a[n].style.removeProperty("margin-left");for(var r=a[n].children,i=0;i<r.length;i++)"LI"==r[i].tagName&&r[i].style.removeProperty("margin-left")}return t[0].innerHTML}(r.innerHTML),h(r,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var a=e.parentNode;a&&(R(e),!(e=a).innerHTML)&&"TD"!==e.parentNode.tagName;)a=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=x(t))&&";"!==t.slice(-1)&&(t+=";");var a=t.match(/(^|\S+?):.+?;{1,1}/gi);if(a){for(var n={},r=0;r<a.length;r++){var i=a[r].split(":");2===i.length&&("text-align"===i[0]&&"SPAN"===e.tagName||(n[i[0]]=i[1]))}var o="";for(var s in n)if(n.hasOwnProperty(s)){if("font-size"===s&&"pt;"===n[s].slice(-3)){var l=null;try{l=parseFloat(n[s].slice(0,-3),10)}catch(d){l=null}if(l){var c=C.opts.fontSizeUnit;"px"===c?(l=Math.round(1.33*l),n[s]=l+"px;"):"pt"===c&&(l=Math.round(l),n[s]=l+"pt;")}}o+=s+":"+n[s]}o&&e.setAttribute("style",o)}}}(e)}return!0}),h(r,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}),h(r,function(e){return e&&"P"===e.tagName&&"DIV"===e.parentNode.tagName&&1==e.parentNode.children.length&&O(e).unwrap(),!0});var s=r.outerHTML,d=C.opts.htmlAllowedStyleProps;return C.opts.htmlAllowedStyleProps=C.opts.wordAllowedStyleProps,s=C.clean.html(s,C.opts.wordDeniedTags,C.opts.wordDeniedAttrs,!1),C.opts.htmlAllowedStyleProps=d,s}return{_init:function e(){C.events.on("paste.wordPaste",function(e){return r=e,C.opts.wordPasteModal?function i(){if(!o){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> '+C.language.translate("Word Paste Detected")+"</h4>",t=function r(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+C.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">'+C.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+C.language.translate("Keep")+"</button></div>",e+="</div>"}(),a=C.modals.create(s,e,t),n=a.$body;o=a.$modal,a.$modal.addClass("fr-middle"),C.events.$on(n,"click","button.fr-remove-word",function(){var e=o.data("instance")||C;e.wordPaste.clean()},!0),C.events.$on(n,"click","button.fr-keep-word",function(){var e=o.data("instance")||C;e.wordPaste.clean(!0)},!0),C.events.$on(O(C.o_win),"resize",function(){C.modals.resize(s)})}C.modals.show(s),C.modals.resize(s)}():t(C.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:i}};var y={},a={},p={},u=n(!0),g="vanilla",h={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:n(!0),allOn:function _(){var e=n(!0),t={};for(var a in e)e.hasOwnProperty(a)&&(t[a]=!0);return t}()};function m(e,t){var a=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};y.helper.isArray(e)||(e=[e]);for(var r=0;r<e.length;++r){var i=a+" sub-extension "+r+": ",o=e[r];if("object"!==Rt(o))return n.valid=!1,n.error=i+"must be an object, but "+Rt(o)+" given",n;if(!y.helper.isString(o.type))return n.valid=!1,n.error=i+'property "type" must be a string, but '+Rt(o.type)+" given",n;var s=o.type=o.type.toLowerCase();if("language"===s&&(s=o.type="lang"),"html"===s&&(s=o.type="output"),"lang"!==s&&"output"!==s&&"listener"!==s)return n.valid=!1,n.error=i+"type "+s+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',n;if("listener"===s){if(y.helper.isUndefined(o.listeners))return n.valid=!1,n.error=i+'. Extensions of type "listener" must have a property called "listeners"',n}else if(y.helper.isUndefined(o.filter)&&y.helper.isUndefined(o.regex))return n.valid=!1,n.error=i+s+' extensions must define either a "regex" property or a "filter" method',n;if(o.listeners){if("object"!==Rt(o.listeners))return n.valid=!1,n.error=i+'"listeners" property must be an object but '+Rt(o.listeners)+" given",n;for(var l in o.listeners)if(o.listeners.hasOwnProperty(l)&&"function"!=typeof o.listeners[l])return n.valid=!1,n.error=i+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+l+" must be a function but "+Rt(o.listeners[l])+" given",n}if(o.filter){if("function"!=typeof o.filter)return n.valid=!1,n.error=i+'"filter" must be a function, but '+Rt(o.filter)+" given",n}else if(o.regex){if(y.helper.isString(o.regex)&&(o.regex=new RegExp(o.regex,"g")),!(o.regex instanceof RegExp))return n.valid=!1,n.error=i+'"regex" property must either be a string or a RegExp object, but '+Rt(o.regex)+" given",n;if(y.helper.isUndefined(o.replace))return n.valid=!1,n.error=i+'"regex" extensions must implement a replace string or function',n}}return n}function i(e,t){return"\xa8E"+t.charCodeAt(0)+"E"}y.helper={},y.extensions={},y.setOption=function(e,t){return u[e]=t,this},y.getOption=function(e){return u[e]},y.getOptions=function(){return u},y.resetOptions=function(){u=n(!0)},y.setFlavor=function(e){if(!h.hasOwnProperty(e))throw Error(e+" flavor was not found");y.resetOptions();var t=h[e];for(var a in g=e,t)t.hasOwnProperty(a)&&(u[a]=t[a])},y.getFlavor=function(){return g},y.getFlavorOptions=function(e){if(h.hasOwnProperty(e))return h[e]},y.getDefaultOptions=function(e){return n(e)},y.subParser=function(e,t){if(y.helper.isString(e)){if(void 0===t){if(a.hasOwnProperty(e))return a[e];throw Error("SubParser named "+e+" not registered!")}a[e]=t}},y.extension=function(e,t){if(!y.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=y.helper.stdExtName(e),y.helper.isUndefined(t)){if(!p.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return p[e]}"function"==typeof t&&(t=t()),y.helper.isArray(t)||(t=[t]);var a=m(t,e);if(!a.valid)throw Error(a.error);p[e]=t},y.getAllExtensions=function(){return p},y.removeExtension=function(e){delete p[e]},y.resetExtensions=function(){p={}},y.validateExtension=function(e){var t=m(e,null);return!!t.valid},y.hasOwnProperty("helper")||(y.helper={}),y.helper.isString=function(e){return"string"==typeof e||e instanceof String},y.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},y.helper.isArray=function(e){return Array.isArray(e)},y.helper.isUndefined=function(e){return void 0===e},y.helper.forEach=function(e,t){if(y.helper.isUndefined(e))throw new Error("obj param is required");if(y.helper.isUndefined(t))throw new Error("callback param is required");if(!y.helper.isFunction(t))throw new Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(y.helper.isArray(e))for(var a=0;a<e.length;a++)t(e[a],a,e);else{if("object"!==Rt(e))throw new Error("obj does not seem to be an array or an iterable object");for(var n in e)e.hasOwnProperty(n)&&t(e[n],n,e)}},y.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},y.helper.escapeCharactersCallback=i,y.helper.escapeCharacters=function(e,t,a){var n="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";a&&(n="\\\\"+n);var r=new RegExp(n,"g");return e=e.replace(r,i)},y.helper.unescapeHTMLEntities=function(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var v=function v(e,t,a,n){var r,i,o,s,l,c=n||"",d=-1<c.indexOf("g"),f=new RegExp(t+"|"+a,"g"+c.replace(/g/g,"")),p=new RegExp(t,c.replace(/g/g,"")),u=[];do{for(r=0;o=f.exec(e);)if(p.test(o[0]))r++||(s=(i=f.lastIndex)-o[0].length);else if(r&&!--r){l=o.index+o[0].length;var g={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l},wholeMatch:{start:s,end:l}};if(u.push(g),!d)return u}}while(r&&(f.lastIndex=i));return u};y.helper.matchRecursiveRegExp=function(e,t,a,n){for(var r=v(e,t,a,n),i=[],o=0;o<r.length;++o)i.push([e.slice(r[o].wholeMatch.start,r[o].wholeMatch.end),e.slice(r[o].match.start,r[o].match.end),e.slice(r[o].left.start,r[o].left.end),e.slice(r[o].right.start,r[o].right.end)]);return i},y.helper.replaceRecursiveRegExp=function(e,t,a,n,r){if(!y.helper.isFunction(t)){var i=t;t=function t(){return i}}var o=v(e,a,n,r),s=e,l=o.length;if(0<l){var c=[];0!==o[0].wholeMatch.start&&c.push(e.slice(0,o[0].wholeMatch.start));for(var d=0;d<l;++d)c.push(t(e.slice(o[d].wholeMatch.start,o[d].wholeMatch.end),e.slice(o[d].match.start,o[d].match.end),e.slice(o[d].left.start,o[d].left.end),e.slice(o[d].right.start,o[d].right.end))),d<l-1&&c.push(e.slice(o[d].wholeMatch.end,o[d+1].wholeMatch.start));o[l-1].wholeMatch.end<e.length&&c.push(e.slice(o[l-1].wholeMatch.end)),s=c.join("")}return s},y.helper.regexIndexOf=function(e,t,a){if(!y.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var n=e.substring(a||0).search(t);return 0<=n?n+(a||0):n},y.helper.splitAtIndex=function(e,t){if(!y.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},y.helper.encodeEmailAddress=function(e){var a=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=a[Math.floor(2*Math.random())](e);else{var t=Math.random();e=.9<t?a[2](e):.45<t?a[1](e):a[0](e)}return e})},y.helper.padEnd=function(e,t,a){return t>>=0,a=String(a||" "),e.length>t?String(e):((t-=e.length)>a.length&&(a+=a.repeat(t/a.length)),String(e)+a.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),y.helper.regexes={asteriskDashAndColon:/([*_:~])/g},y.helper.emojis={"+1":"\ud83d\udc4d","-1":"\ud83d\udc4e",100:"\ud83d\udcaf",1234:"\ud83d\udd22","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49","8ball":"\ud83c\udfb1",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",abc:"\ud83d\udd24",abcd:"\ud83d\udd21",accept:"\ud83c\ude51",aerial_tramway:"\ud83d\udea1",airplane:"\u2708\ufe0f",alarm_clock:"\u23f0",alembic:"\u2697\ufe0f",alien:"\ud83d\udc7d",ambulance:"\ud83d\ude91",amphora:"\ud83c\udffa",anchor:"\u2693\ufe0f",angel:"\ud83d\udc7c",anger:"\ud83d\udca2",angry:"\ud83d\ude20",anguished:"\ud83d\ude27",ant:"\ud83d\udc1c",apple:"\ud83c\udf4e",aquarius:"\u2652\ufe0f",aries:"\u2648\ufe0f",arrow_backward:"\u25c0\ufe0f",arrow_double_down:"\u23ec",arrow_double_up:"\u23eb",arrow_down:"\u2b07\ufe0f",arrow_down_small:"\ud83d\udd3d",arrow_forward:"\u25b6\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_up_down:"\u2195\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_upper_left:"\u2196\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",art:"\ud83c\udfa8",articulated_lorry:"\ud83d\ude9b",artificial_satellite:"\ud83d\udef0",astonished:"\ud83d\ude32",athletic_shoe:"\ud83d\udc5f",atm:"\ud83c\udfe7",atom_symbol:"\u269b\ufe0f",avocado:"\ud83e\udd51",b:"\ud83c\udd71\ufe0f",baby:"\ud83d\udc76",baby_bottle:"\ud83c\udf7c",baby_chick:"\ud83d\udc24",baby_symbol:"\ud83d\udebc",back:"\ud83d\udd19",bacon:"\ud83e\udd53",badminton:"\ud83c\udff8",baggage_claim:"\ud83d\udec4",baguette_bread:"\ud83e\udd56",balance_scale:"\u2696\ufe0f",balloon:"\ud83c\udf88",ballot_box:"\ud83d\uddf3",ballot_box_with_check:"\u2611\ufe0f",bamboo:"\ud83c\udf8d",banana:"\ud83c\udf4c",bangbang:"\u203c\ufe0f",bank:"\ud83c\udfe6",bar_chart:"\ud83d\udcca",barber:"\ud83d\udc88",baseball:"\u26be\ufe0f",basketball:"\ud83c\udfc0",basketball_man:"\u26f9\ufe0f",basketball_woman:"\u26f9\ufe0f&zwj;\u2640\ufe0f",bat:"\ud83e\udd87",bath:"\ud83d\udec0",bathtub:"\ud83d\udec1",battery:"\ud83d\udd0b",beach_umbrella:"\ud83c\udfd6",bear:"\ud83d\udc3b",bed:"\ud83d\udecf",bee:"\ud83d\udc1d",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",beetle:"\ud83d\udc1e",beginner:"\ud83d\udd30",bell:"\ud83d\udd14",bellhop_bell:"\ud83d\udece",bento:"\ud83c\udf71",biking_man:"\ud83d\udeb4",bike:"\ud83d\udeb2",biking_woman:"\ud83d\udeb4&zwj;\u2640\ufe0f",bikini:"\ud83d\udc59",biohazard:"\u2623\ufe0f",bird:"\ud83d\udc26",birthday:"\ud83c\udf82",black_circle:"\u26ab\ufe0f",black_flag:"\ud83c\udff4",black_heart:"\ud83d\udda4",black_joker:"\ud83c\udccf",black_large_square:"\u2b1b\ufe0f",black_medium_small_square:"\u25fe\ufe0f",black_medium_square:"\u25fc\ufe0f",black_nib:"\u2712\ufe0f",black_small_square:"\u25aa\ufe0f",black_square_button:"\ud83d\udd32",blonde_man:"\ud83d\udc71",blonde_woman:"\ud83d\udc71&zwj;\u2640\ufe0f",blossom:"\ud83c\udf3c",blowfish:"\ud83d\udc21",blue_book:"\ud83d\udcd8",blue_car:"\ud83d\ude99",blue_heart:"\ud83d\udc99",blush:"\ud83d\ude0a",boar:"\ud83d\udc17",boat:"\u26f5\ufe0f",bomb:"\ud83d\udca3",book:"\ud83d\udcd6",bookmark:"\ud83d\udd16",bookmark_tabs:"\ud83d\udcd1",books:"\ud83d\udcda",boom:"\ud83d\udca5",boot:"\ud83d\udc62",bouquet:"\ud83d\udc90",bowing_man:"\ud83d\ude47",bow_and_arrow:"\ud83c\udff9",bowing_woman:"\ud83d\ude47&zwj;\u2640\ufe0f",bowling:"\ud83c\udfb3",boxing_glove:"\ud83e\udd4a",boy:"\ud83d\udc66",bread:"\ud83c\udf5e",bride_with_veil:"\ud83d\udc70",bridge_at_night:"\ud83c\udf09",briefcase:"\ud83d\udcbc",broken_heart:"\ud83d\udc94",bug:"\ud83d\udc1b",building_construction:"\ud83c\udfd7",bulb:"\ud83d\udca1",bullettrain_front:"\ud83d\ude85",bullettrain_side:"\ud83d\ude84",burrito:"\ud83c\udf2f",bus:"\ud83d\ude8c",business_suit_levitating:"\ud83d\udd74",busstop:"\ud83d\ude8f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",butterfly:"\ud83e\udd8b",cactus:"\ud83c\udf35",cake:"\ud83c\udf70",calendar:"\ud83d\udcc6",call_me_hand:"\ud83e\udd19",calling:"\ud83d\udcf2",camel:"\ud83d\udc2b",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",camping:"\ud83c\udfd5",cancer:"\u264b\ufe0f",candle:"\ud83d\udd6f",candy:"\ud83c\udf6c",canoe:"\ud83d\udef6",capital_abcd:"\ud83d\udd20",capricorn:"\u2651\ufe0f",car:"\ud83d\ude97",card_file_box:"\ud83d\uddc3",card_index:"\ud83d\udcc7",card_index_dividers:"\ud83d\uddc2",carousel_horse:"\ud83c\udfa0",carrot:"\ud83e\udd55",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",cd:"\ud83d\udcbf",chains:"\u26d3",champagne:"\ud83c\udf7e",chart:"\ud83d\udcb9",chart_with_downwards_trend:"\ud83d\udcc9",chart_with_upwards_trend:"\ud83d\udcc8",checkered_flag:"\ud83c\udfc1",cheese:"\ud83e\uddc0",cherries:"\ud83c\udf52",cherry_blossom:"\ud83c\udf38",chestnut:"\ud83c\udf30",chicken:"\ud83d\udc14",children_crossing:"\ud83d\udeb8",chipmunk:"\ud83d\udc3f",chocolate_bar:"\ud83c\udf6b",christmas_tree:"\ud83c\udf84",church:"\u26ea\ufe0f",cinema:"\ud83c\udfa6",circus_tent:"\ud83c\udfaa",city_sunrise:"\ud83c\udf07",city_sunset:"\ud83c\udf06",cityscape:"\ud83c\udfd9",cl:"\ud83c\udd91",clamp:"\ud83d\udddc",clap:"\ud83d\udc4f",clapper:"\ud83c\udfac",classical_building:"\ud83c\udfdb",clinking_glasses:"\ud83e\udd42",clipboard:"\ud83d\udccb",clock1:"\ud83d\udd50",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",closed_book:"\ud83d\udcd5",closed_lock_with_key:"\ud83d\udd10",closed_umbrella:"\ud83c\udf02",cloud:"\u2601\ufe0f",cloud_with_lightning:"\ud83c\udf29",cloud_with_lightning_and_rain:"\u26c8",cloud_with_rain:"\ud83c\udf27",cloud_with_snow:"\ud83c\udf28",clown_face:"\ud83e\udd21",clubs:"\u2663\ufe0f",cocktail:"\ud83c\udf78",coffee:"\u2615\ufe0f",coffin:"\u26b0\ufe0f",cold_sweat:"\ud83d\ude30",comet:"\u2604\ufe0f",computer:"\ud83d\udcbb",computer_mouse:"\ud83d\uddb1",confetti_ball:"\ud83c\udf8a",confounded:"\ud83d\ude16",confused:"\ud83d\ude15",congratulations:"\u3297\ufe0f",construction:"\ud83d\udea7",construction_worker_man:"\ud83d\udc77",construction_worker_woman:"\ud83d\udc77&zwj;\u2640\ufe0f",control_knobs:"\ud83c\udf9b",convenience_store:"\ud83c\udfea",cookie:"\ud83c\udf6a",cool:"\ud83c\udd92",policeman:"\ud83d\udc6e",copyright:"\xa9\ufe0f",corn:"\ud83c\udf3d",couch_and_lamp:"\ud83d\udecb",couple:"\ud83d\udc6b",couple_with_heart_woman_man:"\ud83d\udc91",couple_with_heart_man_man:"\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc69",couplekiss_man_man:"\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc68",couplekiss_man_woman:"\ud83d\udc8f",couplekiss_woman_woman:"\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc69",cow:"\ud83d\udc2e",cow2:"\ud83d\udc04",cowboy_hat_face:"\ud83e\udd20",crab:"\ud83e\udd80",crayon:"\ud83d\udd8d",credit_card:"\ud83d\udcb3",crescent_moon:"\ud83c\udf19",cricket:"\ud83c\udfcf",crocodile:"\ud83d\udc0a",croissant:"\ud83e\udd50",crossed_fingers:"\ud83e\udd1e",crossed_flags:"\ud83c\udf8c",crossed_swords:"\u2694\ufe0f",crown:"\ud83d\udc51",cry:"\ud83d\ude22",crying_cat_face:"\ud83d\ude3f",crystal_ball:"\ud83d\udd2e",cucumber:"\ud83e\udd52",cupid:"\ud83d\udc98",curly_loop:"\u27b0",currency_exchange:"\ud83d\udcb1",curry:"\ud83c\udf5b",custard:"\ud83c\udf6e",customs:"\ud83d\udec3",cyclone:"\ud83c\udf00",dagger:"\ud83d\udde1",dancer:"\ud83d\udc83",dancing_women:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f&zwj;\u2642\ufe0f",dango:"\ud83c\udf61",dark_sunglasses:"\ud83d\udd76",dart:"\ud83c\udfaf",dash:"\ud83d\udca8",date:"\ud83d\udcc5",deciduous_tree:"\ud83c\udf33",deer:"\ud83e\udd8c",department_store:"\ud83c\udfec",derelict_house:"\ud83c\udfda",desert:"\ud83c\udfdc",desert_island:"\ud83c\udfdd",desktop_computer:"\ud83d\udda5",male_detective:"\ud83d\udd75\ufe0f",diamond_shape_with_a_dot_inside:"\ud83d\udca0",diamonds:"\u2666\ufe0f",disappointed:"\ud83d\ude1e",disappointed_relieved:"\ud83d\ude25",dizzy:"\ud83d\udcab",dizzy_face:"\ud83d\ude35",do_not_litter:"\ud83d\udeaf",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",dollar:"\ud83d\udcb5",dolls:"\ud83c\udf8e",dolphin:"\ud83d\udc2c",door:"\ud83d\udeaa",doughnut:"\ud83c\udf69",dove:"\ud83d\udd4a",dragon:"\ud83d\udc09",dragon_face:"\ud83d\udc32",dress:"\ud83d\udc57",dromedary_camel:"\ud83d\udc2a",drooling_face:"\ud83e\udd24",droplet:"\ud83d\udca7",drum:"\ud83e\udd41",duck:"\ud83e\udd86",dvd:"\ud83d\udcc0","e-mail":"\ud83d\udce7",eagle:"\ud83e\udd85",ear:"\ud83d\udc42",ear_of_rice:"\ud83c\udf3e",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",egg:"\ud83e\udd5a",eggplant:"\ud83c\udf46",eight_pointed_black_star:"\u2734\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",electric_plug:"\ud83d\udd0c",elephant:"\ud83d\udc18",email:"\u2709\ufe0f",end:"\ud83d\udd1a",envelope_with_arrow:"\ud83d\udce9",euro:"\ud83d\udcb6",european_castle:"\ud83c\udff0",european_post_office:"\ud83c\udfe4",evergreen_tree:"\ud83c\udf32",exclamation:"\u2757\ufe0f",expressionless:"\ud83d\ude11",eye:"\ud83d\udc41",eye_speech_bubble:"\ud83d\udc41&zwj;\ud83d\udde8",eyeglasses:"\ud83d\udc53",eyes:"\ud83d\udc40",face_with_head_bandage:"\ud83e\udd15",face_with_thermometer:"\ud83e\udd12",fist_oncoming:"\ud83d\udc4a",factory:"\ud83c\udfed",fallen_leaf:"\ud83c\udf42",family_man_woman_boy:"\ud83d\udc6a",family_man_boy:"\ud83d\udc68&zwj;\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_girl:"\ud83d\udc68&zwj;\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_man_man_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_man_girl:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_man_woman_boy_boy:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_woman_boy:"\ud83d\udc69&zwj;\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_woman_girl:"\ud83d\udc69&zwj;\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67",fast_forward:"\u23e9",fax:"\ud83d\udce0",fearful:"\ud83d\ude28",feet:"\ud83d\udc3e",female_detective:"\ud83d\udd75\ufe0f&zwj;\u2640\ufe0f",ferris_wheel:"\ud83c\udfa1",ferry:"\u26f4",field_hockey:"\ud83c\udfd1",file_cabinet:"\ud83d\uddc4",file_folder:"\ud83d\udcc1",film_projector:"\ud83d\udcfd",film_strip:"\ud83c\udf9e",fire:"\ud83d\udd25",fire_engine:"\ud83d\ude92",fireworks:"\ud83c\udf86",first_quarter_moon:"\ud83c\udf13",first_quarter_moon_with_face:"\ud83c\udf1b",fish:"\ud83d\udc1f",fish_cake:"\ud83c\udf65",fishing_pole_and_fish:"\ud83c\udfa3",fist_raised:"\u270a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",flags:"\ud83c\udf8f",flashlight:"\ud83d\udd26",fleur_de_lis:"\u269c\ufe0f",flight_arrival:"\ud83d\udeec",flight_departure:"\ud83d\udeeb",floppy_disk:"\ud83d\udcbe",flower_playing_cards:"\ud83c\udfb4",flushed:"\ud83d\ude33",fog:"\ud83c\udf2b",foggy:"\ud83c\udf01",football:"\ud83c\udfc8",footprints:"\ud83d\udc63",fork_and_knife:"\ud83c\udf74",fountain:"\u26f2\ufe0f",fountain_pen:"\ud83d\udd8b",four_leaf_clover:"\ud83c\udf40",fox_face:"\ud83e\udd8a",framed_picture:"\ud83d\uddbc",free:"\ud83c\udd93",fried_egg:"\ud83c\udf73",fried_shrimp:"\ud83c\udf64",fries:"\ud83c\udf5f",frog:"\ud83d\udc38",frowning:"\ud83d\ude26",frowning_face:"\u2639\ufe0f",frowning_man:"\ud83d\ude4d&zwj;\u2642\ufe0f",frowning_woman:"\ud83d\ude4d",middle_finger:"\ud83d\udd95",fuelpump:"\u26fd\ufe0f",full_moon:"\ud83c\udf15",full_moon_with_face:"\ud83c\udf1d",funeral_urn:"\u26b1\ufe0f",game_die:"\ud83c\udfb2",gear:"\u2699\ufe0f",gem:"\ud83d\udc8e",gemini:"\u264a\ufe0f",ghost:"\ud83d\udc7b",gift:"\ud83c\udf81",gift_heart:"\ud83d\udc9d",girl:"\ud83d\udc67",globe_with_meridians:"\ud83c\udf10",goal_net:"\ud83e\udd45",goat:"\ud83d\udc10",golf:"\u26f3\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f&zwj;\u2640\ufe0f",gorilla:"\ud83e\udd8d",grapes:"\ud83c\udf47",green_apple:"\ud83c\udf4f",green_book:"\ud83d\udcd7",green_heart:"\ud83d\udc9a",green_salad:"\ud83e\udd57",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\ud83d\ude2c",grin:"\ud83d\ude01",grinning:"\ud83d\ude00",guardsman:"\ud83d\udc82",guardswoman:"\ud83d\udc82&zwj;\u2640\ufe0f",guitar:"\ud83c\udfb8",gun:"\ud83d\udd2b",haircut_woman:"\ud83d\udc87",haircut_man:"\ud83d\udc87&zwj;\u2642\ufe0f",hamburger:"\ud83c\udf54",hammer:"\ud83d\udd28",hammer_and_pick:"\u2692",hammer_and_wrench:"\ud83d\udee0",hamster:"\ud83d\udc39",hand:"\u270b",handbag:"\ud83d\udc5c",handshake:"\ud83e\udd1d",hankey:"\ud83d\udca9",hatched_chick:"\ud83d\udc25",hatching_chick:"\ud83d\udc23",headphones:"\ud83c\udfa7",hear_no_evil:"\ud83d\ude49",heart:"\u2764\ufe0f",heart_decoration:"\ud83d\udc9f",heart_eyes:"\ud83d\ude0d",heart_eyes_cat:"\ud83d\ude3b",heartbeat:"\ud83d\udc93",heartpulse:"\ud83d\udc97",hearts:"\u2665\ufe0f",heavy_check_mark:"\u2714\ufe0f",heavy_division_sign:"\u2797",heavy_dollar_sign:"\ud83d\udcb2",heavy_heart_exclamation:"\u2763\ufe0f",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",helicopter:"\ud83d\ude81",herb:"\ud83c\udf3f",hibiscus:"\ud83c\udf3a",high_brightness:"\ud83d\udd06",high_heel:"\ud83d\udc60",hocho:"\ud83d\udd2a",hole:"\ud83d\udd73",honey_pot:"\ud83c\udf6f",horse:"\ud83d\udc34",horse_racing:"\ud83c\udfc7",hospital:"\ud83c\udfe5",hot_pepper:"\ud83c\udf36",hotdog:"\ud83c\udf2d",hotel:"\ud83c\udfe8",hotsprings:"\u2668\ufe0f",hourglass:"\u231b\ufe0f",hourglass_flowing_sand:"\u23f3",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",houses:"\ud83c\udfd8",hugs:"\ud83e\udd17",hushed:"\ud83d\ude2f",ice_cream:"\ud83c\udf68",ice_hockey:"\ud83c\udfd2",ice_skate:"\u26f8",icecream:"\ud83c\udf66",id:"\ud83c\udd94",ideograph_advantage:"\ud83c\ude50",imp:"\ud83d\udc7f",inbox_tray:"\ud83d\udce5",incoming_envelope:"\ud83d\udce8",tipping_hand_woman:"\ud83d\udc81",information_source:"\u2139\ufe0f",innocent:"\ud83d\ude07",interrobang:"\u2049\ufe0f",iphone:"\ud83d\udcf1",izakaya_lantern:"\ud83c\udfee",jack_o_lantern:"\ud83c\udf83",japan:"\ud83d\uddfe",japanese_castle:"\ud83c\udfef",japanese_goblin:"\ud83d\udc7a",japanese_ogre:"\ud83d\udc79",jeans:"\ud83d\udc56",joy:"\ud83d\ude02",joy_cat:"\ud83d\ude39",joystick:"\ud83d\udd79",kaaba:"\ud83d\udd4b",key:"\ud83d\udd11",keyboard:"\u2328\ufe0f",keycap_ten:"\ud83d\udd1f",kick_scooter:"\ud83d\udef4",kimono:"\ud83d\udc58",kiss:"\ud83d\udc8b",kissing:"\ud83d\ude17",kissing_cat:"\ud83d\ude3d",kissing_closed_eyes:"\ud83d\ude1a",kissing_heart:"\ud83d\ude18",kissing_smiling_eyes:"\ud83d\ude19",kiwi_fruit:"\ud83e\udd5d",koala:"\ud83d\udc28",koko:"\ud83c\ude01",label:"\ud83c\udff7",large_blue_circle:"\ud83d\udd35",large_blue_diamond:"\ud83d\udd37",large_orange_diamond:"\ud83d\udd36",last_quarter_moon:"\ud83c\udf17",last_quarter_moon_with_face:"\ud83c\udf1c",latin_cross:"\u271d\ufe0f",laughing:"\ud83d\ude06",leaves:"\ud83c\udf43",ledger:"\ud83d\udcd2",left_luggage:"\ud83d\udec5",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",lemon:"\ud83c\udf4b",leo:"\u264c\ufe0f",leopard:"\ud83d\udc06",level_slider:"\ud83c\udf9a",libra:"\u264e\ufe0f",light_rail:"\ud83d\ude88",link:"\ud83d\udd17",lion:"\ud83e\udd81",lips:"\ud83d\udc44",lipstick:"\ud83d\udc84",lizard:"\ud83e\udd8e",lock:"\ud83d\udd12",lock_with_ink_pen:"\ud83d\udd0f",lollipop:"\ud83c\udf6d",loop:"\u27bf",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",love_hotel:"\ud83c\udfe9",love_letter:"\ud83d\udc8c",low_brightness:"\ud83d\udd05",lying_face:"\ud83e\udd25",m:"\u24c2\ufe0f",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",mahjong:"\ud83c\udc04\ufe0f",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",man:"\ud83d\udc68",man_artist:"\ud83d\udc68&zwj;\ud83c\udfa8",man_astronaut:"\ud83d\udc68&zwj;\ud83d\ude80",man_cartwheeling:"\ud83e\udd38&zwj;\u2642\ufe0f",man_cook:"\ud83d\udc68&zwj;\ud83c\udf73",man_dancing:"\ud83d\udd7a",man_facepalming:"\ud83e\udd26&zwj;\u2642\ufe0f",man_factory_worker:"\ud83d\udc68&zwj;\ud83c\udfed",man_farmer:"\ud83d\udc68&zwj;\ud83c\udf3e",man_firefighter:"\ud83d\udc68&zwj;\ud83d\ude92",man_health_worker:"\ud83d\udc68&zwj;\u2695\ufe0f",man_in_tuxedo:"\ud83e\udd35",man_judge:"\ud83d\udc68&zwj;\u2696\ufe0f",man_juggling:"\ud83e\udd39&zwj;\u2642\ufe0f",man_mechanic:"\ud83d\udc68&zwj;\ud83d\udd27",man_office_worker:"\ud83d\udc68&zwj;\ud83d\udcbc",man_pilot:"\ud83d\udc68&zwj;\u2708\ufe0f",man_playing_handball:"\ud83e\udd3e&zwj;\u2642\ufe0f",man_playing_water_polo:"\ud83e\udd3d&zwj;\u2642\ufe0f",man_scientist:"\ud83d\udc68&zwj;\ud83d\udd2c",man_shrugging:"\ud83e\udd37&zwj;\u2642\ufe0f",man_singer:"\ud83d\udc68&zwj;\ud83c\udfa4",man_student:"\ud83d\udc68&zwj;\ud83c\udf93",man_teacher:"\ud83d\udc68&zwj;\ud83c\udfeb",man_technologist:"\ud83d\udc68&zwj;\ud83d\udcbb",man_with_gua_pi_mao:"\ud83d\udc72",man_with_turban:"\ud83d\udc73",tangerine:"\ud83c\udf4a",mans_shoe:"\ud83d\udc5e",mantelpiece_clock:"\ud83d\udd70",maple_leaf:"\ud83c\udf41",martial_arts_uniform:"\ud83e\udd4b",mask:"\ud83d\ude37",massage_woman:"\ud83d\udc86",massage_man:"\ud83d\udc86&zwj;\u2642\ufe0f",meat_on_bone:"\ud83c\udf56",medal_military:"\ud83c\udf96",medal_sports:"\ud83c\udfc5",mega:"\ud83d\udce3",melon:"\ud83c\udf48",memo:"\ud83d\udcdd",men_wrestling:"\ud83e\udd3c&zwj;\u2642\ufe0f",menorah:"\ud83d\udd4e",mens:"\ud83d\udeb9",metal:"\ud83e\udd18",metro:"\ud83d\ude87",microphone:"\ud83c\udfa4",microscope:"\ud83d\udd2c",milk_glass:"\ud83e\udd5b",milky_way:"\ud83c\udf0c",minibus:"\ud83d\ude90",minidisc:"\ud83d\udcbd",mobile_phone_off:"\ud83d\udcf4",money_mouth_face:"\ud83e\udd11",money_with_wings:"\ud83d\udcb8",moneybag:"\ud83d\udcb0",monkey:"\ud83d\udc12",monkey_face:"\ud83d\udc35",monorail:"\ud83d\ude9d",moon:"\ud83c\udf14",mortar_board:"\ud83c\udf93",mosque:"\ud83d\udd4c",motor_boat:"\ud83d\udee5",motor_scooter:"\ud83d\udef5",motorcycle:"\ud83c\udfcd",motorway:"\ud83d\udee3",mount_fuji:"\ud83d\uddfb",mountain:"\u26f0",mountain_biking_man:"\ud83d\udeb5",mountain_biking_woman:"\ud83d\udeb5&zwj;\u2640\ufe0f",mountain_cableway:"\ud83d\udea0",mountain_railway:"\ud83d\ude9e",mountain_snow:"\ud83c\udfd4",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",movie_camera:"\ud83c\udfa5",moyai:"\ud83d\uddff",mrs_claus:"\ud83e\udd36",muscle:"\ud83d\udcaa",mushroom:"\ud83c\udf44",musical_keyboard:"\ud83c\udfb9",musical_note:"\ud83c\udfb5",musical_score:"\ud83c\udfbc",mute:"\ud83d\udd07",nail_care:"\ud83d\udc85",name_badge:"\ud83d\udcdb",national_park:"\ud83c\udfde",nauseated_face:"\ud83e\udd22",necktie:"\ud83d\udc54",negative_squared_cross_mark:"\u274e",nerd_face:"\ud83e\udd13",neutral_face:"\ud83d\ude10","new":"\ud83c\udd95",new_moon:"\ud83c\udf11",new_moon_with_face:"\ud83c\udf1a",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde",next_track_button:"\u23ed",ng:"\ud83c\udd96",no_good_man:"\ud83d\ude45&zwj;\u2642\ufe0f",no_good_woman:"\ud83d\ude45",night_with_stars:"\ud83c\udf03",no_bell:"\ud83d\udd15",no_bicycles:"\ud83d\udeb3",no_entry:"\u26d4\ufe0f",no_entry_sign:"\ud83d\udeab",no_mobile_phones:"\ud83d\udcf5",no_mouth:"\ud83d\ude36",no_pedestrians:"\ud83d\udeb7",no_smoking:"\ud83d\udead","non-potable_water":"\ud83d\udeb1",nose:"\ud83d\udc43",notebook:"\ud83d\udcd3",notebook_with_decorative_cover:"\ud83d\udcd4",notes:"\ud83c\udfb6",nut_and_bolt:"\ud83d\udd29",o:"\u2b55\ufe0f",o2:"\ud83c\udd7e\ufe0f",ocean:"\ud83c\udf0a",octopus:"\ud83d\udc19",oden:"\ud83c\udf62",office:"\ud83c\udfe2",oil_drum:"\ud83d\udee2",ok:"\ud83c\udd97",ok_hand:"\ud83d\udc4c",ok_man:"\ud83d\ude46&zwj;\u2642\ufe0f",ok_woman:"\ud83d\ude46",old_key:"\ud83d\udddd",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",om:"\ud83d\udd49",on:"\ud83d\udd1b",oncoming_automobile:"\ud83d\ude98",oncoming_bus:"\ud83d\ude8d",oncoming_police_car:"\ud83d\ude94",oncoming_taxi:"\ud83d\ude96",open_file_folder:"\ud83d\udcc2",open_hands:"\ud83d\udc50",open_mouth:"\ud83d\ude2e",open_umbrella:"\u2602\ufe0f",ophiuchus:"\u26ce",orange_book:"\ud83d\udcd9",orthodox_cross:"\u2626\ufe0f",outbox_tray:"\ud83d\udce4",owl:"\ud83e\udd89",ox:"\ud83d\udc02","package":"\ud83d\udce6",page_facing_up:"\ud83d\udcc4",page_with_curl:"\ud83d\udcc3",pager:"\ud83d\udcdf",paintbrush:"\ud83d\udd8c",palm_tree:"\ud83c\udf34",pancakes:"\ud83e\udd5e",panda_face:"\ud83d\udc3c",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87",parasol_on_ground:"\u26f1",parking:"\ud83c\udd7f\ufe0f",part_alternation_mark:"\u303d\ufe0f",partly_sunny:"\u26c5\ufe0f",passenger_ship:"\ud83d\udef3",passport_control:"\ud83d\udec2",pause_button:"\u23f8",peace_symbol:"\u262e\ufe0f",peach:"\ud83c\udf51",peanuts:"\ud83e\udd5c",pear:"\ud83c\udf50",pen:"\ud83d\udd8a",pencil2:"\u270f\ufe0f",penguin:"\ud83d\udc27",pensive:"\ud83d\ude14",performing_arts:"\ud83c\udfad",persevere:"\ud83d\ude23",person_fencing:"\ud83e\udd3a",pouting_woman:"\ud83d\ude4e",phone:"\u260e\ufe0f",pick:"\u26cf",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",pig_nose:"\ud83d\udc3d",pill:"\ud83d\udc8a",pineapple:"\ud83c\udf4d",ping_pong:"\ud83c\udfd3",pisces:"\u2653\ufe0f",pizza:"\ud83c\udf55",place_of_worship:"\ud83d\uded0",plate_with_cutlery:"\ud83c\udf7d",play_or_pause_button:"\u23ef",point_down:"\ud83d\udc47",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up:"\u261d\ufe0f",point_up_2:"\ud83d\udc46",police_car:"\ud83d\ude93",policewoman:"\ud83d\udc6e&zwj;\u2640\ufe0f",poodle:"\ud83d\udc29",popcorn:"\ud83c\udf7f",post_office:"\ud83c\udfe3",postal_horn:"\ud83d\udcef",postbox:"\ud83d\udcee",potable_water:"\ud83d\udeb0",potato:"\ud83e\udd54",pouch:"\ud83d\udc5d",poultry_leg:"\ud83c\udf57",pound:"\ud83d\udcb7",rage:"\ud83d\ude21",pouting_cat:"\ud83d\ude3e",pouting_man:"\ud83d\ude4e&zwj;\u2642\ufe0f",pray:"\ud83d\ude4f",prayer_beads:"\ud83d\udcff",pregnant_woman:"\ud83e\udd30",previous_track_button:"\u23ee",prince:"\ud83e\udd34",princess:"\ud83d\udc78",printer:"\ud83d\udda8",purple_heart:"\ud83d\udc9c",purse:"\ud83d\udc5b",pushpin:"\ud83d\udccc",put_litter_in_its_place:"\ud83d\udeae",question:"\u2753",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",racehorse:"\ud83d\udc0e",racing_car:"\ud83c\udfce",radio:"\ud83d\udcfb",radio_button:"\ud83d\udd18",radioactive:"\u2622\ufe0f",railway_car:"\ud83d\ude83",railway_track:"\ud83d\udee4",rainbow:"\ud83c\udf08",rainbow_flag:"\ud83c\udff3\ufe0f&zwj;\ud83c\udf08",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90",raised_hands:"\ud83d\ude4c",raising_hand_woman:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b&zwj;\u2642\ufe0f",ram:"\ud83d\udc0f",ramen:"\ud83c\udf5c",rat:"\ud83d\udc00",record_button:"\u23fa",recycle:"\u267b\ufe0f",red_circle:"\ud83d\udd34",registered:"\xae\ufe0f",relaxed:"\u263a\ufe0f",relieved:"\ud83d\ude0c",reminder_ribbon:"\ud83c\udf97",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",rescue_worker_helmet:"\u26d1",restroom:"\ud83d\udebb",revolving_hearts:"\ud83d\udc9e",rewind:"\u23ea",rhinoceros:"\ud83e\udd8f",ribbon:"\ud83c\udf80",rice:"\ud83c\udf5a",rice_ball:"\ud83c\udf59",rice_cracker:"\ud83c\udf58",rice_scene:"\ud83c\udf91",right_anger_bubble:"\ud83d\uddef",ring:"\ud83d\udc8d",robot:"\ud83e\udd16",rocket:"\ud83d\ude80",rofl:"\ud83e\udd23",roll_eyes:"\ud83d\ude44",roller_coaster:"\ud83c\udfa2",rooster:"\ud83d\udc13",rose:"\ud83c\udf39",rosette:"\ud83c\udff5",rotating_light:"\ud83d\udea8",round_pushpin:"\ud83d\udccd",rowing_man:"\ud83d\udea3",rowing_woman:"\ud83d\udea3&zwj;\u2640\ufe0f",rugby_football:"\ud83c\udfc9",running_man:"\ud83c\udfc3",running_shirt_with_sash:"\ud83c\udfbd",running_woman:"\ud83c\udfc3&zwj;\u2640\ufe0f",sa:"\ud83c\ude02\ufe0f",sagittarius:"\u2650\ufe0f",sake:"\ud83c\udf76",sandal:"\ud83d\udc61",santa:"\ud83c\udf85",satellite:"\ud83d\udce1",saxophone:"\ud83c\udfb7",school:"\ud83c\udfeb",school_satchel:"\ud83c\udf92",scissors:"\u2702\ufe0f",scorpion:"\ud83e\udd82",scorpius:"\u264f\ufe0f",scream:"\ud83d\ude31",scream_cat:"\ud83d\ude40",scroll:"\ud83d\udcdc",seat:"\ud83d\udcba",secret:"\u3299\ufe0f",see_no_evil:"\ud83d\ude48",seedling:"\ud83c\udf31",selfie:"\ud83e\udd33",shallow_pan_of_food:"\ud83e\udd58",shamrock:"\u2618\ufe0f",shark:"\ud83e\udd88",shaved_ice:"\ud83c\udf67",sheep:"\ud83d\udc11",shell:"\ud83d\udc1a",shield:"\ud83d\udee1",shinto_shrine:"\u26e9",ship:"\ud83d\udea2",shirt:"\ud83d\udc55",shopping:"\ud83d\udecd",shopping_cart:"\ud83d\uded2",shower:"\ud83d\udebf",shrimp:"\ud83e\udd90",signal_strength:"\ud83d\udcf6",six_pointed_star:"\ud83d\udd2f",ski:"\ud83c\udfbf",skier:"\u26f7",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",sleeping:"\ud83d\ude34",sleeping_bed:"\ud83d\udecc",sleepy:"\ud83d\ude2a",slightly_frowning_face:"\ud83d\ude41",slightly_smiling_face:"\ud83d\ude42",slot_machine:"\ud83c\udfb0",small_airplane:"\ud83d\udee9",small_blue_diamond:"\ud83d\udd39",small_orange_diamond:"\ud83d\udd38",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",smile:"\ud83d\ude04",smile_cat:"\ud83d\ude38",smiley:"\ud83d\ude03",smiley_cat:"\ud83d\ude3a",smiling_imp:"\ud83d\ude08",smirk:"\ud83d\ude0f",smirk_cat:"\ud83d\ude3c",smoking:"\ud83d\udeac",snail:"\ud83d\udc0c",snake:"\ud83d\udc0d",sneezing_face:"\ud83e\udd27",snowboarder:"\ud83c\udfc2",snowflake:"\u2744\ufe0f",snowman:"\u26c4\ufe0f",snowman_with_snow:"\u2603\ufe0f",sob:"\ud83d\ude2d",soccer:"\u26bd\ufe0f",soon:"\ud83d\udd1c",sos:"\ud83c\udd98",sound:"\ud83d\udd09",space_invader:"\ud83d\udc7e",spades:"\u2660\ufe0f",spaghetti:"\ud83c\udf5d",sparkle:"\u2747\ufe0f",sparkler:"\ud83c\udf87",sparkles:"\u2728",sparkling_heart:"\ud83d\udc96",speak_no_evil:"\ud83d\ude4a",speaker:"\ud83d\udd08",speaking_head:"\ud83d\udde3",speech_balloon:"\ud83d\udcac",speedboat:"\ud83d\udea4",spider:"\ud83d\udd77",spider_web:"\ud83d\udd78",spiral_calendar:"\ud83d\uddd3",spiral_notepad:"\ud83d\uddd2",spoon:"\ud83e\udd44",squid:"\ud83e\udd91",stadium:"\ud83c\udfdf",star:"\u2b50\ufe0f",star2:"\ud83c\udf1f",star_and_crescent:"\u262a\ufe0f",star_of_david:"\u2721\ufe0f",stars:"\ud83c\udf20",station:"\ud83d\ude89",statue_of_liberty:"\ud83d\uddfd",steam_locomotive:"\ud83d\ude82",stew:"\ud83c\udf72",stop_button:"\u23f9",stop_sign:"\ud83d\uded1",stopwatch:"\u23f1",straight_ruler:"\ud83d\udccf",strawberry:"\ud83c\udf53",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",stuck_out_tongue_winking_eye:"\ud83d\ude1c",studio_microphone:"\ud83c\udf99",stuffed_flatbread:"\ud83e\udd59",sun_behind_large_cloud:"\ud83c\udf25",sun_behind_rain_cloud:"\ud83c\udf26",sun_behind_small_cloud:"\ud83c\udf24",sun_with_face:"\ud83c\udf1e",sunflower:"\ud83c\udf3b",sunglasses:"\ud83d\ude0e",sunny:"\u2600\ufe0f",sunrise:"\ud83c\udf05",sunrise_over_mountains:"\ud83c\udf04",surfing_man:"\ud83c\udfc4",surfing_woman:"\ud83c\udfc4&zwj;\u2640\ufe0f",sushi:"\ud83c\udf63",suspension_railway:"\ud83d\ude9f",sweat:"\ud83d\ude13",sweat_drops:"\ud83d\udca6",sweat_smile:"\ud83d\ude05",sweet_potato:"\ud83c\udf60",swimming_man:"\ud83c\udfca",swimming_woman:"\ud83c\udfca&zwj;\u2640\ufe0f",symbols:"\ud83d\udd23",synagogue:"\ud83d\udd4d",syringe:"\ud83d\udc89",taco:"\ud83c\udf2e",tada:"\ud83c\udf89",tanabata_tree:"\ud83c\udf8b",taurus:"\u2649\ufe0f",taxi:"\ud83d\ude95",tea:"\ud83c\udf75",telephone_receiver:"\ud83d\udcde",telescope:"\ud83d\udd2d",tennis:"\ud83c\udfbe",tent:"\u26fa\ufe0f",thermometer:"\ud83c\udf21",thinking:"\ud83e\udd14",thought_balloon:"\ud83d\udcad",ticket:"\ud83c\udfab",tickets:"\ud83c\udf9f",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",timer_clock:"\u23f2",tipping_hand_man:"\ud83d\udc81&zwj;\u2642\ufe0f",tired_face:"\ud83d\ude2b",tm:"\u2122\ufe0f",toilet:"\ud83d\udebd",tokyo_tower:"\ud83d\uddfc",tomato:"\ud83c\udf45",tongue:"\ud83d\udc45",top:"\ud83d\udd1d",tophat:"\ud83c\udfa9",tornado:"\ud83c\udf2a",trackball:"\ud83d\uddb2",tractor:"\ud83d\ude9c",traffic_light:"\ud83d\udea5",train:"\ud83d\ude8b",train2:"\ud83d\ude86",tram:"\ud83d\ude8a",triangular_flag_on_post:"\ud83d\udea9",triangular_ruler:"\ud83d\udcd0",trident:"\ud83d\udd31",triumph:"\ud83d\ude24",trolleybus:"\ud83d\ude8e",trophy:"\ud83c\udfc6",tropical_drink:"\ud83c\udf79",tropical_fish:"\ud83d\udc20",truck:"\ud83d\ude9a",trumpet:"\ud83c\udfba",tulip:"\ud83c\udf37",tumbler_glass:"\ud83e\udd43",turkey:"\ud83e\udd83",turtle:"\ud83d\udc22",tv:"\ud83d\udcfa",twisted_rightwards_arrows:"\ud83d\udd00",two_hearts:"\ud83d\udc95",two_men_holding_hands:"\ud83d\udc6c",two_women_holding_hands:"\ud83d\udc6d",u5272:"\ud83c\ude39",u5408:"\ud83c\ude34",u55b6:"\ud83c\ude3a",u6307:"\ud83c\ude2f\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6e80:"\ud83c\ude35",u7121:"\ud83c\ude1a\ufe0f",u7533:"\ud83c\ude38",u7981:"\ud83c\ude32",u7a7a:"\ud83c\ude33",umbrella:"\u2614\ufe0f",unamused:"\ud83d\ude12",underage:"\ud83d\udd1e",unicorn:"\ud83e\udd84",unlock:"\ud83d\udd13",up:"\ud83c\udd99",upside_down_face:"\ud83d\ude43",v:"\u270c\ufe0f",vertical_traffic_light:"\ud83d\udea6",vhs:"\ud83d\udcfc",vibration_mode:"\ud83d\udcf3",video_camera:"\ud83d\udcf9",video_game:"\ud83c\udfae",violin:"\ud83c\udfbb",virgo:"\u264d\ufe0f",volcano:"\ud83c\udf0b",volleyball:"\ud83c\udfd0",vs:"\ud83c\udd9a",vulcan_salute:"\ud83d\udd96",walking_man:"\ud83d\udeb6",walking_woman:"\ud83d\udeb6&zwj;\u2640\ufe0f",waning_crescent_moon:"\ud83c\udf18",waning_gibbous_moon:"\ud83c\udf16",warning:"\u26a0\ufe0f",wastebasket:"\ud83d\uddd1",watch:"\u231a\ufe0f",water_buffalo:"\ud83d\udc03",watermelon:"\ud83c\udf49",wave:"\ud83d\udc4b",wavy_dash:"\u3030\ufe0f",waxing_crescent_moon:"\ud83c\udf12",wc:"\ud83d\udebe",weary:"\ud83d\ude29",wedding:"\ud83d\udc92",weight_lifting_man:"\ud83c\udfcb\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f&zwj;\u2640\ufe0f",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",wheel_of_dharma:"\u2638\ufe0f",wheelchair:"\u267f\ufe0f",white_check_mark:"\u2705",white_circle:"\u26aa\ufe0f",white_flag:"\ud83c\udff3\ufe0f",white_flower:"\ud83d\udcae",white_large_square:"\u2b1c\ufe0f",white_medium_small_square:"\u25fd\ufe0f",white_medium_square:"\u25fb\ufe0f",white_small_square:"\u25ab\ufe0f",white_square_button:"\ud83d\udd33",wilted_flower:"\ud83e\udd40",wind_chime:"\ud83c\udf90",wind_face:"\ud83c\udf2c",wine_glass:"\ud83c\udf77",wink:"\ud83d\ude09",wolf:"\ud83d\udc3a",woman:"\ud83d\udc69",woman_artist:"\ud83d\udc69&zwj;\ud83c\udfa8",woman_astronaut:"\ud83d\udc69&zwj;\ud83d\ude80",woman_cartwheeling:"\ud83e\udd38&zwj;\u2640\ufe0f",woman_cook:"\ud83d\udc69&zwj;\ud83c\udf73",woman_facepalming:"\ud83e\udd26&zwj;\u2640\ufe0f",woman_factory_worker:"\ud83d\udc69&zwj;\ud83c\udfed",woman_farmer:"\ud83d\udc69&zwj;\ud83c\udf3e",woman_firefighter:"\ud83d\udc69&zwj;\ud83d\ude92",woman_health_worker:"\ud83d\udc69&zwj;\u2695\ufe0f",woman_judge:"\ud83d\udc69&zwj;\u2696\ufe0f",woman_juggling:"\ud83e\udd39&zwj;\u2640\ufe0f",woman_mechanic:"\ud83d\udc69&zwj;\ud83d\udd27",woman_office_worker:"\ud83d\udc69&zwj;\ud83d\udcbc",woman_pilot:"\ud83d\udc69&zwj;\u2708\ufe0f",woman_playing_handball:"\ud83e\udd3e&zwj;\u2640\ufe0f",woman_playing_water_polo:"\ud83e\udd3d&zwj;\u2640\ufe0f",woman_scientist:"\ud83d\udc69&zwj;\ud83d\udd2c",woman_shrugging:"\ud83e\udd37&zwj;\u2640\ufe0f",woman_singer:"\ud83d\udc69&zwj;\ud83c\udfa4",woman_student:"\ud83d\udc69&zwj;\ud83c\udf93",woman_teacher:"\ud83d\udc69&zwj;\ud83c\udfeb",woman_technologist:"\ud83d\udc69&zwj;\ud83d\udcbb",woman_with_turban:"\ud83d\udc73&zwj;\u2640\ufe0f",womans_clothes:"\ud83d\udc5a",womans_hat:"\ud83d\udc52",women_wrestling:"\ud83e\udd3c&zwj;\u2640\ufe0f",womens:"\ud83d\udeba",world_map:"\ud83d\uddfa",worried:"\ud83d\ude1f",wrench:"\ud83d\udd27",writing_hand:"\u270d\ufe0f",x:"\u274c",yellow_heart:"\ud83d\udc9b",yen:"\ud83d\udcb4",yin_yang:"\u262f\ufe0f",yum:"\ud83d\ude0b",zap:"\u26a1\ufe0f",zipper_mouth_face:"\ud83e\udd10",zzz:"\ud83d\udca4",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},y.Converter=function(a){var r={},o=[],s=[],l={},n=g,i={parsed:{},raw:"",format:""};function c(e,t){if(t=t||null,y.helper.isString(e)){if(t=e=y.helper.stdExtName(e),y.extensions[e])return void function i(e,t){"function"==typeof e&&(e=e(new y.Converter));y.helper.isArray(e)||(e=[e]);var a=m(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n<e.length;++n)switch(e[n].type){case"lang":o.push(e[n]);break;case"output":s.push(e[n]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(y.extensions[e],e);if(y.helper.isUndefined(p[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=p[e]}"function"==typeof e&&(e=e()),y.helper.isArray(e)||(e=[e]);var a=m(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n<e.length;++n){switch(e[n].type){case"lang":o.push(e[n]);break;case"output":s.push(e[n])}if(e[n].hasOwnProperty("listeners"))for(var r in e[n].listeners)e[n].listeners.hasOwnProperty(r)&&d(r,e[n].listeners[r])}}function d(e,t){if(!y.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+Rt(e)+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+Rt(t)+" given");l.hasOwnProperty(e)||(l[e]=[]),l[e].push(t)}!function f(){for(var e in a=a||{},u)u.hasOwnProperty(e)&&(r[e]=u[e]);{if("object"!==Rt(a))throw Error("Converter expects the passed parameter to be an object, but "+Rt(a)+" was passed instead.");for(var t in a)a.hasOwnProperty(t)&&(r[t]=a[t])}r.extensions&&y.helper.forEach(r.extensions,c)}(),this._dispatch=function(e,t,a,n){if(l.hasOwnProperty(e))for(var r=0;r<l[e].length;++r){var i=l[e][r](e,t,this,a,n);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return d(e,t),this},this.makeHtml=function(t){if(!t)return t;var a={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:o,outputModifiers:s,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return t=(t=(t=(t=(t=t.replace(/\xa8/g,"\xa8T")).replace(/\$/g,"\xa8D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),r.smartIndentationFix&&(t=function n(e){var t=e.match(/^\s*/)[0].length,a=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(a,"")}(t)),t="\n\n"+t+"\n\n",t=(t=y.subParser("detab")(t,r,a)).replace(/^[ \t]+$/gm,""),y.helper.forEach(o,function(e){t=y.subParser("runExtension")(e,t,r,a)}),t=y.subParser("metadata")(t,r,a),t=y.subParser("hashPreCodeTags")(t,r,a),t=y.subParser("githubCodeBlocks")(t,r,a),t=y.subParser("hashHTMLBlocks")(t,r,a),t=y.subParser("hashCodeTags")(t,r,a),t=y.subParser("stripLinkDefinitions")(t,r,a),t=y.subParser("blockGamut")(t,r,a),t=y.subParser("unhashHTMLSpans")(t,r,a),t=(t=(t=y.subParser("unescapeSpecialChars")(t,r,a)).replace(/\xa8D/g,"$$")).replace(/\xa8T/g,"\xa8"),t=y.subParser("completeHTMLDocument")(t,r,a),y.helper.forEach(s,function(e){t=y.subParser("runExtension")(e,t,r,a)}),i=a.metadata,t},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">\xa8NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var a=t.createElement("div");a.innerHTML=e;var n={preList:function c(e){for(var t=e.querySelectorAll("pre"),a=[],n=0;n<t.length;++n)if(1===t[n].childElementCount&&"code"===t[n].firstChild.tagName.toLowerCase()){var r=t[n].firstChild.innerHTML.trim(),i=t[n].firstChild.getAttribute("data-language")||"";if(""===i)for(var o=t[n].firstChild.className.split(" "),s=0;s<o.length;++s){var l=o[s].match(/^language-(.+)$/);if(null!==l){i=l[1];break}}r=y.helper.unescapeHTMLEntities(r),a.push(r),t[n].outerHTML='<precode language="'+i+'" precodenum="'+n.toString()+'"></precode>'}else a.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return a}(a)};!function s(e){for(var t=0;t<e.childNodes.length;++t){var a=e.childNodes[t];3===a.nodeType?/\S/.test(a.nodeValue)?(a.nodeValue=a.nodeValue.split("\n").join(" "),a.nodeValue=a.nodeValue.replace(/(\s)+/g,"$1")):(e.removeChild(a),--t):1===a.nodeType&&s(a)}}(a);for(var r=a.childNodes,i="",o=0;o<r.length;o++)i+=y.subParser("makeMarkdown.node")(r[o],n);return i},this.setOption=function(e,t){r[e]=t},this.getOption=function(e){return r[e]},this.getOptions=function(){return r},this.addExtension=function(e,t){c(e,t=t||null)},this.useExtension=function(e){c(e)},this.setFlavor=function(e){if(!h.hasOwnProperty(e))throw Error(e+" flavor was not found");var t=h[e];for(var a in n=e,t)t.hasOwnProperty(a)&&(r[a]=t[a])},this.getFlavor=function(){return n},this.removeExtension=function(e){y.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var a=e[t],n=0;n<o.length;++n)o[n]===a&&o[n].splice(n,1);for(;0<s.length;++n)s[0]===a&&s[0].splice(n,1)}},this.getAllExtensions=function(){return{language:o,output:s}},this.getMetadata=function(e){return e?i.raw:i.parsed},this.getMetadataFormat=function(){return i.format},this._setMetadataPair=function(e,t){i.parsed[e]=t},this._setMetadataFormat=function(e){i.format=e},this._setMetadataRaw=function(e){i.raw=e}},y.subParser("anchors",function(e,l,c){var d=function d(e,t,a,n,r,i,o){if(y.helper.isUndefined(o)&&(o=""),a=a.toLowerCase(),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))n="";else if(!n){if(a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,y.helper.isUndefined(c.gUrls[a]))return e;n=c.gUrls[a],y.helper.isUndefined(c.gTitles[a])||(o=c.gTitles[a])}var s='<a href="'+(n=n.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"';return""!==o&&null!==o&&(s+=' title="'+(o=(o=o.replace(/"/g,"&quot;")).replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"'),l.openLinksInNewWindow&&!/^#/.test(n)&&(s+=' rel="noopener noreferrer" target="\xa8E95Eblank"'),s+=">"+t+"</a>"};return e=(e=(e=(e=(e=c.converter._dispatch("anchors.before",e,l,c)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,d)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d)).replace(/\[([^\[\]]+)]()()()()()/g,d),l.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,t,a,n,r){if("\\"===a)return t+n;if(!y.helper.isString(l.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var i=l.ghMentionsLink.replace(/\{u}/g,r),o="";return l.openLinksInNewWindow&&(o=' rel="noopener noreferrer" target="\xa8E95Eblank"'),t+'<a href="'+i+'"'+o+">"+n+"</a>"})),e=c.converter._dispatch("anchors.after",e,l,c)});var I,O,o=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,s=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,c=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,d=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,f=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,b=function b(p){return function(e,t,a,n,r,i,o){var s=a=a.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback),l="",c="",d=t||"",f=o||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),p.excludeTrailingPunctuationFromURLs&&i&&(l=i),p.openLinksInNewWindow&&(c=' rel="noopener noreferrer" target="\xa8E95Eblank"'),d+'<a href="'+a+'"'+c+">"+s+"</a>"+l+f}},E=function E(r,i){return function(e,t,a){var n="mailto:";return t=t||"",a=y.subParser("unescapeSpecialChars")(a,r,i),r.encodeEmails?(n=y.helper.encodeEmailAddress(n+a),a=y.helper.encodeEmailAddress(a)):n+=a,t+'<a href="'+n+'">'+a+"</a>"}};y.subParser("autoLinks",function(e,t,a){return e=(e=(e=a.converter._dispatch("autoLinks.before",e,t,a)).replace(c,b(t))).replace(f,E(t,a)),e=a.converter._dispatch("autoLinks.after",e,t,a)}),y.subParser("simplifiedAutoLinks",function(e,t,a){return t.simplifiedAutoLink?(e=a.converter._dispatch("simplifiedAutoLinks.before",e,t,a),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(s,b(t)):e.replace(o,b(t))).replace(d,E(t,a)),e=a.converter._dispatch("simplifiedAutoLinks.after",e,t,a)):e}),y.subParser("blockGamut",function(e,t,a){return e=a.converter._dispatch("blockGamut.before",e,t,a),e=y.subParser("blockQuotes")(e,t,a),e=y.subParser("headers")(e,t,a),e=y.subParser("horizontalRule")(e,t,a),e=y.subParser("lists")(e,t,a),e=y.subParser("codeBlocks")(e,t,a),e=y.subParser("tables")(e,t,a),e=y.subParser("hashHTMLBlocks")(e,t,a),e=y.subParser("paragraphs")(e,t,a),e=a.converter._dispatch("blockGamut.after",e,t,a)}),y.subParser("blockQuotes",function(e,t,a){e=a.converter._dispatch("blockQuotes.before",e,t,a),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/\xa80/g,"")).replace(/^[ \t]+$/gm,""),e=y.subParser("githubCodeBlocks")(e,t,a),e=(e=(e=y.subParser("blockGamut")(e,t,a)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,t){var a=t;return a=(a=a.replace(/^ {2}/gm,"\xa80")).replace(/\xa80/g,"")}),y.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,a)}),e=a.converter._dispatch("blockQuotes.after",e,t,a)}),y.subParser("codeBlocks",function(e,o,s){e=s.converter._dispatch("codeBlocks.before",e,o,s);return e=(e=(e+="\xa80").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=\xa80))/g,function(e,t,a){var n=t,r=a,i="\n";return n=y.subParser("outdent")(n,o,s),n=y.subParser("encodeCode")(n,o,s),n=(n=(n=y.subParser("detab")(n,o,s)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o.omitExtraWLInCodeBlocks&&(i=""),n="<pre><code>"+n+i+"</code></pre>",y.subParser("hashBlock")(n,o,s)+r})).replace(/\xa80/,""),e=s.converter._dispatch("codeBlocks.after",e,o,s)}),y.subParser("codeSpans",function(e,i,o){return void 0===(e=o.converter._dispatch("codeSpans.before",e,i,o))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,a,n){var r=n;return r=(r=r.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),r=t+"<code>"+(r=y.subParser("encodeCode")(r,i,o))+"</code>",r=y.subParser("hashHTMLSpans")(r,i,o)}),e=o.converter._dispatch("codeSpans.after",e,i,o)}),y.subParser("completeHTMLDocument",function(e,t,a){if(!t.completeHTMLDocument)return e;e=a.converter._dispatch("completeHTMLDocument.before",e,t,a);var n="html",r="<!DOCTYPE HTML>\n",i="",o='<meta charset="utf-8">\n',s="",l="";for(var c in"undefined"!=typeof a.metadata.parsed.doctype&&(r="<!DOCTYPE "+a.metadata.parsed.doctype+">\n","html"!==(n=a.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='<meta charset="utf-8">')),a.metadata.parsed)if(a.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i="<title>"+a.metadata.parsed.title+"</title>\n";break;case"charset":o="html"===n||"html5"===n?'<meta charset="'+a.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+a.metadata.parsed.charset+'">\n';break;case"language":case"lang":s=' lang="'+a.metadata.parsed[c]+'"',l+='<meta name="'+c+'" content="'+a.metadata.parsed[c]+'">\n';break;default:l+='<meta name="'+c+'" content="'+a.metadata.parsed[c]+'">\n'}return e=r+"<html"+s+">\n<head>\n"+i+o+l+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",e=a.converter._dispatch("completeHTMLDocument.after",e,t,a)}),y.subParser("detab",function(e,t,a){return e=(e=(e=(e=(e=(e=a.converter._dispatch("detab.before",e,t,a)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"\xa8A\xa8B")).replace(/\xa8B(.+?)\xa8A/g,function(e,t){for(var a=t,n=4-a.length%4,r=0;r<n;r++)a+=" ";return a})).replace(/\xa8A/g," ")).replace(/\xa8B/g,""),e=a.converter._dispatch("detab.after",e,t,a)}),y.subParser("ellipsis",function(e,t,a){return e=(e=a.converter._dispatch("ellipsis.before",e,t,a)).replace(/\.\.\./g,"\u2026"),e=a.converter._dispatch("ellipsis.after",e,t,a)}),y.subParser("emoji",function(e,t,a){if(!t.emoji)return e;return e=(e=a.converter._dispatch("emoji.before",e,t,a)).replace(/:([\S]+?):/g,function(e,t){return y.helper.emojis.hasOwnProperty(t)?y.helper.emojis[t]:e}),e=a.converter._dispatch("emoji.after",e,t,a)}),y.subParser("encodeAmpsAndAngles",function(e,t,a){return e=(e=(e=(e=(e=a.converter._dispatch("encodeAmpsAndAngles.before",e,t,a)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),e=a.converter._dispatch("encodeAmpsAndAngles.after",e,t,a)}),y.subParser("encodeBackslashEscapes",function(e,t,a){return e=(e=(e=a.converter._dispatch("encodeBackslashEscapes.before",e,t,a)).replace(/\\(\\)/g,y.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeBackslashEscapes.after",e,t,a)}),y.subParser("encodeCode",function(e,t,a){return e=(e=a.converter._dispatch("encodeCode.before",e,t,a)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("encodeCode.after",e,t,a)}),y.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,a){return e=(e=(e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,a)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)})).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,y.helper.escapeCharactersCallback)}),e=a.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,a)}),y.subParser("githubCodeBlocks",function(e,i,o){return i.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,i,o),e=(e=(e+="\xa80").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,t,a,n){var r=i.omitExtraWLInCodeBlocks?"":"\n";return n=y.subParser("encodeCode")(n,i,o),n="<pre><code"+(a?' class="'+a+" language-"+a+'"':"")+">"+(n=(n=(n=y.subParser("detab")(n,i,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+r+"</code></pre>",n=y.subParser("hashBlock")(n,i,o),"\n\n\xa8G"+(o.ghCodeBlocks.push({text:e,codeblock:n})-1)+"G\n\n"})).replace(/\xa80/,""),o.converter._dispatch("githubCodeBlocks.after",e,i,o)):e}),y.subParser("hashBlock",function(e,t,a){return e=(e=a.converter._dispatch("hashBlock.before",e,t,a)).replace(/(^\n+|\n+$)/g,""),e="\n\n\xa8K"+(a.gHtmlBlocks.push(e)-1)+"K\n\n",e=a.converter._dispatch("hashBlock.after",e,t,a)}),y.subParser("hashCodeTags",function(e,i,o){e=o.converter._dispatch("hashCodeTags.before",e,i,o);var s=function s(e,t,a,n){var r=a+y.subParser("encodeCode")(t,i,o)+n;return"\xa8C"+(o.gHtmlSpans.push(r)-1)+"C"};return e=y.helper.replaceRecursiveRegExp(e,s,"<code\\b[^>]*>","</code>","gim"),e=o.converter._dispatch("hashCodeTags.after",e,i,o)}),y.subParser("hashElement",function(e,t,n){return function(e,t){var a=t;return a=(a=(a=a.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),a="\n\n\xa8K"+(n.gHtmlBlocks.push(a)-1)+"K\n\n"}}),y.subParser("hashHTMLBlocks",function(e,t,i){e=i.converter._dispatch("hashHTMLBlocks.before",e,t,i);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function o(e,t,a,n){var r=e;return-1!==a.search(/\bmarkdown\b/)&&(r=a+i.converter.makeHtml(t)+n),"\n\n\xa8K"+(i.gHtmlBlocks.push(r)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"&lt;"+t+"&gt;"}));for(var n=0;n<a.length;++n)for(var r,s=new RegExp("^ {0,3}(<"+a[n]+"\\b[^>]*>)","im"),l="<"+a[n]+"\\b[^>]*>",c="</"+a[n]+">";-1!==(r=y.helper.regexIndexOf(e,s));){var d=y.helper.splitAtIndex(e,r),f=y.helper.replaceRecursiveRegExp(d[1],o,l,c,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,t,i)),e=(e=y.helper.replaceRecursiveRegExp(e,function(e){return"\n\n\xa8K"+(i.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,y.subParser("hashElement")(e,t,i)),e=i.converter._dispatch("hashHTMLBlocks.after",e,t,i)}),y.subParser("hashHTMLSpans",function(e,t,a){function n(e){return"\xa8C"+(a.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=a.converter._dispatch("hashHTMLSpans.before",e,t,a)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=a.converter._dispatch("hashHTMLSpans.after",e,t,a)}),y.subParser("unhashHTMLSpans",function(e,t,a){e=a.converter._dispatch("unhashHTMLSpans.before",e,t,a);for(var n=0;n<a.gHtmlSpans.length;++n){for(var r=a.gHtmlSpans[n],i=0;/\xa8C(\d+)C/.test(r);){var o=RegExp.$1;if(r=r.replace("\xa8C"+o+"C",a.gHtmlSpans[o]),10===i)break;++i}e=e.replace("\xa8C"+n+"C",r)}return e=a.converter._dispatch("unhashHTMLSpans.after",e,t,a)}),y.subParser("hashPreCodeTags",function(e,i,o){e=o.converter._dispatch("hashPreCodeTags.before",e,i,o);var s=function s(e,t,a,n){var r=a+y.subParser("encodeCode")(t,i,o)+n;return"\n\n\xa8G"+(o.ghCodeBlocks.push({text:e,codeblock:r})-1)+"G\n\n"};return e=y.helper.replaceRecursiveRegExp(e,s,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),e=o.converter._dispatch("hashPreCodeTags.after",e,i,o)}),y.subParser("headers",function(e,l,c){e=c.converter._dispatch("headers.before",e,l,c);var d=isNaN(parseInt(l.headerLevelStart))?1:parseInt(l.headerLevelStart),t=l.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=l.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(t,function(e,t){var a=y.subParser("spanGamut")(t,l,c),n=l.noHeaderId?"":' id="'+f(t)+'"',r="<h"+d+n+">"+a+"</h"+d+">";return y.subParser("hashBlock")(r,l,c)})).replace(a,function(e,t){var a=y.subParser("spanGamut")(t,l,c),n=l.noHeaderId?"":' id="'+f(t)+'"',r=d+1,i="<h"+r+n+">"+a+"</h"+r+">";return y.subParser("hashBlock")(i,l,c)});var n=l.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function f(e){var t,a;if(l.customizedHeaderId){var n=e.match(/\{([^{]+?)}\s*$/);n&&n[1]&&(e=n[1])}return t=e,a=y.helper.isString(l.prefixHeaderId)?l.prefixHeaderId:!0===l.prefixHeaderId?"section-":"",l.rawPrefixHeaderId||(t=a+t),t=l.ghCompatibleHeaderId?t.replace(/ /g,"-").replace(/&amp;/g,"").replace(/\xa8T/g,"").replace(/\xa8D/g,"").replace(/[&+$,\/:;=?@"#{}|^\xa8~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():l.rawHeaderId?t.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/\xa8T/g,"\xa8").replace(/\xa8D/g,"$").replace(/["']/g,"-").toLowerCase():t.replace(/[^\w]/g,"").toLowerCase(),l.rawPrefixHeaderId&&(t=a+t),c.hashLinkCounts[t]?t=t+"-"+c.hashLinkCounts[t]++:c.hashLinkCounts[t]=1,t}return e=e.replace(n,function(e,t,a){var n=a;l.customizedHeaderId&&(n=a.replace(/\s?\{([^{]+?)}\s*$/,""));var r=y.subParser("spanGamut")(n,l,c),i=l.noHeaderId?"":' id="'+f(a)+'"',o=d-1+t.length,s="<h"+o+i+">"+r+"</h"+o+">";return y.subParser("hashBlock")(s,l,c)}),e=c.converter._dispatch("headers.after",e,l,c)}),y.subParser("horizontalRule",function(e,t,a){e=a.converter._dispatch("horizontalRule.before",e,t,a);var n=y.subParser("hashBlock")("<hr />",t,a);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=a.converter._dispatch("horizontalRule.after",e,t,a)}),y.subParser("images",function(e,t,p){function l(e,t,a,n,r,i,o,s){var l=p.gUrls,c=p.gTitles,d=p.gDimensions;if(a=a.toLowerCase(),s||(s=""),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))n="";else if(""===n||null===n){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,y.helper.isUndefined(l[a]))return e;n=l[a],y.helper.isUndefined(c[a])||(s=c[a]),y.helper.isUndefined(d[a])||(r=d[a].width,i=d[a].height)}t=t.replace(/"/g,"&quot;").replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback);var f='<img src="'+(n=n.replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'" alt="'+t+'"';return s&&y.helper.isString(s)&&(f+=' title="'+(s=s.replace(/"/g,"&quot;").replace(y.helper.regexes.asteriskDashAndColon,y.helper.escapeCharactersCallback))+'"'),r&&i&&(f+=' width="'+(r="*"===r?"auto":r)+'"',f+=' height="'+(i="*"===i?"auto":i)+'"'),f+=" />"}return e=(e=(e=(e=(e=(e=p.converter._dispatch("images.before",e,t,p)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function c(e,t,a,n,r,i,o,s){return l(e,t,a,n=n.replace(/\s/g,""),r,i,0,s)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,l)).replace(/!\[([^\[\]]+)]()()()()()/g,l),e=p.converter._dispatch("images.after",e,t,p)}),y.subParser("italicsAndBold",function(e,t,a){function n(e,t,a){return t+e+a}return e=a.converter._dispatch("italicsAndBold.before",e,t,a),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return n(t,"<strong><em>","</em></strong>")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return n(t,"<strong>","</strong>")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return n(t,"<em>","</em>")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?n(t,"<strong><em>","</em></strong>"):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?n(t,"<strong>","</strong>"):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?n(t,"<em>","</em>"):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<strong><em>","</em></strong>")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<strong>","</strong>")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,a){return n(a,t+"<em>","</em>")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"<strong><em>","</em></strong>"):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"<strong>","</strong>"):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?n(t,"<em>","</em>"):e}),e=a.converter._dispatch("italicsAndBold.after",e,t,a)}),y.subParser("lists",function(e,p,d){function u(e,t){d.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80| {0,3}([*+-]|\d+[.])[ \t]+))/gm,c=/\n[ \t]*\n(?!\xa80)/.test(e+="\xa80");return p.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,function(e,t,a,n,r,i,o){o=o&&""!==o.trim();var s=y.subParser("outdent")(r,p,d),l="";return i&&p.tasklists&&(l=' class="task-list-item" style="list-style-type: none;"',s=s.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return o&&(e+=" checked"),e+=">"})),s=s.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"\xa8A"+e}),s="<li"+l+">"+(s=(s=t||-1<s.search(/\n{2,}/)?(s=y.subParser("githubCodeBlocks")(s,p,d),y.subParser("blockGamut")(s,p,d)):(s=(s=y.subParser("lists")(s,p,d)).replace(/\n$/,""),s=(s=y.subParser("hashHTMLBlocks")(s,p,d)).replace(/\n\n+/g,"\n\n"),c?y.subParser("paragraphs")(s,p,d):y.subParser("spanGamut")(s,p,d))).replace("\xa8A",""))+"</li>\n"})).replace(/\xa80/g,""),d.gListLevel--,t&&(e=e.replace(/\s+$/,"")),e}function g(e,t){if("ol"===t){var a=e.match(/^ *(\d+)\./);if(a&&"1"!==a[1])return' start="'+a[1]+'"'}return""}function h(e){return"ul"===e?' style="list-style: disc !important;padding: 0px 0px 0px 40px !important;"':' style="list-style: decimal !important;padding: 0px 0px 0px 40px !important;"'}function r(n,r,i){var o=p.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=p.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===r?o:s,c="",d=h(r);if(-1!==n.search(l))!function f(e){var t=e.search(l),a=g(n,r);d=h(r),-1!==t?(c+="\n\n<"+r+d+a+">\n"+u(e.slice(0,t),!!i)+"</"+r+">\n",l="ul"===(r="ul"===r?"ol":"ul")?o:s,f(e.slice(t))):c+="\n\n<"+r+d+a+">\n"+u(e,!!i)+"</"+r+">\n"}(n);else{var e=g(n,r);c="\n\n<"+r+d+e+">\n"+u(n,!!i)+"</"+r+">\n"}return c}return e=d.converter._dispatch("lists.before",e,p,d),e+="\xa80",e=(e=d.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,a){return r(t,-1<a.search(/[*+-]/g)?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,a,n){return r(a,-1<n.search(/[*+-]/g)?"ul":"ol",!1)})).replace(/\xa80/,""),e=d.converter._dispatch("lists.after",e,p,d)}),y.subParser("metadata",function(e,t,n){if(!t.metadata)return e;function r(e){(e=(e=(n.metadata.raw=e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,a){return n.metadata.parsed[t]=a,""})}return e=(e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*\xab\xab\xab+(\S*?)\n([\s\S]+?)\n\xbb\xbb\xbb+\n/,function(e,t,a){return r(a),"\xa8M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,a){return t&&(n.metadata.format=t),r(a),"\xa8M"})).replace(/\xa8M/g,""),e=n.converter._dispatch("metadata.after",e,t,n)}),y.subParser("outdent",function(e,t,a){return e=(e=(e=a.converter._dispatch("outdent.before",e,t,a)).replace(/^(\t|[ ]{1,4})/gm,"\xa80")).replace(/\xa80/g,""),e=a.converter._dispatch("outdent.after",e,t,a)}),y.subParser("paragraphs",function(e,t,a){for(var n=(e=(e=(e=a.converter._dispatch("paragraphs.before",e,t,a)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),r=[],i=n.length,o=0;o<i;o++){var s=n[o];0<=s.search(/\xa8(K|G)(\d+)\1/g)?r.push(s):0<=s.search(/\S/)&&(s=(s=y.subParser("spanGamut")(s,t,a)).replace(/^([ \t]*)/g,"<p>"),s+="</p>",r.push(s))}for(i=r.length,o=0;o<i;o++){for(var l="",c=r[o],d=!1;/\xa8(K|G)(\d+)\1/.test(c);){var f=RegExp.$1,p=RegExp.$2;l=(l="K"===f?a.gHtmlBlocks[p]:d?y.subParser("encodeCode")(a.ghCodeBlocks[p].text,t,a):a.ghCodeBlocks[p].codeblock).replace(/\$/g,"$$$$"),c=c.replace(/(\n\n)?\xa8(K|G)\d+\2(\n\n)?/,l),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(c)&&(d=!0)}r[o]=c}return e=(e=(e=r.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),a.converter._dispatch("paragraphs.after",e,t,a)}),y.subParser("runExtension",function(e,t,a,n){if(e.filter)t=e.filter(t,n.converter,a);else if(e.regex){var r=e.regex;r instanceof RegExp||(r=new RegExp(r,"g")),t=t.replace(r,e.replace)}return t}),y.subParser("spanGamut",function(e,t,a){return e=a.converter._dispatch("spanGamut.before",e,t,a),e=y.subParser("codeSpans")(e,t,a),e=y.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,a),e=y.subParser("encodeBackslashEscapes")(e,t,a),e=y.subParser("images")(e,t,a),e=y.subParser("anchors")(e,t,a),e=y.subParser("autoLinks")(e,t,a),e=y.subParser("simplifiedAutoLinks")(e,t,a),e=y.subParser("emoji")(e,t,a),e=y.subParser("underline")(e,t,a),e=y.subParser("italicsAndBold")(e,t,a),e=y.subParser("strikethrough")(e,t,a),e=y.subParser("ellipsis")(e,t,a),e=y.subParser("hashHTMLSpans")(e,t,a),e=y.subParser("encodeAmpsAndAngles")(e,t,a),t.simpleLineBreaks?/\n\n\xa8K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/ +\n/g,"<br />\n"),e=a.converter._dispatch("spanGamut.after",e,t,a)}),y.subParser("strikethrough",function(e,n,r){return n.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,n,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,t){return function a(e){return n.simplifiedAutoLink&&(e=y.subParser("simplifiedAutoLinks")(e,n,r)),"<del>"+e+"</del>"}(t)}),e=r.converter._dispatch("strikethrough.after",e,n,r)),e}),y.subParser("stripLinkDefinitions",function(e,s,l){var c=function c(e,t,a,n,r,i,o){return t=t.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?l.gUrls[t]=a.replace(/\s/g,""):l.gUrls[t]=y.subParser("encodeAmpsAndAngles")(a,s,l),i?i+o:(o&&(l.gTitles[t]=o.replace(/"|'/g,"&quot;")),s.parseImgDimensions&&n&&r&&(l.gDimensions[t]={width:n,height:r}),"")};return e=(e=(e=(e+="\xa80").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=\xa80)|(?=\n\[))/gm,c)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=\xa80))/gm,c)).replace(/\xa80/,"")}),y.subParser("tables",function(e,v,b){if(!v.tables)return e;function t(e){var t,a=e.split("\n");for(t=0;t<a.length;++t)/^ {0,3}\|/.test(a[t])&&(a[t]=a[t].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(a[t])&&(a[t]=a[t].replace(/\|[ \t]*$/,"")),a[t]=y.subParser("codeSpans")(a[t],v,b);var n,r,i,o,s,l=a[0].split("|").map(function(e){return e.trim()}),c=a[1].split("|").map(function(e){return e.trim()}),d=[],f=[],p=[],u=[];for(a.shift(),a.shift(),t=0;t<a.length;++t)""!==a[t].trim()&&d.push(a[t].split("|").map(function(e){return e.trim()}));if(l.length<c.length)return e;for(t=0;t<c.length;++t)p.push((n=c[t],/^:[ \t]*--*$/.test(n)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(n)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(n)?' style="text-align:center;"':""));for(t=0;t<l.length;++t)y.helper.isUndefined(p[t])&&(p[t]=""),f.push((r=l[t],i=p[t],o=void 0,o="",r=r.trim(),(v.tablesHeaderId||v.tableHeaderId)&&(o=' id="'+r.replace(/ /g,"_").toLowerCase()+'"'),"<th"+o+i+">"+(r=y.subParser("spanGamut")(r,v,b))+"</th>\n"));for(t=0;t<d.length;++t){for(var g=[],h=0;h<f.length;++h)y.helper.isUndefined(d[t][h]),g.push((s=d[t][h],"<td"+p[h]+">"+y.subParser("spanGamut")(s,v,b)+"</td>\n"));u.push(g)}return function m(e,t){for(var a="<table>\n<thead>\n<tr>\n",n=e.length,r=0;r<n;++r)a+=e[r];for(a+="</tr>\n</thead>\n<tbody>\n",r=0;r<t.length;++r){a+="<tr>\n";for(var i=0;i<n;++i)a+=t[r][i];a+="</tr>\n"}return a+="</tbody>\n</table>\n"}(f,u)}return e=(e=(e=(e=b.converter._dispatch("tables.before",e,v,b)).replace(/\\(\|)/g,y.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|\xa80)/gm,t)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|\xa80)/gm,t),e=b.converter._dispatch("tables.after",e,v,b)}),y.subParser("underline",function(e,t,a){return t.underline?(e=a.converter._dispatch("underline.before",e,t,a),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return"<u>"+t+"</u>"})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return"<u>"+t+"</u>"}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/(_)/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("underline.after",e,t,a)):e}),y.subParser("unescapeSpecialChars",function(e,t,a){return e=(e=a.converter._dispatch("unescapeSpecialChars.before",e,t,a)).replace(/\xa8E(\d+)E/g,function(e,t){var a=parseInt(t);return String.fromCharCode(a)}),e=a.converter._dispatch("unescapeSpecialChars.after",e,t,a)}),y.subParser("makeMarkdown.blockquote",function(e,t){var a="";if(e.hasChildNodes())for(var n=e.childNodes,r=n.length,i=0;i<r;++i){var o=y.subParser("makeMarkdown.node")(n[i],t);""!==o&&(a+=o)}return a="> "+(a=a.trim()).split("\n").join("\n> ")}),y.subParser("makeMarkdown.codeBlock",function(e,t){var a=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+a+"\n"+t.preList[n]+"\n```"}),y.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),y.subParser("makeMarkdown.emphasis",function(e,t){var a="";if(e.hasChildNodes()){a+="*";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="*"}return a}),y.subParser("makeMarkdown.header",function(e,t,a){var n=new Array(a+1).join("#"),r="";if(e.hasChildNodes()){r=n+" ";for(var i=e.childNodes,o=i.length,s=0;s<o;++s)r+=y.subParser("makeMarkdown.node")(i[s],t)}return r}),y.subParser("makeMarkdown.hr",function(){return"---"}),y.subParser("makeMarkdown.image",function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),y.subParser("makeMarkdown.links",function(e,t){var a="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,r=n.length;a="[";for(var i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="](",a+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(a+=' "'+e.getAttribute("title")+'"'),a+=")"}return a}),y.subParser("makeMarkdown.list",function(e,t,a){var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,i=r.length,o=e.getAttribute("start")||1,s=0;s<i;++s)if("undefined"!=typeof r[s].tagName&&"li"===r[s].tagName.toLowerCase()){n+=("ol"===a?o.toString()+". ":"- ")+y.subParser("makeMarkdown.listItem")(r[s],t),++o}return(n+="\n\x3c!-- --\x3e\n").trim()}),y.subParser("makeMarkdown.listItem",function(e,t){for(var a="",n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);return/\n$/.test(a)?a=a.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):a+="\n",a}),y.subParser("makeMarkdown.node",function(e,t,a){a=a||!1;var n="";if(3===e.nodeType)return y.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":a||(n=y.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":a||(n=y.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":a||(n=y.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":a||(n=y.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":a||(n=y.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":a||(n=y.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":a||(n=y.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":a||(n=y.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":a||(n=y.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":a||(n=y.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":a||(n=y.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":a||(n=y.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":a||(n=y.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":a||(n=y.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":n=y.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":n=y.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":n=y.subParser("makeMarkdown.strong")(e,t);break;case"del":n=y.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":n=y.subParser("makeMarkdown.links")(e,t);break;case"img":n=y.subParser("makeMarkdown.image")(e,t);break;default:n=e.outerHTML+"\n\n"}return n}),y.subParser("makeMarkdown.paragraph",function(e,t){var a="";if(e.hasChildNodes())for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);return a=a.trim()}),y.subParser("makeMarkdown.pre",function(e,t){var a=e.getAttribute("prenum");return"<pre>"+t.preList[a]+"</pre>"}),y.subParser("makeMarkdown.strikethrough",function(e,t){var a="";if(e.hasChildNodes()){a+="~~";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="~~"}return a}),y.subParser("makeMarkdown.strong",function(e,t){var a="";if(e.hasChildNodes()){a+="**";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t);a+="**"}return a}),y.subParser("makeMarkdown.table",function(e,t){var a,n,r="",i=[[],[]],o=e.querySelectorAll("thead>tr>th"),s=e.querySelectorAll("tbody>tr");for(a=0;a<o.length;++a){var l=y.subParser("makeMarkdown.tableCell")(o[a],t),c="---";if(o[a].hasAttribute("style"))switch(o[a].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":c=":---";break;case"text-align:right;":c="---:";break;case"text-align:center;":c=":---:"}i[0][a]=l.trim(),i[1][a]=c}for(a=0;a<s.length;++a){var d=i.push([])-1,f=s[a].getElementsByTagName("td");for(n=0;n<o.length;++n){var p=" ";"undefined"!=typeof f[n]&&(p=y.subParser("makeMarkdown.tableCell")(f[n],t)),i[d].push(p)}}var u=3;for(a=0;a<i.length;++a)for(n=0;n<i[a].length;++n){var g=i[a][n].length;u<g&&(u=g)}for(a=0;a<i.length;++a){for(n=0;n<i[a].length;++n)1===a?":"===i[a][n].slice(-1)?i[a][n]=y.helper.padEnd(i[a][n].slice(-1),u-1,"-")+":":i[a][n]=y.helper.padEnd(i[a][n],u,"-"):i[a][n]=y.helper.padEnd(i[a][n],u);r+="| "+i[a].join(" | ")+" |\n"}return r.trim()}),y.subParser("makeMarkdown.tableCell",function(e,t){var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,r=n.length,i=0;i<r;++i)a+=y.subParser("makeMarkdown.node")(n[i],t,!0);return a.trim()}),y.subParser("makeMarkdown.txt",function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/\xa8NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=y.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),St.PLUGINS.markdown=function(o){var s,l,a,n,r,c=o.$,i=!1,d="",f="",p="",u="",g=[],h=[],m="",v=null,b=null;function E(e){e=function u(e){var t=e,a=e.match(/(\[\^(.+?)\])[^:]/g),n=e.match(/(\[\^(.+?)\]:)/g);if(a&&n){a.forEach(function(e,t,a){a[t]=a[t].substring(0,a[t].length-1)}),a=a.filter(function(e,t){return a.indexOf(e)===t}),n=n.filter(function(e,t){return n.indexOf(e)===t});for(var r=1,i=0;i<a.length;i++){var o="";if(1==r&&(o='<hr class="footnote-sep"><ol>'),-1<n.indexOf(a[i]+":")){for(var s=-1<(t=(t=t.split(n[i]).join("{ftnt-plc}")).replace(n[i].substring(0,n[i].length-1),'<sup id="fnref:'.concat(r,'"><a href="#fn:').concat(r,'" class="footnote-a">').concat(r,"</a></sup>"))).indexOf(a[i])?1:0,l=0;s&&(l++,t=t.replace(n[i].substring(0,n[i].length-1),'<sup id="fnref:'.concat(r,":").concat(l,'"><a href="#fn:').concat(r,":").concat(l,'" class="footnote-a">').concat(r,":").concat(l,"</a></sup>")),s=-1<t.indexOf(a[i])?1:0););var c=(t=t.split("{ftnt-plc}").join(n[i])).indexOf(n[i]),d=t,f=d.substring(c,d.length-1);if(f=f.split("\n")[0],t=t.replace(f,""),-1<f.indexOf(": ")){f=f.split(": ")[1],f+='<a href="#fnref:'.concat(r,'" class="footnote-a">\u21a9</a>');for(var p=l;0!=l;)f+='<a href="#fnref:'.concat(r,":").concat(p-l+1,'" class="footnote-a">\u21a9</a>'),l--;f+="</p></li>",t=t+o+'<li id="fn:'.concat(r,'"><p>')+f,r++}}}1!=r&&(t+="</ol>")}return e=t}(e=function s(e){for(var t=/^[A-Za-z0-9]/g,a=/^:[ ]{1}(.+?)+/g,n=e.split("\n"),r=n,i=n.length-1,o=1;o<i;o++)null!==n[o].match(a)&&(null!==n[o-1].match(t)&&o<i-1&&null!==n[o+1].match(a)?(r[o-1]="<dl><dt>"+n[o-1]+"</dt>",r[o]="<dd>"+n[o].substring(2)+"</dd>"):null!==n[o-1].match(t)&&(o<i-1&&null===n[o+1].match(a)||o==i-1)?(r[o-1]="<dl><dt>"+n[o-1]+"</dt>",r[o]="<dd>"+n[o].substring(2)+"</dd></dl>"):o<i-1&&null!==n[o+1].match(a)?r[o]="<dd>"+n[o].substring(2)+"</dd>":r[o]="<dd>"+n[o].substring(2)+"</dd></dl>");return e=r.join("\n")}(e=function t(e){var n=e.indexOf("```"),r=0;-1<n&&(r=-1<(r=e.substring(n+1).indexOf("```"))?r+3:r);return e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,function(e,t,a){return n<a&&a<r?"---":"<hr />\n"})}(e=function a(e){return-1<(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.split("</p>").join("</p>\n")).split("</div>").join("\n")).replace(/(<([^>]+)>)/gi,"")).replace(/&gt;/gi,">")).replace(/&lt;/gi,"<")).split("&quot;").join('"')).split("&amp;").join("&")).split("&#39;").join("'")).split("&nbsp;").join(" ")).replace(/\|+\n[^\|]/g,function(e){return e.replace("\n","\n\n")})).indexOf("Powered by Froala Editor")&&(e=e.replace("Powered by Froala Editor","")),e}(e)))),e=n.makeHtml(e),e=o.clean.html(e),o.$wp.find(l)[0].innerHTML=e}return{_init:function t(){if(function e(){o.events.on("contentChanged",function(){i&&E(o.html.get(!1,!1))},!0),o.events.$on(c(o.o_win),"resize",function(){i&&(l[0].style.width=o.$wp[0].clientWidth-o.$el[0].clientWidth+2+"px")}),o.events.on("paste.afterCleanup",function(e){if(i){var t=o.doc.createElement("div");t.innerHTML=e;for(var a,n=t.querySelectorAll("img"),r=0;r<n.length;r++)(a=n[r]).outerHTML=a.outerHTML.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e=t.innerHTML}return e})}(),n=new y.Converter({strikethrough:!0,tables:!0,tablesHeaderId:!0,simpleLineBreaks:!0,ghCodeBlocks:!0,tasklists:!0,customizedHeaderId:!0,requireSpaceBeforeHeadingText:!0,underline:!0}),o.$tb&&(a=o.$tb.find('.fr-command[data-cmd="markdown"]')),!o.$wp)return!1},refresh:function _(e){var t=i;e.toggleClass("fr-active",t).attr("aria-pressed",t)},toggle:function w(){i?function e(){f=o.html.get(!0,!0),o.opts.pastePlain=!1,o.$el.removeClass("fr-markdown-editor"),o.$wp.append(r[0].firstChild),c(r).remove(),o.$wp.find(s).remove(),o.$wp.find(l).remove(),o.$wp[0].lastChild.after(o.$placeholder[0]),o.$el.removeAttr("style"),o.size.refresh(),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(a).removeClass("fr-disabled").attr("aria-disabled",!1),o.opts.iframe&&(o.$el=b,o.$wp=v,Object.keys(h).map(function(e){o.$el[0].setAttribute(e,h[e]),"class"!=e&&m[0].removeAttribute(e)}),o.$el[0].style.removeProperty("padding")),o.html.set(d),o.opts.iframe&&(o.$el=b,o.$wp=v,o.$placeholder=null,o.placeholder.show(),o.placeholder.refresh())}():function t(){var i;d=o.html.get(!0,!0),o.html.set(f),o.opts.pastePlain=!0,o.opts.iframe?(o.$el[0].removeAttribute("spellcheck"),Array.from(o.$el[0].attributes).map(function(e){var t=e.name,a=e.value;return"class"!=t&&(g[t]=a),h[t]=a,o.$el[0].removeAttribute(t)}),o.$el[0].style.padding=0,o.$el[0].innerHTML="",o.$placeholder.hide()):o.$el.addClass("fr-markdown-editor"),r=c('<div class="fr-wrapper-markdown" />'),o.opts.heightMin?r.css("min-height","".concat(o.opts.heightMin,"px")):r.css("min-height","200px"),o.opts.heightMax?(r.css("maxHeight","".concat(o.opts.heightMax,"px")),r.css("overflow","auto")):(r.css("maxHeight",""),r.css("overflow","")),o.opts.height&&(r.css("height","".concat(o.opts.height,"px")),r.css("overflow","auto"),r.css("minHeight",o.opts.height-o.helpers.getPX(o.$el.css("padding-top"))-o.helpers.getPX(o.$el.css("padding-bottom")))),o.opts.iframe?(u=c('<div class="fr-box fr-basic fr-top"></div>'),p=c('<div class="fr-markdown-wrapper"></div>'),m=c('<div class="fr-element fr-markdown-editor"><p><br></p></div>'),Object.keys(g).map(function(e){return m[0].setAttribute(e,g[e])}),f&&(m[0].innerHTML=f),r[0].appendChild(m[0]),p[0].appendChild(r[0]),u[0].appendChild(p[0]),1==c(o.$html.find("body")[0]).find(".fr-box").length?(o.$el.prevAll().filter(function(e){return!["CodeMirror cm-s-default CodeMirror-wrap","fr-code"].includes(e.className)}).remove(),o.$el[0].appendChild(r[0])):(o.$el[0].appendChild(u[0]),v=o.$wp,o.$wp=p),b=o.$el,o.$el=m):(o.$wp.append(r),r[0].appendChild(o.$el[0])),s=c('<div class="gutter-horizontal"><div class="e-resize-handler"><i class="fa fa-circle-thin" aria-hidden="true"></i></div></div>'),c(r).append(s[0]),l=c('<div class="fr-element fr-markdown-view"></div>'),c(r).append(l[0]),c(r).after(o.$placeholder[0]),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(a).filter(function(){return"fullscreen"!==c(this).data("cmd")&&"moreMisc"!==c(this).data("cmd")}).addClass("fr-disabled").attr("aria-disabled",!0),c(s).on("mousedown touchstart",function(e){i={e:e,offsetLeft:s[0].offsetLeft,offsetTop:s[0].offsetTop,firstWidth:o.$el[0].offsetWidth,secondWidth:l[0].offsetWidth};var a=function a(e){o.selection.clear();var t={x:e.clientX-i.e.clientX,y:e.clientY-i.e.clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<125||i.secondWidth-t.x<125||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},n=function n(e){o.selection.clear();var t={x:e.changedTouches[0].clientX-i.e.changedTouches[0].clientX,y:e.changedTouches[0].clientY-i.e.changedTouches[0].clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<100||i.secondWidth-t.x<100||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},t=function t(){document.onmousemove=document.onmouseup=null,document.ontouchmove=document.ontouchend=null},r=function r(){o.$doc[0].onmousemove=o.$doc[0].onmouseup=null,o.$doc[0].ontouchmove=o.$doc[0].ontouchend=null};o.opts.iframe&&o.markdown.isEnabled?(o.$doc[0].onmousemove=a,o.$doc[0].ontouchmove=n,o.$doc[0].onmouseup=r,o.$doc[0].ontouchend=r):(document.onmousemove=a,document.ontouchmove=n,document.onmouseup=t,document.ontouchend=t)}),E(f)}(),i=!i},isEnabled:function e(){return i}}},St.DefineIcon("markdown",{NAME:"markdown",SVG_KEY:"markdown"}),St.RegisterCommand("markdown",{title:"Markdown",undo:!1,focus:!1,toggle:!0,forcedRefresh:!0,accessibilityFocus:!0,callback:function(){this.markdown.toggle()},refresh:function(e){this.markdown.refresh(e)},plugin:"markdown"}),Object.assign(St.DEFAULTS,{wordCounterMax:-1,wordCounterCount:!0}),St.PLUGINS.wordCounter=function(p){var a,t=p.$;function u(){var e=p.el.innerText.toString();e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi," ")).replace(/\u00a0/g," ")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).replace(/[\u200A\u200C-\u200D\uFEFF\u202F\u2000-\u2009\u205F\u3000\u1680\u00A0\u0020]/g," ")).replace(/[\u200B]/g,"")).replace(/\t+/g," ")).split(" ").join("\n");var t=p.$el.find(".fr-pagebreak"),a=e.split(/\r?\n/),n=0;return a.forEach(function(e){0<(e=e.replace(/\s/g,"")).length&&n++}),n-2*t.length}function e(e){var t=!1;if(p.opts.wordCounterMax<0)return!0;if(u()<p.opts.wordCounterMax)return!0;var a=e.which,n=p.selection.get(),r=n.focusOffset,i=n.focusNode.textContent,o=(i=i.replace(/\u00a0/g," ")).toUpperCase().charCodeAt(r-1),s=i.toUpperCase().charCodeAt(r);return n.focusNode.data||(o=s=NaN),!function l(e,t){if(p.keys.isCharacter(e)&&p.keys.isCharacter(t)&&e!=St.KEYCODE.SPACE&&t!=St.KEYCODE.SPACE)return!0;return!1}(o,s)||a!==St.KEYCODE.ENTER&&a!==St.KEYCODE.SPACE||(t=!0),(function c(e,t){return e===St.KEYCODE.SPACE&&t===St.KEYCODE.SPACE}(o,s)||function d(e,t){if(isNaN(e)&&t===St.KEYCODE.SPACE||e===St.KEYCODE.SPACE&&isNaN(t))return!0;return!1}(o,s)||function f(e,t){if(isNaN(e)&&isNaN(t))return!0;return!1}(o,s))&&p.keys.isCharacter(a)&&a!=St.KEYCODE.SPACE&&(t=!0),u()>p.opts.wordCounterMax&&(p.keys.isCharacter(a)||a===St.KEYCODE.ENTER)&&(t=!0),!(!p.keys.ctrlKey(e)&&t||a===St.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),p.events.trigger("wordCounter.exceeded"),!1)}function n(){if(p.opts.wordCounterCount){var e=u()+(0<p.opts.wordCounterMax?"/"+p.opts.wordCounterMax:"");a.text("".concat(p.language.translate("Words")," : ").concat(e)),p.opts.toolbarBottom&&a.css("margin-bottom",p.$tb.outerHeight(!0));var t=p.$wp.get(0).offsetWidth-p.$wp.get(0).clientWidth;0<=t&&("rtl"==p.opts.direction?a.css("margin-left",t):a.css("margin-right",t))}}function r(e){return p.opts.wordCounterMax<0?e:t("<div>").html(e).text().split(" ").length+u()<=p.opts.wordCounterMax?e:(p.events.trigger("wordCounter.exceeded"),"")}return{_init:function i(){return!!p.$wp&&!!p.opts.wordCounterCount&&((a=t(document.createElement("span")).attr("class","fr-counter fr-wCounter")).css("bottom",p.$wp.css("border-bottom-width")),p.$second_tb?p.$second_tb.append(a):p.$wp.append(a),p.events.on("keydown",e,!0),p.events.on("paste.afterCleanup",r),p.events.on("keyup contentChanged input",function(){p.events.trigger("wordCounter.update")}),p.events.on("wordCounter.update",n),p.events.trigger("wordCounter.update"),void p.events.on("destroy",function(){t(p.o_win).off("resize.char".concat(p.id)),a.removeData().remove(),a=null}))},wordCount:u}},Object.assign(St.POPUP_TEMPLATES,{"filestackPlugin.error":"[_UPLOAD_LAYER_]"}),St.FILESTACK_PICKER_OPTIONS_MEDIA_MAX_SUPPORTED=[".pdf",".docx",".ppt",".pptx",".doc",".xlsx",".xls",".csv",".txt","image/jpeg","image/png","image/jpg","image/gif","image/webp","video/*","audio/*","mp3"],St.REQUIRED_PLUGINS=["image","video","file","filesManager"],St.FILESTACK_PICKER_OPTIONS_IMAGE_ONLY_SUPPORTED=["image/jpeg","image/png","image/jpg","image/gif","image/webp"],St.FILESTACK_DEFAULT_ACCEPT_FILE_TYPES=[".pdf",".docx",".ppt",".pptx",".doc",".xlsx",".xls",".csv",".txt"],St.FILESTACK_PICKER_OPTIONS_VIDEO_ONLY_SUPPORTED=["video/*"],St.FILESTACK_PICKER_OPTIONS_FROMSOURCES_MAX_SUPPORTED=["local_file_system","imagesearch","url","googledrive","facebook","instagram","dropbox"],St.FILESTACK_PICKER_DEFAULT_OPTIONS={displayMode:"overlay",uploadInBackground:!1,stage:{cname:"stage.filestackapi.com"}},Object.assign(St.DEFAULTS,{filestackOptions:{}}),St.FILE_STACK_URL_PART="filestack",St.PLUGINS.filestack=function(f){var r,p,t=["pdf","msword","vnd.openxmlformats-officedocument.wordprocessingml.document","vnd.ms-excel","vnd.openxmlformats-officedocument.spreadsheetml.sheet","vnd.ms-powerpoint","vnd.openxmlformats-officedocument.presentationml.presentation","csv","plain","ogg"],u=1,o=4,g=5,h=6,s=7,l={};function m(e,t,a){v(a?f.language.translate(l[e])+"\nResponse: "+JSON.stringify(a):f.language.translate(l[e]),t)}function v(e,t,a,n){var r;if((r=f.popups.get("filestackPlugin.error"))||(r=d(e)),a&&(r.find(".fr-image-progress-bar-layer").addClass("fr-active"),r.find(".fr-error-message").addClass("fr-layer"),r.find(".fr-buttons").hide()),!!f.$tb){var i;"openFilePicker"===t?i="openFilePicker":"openFilePickerReplaceImageOnly"===t||"openFilePickerImage"===t?i="insertImage":"openFilePickerReplaceVideoOnly"===t||"openFilePickerVideo"===t?i="insertVideo":"openFilePickerVideoOnly"===t?i="openFilePickerVideoOnly":"openFilePickerImageOnly"===t?i="openFilePickerImageOnly":"openFilePickerFile"===t&&(i="openFilePickerFile");var o=f.$tb.find(".fr-command[data-cmd='".concat(i,"']"));if(a)f.popups.show("filestackPlugin.error",n.x,n.y);else if(!r.hasClass("fr-active")&&(f.popups.refresh("filestackPlugin.error"),f.popups.setContainer("filestackPlugin.error",f.$tb),o.isVisible()||f.opts.toolbarInline)){var s=f.opts.toolbarInline&&["openFilePickerImage","openFilePickerVideo"].includes(t)?f.$(".fr-popup")[0].style:f.button.getPosition(o),l=s.left,c=s.top;f.popups.show("filestackPlugin.error",l,c,o.outerHeight())}}}function b(){var e="",t=function a(){var t=[];return St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();return e=t.join(", "),1<t.length?e+=" plugin are":e+=" plugin is",e}function d(e){var t=e.includes("Do you want to enable"),a=t?"<div style='text-align:right;' class='fr-buttons'>\n <button class='fr-trim-button fr-plugins-enable'>".concat(f.language.translate("Enable"),"</button> \n <button class='fr-trim-button fr-plugins-cancel'>").concat(f.language.translate("Cancel"),"</button>\n </div>"):"<div style='text-align:right;' class='fr-buttons'>\n <button class='fr-trim-button fr-plugins-ok'>".concat(f.language.translate("OK"),"</button> \n </div>"),n={upload_layer:"".concat('<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader fr-indeterminate"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>',"\n <div style= 'padding:10px'>\n <div class = 'fr-message fr-error-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>").concat(f.language.translate(e),"</h3></div>\n ").concat(a,"\n ")},r=f.popups.create("filestackPlugin.error",n);if(t){var i=r.find(".fr-plugins-enable")[0],o=r.find(".fr-plugins-cancel")[0];i.addEventListener("click",function(e){!function t(){St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&f.opts.pluginsEnabled.push(e)})}(),function a(e){for(var t in e)if(!f[t]){if(St.PLUGINS[t]&&f.opts.pluginsEnabled.indexOf(t)<0)continue;f[t]=new e[t](f),f[t]._init&&f[t]._init()}}(St.PLUGINS),R(),f.events.trigger("filestack.pluginsEnabled"),f.popups.hide("filestackPlugin.error"),y(),e.preventDefault()}),o.addEventListener("click",function(e){f.popups.hide("filestackPlugin.error"),y(),e.preventDefault()})}else{var s=r.find(".fr-plugins-ok")[0];s&&s.addEventListener("click",function(e){f.popups.hide("filestackPlugin.error"),e.preventDefault()})}return r}function E(){var t=!0;return St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}l[u]="Filestack api is missing",l[2]="The Filestack options are missing. Please check filestackOptions",l[3]="The Filestack picker is missing. Please check filestackOption",l[o]="Image upload to filestack failed while processing the request",l[g]="Filestack plugin is currently not supported on this browser",l[h]="The selected media types are not supported",l[s]="The selected source types are not supported by Filestack",l[8]="Error opening Filestack picker due to invalid picker parameters",l[9]="This image is not supported for image transformation",l[10]="The Filestack client is not created yet";var _=f.opts.filestackOptions.filestackAPI;if(_)try{p=f.opts.filestackOptions.staging?filestack.init(_,St.FILESTACK_PICKER_DEFAULT_OPTIONS.stage):filestack.init(_,St.FILESTACK_PICKER_DEFAULT_OPTIONS)}catch(L){0===!Object.keys(f.opts.filestackOptions).length&&m(10)}else;function w(){var e=navigator.userAgent,t=f||"",a=t.helpers,n=t.browser;if(a.isMac()&&n.mozilla)return!1;var r=-1!=e.indexOf("Windows NT 10.")||-1!=e.indexOf("Windows NT 7."),i=e.match(/(chrome|safari|firefox|trident(?=\/))\/?\s*(\d+)/i)[2]||[],o=null;return 0<=e.indexOf("Android")&&(o=parseFloat(e.slice(e.indexOf("Android")+8))),!!((a.isMac()||a.isIOS())&&12<a.getSafariVersion())||(!!(r&&n.chrome&&70<i||-1!=e.indexOf("Edg")&&40<i)||!!(a.isAndroid()&&6<o&&n.chrome&&70<i))}function c(e){return!1===f.events.trigger("filestack.uploadedToFilestack",[e],!0)?(f.edit.on(),!1):e}function y(e){var t=f.button.getButtons('button[data-cmd="openFilePicker"]'),a=f.button.getButtons('button[data-cmd="openFilePickerImageOnly"]'),n=f.button.getButtons('button[data-cmd="openFilePickerVideoOnly"]'),r=f.button.getButtons('button[data-cmd="openFilePickerFile"]');t.removeClass("fr-filestack-active"),a.removeClass("fr-filestack-active"),n.removeClass("fr-filestack-active"),r.removeClass("fr-filestack-active"),!1===f.events.trigger("filestack.filestackPickerClosed",[e],!0)&&f.edit.on()}function A(){O=I=null,f.selection.restore()}function C(e){m(o,e),!1===f.events.trigger("filestack.uploadFailedToFilestack",[e],!0)&&f.edit.on()}function T(e){return t.includes(e.split("/")[1])}function k(e){var t=!1;f.opts.imageInsertButtons=f.opts.imageInsertButtons.map(function(e){return"openFilePickerImage"===e?(t=!0,"openFilePickerReplaceImageOnly"):e}),t&&f.events.trigger("filestack-init"),f.popups.hide("image.edit");var a=f.doc.querySelector(".fr-popup");a&&a.remove(),f.opts.pluginsEnabled.includes("filestack")&&function n(e){f.opts.imageEditButtons.includes("filestackIcon")&&(r=f.opts.imageEditButtons.indexOf("filestackIcon"));!f.opts.imageEditButtons.includes("filestackIcon")&&e&&f.opts.pluginsEnabled.includes("filestack")?(r||0===r)&&f.opts.imageEditButtons.splice(r,0,"filestackIcon"):e||(f.opts.imageEditButtons=f.opts.imageEditButtons.filter(function(e){return"filestackIcon"!=e}));f.opts.filestackOptions.uploadToFilestackOnly&&e?f.opts.imageEditButtons=f.opts.imageEditButtons.filter(function(e){return"imageTUI"!=e}):f.opts.pluginsEnabled.includes("imageTUI")&&!f.opts.imageEditButtons.includes("imageTUI")&&f.opts.imageEditButtons.push("imageTUI")}(e),f.events.trigger("filestack-init-edit")}function S(){var t=!1;f.opts.videoInsertButtons=f.opts.videoInsertButtons.map(function(e){return"openFilePickerVideo"===e?(t=!0,"openFilePickerReplaceVideoOnly"):e}),t&&f.events.trigger("filestack-init-video")}function R(){St.DEFAULTS.imageInsertButtons&&!St.DEFAULTS.imageInsertButtons.includes("openFilePickerImage")&&St.DEFAULTS.imageInsertButtons.push("openFilePickerImage"),St.DEFAULTS.imageEditButtons&&!St.DEFAULTS.imageEditButtons.includes("filestackIcon")&&St.DEFAULTS.imageEditButtons.push("filestackIcon"),St.DEFAULTS.videoInsertButtons&&!St.DEFAULTS.videoInsertButtons.includes("openFilePickerVideo")&&St.DEFAULTS.videoInsertButtons.push("openFilePickerVideo"),St.DEFAULTS.filesInsertButtons&&!St.DEFAULTS.filesInsertButtons.includes("openFilePicker")&&St.DEFAULTS.filesInsertButtons.push("openFilePicker"),St.DEFAULTS.fileInsertButtons&&!St.DEFAULTS.fileInsertButtons.includes("openFilePickerFile")&&St.DEFAULTS.fileInsertButtons.push("openFilePickerFile"),f.popups.onHide("image.insert",function(){var e=f.button.getButtons('button[data-cmd="openFilePickerImage"]'),t=f.button.getButtons('button[data-cmd="openFilePickerReplaceImageOnly"]');e.removeClass("fr-filestack-active"),t.removeClass("fr-filestack-active")}),f.popups.onHide("video.insert",function(){var e=f.button.getButtons('button[data-cmd="openFilePickerVideo"]'),t=f.button.getButtons('button[data-cmd="openFilePickerReplaceVideoOnly"]');e.removeClass("fr-filestack-active"),t.removeClass("fr-filestack-active")}),f.popups.onHide("filesManager.insert",function(){f.button.getButtons('button[data-cmd="openFilePicker"]').removeClass("fr-filestack-active")});var e=f.opts.filestackOptions.pickerOptions?Object.assign({},f.opts.filestackOptions.pickerOptions,{accept:f.opts.filestackOptions.pickerOptions.accept?f.opts.filestackOptions.pickerOptions.accept:[],fromSources:f.opts.filestackOptions.pickerOptions.fromSources?f.opts.filestackOptions.pickerOptions.fromSources:[]}):{accept:[],fromSources:[]};e.fromSources=function o(t,e){if(!e||0===e.length)return t;var a=[];return e.forEach(function(e){-1<t.indexOf(e)&&a.push(e)}),0===a.length&&m(s),a}(St.FILESTACK_PICKER_OPTIONS_FROMSOURCES_MAX_SUPPORTED,e.fromSources),e.onOpen=function(e){f.events.on("window.mouseup",function(e){if(document.getElementById("__filestack-picker")&&f.helpers.isMobile())return e.preventDefault(),e.stopPropagation(),!1},!0),!1===f.events.trigger("filestack.filestackPickerOpened",[e],!0)&&f.edit.on();var t=f.selection.get();t&&(t.anchorNode,t.anchorOffset)},e.onUploadDone=function(e){return function o(e){if("undefined"!=typeof e.filesUploaded){var n,t=He(e.filesUploaded);try{var a,r=function r(){var t=n.value;if(T(t.mimetype)||t.mimetype.includes("image/jpeg")||t.mimetype.includes("image/png")||t.mimetype.includes("image/")||t.mimetype.includes("video/")||t.mimetype.includes("audio/mpeg")){t.mimetype.includes("image/")&&k(!0),t.mimetype.includes("video/")&&S();var a=function a(e){t.mimetype.includes("image")?e.next().is("br")&&e.next().remove():(e.next()&&e.next().is("br")&&e.next().remove(),e.prev()&&e.prev().is("br")&&e.prev().remove()),f.selection.setAfter(e[0])};if(!c(e)||I||O||(t.mimetype.includes("ogg")?f.file.insert(t.url,t.filename,null):t.mimetype.includes("image")?(f.image.insert(t.url,!1,null,null),f.events.on("image.loaded",a)):t.mimetype.includes("video")?(f.events.on("video.inserted",a),f.video.insertHtmlVideo(t.url,null,null,null,null)):t.mimetype.includes("audio/mpeg")?(f.events.on("video.inserted",a),f.video.insertHtmlVideo(t.url,null,null,null,null,"audio")):T(t.mimetype)&&f.file.insert(t.url,t.filename,null)),I)return f.image.insert(t.url,!1,null,I),I=null,{v:void 0};if(O)return f.video.insertHtmlVideo(t.url,!1,null,O),O=null,{v:void 0}}};for(t.s();!(n=t.n()).done;)if(a=r())return a.v}catch(i){t.e(i)}finally{t.f()}}}(e)},e.onFileUploadFailed=C,e.onClose=y,e.onCancel=A,f.opts.filestackOptions.pickerOptions=e;var r=function r(e){var t="IMG"===e.target.tagName,a="VIDEO"===e.target.tagName,n=e.target.src&&e.target.src.includes(St.FILE_STACK_URL_PART)&&!e.target.src.includes("blob:");t?k(n):a&&S()},t=f.helpers.isMobile()&&!f.helpers.isWindowsPhone();if(f.events.on(t?"touchend":"click",r,t),f.events.on("drop",function(){k(!1),S()},!0),f.opts.filestackOptions.uploadToFilestackOnly&&!f.opts.iframe&&!f.opts.fullPage){if(p&&w()&&E()){var a=filestackDnD.init(p,f.el);a&&a.on("uploadFileFinish",function(e){if(e.files[0].mimetype.includes("image/")&&k(!0),e.files[0].mimetype.includes("video/")&&S(),T(e.files[0].mimetype)||e.files[0].mimetype.includes("pdf")||e.files[0].mimetype.includes("image/jpeg")||e.files[0].mimetype.includes("image/png")||e.files[0].mimetype.includes("image/")||e.files[0].mimetype.includes("video/")||e.files[0].name&&e.files[0].name.includes(".ogg")){var t=function t(e){f.popups.hide("filestackPlugin.error"),f.selection.setAfter(e[0])};if(e.files[0].mimetype.includes("image"))c(e)&&(f.image.insert(e.data.url,!1),f.events.on("image.inserted",t));else e.files[0].mimetype.includes("video")?(f.video.insertHtmlVideo(e.data.url),f.events.on("video.inserted",t)):(e.files[0].mimetype.includes("pdf")||T(e.files[0].mimetype)||e.files[0].name&&e.files[0].name.includes(".ogg"))&&f.file.insert(e.data.url,e.data._file.name,null);f.popups.hide("filestackPlugin.error")}})}f.events.on("drop",function(e){return p?w()?E()?(f.markers.remove(),f.markers.insertAtPoint(e.originalEvent),f.$el.find(".fr-marker").replaceWith(St.MARKERS),0===f.$el.find(".fr-marker").length&&f.selection.setAtEnd(f.el),v("Image loading","",!0,{x:e.originalEvent.x,y:e.originalEvent.y})):v(b()+" not enabled. Do you want to enable?","openFilePicker"):(d(l[g]),f.popups.show("filestackPlugin.error",e.originalEvent.x,e.originalEvent.y)):(d(l[u]),f.popups.show("filestackPlugin.error",e.originalEvent.x,e.originalEvent.y)),e.preventDefault(),e.stopPropagation(),!1},!0)}var n=document.getElementById("insertImage-".concat(f.id));n&&n.addEventListener("mouseup",function(){var t=!1;f.opts.imageInsertButtons=f.opts.imageInsertButtons.map(function(e){return"openFilePickerReplaceImageOnly"===e?(t=!0,"openFilePickerImage"):e}),t&&f.events.trigger("filestack-init")});var i=document.getElementById("insertVideo-".concat(f.id));i&&i.addEventListener("mouseup",function(){var t=!1;f.opts.videoInsertButtons=f.opts.videoInsertButtons.map(function(e){return"openFilePickerReplaceVideoOnly"===e?(t=!0,"openFilePickerVideo"):e}),t&&f.events.trigger("filestack-init-video")}),f.events.on("image.loaded",function(e){(!e[0].src.includes(St.FILE_STACK_URL_PART)||e[0].src.includes(St.FILE_STACK_URL_PART)&&e[0].src.includes("blob:"))&&setTimeout(function(){var e=document.querySelector("#filestackIcon-".concat(f.id));e&&e.parentNode.removeChild(e)},10)})}return f.events.on("filestack.imageTransformation.click",function(){!function i(e){I=e;var a=f.image.get()[0].currentSrc||"",t=filestack.init(_),n=new FilestackTransform(t);n.setConfigKey("output.blob",!0),n.open(a).then(function(e){t.upload(e).then(function(e){var t=f.selection.save();void 0!==a&&(f.image.insert(e.url,!1,null,I),I=null,f.selection.restore(t))}),t.on("upload.error",function(){m(o)})}),f.events.on("keydown",function(){var e=document.getElementsByClassName("fs-transforms-container");f.helpers.isMobile()&&e&&e[0].childNodes&&e[0].childNodes.length&&(I=null)});var r=f.button.getButtons('button[data-cmd="filestackIcon"]');n.on("canvas:save",function(){r.removeClass("fr-filestack-active"),v("Image loading","",!0,{x:I.offset().left,y:I.offset().top+I.height()})}),n.on("canvas:cancel",function(){r.removeClass("fr-filestack-active")})}(f.image.get())}),f.events.on("filestack.imageTransformation.error",function(){m(9)}),{_init:R,showFilestackPopup:function x(e,t,a){if(!e)return!1;var n;if("openFilePicker"===e||"openFilePickerFile"===e?n=St.FILESTACK_PICKER_OPTIONS_MEDIA_MAX_SUPPORTED:"openFilePickerImageOnly"===e||"openFilePickerReplaceImageOnly"===e||"openFilePickerImage"===e?n=St.FILESTACK_PICKER_OPTIONS_IMAGE_ONLY_SUPPORTED:"openFilePickerVideoOnly"!==e&&"openFilePickerReplaceVideoOnly"!==e&&"openFilePickerVideo"!==e||(n=St.FILESTACK_PICKER_OPTIONS_VIDEO_ONLY_SUPPORTED),!_)return m(u,e),!1;if(!w())return m(g,e),!1;if(!E())return v(b()+" not enabled. Do you want to enable?",e),!1;if(!p&&0===!Object.keys(f.opts.filestackOptions).length)return m(10,e),!1;t&&(I=t),a&&(O=a);var r,i=f.opts.filestackOptions.pickerOptions?Object.assign({},f.opts.filestackOptions.pickerOptions,{accept:f.opts.filestackOptions.pickerOptions.accept?f.opts.filestackOptions.pickerOptions.accept:[],fromSources:f.opts.filestackOptions.pickerOptions.fromSources?f.opts.filestackOptions.pickerOptions.fromSources:[]}):{accept:[],fromSources:[]};r=f.opts.fileAllowedTypes&&1===f.opts.fileAllowedTypes.length&&"*"===f.opts.fileAllowedTypes[0]?St.FILESTACK_PICKER_OPTIONS_MEDIA_MAX_SUPPORTED:f.opts.fileAllowedTypes,0===i.accept.length&&(i.accept=St.FILESTACK_PICKER_OPTIONS_MEDIA_MAX_SUPPORTED);var o=St.FILESTACK_PICKER_OPTIONS_VIDEO_ONLY_SUPPORTED;f.opts.videoAllowedTypes&&(o=f.opts.videoAllowedTypes.map(function(e){return"mp3"===e?"audio/".concat(e):"video/".concat(e)})),"openFilePickerImageOnly"===e||"openFilePickerReplaceImageOnly"===e||"openFilePickerImage"===e?n=f.opts.imageAllowedTypes.map(function(e){return"image/".concat(e)}):"openFilePickerVideoOnly"===e||"openFilePickerReplaceVideoOnly"===e||"openFilePickerVideo"===e?n=o:"openFilePickerFile"===e&&(n=r);var s=i.maxFiles;(t||a)&&(s=1);var l="openFilePicker"===e?function d(t,e){if(!e||0===e.length)return t;var a=[];return e.forEach(function(e){-1<t.indexOf(e)&&a.push(e)}),0===a.length&&m(h),a}(n,i.accept):n,c=Object.assign({},i,{accept:l,maxFiles:s});try{p.picker(c).open(),f.popups.hideAll(),f.selection.save()}catch(L){0===Object.keys(f.opts.filestackOptions).length&&m(8,e)}},isBrowserSupported:w}},St.DefineIcon("filestackIcon",{ALT:"Open Filestack file picker",NAME:"filestack",SVG_KEY:"filestackIcon"}),St.DefineIcon("filestackIconAdd",{ALT:"Open Filestack file picker",NAME:"filestackAdd",SVG_KEY:"filestackIconAdd"}),St.DefineIcon("imageTransformations",{ALT:"Open Filestack image transformations",NAME:"imageTransformations",SVG_KEY:"imageTransformations"}),St.DefineIcon("imageFilestackOnly",{template:"svgMultiplePath",PATHS:'<path d="M11.1 15.8h7.7V5.7H5.1v4.2H3.4V5.7c0-.9.8-1.7 1.7-1.7h13.7c.9 0 1.7.8 1.7 1.7v10.1c0 .9-.8 1.7-1.7 1.7h-7.7v-1.7Zm0-2.5 2.6-3.4h.2l3.3 4.2h-6.1v-.8ZM8.9 6.9c.7 0 1.3.6 1.3 1.3s-.6 1.3-1.3 1.3-1.3-.6-1.3-1.3.6-1.3 1.3-1.3Z"/><path d="M11.1 17.5 8.7 20v-2.5h2.4Zm-4.9-1.6v.9h-.9v-.9h.9Zm4.9.9h-.9v-6H3.5V19h4.6v.9H2.5V9.8h8.6v7Zm-3.4-1.6H5.3v-.9h2.4v.9Zm.6-2.5v.9h-3v-.9h3Z"/>'}),St.DefineIcon("videoFilestackOnly",{template:"svgMultiplePath",PATHS:'<path d="m11 11.3 1 2.6h3.6V6.8h-9v3.6H4.8V6c0-.2.1-.5.3-.6s.4-.3.6-.3h10.8c.2 0 .5.1.6.3s.3.4.3.6v3.1l2.1-2c.3-.3.6-.3 1-.2.3 0 .6.5.6.8v5.5c0 .4-.2.7-.6.8-.3.1-.7 0-1-.2l-2.1-2v3.1c0 .2 0 .5-.3.6-.2.2-.4.3-.6.3H12V14l-1-2.7Z" /><path d="M11.1 17.5 8.7 20v-2.5h2.4Zm-4.9-1.6v.9h-.9v-.9h.9Zm4.9.9h-.9v-6H3.5V19h4.6v.9H2.5V9.8h8.6v7Zm-3.4-1.6H5.3v-.9h2.4v.9Zm.6-2.5v.9h-3v-.9h3Z"/>'}),St.RegisterCommand("openFilePicker",{type:"button",icon:"filestackIcon",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePicker"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePicker")},plugin:"filestack"}),St.RegisterCommand("openFilePickerImageOnly",{type:"button",icon:"imageFilestackOnly",title:"Open Filestack Image Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerImageOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerImageOnly",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerImage",{type:"button",icon:"filestackIcon",title:"Open Filestack Image Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerImage"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerImage",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerReplaceImageOnly",{type:"button",icon:"filestackIconAdd",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerReplaceImageOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerReplaceImageOnly",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerVideoOnly",{type:"button",icon:"videoFilestackOnly",title:"Open Filestack Video Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerVideoOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerVideoOnly",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerVideo",{type:"button",icon:"filestackIcon",title:"Open Filestack Video Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerVideo"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerVideo",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerReplaceVideoOnly",{type:"button",icon:"filestackIconAdd",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerReplaceVideoOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerReplaceVideoOnly",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("filestackIcon",{type:"button",icon:"imageTransformations",title:"Image Transformations",plugin:"filestack",callback:function(){var e=!1,t=this.image.get(0)[0];(t&&t.currentSrc&&(e=t.currentSrc.includes(St.FILE_STACK_URL_PART)&&!t.currentSrc.includes("blob:")),e)?(this.button.getButtons('button[data-cmd="filestackIcon"]').addClass("fr-filestack-active"),this.events.trigger("filestack.imageTransformation.click")):this.events.trigger("filestack.imageTransformation.error")}}),St.RegisterCommand("openFilePickerFile",{type:"button",icon:"filestackIcon",title:"Open Filestack Upload File",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerFile"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerFile")},plugin:"filestack"})});