text: /*!
   * froala_editor v3.2.0 (https://www.froala.com/wysiwyg-editor)
   * License https://froala.com/wysiwyg-editor/terms/
   * Copyright 2014-2020 Froala Labs
   */
  
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(It){"use strict";function xt(e){return(xt="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)}if((It=It&&It.hasOwnProperty("default")?It["default"]:It).PLUGINS.align=function(i){var r=i.$;return{apply:function o(e){var t=i.selection.element();if(r(t).parents(".fr-img-caption").length)r(t).css("text-align",e);else{i.selection.save(),i.html.wrap(!0,!0,!0,!0),i.selection.restore();for(var a=i.selection.blocks(),n=0;n<a.length;n++)r(a[n]).css("text-align",e).removeClass("fr-temp-div"),""===r(a[n]).attr("class")&&r(a[n]).removeAttr("class"),""===r(a[n]).attr("style")&&r(a[n]).removeAttr("style");i.selection.save(),i.html.unwrap(),i.selection.restore()}},refresh:function n(e){var t=i.selection.blocks();if(t.length){var a=i.helpers.getAlignment(r(t[0]));e.find("> *").first().replaceWith(i.icon.create("align-".concat(a)))}},refreshOnShow:function s(e,t){var a=i.selection.blocks();if(a.length){var n=i.helpers.getAlignment(r(a[0]));t.find('a.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function l(e){var t=i.selection.blocks();if(t.length){var a=i.helpers.getAlignment(r(t[0]));a=a.charAt(0).toUpperCase()+a.slice(1),"align".concat(a)===e.attr("data-cmd")&&e.addClass("fr-active")}}}},It.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),It.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),It.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),It.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=It.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"}),It.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"}),It.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"}),It.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"}),It.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(It.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),It.PLUGINS.charCounter=function(a){var n,t=a.$,i=function i(){return(a.el.textContent||"").replace(/\u200B/g,"").length};function e(e){if(a.opts.charCounterMax<0)return!0;if(i()<a.opts.charCounterMax)return!0;var t=e.which;return!(!a.keys.ctrlKey(e)&&a.keys.isCharacter(t)||t===It.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),a.events.trigger("charCounter.exceeded"),!1)}function r(e){return a.opts.charCounterMax<0?e:t("<div>").html(e).text().length+i()<=a.opts.charCounterMax?e:(a.events.trigger("charCounter.exceeded"),"")}function o(){if(a.opts.charCounterCount){var e=i()+(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.events.on("keydown",e,!0),a.events.on("paste.afterCleanup",r),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:i}},It.PLUGINS.codeBeautifier=function(){var e,t,a,n,j={};function I(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 i=e.indent_size||4,r=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 i&&(i=parseInt(i,10)),e.indent_with_tabs&&(r="\t",i=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 A(e){return n.substring(p-e.length,p).toLowerCase()===e}function y(){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 T=n.match(/^[\t ]*/)[0],C=new Array(i+1).join(r),R=0,w=0;for(var S,_,L,I={"{":function(e){I.singleSpace(),x.push(e),I.newLine()},"}":function(e){I.newLine(),x.push(e),I.newLine()},_lastCharWhitespace:function(){return f.test(x[x.length-1])},newLine:function(e){x.length&&(e||"\n"===x[x.length-1]||I.trim(),x.push("\n"),T&&x.push(T))},singleSpace:function(){x.length&&!I._lastCharWhitespace()&&x.push(" ")},preserveSingleSpace:function(){S&&I.singleSpace()},trim:function(){for(;I._lastCharWhitespace();)x.pop()}},x=[],k=!1,O=!1,F=!1,D="",M="";;){var B=b();S=""!==B;var N=-1!==B.indexOf("\n");if(M=D,!(D=d))break;if("/"===d&&"*"===h()){var P=0===R;(N||P)&&I.newLine(),x.push(E()),I.newLine(),P&&I.newLine(!0)}else if("/"===d&&"/"===h())N||"{"===M||I.trim(),I.singleSpace(),x.push(E()),I.newLine();else if("@"===d){I.preserveSingleSpace(),x.push(d);var U=(void 0,_=p,L=m(": , {}()[]/='\""),p=_-1,g(),L);U.match(/[ :]$/)&&(g(),U=m(": ").replace(/\s$/,""),x.push(U),I.singleSpace()),(U=U.replace(/\s$/,""))in t&&(w+=1,U in a&&(F=!0))}else"#"===d&&"{"===h()?(I.preserveSingleSpace(),x.push(m("}"))):"{"===d?"}"===h(!0)?(v(),g(),I.singleSpace(),x.push("{}"),I.newLine(),l&&0===R&&I.newLine(!0)):(R++,T+=C,I["{"](d),k=F?(F=!1,w<R):w<=R):"}"===d?(R--,T=T.slice(0,-i),I["}"](d),O=k=!1,w&&w--,l&&0===R&&I.newLine(!0)):":"===d?(v(),!k&&!F||A("&")||y()?":"===h()?(g(),x.push("::")):x.push(":"):(O=!0,x.push(":"),I.singleSpace())):'"'===d||"'"===d?(I.preserveSingleSpace(),x.push(m(d))):" "===d?(O=!1,x.push(d),I.newLine()):"("===d?A("url")?(x.push(d),v(),g()&&(")"!==d&&'"'!==d&&"'"!==d?x.push(m(")")):p--)):(u++,I.preserveSingleSpace(),x.push(d),v()):")"===d?(x.push(d),u--):","===d?(x.push(d),v(),o&&!O&&u<1?I.newLine():I.singleSpace()):("]"===d||("["===d?I.preserveSingleSpace():"="===d?(v(),d="="):I.preserveSingleSpace()),x.push(d))}var H="";return T&&(H+=T),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 i(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 i(n,e){var c,i,r,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 D(){x();var e=Q.Expression;if("["===d.text){if("TK_WORD"===o||")"===f.last_text)return"TK_RESERVED"===o&&q(f.last_text,r.line_starters)&&(c.space_before_token=!0),w(e),C(),R(),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||y())}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?y():"TK_END_EXPR"===o||"TK_START_EXPR"===o||"TK_END_BLOCK"===o||"."===f.last_text?A(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,r.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||I()||A());w(e),C(),g.space_in_paren&&(c.space_before_token=!0);R()},TK_END_EXPR:function M(){for(;f.mode===Q.Statement;)L();f.multiline_frame&&A("]"===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?(C(),L()):(L(),C());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 B(){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"])?w(Q.BlockStatement):w(Q.ObjectLiteral):w(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&&k(f.last_text)&&"else"!==f.last_text)?c.space_before_token=!0:y(!1,!0):"TK_OPERATOR"!==o&&"TK_START_EXPR"!==o?"TK_START_BLOCK"===o?y():c.space_before_token=!0:S(p.mode)&&","===f.last_text&&("}"===s?c.space_before_token=!0:y());C(),R()},TK_END_BLOCK:function N(){for(;f.mode===Q.Statement;)L();var e="TK_START_BLOCK"===o;"expand"===g.brace_style?e||y():e||(S(f.mode)&&g.keep_array_indentation?(g.keep_array_indentation=!1,y(),g.keep_array_indentation=!0):y());L(),C()},TK_WORD:F,TK_RESERVED:F,TK_SEMICOLON:function P(){x()&&(c.space_before_token=!1);for(;f.mode===Q.Statement&&!f.if_block&&!f.do_block;)L();C()},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?I()||A():y();C()},TK_EQUALS:function H(){x();f.declaration_statement&&(f.declaration_assignment=!0);c.space_before_token=!0,C(),c.space_before_token=!0},TK_OPERATOR:function W(){x();if("TK_RESERVED"===o&&k(f.last_text))return c.space_before_token=!0,void C();if("*"===d.text&&"TK_DOT"===o)return void C();if(":"===d.text&&f.in_case)return f.case_body=!0,R(),C(),y(),void(f.in_case=!1);if("::"===d.text)return void C();"TK_OPERATOR"===o&&A();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,r.line_starters)||","===f.last_text)?(t=e=!1,!d.wanted_newline||"--"!==d.text&&"++"!==d.text||y(!1,!0)," "===f.last_text&&_(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||y()):":"===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,C(),c.space_before_token=t},TK_COMMA:function K(){if(f.declaration_statement)return _(f.parent.mode)&&(f.declaration_assignment=!1),C(),void(f.declaration_assignment?y(f.declaration_assignment=!1,!0):(c.space_before_token=!0,g.comma_first&&A()));C(),f.mode===Q.ObjectLiteral||f.mode===Q.Statement&&f.parent.mode===Q.ObjectLiteral?(f.mode===Q.Statement&&L(),y()):(c.space_before_token=!0,g.comma_first&&A())},TK_BLOCK_COMMENT:function $(){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 y(!1,!0),C(),"start"===d.directives.preserve&&(c.raw=!0),void y(!1,!0);if(!j.newline.test(d.text)&&!d.wanted_newline)return c.space_before_token=!0,C(),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,i=d.whitespace_before,r=i.length;y(!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,i=e.length;n<i;n++)if((a=e[n])&&0!==a.indexOf(t))return!1;return!0}(t.slice(1),i)&&(n=!0):a=!0);for(C(t[0]),e=1;e<t.length;e++)y(!1,!0),a?C(" ".concat(t[e].replace(/^\s+/g,""))):n&&t[e].length>r?C(t[e].substring(r)):c.add_token(t[e]);y(!1,!0)},TK_COMMENT:function z(){d.wanted_newline?y(!1,!0):c.trim(!0);c.space_before_token=!0,C(),y(!1,!0)},TK_DOT:function G(){x();"TK_RESERVED"===o&&k(f.last_text)?c.space_before_token=!0:A(")"===f.last_text&&g.break_chained_methods);C()},TK_UNKNOWN:function Y(){C(),"\n"===d.text[d.text.length-1]&&y()},TK_EOF:function V(){for(;f.mode===Q.Statement;)L()}},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&&S(f.mode))for(var a=0;a<t;a+=1)y(0<a);else if(g.max_preserve_newlines&&t>g.max_preserve_newlines&&(t=g.max_preserve_newlines),g.preserve_newlines&&1<e.newlines){y();for(var n=1;n<t;n+=1)y(!0)}u[(d=e).type]()}function A(e){if(e=e!==undefined&&e,!c.just_added_newline())if(g.preserve_newlines&&d.wanted_newline||e)y(!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&&y(!1,!0)}}function y(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;)L();c.add_new_line(e)&&(f.multiline_frame=!0)}function T(){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 C(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(),T(),c.add_token(","),c.space_before_token=!0),e=e||d.text,T(),c.add_token(e))}function R(){f.indentation_level+=1}function w(e){p=f?(t.push(f),f):v(null,e),f=v(p,e)}function S(e){return e===Q.ArrayLiteral}function _(e){return q(e,[Q.Expression,Q.ForInitializer,Q.Conditional])}function L(){0<t.length&&(p=f,f=t.pop(),p.mode===Q.Statement&&c.remove_redundant_indentation(p))}function I(){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"])))&&(w(Q.Statement),R(),"TK_RESERVED"===o&&q(f.last_text,["const","let","const"])&&"TK_WORD"===d.type&&(f.declaration_statement=!0),I()||A("TK_RESERVED"===d.type&&q(d.text,["do","for","if","while"])),!0)}function k(e){return q(e,["case","return","do","if","throw","else"])}function O(e){var t=i+(e||0);return t<0||t>=h.length?null:h[t]}function F(){("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||_(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"])||y(),f.do_block&&!f.do_while){if("TK_RESERVED"===d.type&&"while"===d.text)return c.space_before_token=!0,C(),c.space_before_token=!0,void(f.do_while=!0);y(),f.do_block=!1}if(f.if_block)if(f.else_block||"TK_RESERVED"!==d.type||"else"!==d.text){for(;f.mode===Q.Statement;)L();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 y(),(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),C(),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||(y(),y(!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:y():"TK_OPERATOR"===o||"="===f.last_text?c.space_before_token=!0:(f.multiline_frame||!_(f.mode)&&!S(f.mode))&&y()),"TK_COMMA"!==o&&"TK_START_EXPR"!==o&&"TK_EQUALS"!==o&&"TK_OPERATOR"!==o||I()||A(),"TK_RESERVED"===d.type&&q(d.text,["function","get","set"]))return C(),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&&_(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,r.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?y():(c.trim(!0),"}"!==c.current_line.last()&&y(),c.space_before_token=!0):"NEWLINE"===a?"TK_RESERVED"===o&&k(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:y()):"TK_RESERVED"===d.type&&q(d.text,r.line_starters)&&")"!==f.last_text&&y():f.multiline_frame&&S(f.mode)&&","===f.last_text&&"}"===s?y():"SPACE"===a&&(c.space_before_token=!0);C(),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 J(l,m)).raw=g.test_output_raw,t=[],w(Q.BlockStatement),this.beautify=function(){var e,t;for(r=new ee(n,g,l),h=r.tokenize(),i=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,i+=1}return t=c.get_code(),g.end_with_newline&&(t+="\n"),"\n"!=g.eol&&(t=t.replace(/[\n]/g,g.eol)),t}}function r(t){var a=0,n=-1,i=[],r=!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 r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(e){i.push(e),a+=e.length,r=!1},this.pop=function(){var e=null;return r||(e=i.pop(),a-=e.length,r=0===i.length),e},this.remove_indent=function(){0<n&&(n-=1,a-=t.indent_length)},this.trim=function(){for(;" "===this.last();)i.pop(),a-=1;r=0===i.length},this.toString=function(){var e="";return this._empty||(0<=n&&(e=t.indent_cache[n]),e+=i.join("")),e}}function J(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 r(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 Z=function Z(e,t,a,n,i,r){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(L,I,e){var x="\n\r\t ".split(""),k=/[0-9]/,O=/[01234567]/,F=/[0123456789abcdefABCDEF]/,D="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var M,B,N,P,U,H,W=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),K=/([\s\S]*?)((?:\*\/)|$)/g,$=/([^\n\r\u2028\u2029]*)/g,z=/\/\* 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(M=0,B="",H<=U)return["","TK_EOF"];t=P.length?P[P.length-1]:new Z("TK_START_BLOCK","{");var n=L.charAt(U);for(U+=1;q(n,x);){if(j.newline.test(n)?"\n"===n&&"\r"===L.charAt(U-2)||(M+=1,a=[]):a.push(n),H<=U)return["","TK_EOF"];n=L.charAt(U),U+=1}if(a.length&&(B=a.join("")),k.test(n)){var i=!0,r=!0,o=k;for("0"===n&&U<H&&/[Xxo]/.test(L.charAt(U))?(r=i=!1,n+=L.charAt(U),U+=1,o=/[o]/.test(L.charAt(U))?O:F):(n="",U-=1);U<H&&o.test(L.charAt(U));)n+=L.charAt(U),U+=1,i&&U<H&&"."===L.charAt(U)&&(n+=L.charAt(U),U+=1,i=!1),r&&U<H&&/[Ee]/.test(L.charAt(U))&&(n+=L.charAt(U),(U+=1)<H&&/[+-]/.test(L.charAt(U))&&(n+=L.charAt(U),U+=1),i=r=!1);return[n,"TK_WORD"]}if(j.isIdentifierStart(L.charCodeAt(U-1))){if(U<H)for(;j.isIdentifierChar(L.charCodeAt(U))&&(n+=L.charAt(U),(U+=1)!==H););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&q(t.text,["set","get"])||!q(n,W)?[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("*"===L.charAt(U)){U+=1,K.lastIndex=U;var l=K.exec(L);s="/*".concat(l[0]),U+=l[0].length;var c=function S(e){if(!e.match(z))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(L))[0],U+=l[0].length),[s=s.replace(j.lineBreak,"\n"),"TK_BLOCK_COMMENT",c]}if("/"===L.charAt(U)){U+=1,$.lastIndex=U;var d=$.exec(L);return s="//".concat(d[0]),U+=d[0].length,[s,"TK_COMMENT"]}}if("`"===n||"'"===n||'"'===n||("/"===n||I.e4x&&"<"===n&&L.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||L.charAt(U)!==f)&&!j.newline.test(L.charAt(U));)e+=L.charAt(U),p?p=!1:(p="\\"===L.charAt(U),"["===L.charAt(U)?g=!0:"]"===L.charAt(U)&&(g=!1)),U+=1;else if(I.e4x&&"<"===f){var h=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,m=L.slice(U-1),v=h.exec(m);if(v&&0===v.index){for(var b=v[2],E=0;v;){var A=!!v[1],y=v[2],T=!!v[v.length-1]||"![CDATA["===y.slice(0,8);if(y!==b||T||(A?--E:++E),E<=0)break;v=h.exec(m)}var C=v?v.index+v[0].length:m.length;return m=m.slice(0,C),U+=C-1,[m=m.replace(j.lineBreak,"\n"),"TK_STRING"]}}else for(;U<H&&(p||L.charAt(U)!==f&&("`"===f||!j.newline.test(L.charAt(U))));)(p||"`"===f)&&j.newline.test(L.charAt(U))?("\r"===L.charAt(U)&&"\n"===L.charAt(U+1)&&(U+=1),e+="\n"):e+=L.charAt(U),p=p?("x"!==L.charAt(U)&&"u"!==L.charAt(U)||(u=!0),!1):"\\"===L.charAt(U),U+=1;if(u&&I.unescape_strings&&(e=function _(e){var t,a=!1,n="",i=0,r="",o=0;for(;a||i<e.length;)if(t=e.charAt(i),i++,a){if(a=!1,"x"===t)r=e.substr(i,2),i+=2;else{if("u"!==t){n+="\\".concat(t);continue}r=e.substr(i,4),i+=4}if(!r.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(o=parseInt(r,16))&&o<32){n+="x"===t?"\\x".concat(r):"\\u".concat(r);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&&L.charAt(U)===f&&(e+=f,U+=1,"/"===f))for(;U<H&&j.isIdentifierStart(L.charCodeAt(U));)e+=L.charAt(U),U+=1;return[e,"TK_STRING"]}if("#"===n){if(0===P.length&&"!"===L.charAt(U)){for(e=n;U<H&&"\n"!==n;)e+=n=L.charAt(U),U+=1;return["".concat(X(e),"\n"),"TK_UNKNOWN"]}var R="#";if(U<H&&k.test(L.charAt(U))){for(;R+=n=L.charAt(U),(U+=1)<H&&"#"!==n&&"="!==n;);return"#"===n||("["===L.charAt(U)&&"]"===L.charAt(U+1)?(R+="[]",U+=2):"{"===L.charAt(U)&&"}"===L.charAt(U+1)&&(R+="{}",U+=2)),[R,"TK_WORD"]}}if("<"===n&&("?"===L.charAt(U)||"%"===L.charAt(U))){V.lastIndex=U-1;var w=V.exec(L);if(w)return n=w[0],U+=n.length-1,[n=n.replace(j.lineBreak,"\n"),"TK_STRING"]}if("<"===n&&"\x3c!--"===L.substring(U-1,U+3)){for(U+=3,n="\x3c!--";!j.newline.test(L.charAt(U))&&U<H;)n+=L.charAt(U),U++;return N=!0,[n,"TK_COMMENT"]}if("-"===n&&N&&"--\x3e"===L.substring(U-1,U+2))return N=!1,U+=2,["--\x3e","TK_COMMENT"];if("."===n)return[n,"TK_DOT"];if(q(n,D)){for(;U<H&&q(n+L.charAt(U),D)&&(n+=L.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=L.length,U=0,N=!1,P=[];for(var n=null,i=[],r=[];!t||"TK_EOF"!==t.type;){for(a=o(),e=new Z(a[1],a[0],M,B);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=a[2]),r.push(e),a=o(),e=new Z(a[1],a[0],M,B);r.length&&(e.comments_before=r,r=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,i.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=i.pop()),P.push(e),t=e}return P}}return{run:function k(e,t){function o(e){return e.replace(/\s+$/g,"")}var a,n,i,m,r,s,v,l,c,b,E,A,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,i=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,r=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,A=t.wrap_attributes_indent_size===undefined?i:parseInt(t.wrap_attributes_indent_size,10)||i,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",i=1),(a=new function L(){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),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),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="",i=[],r="",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),i.length?i.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),i.length&&"="!=i[i.length-1]&&">"!=n&&o){if(this.space_or_wrap(i),o=!1,!s&&"force"===E&&"/"!=n){this.print_newline(!0,i),this.print_indentation(i);for(var d=0;d<A;d++)i.push(m)}for(var f=0;f<i.length;f++)if(" "===i[f]){s=!1;break}}if(b&&"<"===a&&n+this.input.charAt(this.pos)==="{{"&&(n+=this.get_unformatted("}}"),i.length&&" "!=i[i.length-1]&&"<"!=i[i.length-1]&&(n=" ".concat(n)),o=!0),"<"!==n||a||(t=this.pos-1,a="<"),b&&!a&&2<=i.length&&"{"===i[i.length-1]&&"{"===i[i.length-2]&&(t="#"===n||"/"===n||"!"===n?this.pos-3:this.pos-2,a="{"),this.line_char_count++,i.push(n),i[1]&&("!"===i[1]||"?"===i[1]||"%"===i[1])){i=[this.get_comment(t)];break}if(b&&i[1]&&"{"===i[1]&&i[2]&&"!"===i[2]){i=[this.get_comment(t)];break}if(b&&"{"===a&&2<i.length&&"}"===i[i.length-2]&&"}"===i[i.length-1])break}}while(">"!=n);var p,u,g=i.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)?(r=this.get_unformatted("</".concat(h,">"),g),i.push(r),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(i),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),i.join("")},this.get_comment=function(e){var t="",a=">",n=!1;this.pos=e;var i=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=i)[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)),i=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="",i=0,r=!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(!r){this.line_char_count--;continue}if("\n"===a||"\r"===a){n+="\n",this.line_char_count=0;continue}}n+=a,this.line_char_count++,r=!0,b&&"{"===a&&n.length&&"{"===n[n.length-2]&&(i=(n+=this.get_unformatted("}}")).length)}while(-1===n.toLowerCase().indexOf(e,i));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,i){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=a,this.brace_style=i,this.indent_level=0,this.wrap_line_length=n;for(var r=this.line_char_count=0;r<this.indent_size;r++)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,i,r,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 y=a.token_text,T=void 0,C=1;"TK_SCRIPT"===a.token_type?T=x:"TK_STYLE"===a.token_type&&(T=I),"keep"===t.indent_scripts?C=0:"separate"===t.indent_scripts&&(C=-a.indent_level);var R=a.get_full_indent(C);if(T)y=T(y.replace(/^\s*/,R),t);else{var w=y.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,S=a.get_full_indent(C-w);y=y.replace(/^\s*/,R).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}y&&(a.print_token_raw(y),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 _=a.output.join("").replace(/[\r\n\t ]+$/,"");return d&&(_+="\n"),_}}},Object.assign(It.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"]}),It.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"]),A(!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",y,!0),c.events.on("html.set",function(){u()&&A(!0)}),c.events.on("codeView.update",h),c.events.on("codeView.toggle",function(){c.$box.hasClass("fr-code-view")&&A()}),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,i=!1;if(c.core.hasFocus()&&(i=!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 r=(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=!i,f.focus(),v=!0,f.setSelection({line:r,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=!i,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 A(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 y(){u()&&A(!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:A,isActive:u,get:g}},It.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),It.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"}),Object.assign(It.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(It.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","|","-"]}),It.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 i=a.find(".fr-".concat(e,"-color .fr-select-color"));for(i.find(".fr-selected-color").remove(),i.removeClass("fr-active-item"),i.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 r=a.find(".fr-".concat(e,'-color .fr-select-color[data-param1="').concat(m.helpers.RGBToHex(n.css(t)),'"]'));r.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),r.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 i(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 i=m.popups.create("".concat(e,".picker"),a);return function r(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(It.KEYCODE.TAB===a){var i=g.find(".fr-buttons");n=!m.accessibility.focusToolbar(i,!!e.shiftKey)}else if(It.KEYCODE.ARROW_UP===a||It.KEYCODE.ARROW_DOWN===a||It.KEYCODE.ARROW_LEFT===a||It.KEYCODE.ARROW_RIGHT===a){if(t.is("span.fr-select-color")){var r=t.parent().find("span.fr-select-color"),o=r.index(t),s=m.opts.colorsStep,l=Math.floor(r.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;It.KEYCODE.ARROW_UP===a?f=((f-s)%p+p)%p:It.KEYCODE.ARROW_DOWN===a?f=(f+s)%p:It.KEYCODE.ARROW_LEFT===a?f=((f-1)%p+p)%p:It.KEYCODE.ARROW_RIGHT===a&&(f=(f+1)%p);var u=v(r.get(f));m.events.disableBlur(),u.focus(),n=!1}}else It.KEYCODE.ENTER===a&&(m.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(i,"".concat(e,".picker")),i}(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),i=n.left,r=n.top;m.popups.show("".concat(e,".picker"),i,r,t.outerHeight())}else m.position.forSelection(a),m.popups.show("".concat(e,".picker"))},background:n,customColor:function r(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):i(a)}},text:i,back:function e(){m.popups.hide("textColor.picker"),m.popups.hide("backgroundColor.picker"),m.toolbar.showInline()}}},It.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),It.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")}}),It.RegisterCommand("applytextColor",{undo:!0,callback:function(e,t){this.colors.text(t)}}),It.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),It.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),It.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")}}),It.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(e,t){this.colors.background(t)}}),It.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),It.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),It.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"}),Object.assign(It.DEFAULTS,{dragInline:!0}),It.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")),i=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-left"));e+=d.$iframe.offset().top+n,t+=d.$iframe.offset().left+i}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<It.INSTANCES.length;t++)if((e=It.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 i=0,r=t;!u(r)&&r===t&&e.originalEvent.pageY-d.win.pageYOffset+i<f(d.doc).height();)i++,r=d.doc.elementFromPoint(e.originalEvent.pageX-d.win.pageXOffset,e.originalEvent.pageY-d.win.pageYOffset+i);(!u(r)||p&&0===d.$el.find(r).length&&r!==p.get(0))&&(r=null),t=null===r&&n?n:r&&null===n?r:r&&n?a<i?n:r: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||(It.$draggable_helper||(It.$draggable_helper=f(document.createElement("div")).attr("class","fr-drag-helper")),p=It.$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?i(e):t.length&&(e.preventDefault(),e.stopPropagation()),p&&d.$box.find(p).length&&p.removeClass("fr-visible"),t.removeClass("fr-dragging")}function i(e){var t,a;d.$el.attr("contenteditable",!0);for(var n=0;n<It.INSTANCES.length;n++)if((t=It.INSTANCES[n].$el.find(".fr-dragging")).length){a=It.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 i=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(i=t.parent()),d.core.isEmpty())d.events.focus();else d.$el.find(".fr-marker").replaceWith(It.MARKERS),d.selection.restore();if(a===d||d.undo.canDo()||d.undo.saveStep(),d.core.isEmpty())d.$el.html(i);else{var r=d.markers.insert();0===i.find(r).length?f(r).replaceWith(i):0===t.find(r).length&&f(r).replaceWith(t),t.after(It.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",[i]),!1}p&&p.removeClass("fr-visible"),d.undo.canDo()||d.undo.saveStep(),setTimeout(function(){d.undo.saveStep()},0)}function r(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===It.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",i,!0),d.events.on("html.processGet",r)}}},Object.assign(It.DEFAULTS,{editInPopup:!1}),It.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")}}},It.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}}),Object.assign(It.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(It.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}),It.PLUGINS.emoticons=function(m){var v=m.$,i=m.opts.emoticonsSet,r=i&&i[0],o="";function s(){if(!m.selection.isCollapsed())return!1;var e=m.selection.element(),t=m.selection.endElement();if(e&&m.node.hasClass(e,"fr-emoticon"))return e;if(t&&m.node.hasClass(t,"fr-emoticon"))return t;var a=m.selection.ranges(0),n=a.startContainer;if(n.nodeType==Node.ELEMENT_NODE&&0<n.childNodes.length&&0<a.startOffset){var i=n.childNodes[a.startOffset-1];if(m.node.hasClass(i,"fr-emoticon"))return i}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 i="";return e.forEach(function(e){var t={image:e.code.toLowerCase()},a={elementClass:e.id===n.id?"fr-active fr-active-tab":"",emoticonsUnicodeClass:m.opts.emoticonsUseImage?"":"fr-tabs-unicode",title:m.language.translate(e.name),dataCmd:"setEmoticonCategory",dataParam1:e.id,image:m.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(t.image,'.svg"/>'):"&#x".concat(t.image,";")};i+='<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>")}),i}(e,t),"\n                        </div>")}(i,r),"\n                      ").concat(function a(e){return'\n        <div class="fr-icon-container fr-emoticon-container">\n            '.concat(function t(e){var i="";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:m.language.translate(e.desc),image:m.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(a.image,'.svg"/>'):"".concat(a.compiledCode),desc:m.language.translate(e.desc)};i+='<span class="fr-command fr-emoticon fr-icon" role="button" \n      data-cmd="insertEmoticon" data-param1="'.concat(n.dataParam1,'" \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>")}),i}(e),"\n        </div>\n        ")}(r),"\n                      ").concat(function e(){return m.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=m.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),t=0;t<e.length;t++)e[t].className+=" fr-deletable"};a(),m.events.on("html.set",a),m.events.on("keydown",function(e){if(m.keys.isCharacter(e.which)&&m.selection.inEditor()){var t=m.selection.ranges(0),a=s();m.node.hasClass(a,"fr-emoticon-img")&&a&&(0===t.startOffset&&m.selection.element()===a?v(a).before(It.MARKERS+It.INVISIBLE_SPACE):v(a).after(It.INVISIBLE_SPACE+It.MARKERS),m.selection.restore())}}),m.events.on("keyup",function(e){for(var t=m.el.querySelectorAll(".fr-emoticon"),a=0;a<t.length;a++)"undefined"!=typeof t[a].textContent&&0===t[a].textContent.replace(/\u200B/gi,"").length&&v(t[a]).remove();if(!(e.which>=It.KEYCODE.ARROW_LEFT&&e.which<=It.KEYCODE.ARROW_DOWN)){var n=s();m.node.hasClass(n,"fr-emoticon-img")&&(v(n).append(It.MARKERS),m.selection.restore())}})},insert:function c(e,t){var a=s(),n=m.selection.ranges(0);a?(0===n.startOffset&&m.selection.element()===a?v(a).before(It.MARKERS+It.INVISIBLE_SPACE):0<n.startOffset&&m.selection.element()===a&&n.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&v(a).after(It.INVISIBLE_SPACE+It.MARKERS),m.selection.restore(),m.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(It.MARKERS),!0)):m.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;"),!0)},setEmoticonCategory:function a(t){r=i.filter(function(e){return e.id===t})[0],function e(){m.popups.get("emoticons").html(o+l())}()},showEmoticonsPopup:function d(){var e=m.popups.get("emoticons");if(e||(e=function r(){m.opts.toolbarInline&&0<m.opts.emoticonsButtons.length&&(o='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(m.button.buildList(m.opts.emoticonsButtons),"</div>"));var e={buttons:o,custom_layer:l()},t=m.popups.create("emoticons",e);return function a(h){m.events.on("popup.tab",function(e){var t=v(e.currentTarget);if(!m.popups.isVisible("emoticons")||!t.is("span, a"))return!0;var a,n,i,r=e.which;if(It.KEYCODE.TAB==r){if(t.is("span.fr-emoticon")&&e.shiftKey||t.is("a")&&!e.shiftKey){var o=h.find(".fr-buttons");a=!m.accessibility.focusToolbar(o,!!e.shiftKey)}if(!1!==a){var s=h.find("span.fr-emoticon:focus").first().concat(h.findVisible(" div.fr-tabs").first().concat(h.find("a")));t.is("span.fr-emoticon")&&(s=s.not("span.fr-emoticon:not(:focus)")),n=s.index(t),n=e.shiftKey?((n-1)%s.length+s.length)%s.length:(n+1)%s.length,i=s.get(n),m.events.disableBlur(),i.focus(),a=!1}}else if(It.KEYCODE.ARROW_UP==r||It.KEYCODE.ARROW_DOWN==r||It.KEYCODE.ARROW_LEFT==r||It.KEYCODE.ARROW_RIGHT==r){if(t.is("span.fr-emoticon")){var l=t.parent().find("span.fr-emoticon");n=l.index(t);var c=m.opts.emoticonsStep,d=Math.floor(l.length/c),f=n%c,p=Math.floor(n/c),u=p*c+f,g=d*c;It.KEYCODE.ARROW_UP==r?u=((u-c)%g+g)%g:It.KEYCODE.ARROW_DOWN==r?u=(u+c)%g:It.KEYCODE.ARROW_LEFT==r?u=((u-1)%g+g)%g:It.KEYCODE.ARROW_RIGHT==r&&(u=(u+1)%g),i=v(l.get(u)),m.events.disableBlur(),i.focus(),a=!1}}else It.KEYCODE.ENTER==r&&(t.is("a")?t[0].click():m.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){m.popups.refresh("emoticons"),m.popups.setContainer("emoticons",m.$tb);var t=m.$tb.find('.fr-command[data-cmd="emoticons"]'),a=m.button.getPosition(t),n=a.left,i=a.top;m.popups.show("emoticons",n,i,t.outerHeight())}},back:function t(){m.popups.hide("emoticons"),m.toolbar.showInline()}}},It.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),It.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"}),It.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")}}),It.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,t){this.emoticons.setEmoticonCategory(t)}}),It.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}}),Object.assign(It.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;"}),It.PLUGINS.entities=function(i){var r,o,s=i.$;function n(e){var t=e.textContent;if(t.match(r)){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=i.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?"":i.clean.exec(e,l).replace(/\&amp;/g,"&")};return{_init:function d(){i.opts.htmlSimpleAmpersand||(i.opts.entities="".concat(i.opts.entities,"&amp;"));var e=s(document.createElement("div")).html(i.opts.entities).text(),t=i.opts.entities.split(";");o={},r="";for(var a=0;a<e.length;a++){var n=e.charAt(a);o[n]="".concat(t[a],";"),r+="\\".concat(n+(a<e.length-1?"|":""))}r=new RegExp("(".concat(r,")"),"g"),i.events.on("html.get",c,!0)}}},Object.assign(It.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(It.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadToAzure:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),It.PLUGINS.file=function(A){var n,p=A.$,y="https://i.froala.com/upload",u=2,g=3,h=4,T=5,C=6,a={};function R(){var e=A.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(),i(A.language.translate("Uploading"),0)}function r(e){var t=A.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&&(A.events.focus(),A.popups.hide("file.insert")))}function i(e,t){var a=A.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){A.edit.on(),A.events.focus(!0),A.selection.restore(),A.opts.fileUseSelectedText&&A.selection.text().length&&(t=A.selection.text()),A.html.insert('<a href="'.concat(e,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(t,"</a>"));var n=A.$el.find("#fr-inserted-file");n.removeAttr("id"),A.popups.hide("file.insert"),A.undo.saveStep(),d(),A.events.trigger("file.inserted",[n,a])}function w(e,t,a){var n=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(A.opts.fileUploadToS3||A.opts.fileUploadToAzure)if(201===n){var s;if(A.opts.fileUploadToAzure){if(!1===A.events.trigger("file.uploadedToAzure",[this.responseURL,a,i],!0))return A.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===A.events.trigger("file.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(n){return L(h,e),!1}}(r);s&&m(s,e,i||r)}else L(h,i||r);else if(200<=n&&n<300){var l=function d(e){try{if(!1===A.events.trigger("file.uploaded",[e],!0))return A.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,i||o)}else L(g,i||o)}catch(f){L(h,i||o)}}function S(){L(h,this.response||this.responseText||this.responseXML)}function _(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;i(A.language.translate("Uploading"),t)}}function L(e,t){A.edit.on(),function n(e){R();var t=A.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}(A.language.translate("Something went wrong. Please try again.")),A.events.trigger("file.error",[{code:e,message:a[e]},t])}function I(){A.edit.on(),r(!0)}function o(e){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("file.beforeUpload",[e]))return!1;var t,a=e[0];if(!(null!==A.opts.fileUploadURL&&A.opts.fileUploadURL!==y||A.opts.fileUploadToS3||A.opts.fileUploadToAzure))return function E(i){var r=new FileReader;r.onload=function(){for(var e=r.result,t=atob(r.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:i.type})),A.file.insert(e,i.name,null)},R(),r.readAsDataURL(i)}(a),!1;if(a.size>A.opts.fileMaxSize)return L(T),!1;if(A.opts.fileAllowedTypes.indexOf("*")<0&&A.opts.fileAllowedTypes.indexOf(a.type.replace(/file\//g,""))<0)return L(C),!1;if(A.drag_support.formdata&&(t=A.drag_support.formdata?new FormData:null),t){var n;if(!1!==A.opts.fileUploadToS3)for(n in t.append("key",A.opts.fileUploadToS3.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),A.opts.fileUploadToS3.params)A.opts.fileUploadToS3.params.hasOwnProperty(n)&&t.append(n,A.opts.fileUploadToS3.params[n]);for(n in A.opts.fileUploadParams)A.opts.fileUploadParams.hasOwnProperty(n)&&t.append(n,A.opts.fileUploadParams[n]);t.append(A.opts.fileUploadParam,a);var i,r,o=A.opts.fileUploadURL;A.opts.fileUploadToS3&&(o=A.opts.fileUploadToS3.uploadURL?A.opts.fileUploadToS3.uploadURL:"https://".concat(A.opts.fileUploadToS3.region,".amazonaws.com/").concat(A.opts.fileUploadToS3.bucket));var s=A.opts.fileUploadMethod;A.opts.fileUploadToAzure&&(o=A.opts.fileUploadToAzure.uploadURL?"".concat(A.opts.fileUploadToAzure.uploadURL,"/").concat(a.name):encodeURI("https://".concat(A.opts.fileUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.fileUploadToAzure.container,"/").concat(a.name)),i=o,A.opts.fileUploadToAzure.SASToken&&(o+=A.opts.fileUploadToAzure.SASToken),s="PUT");var l=A.core.getXHR(o,s);if(A.opts.fileUploadToAzure){var c=(new Date).toUTCString();if(!A.opts.fileUploadToAzure.SASToken&&A.opts.fileUploadToAzure.accessKey){var d=A.opts.fileUploadToAzure.account,f=A.opts.fileUploadToAzure.container;if(A.opts.fileUploadToAzure.uploadURL){var p=A.opts.fileUploadToAzure.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=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.fileUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),v="SharedKey "+d+":"+m;r=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"),A.opts.fileUploadParams)A.opts.fileUploadParams.hasOwnProperty(n)&&l.setRequestHeader(n,A.opts.fileUploadParams[n]);for(n in A.opts.fileUploadToAzure.params)A.opts.fileUploadToAzure.params.hasOwnProperty(n)&&l.setRequestHeader(n,A.opts.fileUploadToAzure.params[n])}l.onload=function(){w.call(l,a.name,i,r)},l.onerror=S,l.upload.onprogress=_,l.onabort=I,R();var b=A.popups.get("file.insert");b&&(b.off("abortUpload"),b.on("abortUpload",function(){4!==l.readyState&&l.abort()})),l.send(A.opts.fileUploadToAzure?a:t)}}}function s(){r()}function l(e){if(e)return A.popups.onHide("file.insert",s),!0;var t;A.opts.fileUpload||A.opts.fileInsertButtons.splice(A.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.fileInsertButtons),"</div>");var a="";A.opts.fileUpload&&(a='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'.concat(A.id,'"><strong>').concat(A.language.translate("Drop file"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" name="').concat(A.opts.fileUploadParam,'" accept="').concat(0<=A.opts.fileAllowedTypes.indexOf("*")?"/":"").concat(A.opts.fileAllowedTypes.join(", ").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-').concat(A.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>'},i=A.popups.create("file.insert",n);return function r(a){A.events.$on(a,"dragover dragenter",".fr-file-upload-layer",function(){return p(this).addClass("fr-drop"),!1},!0),A.events.$on(a,"dragleave dragend",".fr-file-upload-layer",function(){return p(this).removeClass("fr-drop"),!1},!0),A.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")||A).file.upload(t.files)},!0),A.helpers.isIOS()&&A.events.$on(a,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){p(this).trigger("click")}),A.events.$on(a,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=a.data("instance")||A;e.events.disableBlur(),a.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}p(this).val("")},!0)}(i),i}function t(e){A.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(!A.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(It.MARKERS),A.popups.hideAll();var n=A.popups.get("file.insert");return n||(n=l()),A.popups.setContainer("file.insert",A.$sc),A.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),R(),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(A.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&&A.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[T]="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(){A.events.on("drop",c),A.events.$on(A.$win,"keydown",function(e){var t=e.which,a=A.popups.get("file.insert");a&&t===It.KEYCODE.ESC&&a.trigger("abortUpload")}),A.events.on("destroy",function(){var e=A.popups.get("file.insert");e&&e.trigger("abortUpload")})}(),A.events.on("link.beforeRemove",t),A.$wp&&(d(),A.events.on("contentChanged",d)),l(!0)},showInsertPopup:function v(){var e=A.$tb.find('.fr-command[data-cmd="insertFile"]'),t=A.popups.get("file.insert");if(t||(t=l()),r(),!t.hasClass("fr-active"))if(A.popups.refresh("file.insert"),A.popups.setContainer("file.insert",A.$tb),e.isVisible){var a=A.button.getPosition(e),n=a.left,i=a.top;A.popups.show("file.insert",n,i,e.outerHeight())}else A.position.forSelection(t),A.popups.show("file.insert")},upload:o,insert:m,back:function e(){A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("file.insert"),A.toolbar.showInline()},hideProgressBar:r}},It.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),It.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"}),It.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.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"))}}),It.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}}),Object.assign(It.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(It.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}),It.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"}],It.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,It.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,It.PLUGINS.filesManager=function(w){var y,o,S,l,c,d,s,f,_=w.$,T="https://i.froala.com/upload",p=!1,t=!1,L=new Map,I=new Map,C=new Map,R=new Map,x=new Map,k=new Map,r=0,i=[],u=-1,O=[],g=0,h=["file","image","imageTUI","video"],F=1,m=2,D=3,M=4,B=5,N=6,P=10,U=["video/avi","video/mpeg","video/x-ms-wmv"],v={};function b(){var e=w.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;w.hasOwnProperty("imageTUI")||(s="fr-disabled"),k.forEach(function(e,t){X(t)}),A()?(t=w.popups.get("filesManager.insert"))||(t=We()):(t=w.popups.get("filesManager.insert"))||(t=function o(){var e='<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.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(w.language.translate(function i(){var e="",t=function a(){var t=[];return h.forEach(function(e){w.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(w.language.translate("Enable"),"</button>               \n      <button class='fr-trim-button fr-plugins-cancel'>").concat(w.language.translate("Cancel"),"</button>\n    </div>"),a={buttons:e,upload_layer:t,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},n=w.popups.create("filesManager.insert",a);return De(n),n}());var a=w.$tb.find('.fr-command[data-cmd="insertFiles"]');if(Z(),e||!t.hasClass("fr-active"))if(e||Q(),w.popups.refresh("filesManager.insert"),w.popups.setContainer("filesManager.insert",w.$tb),a.isVisible()){var n=w.button.getPosition(a,L.size),i=n.left,r=n.top;w.popups.show("filesManager.insert",i,r,a.outerHeight())}else w.position.forSelection(t),w.popups.show("filesManager.insert");w.popups.setPopupDimensions(t),A()&&w.popups.setFileListHeight(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function A(){var t=!0;return h.forEach(function(e){w.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}function H(){Z()}function W(){if(l||function o(){var e;w.shared.$image_resizer?(l=w.shared.$image_resizer,d=w.shared.$img_overlay,w.events.on("destroy",function(){_("body").first().append(l.removeClass("fr-active"))},!0)):(w.shared.$image_resizer=_(document.createElement("div")).attr("class","fr-image-resizer"),l=w.shared.$image_resizer,w.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),w.opts.imageResize&&(l.append(K("nw")+K("ne")+K("sw")+K("se")),w.shared.$img_overlay=_(document.createElement("div")).attr("class","fr-image-overlay"),d=w.shared.$img_overlay,e=l.get(0).ownerDocument,_(e).find("body").first().append(d)));w.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,w.opts.imageResize&&(d.remove(),d=null)},!0),w.helpers.isMobile()||w.events.$on(_(w.o_win),"resize",function(){y&&!y.hasClass("fr-uploading")?it(!0):y&&(W(),replace(),J(!1))});if(w.opts.imageResize){e=l.get(0).ownerDocument,w.events.$on(l,w._mousedown,".fr-handler",z),w.events.$on(_(e),w._mousemove,G),w.events.$on(_(e.defaultView||e.parentWindow),w._mouseup,Y),w.events.$on(d,"mouseleave",Y);var n=1,i=null,r=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!==i||200<e.timeStamp-r)&&(n=1),(a==It.KEYCODE.EQUALS||w.browser.mozilla&&a==It.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=qe.call(this,e,1,1,n):(a==It.KEYCODE.HYPHEN||w.browser.mozilla&&a==It.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=qe.call(this,e,2,-1,n):w.keys.ctrlKey(e)||a!=It.KEYCODE.ENTER||(y.before("<br>"),Ce(y)),i=a,r=e.timeStamp}},!0),w.events.on("keyup",function(){n=1})}}(),!y)return!1;var e=w.$wp||w.$sc;e.append(l),l.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=dt();ft()&&(n=n.find(".fr-img-wrap"));var i=0,r=0;w.opts.iframe&&(i=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),r=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(w.opts.iframe?n.offset().top+i:n.offset().top+t)-1).css("left",(w.opts.iframe?n.offset().left+r:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function K(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function $(e){ft()?y.parents(".fr-img-caption").css("width",e):y.css("width",e)}function z(e){if(!w.core.sameInstance(l))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).ownerDocument,n=a.defaultView||a.parentWindow,i=!1;try{i=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(s){}i&&n.frameElement&&(t+=w.helpers.getPX(_(n.frameElement).offset().left)+n.frameElement.clientLeft)}(c=_(this)).data("start-x",t),c.data("start-width",y.width()),c.data("start-height",y.height());var r=y.width();if(w.opts.imageResizeWithPercent){var o=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;r=(r/_(o).outerWidth()*100).toFixed(2)+"%"}$(r),d.show(),w.popups.hideAll(),st()}function G(e){if(!w.core.sameInstance(l))return!0;var t;if(c&&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-c.data("start-x"),i=c.data("start-width");if((c.hasClass("fr-hnw")||c.hasClass("fr-hsw"))&&(n=0-n),w.opts.imageResizeWithPercent){var r=y.parentsUntil(w.$el,w.html.blockTagsQuery()).get(0)||w.el;i=((i+n)/_(r).outerWidth()*100).toFixed(2),w.opts.imageRoundPercent&&(i=Math.round(i)),$("".concat(i,"%")),(t=ft()?(w.helpers.getPX(y.parents(".fr-img-caption").css("width"))/_(r).outerWidth()*100).toFixed(2):(w.helpers.getPX(y.css("width"))/_(r).outerWidth()*100).toFixed(2))===i||w.opts.imageRoundPercent||$("".concat(t,"%")),y.css("height","").removeAttr("height")}else i+n>=w.opts.imageMinWidth&&($(i+n),t=ft()?w.helpers.getPX(y.parents(".fr-img-caption").css("width")):w.helpers.getPX(y.css("width"))),t!==i+n&&$(t),((y.attr("style")||"").match(/(^height:)|(; *height:)/)||y.attr("height"))&&(y.css("height",c.data("start-height")*y.width()/c.data("start-width")),y.removeAttr("height"));W(),w.events.trigger("image.resize",[ct()])}}function Y(e){if(!w.core.sameInstance(l))return!0;if(c&&y){if(e&&e.stopPropagation(),w.$el.find("img.fr-error").left)return!1;c=null,d.hide(),W(),w.undo.saveStep(),w.events.trigger("image.resizeEnd",[ct()])}else l.removeClass("fr-active")}function V(){k.forEach(function(e,t){var a=w.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){w.edit.on(),y&&y.addClass("fr-error"),v[e]?(e!=D&&e!=m&&e!=M||Ae(100,n,!0),k.set(n,v[e]),V(),function i(){k.forEach(function(e,t){w.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(w.language.translate(v[e]),n)):ae(w.language.translate("Something went wrong. Please try again."),n),!y&&a&&Xe(a),w.events.trigger("filesManager.error",[{code:e,message:v[e]},t,a])}function q(){var e=w.popups.get("filesManager.insert"),t=e.find('.fr-command[data-cmd="insertAll"]'),a=e.find('.fr-command[data-cmd="deleteAll"]'),n=!0;x.forEach(function i(e,t,a){x.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){I.get(e)&&I.get(e).link&&w.events.trigger("filesManager.removed",[I.get(e).link]);var t=w.popups.get("filesManager.insert");t.find(".fr-file-"+e).get(0)!==undefined&&(t.find(".fr-file-"+e).get(0).outerHTML=""),I["delete"](e),L["delete"](e),x["delete"](e),q(),0==L.size&&(g=0),k["delete"](e),w.popups.setPopupDimensions(t,!0),w.opts.toolbarBottom?E(!0):w.popups.setPopupDimensions(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function Q(){for(var e=w.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(S)document.getElementById("fr-file-autoplay-button-".concat(S))&&(document.getElementById("fr-file-autoplay-button-".concat(S)).checked=!1),O=O.filter(function(e){return e!=S});else{for(var n=e.find(".fr-file-autoplay-button"),i=0;i<n.length;i++)n.get(i).checked=!1;O=[]}x=new Map,q()}function J(e){var t=w.popups.get("filesManager.insert");if(t||(t=We()),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(),y){var a=dt();w.popups.setContainer("filesManager.insert",w.$sc);var n=a.offset().left,i=a.offset().top+a.height();w.popups.show("filesManager.insert",n,i,a.outerHeight())}void 0===e&&ee(w.language.translate("Uploading"),0)}function Z(e){var t=w.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||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;it(!0),w.selection.setAfter(a.get(0)),w.selection.restore()}w.popups.hide("filesManager.insert")}}function ee(e,t){var a=w.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){J();var t=w.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),w.events.disableBlur(),a.focus()}function ae(e,t){var a=w.popups.get("filesManager.insert"),n=a.find(".fr-upload-progress-layer"),i=a.find(".fr-file-".concat(t));n.addClass("fr-error"),i.find("h5").text(e)}v[F]="File cannot be loaded from the passed link.",v[m]="No link in upload response.",v[D]="Error during file upload.",v[M]="Parsing response failed.",v[B]="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[P]="File upload cancelled";var a,ne,ie,re,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,ie=e.pageY;var t=document.getElementById("filesList");ie+20>t.getBoundingClientRect().bottom&&ue(t,0,10),ie-20<t.getBoundingClientRect().top&&ue(t,0,-10)},!1),w.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 i=document.getElementById("filesList");e.targetTouches[0].clientY+5>i.getBoundingClientRect().bottom&&ue(i,0,5),e.targetTouches[0].clientY-5<i.getBoundingClientRect().top&&ue(i,0,-5)},!1)}if(e.ondrag=ge,e.ondragend=he,w.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(w.helpers.isMobile()&&(oe=event.touches[0].clientX,se=event.touches[0].clientY),re=e.target;!re.classList.contains(fe);)re=re.parentElement;re.classList.contains(fe)&&!re.classList.contains("fr-unchecked")?w.helpers.isMobile()&&re.classList.add("drag-sort-active"):re=undefined}function he(e){var t;if(re!==undefined){var a,n;if(w.helpers.isMobile())for(a=oe,n=se,t=event.target;!t.classList.contains(fe);)t=t.parentElement;else a=event.clientX,n=event.clientY;w.helpers.isMobile()||!w.browser.safari&&!w.browser.mozilla||(a=ne,n=ie);for(var i=document.elementFromPoint(a,n);i&&!i.classList.contains(fe);)i=i.parentElement;i&&!i.classList.contains(fe)?i=undefined:i&&re!==i&&function s(e,t){var a,n,i=e.parentNode,r=t.parentNode;if(!i||!r||i.isEqualNode(t)||r.isEqualNode(e))return;for(var o=0;o<i.children.length;o++)i.children[o].isEqualNode(e)&&(a=o);for(var o=0;o<r.children.length;o++)r.children[o].isEqualNode(t)&&(n=o);i.isEqualNode(r)&&a<n&&n++;i.insertBefore(t,i.children[a]),r.insertBefore(e,r.children[n])}(re,i),w.helpers.isMobile()&&(t.classList.remove("fr-hovered-over-file"),i.classList.remove("fr-hovered-over-file"))}}function me(e){var n=w.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=L.get(e),a=function o(e){var t,a={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{t=e.toLocaleDateString(w.opts.language?w.opts.language:undefined,a)}catch(n){t=e.toLocaleDateString(undefined,a)}return t+""}(new Date),i=x.get(e)?"":"fr-unchecked ",r="\n        <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(i,"' draggable = \"").concat(!i,'" >\n        <div class=\'fr-file-item-left\' >\n\n    \n            <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n            ').concat(w.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(w.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(w.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='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=r+n.find(".fr-upload-progress-layer")[0].innerHTML,L.forEach(function c(e,t,a){x.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)}),O.forEach(function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0}),be(e,t),Z(),w.opts.toolbarBottom?E(!0):w.popups.setPopupDimensions(n),pe("fr-file-list-item")}function ve(e){switch(e){case"application/msword":return w.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return w.icon.getFileIcon("docxIcon");case"image/gif":return w.icon.getFileIcon("gifIcon");case"image/jpeg":return w.icon.getFileIcon("jpegIcon");case"image/jpeg":return w.icon.getFileIcon("jpgIcon");case"type/text":return w.icon.getFileIcon("logIcon");case"video/quicktime":return w.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return w.icon.getFileIcon("mp3Icon");case"video/mp4":return w.icon.getFileIcon("mp4Icon");case"audio/ogg":return w.icon.getFileIcon("oggIcon");case"video/ogg":return w.icon.getFileIcon("ogvIcon");case"application/pdf":return w.icon.getFileIcon("pdfIcon");case"image/png":return w.icon.getFileIcon("pngIcon");case"text/plain":return w.icon.getFileIcon("txtIcon");case"video/webm":return w.icon.getFileIcon("webmIcon");case"image/webp":return w.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return w.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return w.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return w.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return w.icon.getFileIcon("zipIcon");default:return w.icon.getFileIcon("defaultIcon")}}function be(n,i,e){var r=w.popups.get("filesManager.insert"),t=r.find(".fr-file-item-icon-"+n).get(0);if(Be(Le(i))&&"image/gif"!=Le(i)&&"image/webp"!=Le(i)){"a"!=t.children[0].localName&&(t.innerHTML="<a target='_blank' href=''>"+t.innerHTML+"</a>");r.find(".fr-file-item-icon-"+n).get(0).children[0].children[0];var o=new FileReader;if(null!=e&&e){var a=L.get(n);i.name=a.name,L.set(n,i)}if(o.onloadend=function(){r.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));r.find(".fr-file-item-icon-"+n).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:Le(i)})),r.find(".fr-file-item-icon-"+n).get(0).classList.add("file-item-thumbnail-hover")},i)o.readAsDataURL(i);else{var s=ve(Le(i));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(Le(i));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(Pe(Le(L.get(e)))){var a="fr-files-checkbox",n="";He(Le(L.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 i="application/msword",r="application/vnd.openxmlformats-officedocument.wordprocessingml.document",o="";return!Ue(Le(L.get(e)))&&He(Le(L.get(e)))||(s="fr-disabled"),Pe(Le(L.get(e)))&&(s="fr-disabled"),Ne(Le(L.get(e)))&&(s="fr-disabled",Le(L.get(e))!=i&&Le(L.get(e))!=r||w.opts.googleOptions&&!w.helpers.isMobile()&&w.opts.googleOptions.API_KEY&&w.opts.googleOptions.CLIENT_ID&&(s=""),"text/plain"!=Le(L.get(e))&&Le(L.get(e))!=i&&"application/pdf"!=Le(L.get(e))&&Le(L.get(e))!=r&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=Le(L.get(e))&&"application/vnd.ms-excel"!=Le(L.get(e))&&"type/text"!=Le(L.get(e))||(o="")),"video/url"===Le(L.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 Ae(e,t,a){var n=w.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 i=n.find(".fr-file-progress-circle-"+t),r=n.find(".fr-file-upload-percent-"+t);return 50<e?i.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)+" over50"):i.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)),r.get(0).innerHTML=Math.floor(e)+"%",void ye(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),ye(t,100,a))}function ye(e,t,a){var n=w.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")&&w.popups.setFileListHeight(n);var i=0;R.set(e,t),R.forEach(function(e,t){i+=e}),i/=R.size,100==t&&a&&r++,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=i+"%",r==R.size&&(n.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),R=new Map,r=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 Te(a,n){Z(),w.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),a.forEach(function(e,t){Be(Le(e))&&w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy&&w.opts.imageUpload?Fe(e,a,y,n[t]):I.set(n[t],e)})}function Ce(e){(function a(e){if("false"==_(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&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<It.INSTANCES.length;t++)It.INSTANCES[t]!=w&&It.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=_(this),W(),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")}).call(e.get(0))}function Re(){var e=_(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==i.length||0<i.length&&i.length==u)&&(f=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?w.selection.setAfter(e.parent()):w.selection.setAfter(e),w.undo.saveStep(),w.events.trigger("filesManager.loaded",[e]),Se(i)}function we(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),_(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)a.indexOf(n[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[_(n[e])]);n=t}function Se(e){if(null!=e){if(0==e.length)return void(null!=f&&("VIDEO"==f.get(0).tagName?w.video._editVideo(f.parent()):"IMG"==f.get(0).tagName?w.image.edit(f):f.trigger("click"),w.toolbar.disable()));Ie(e.shift(),e)}}function _e(e){var t=!1;if(Pe(Le(I.get(e))))w.trimVideoPlugin.trimVideo(L.get(e),e,L),t=!0;else if(Be(Le(I.get(e)))){var a=I.get(e).link,n=w.o_doc.createElement("img");n.src=a,y=n,o=e,w.imageTUI.launch(w,!1,e),t=!0}else if(Ne(Le(I.get(e)))){var i={apiKey:w.opts.googleOptions.API_KEY,clientId:w.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:L.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};ce=function d(p){var r,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 i(e){var t=gapi.auth.getToken().access_token,a=r,n="https://docs.google.com/feeds/download/documents/export/Export?id="+a+"&format=docx&access_token="+t,i=new XMLHttpRequest;i.open("get",n),i.responseType="arraybuffer",i.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),t=L.get(p.fileIndex);e.name=t.name,e.lastModified=t.lastModified,e.lastModifiedDate=t.lastModifiedDate,L.set(p.fileIndex,e),w.filesManager.upload(e,I,y,p.fileIndex),l()},i.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),i=n.byteLength,r=0;r<i;r++)a+=String.fromCharCode(n[r]);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){r=e.id;var t="https://docs.google.com/document/d/"+e.id+"/edit",a=w.o_doc.body,n=w.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=i,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}(i),function r(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 Le(e){if(""!=e.type)return e.type;var a,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 Ie(s,e){if(Ne(Le(I.get(s)))||!He(Le(I.get(s)))){var t=I.get(s).link,a=I.get(s).text;!a&&L.get(s)&&L.get(s).name&&(a=L.get(s).name);var n=I.get(s).response;if(w.edit.on(),w.events.focus(!0),w.selection.restore(),w.opts.fileUseSelectedText&&w.selection.text().length&&(a=w.selection.text()),t.endsWith(".pdf")||t.endsWith(".txt"))xe('<iframe src="'.concat(t,'" title="').concat(a,'" width="\u201d100%\u201d" height="\u201d100%\u201d" class="fr-file"></iframe>'),!0);else w.html.insert('<a href="'.concat(t,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(a,"</a>"));var i=w.$el.find("#fr-inserted-file");i.removeAttr("id"),w.undo.saveStep(),function T(){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(le)for(e=0;e<le.length;e++)a.indexOf(le[e].getAttribute("href"))<0&&w.events.trigger("file.unlink",[le[e]]);le=t}(),w.selection.clear(),w.selection.setAfter(i),w.events.trigger("file.inserted",[i,n]),Se(e)}if(Be(Le(I.get(s)))&&He(Le(I.get(s)))){var o=I.get(s).link,r=I.get(s).sanitize,l=I.get(s).data,c=I.get(s).$existing_img,d=I.get(s).response;c&&"string"==typeof c&&(c=w.$(c)),w.edit.off(),ee(w.language.translate("Loading image")),r&&(o=w.helpers.sanitizeURL(o));var f=new Image;f.onload=function(){var e,t;if(c){w.undo.canDo()||c.hasClass("fr-uploading")||w.undo.saveStep();var a=c.data("fr-old-src");c.data("fr-image-pasted")&&(a=null),w.$wp?((e=c.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&c.attr("src",a),c.replaceWith(e)):e=c;for(var n=e.get(0).attributes,i=0;i<n.length;i++){var r=n[i];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),l[t]);e.on("load",Re),e.attr("src",o),w.edit.on(),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger(a?"image.replaced":"image.inserted",[e,d])}else e=function s(e,t,a){var n,i=_(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],'"'),i.attr("data-".concat(n),t[n]));var r=w.opts.imageDefaultWidth;r&&"auto"!=r&&(r=w.opts.imageResizeWithPercent?"100%":"".concat(r,"px"));i.attr("style",r?"width: ".concat(r,";"):""),lt(i,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),i.on("load",a),i.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");o.length?(o.parent().is("hr")&&o.parent().after(o),w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(i)):w.$el.append(i);return i}(o,l,Re),w.undo.saveStep(),w.events.disableBlur(),w.$el.blur(),w.events.trigger("image.inserted",[e,d])},f.onerror=function(){j(F,null,null,s),Se(e)},f.src=o}if((Pe(Le(I.get(s)))||Ue(Le(I.get(s))))&&He(Le(I.get(s))))if(S=s,"video/url"==Le(I.get(s))){var p=!1;if(document.getElementById("fr-file-autoplay-button-"+s)!==undefined&&(p=document.getElementById("fr-file-autoplay-button-"+s).checked),p&&I.get(s)!==undefined&&-1<I.get(s).video.indexOf("iframe")&&I.get(s).video.indexOf("autoplay=1")<0){var u=I.get(s).video.substring(I.get(s).video.indexOf("src")+3),g="&";(u=(u=u.substring(u.indexOf('"')+1)).substring(0,u.indexOf('"'))).indexOf("?")<0&&(g="?"),I.get(s).video=I.get(s).video.replace(u,u+=g+"autoplay=1")}else!p&&I.get(s).video.indexOf(!1)&&(-1<I.get(s).video.indexOf("&autoplay=1")&&(I.get(s).video=I.get(s).video.replace("&autoplay=1","")),-1<I.get(s).video.indexOf("?autoplay=1")&&(I.get(s).video=I.get(s).video.replace("?autoplay=1","")));w.events.focus(!0),w.selection.restore(),w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(I.get(s).video,"</span>"),!1,w.opts.videoSplitHTML),w.popups.hide("filesManager.insert");var h=w.$el.find(".fr-jiv");h.removeClass("fr-jiv"),h.toggleClass("fr-rv",w.opts.videoResponsive),function C(e,t,a){!w.opts.htmlUntouched&&w.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"}))}(h,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),h.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger("video.inserted",[h]),Re.call(h)}else{var m=I.get(s).link,v=I.get(s).sanitize,b=I.get(s).data,E=I.get(s).$existing_img,A=I.get(s).response;w.edit.off(),v&&(m=w.helpers.sanitizeURL(m)),function R(){var e,t;if(E){w.undo.canDo()||E.find("video").hasClass("fr-uploading")||w.undo.saveStep();var a=E.find("video").data("fr-old-src"),n=E.data("fr-replaced");E.data("fr-replaced",!1),w.$wp?((e=E.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&E.find("video").attr("src",a),E.replaceWith(e)):e=E;for(var i=e.find("video").get(0).attributes,r=0;r<i.length;r++){var o=i[r];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==b)for(t in b)b.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),b[t]);e.find("video").on("canplay",Re),e.find("video").attr("src",m),w.edit.on(),we(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(n?"video.replaced":"video.inserted",[e,A])}else e=function u(e,t,a,n,i){var r,o="";if(t&&void 0!==t)for(r in t)t.hasOwnProperty(r)&&"link"!=r&&(o+=" data-".concat(r,'="').concat(t[r],'"'));var s,l=w.opts.videoDefaultWidth;l&&"auto"!=l&&(l="".concat(l,"px"));if(Ue(n))s=_(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+o+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var c="",d=document.getElementById("fr-file-autoplay-button-"+i).checked;d&&(c="autoplay"),s=_(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+o+(l?' style="width: '+l+';" ':"")+c+"  controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>")}s.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert();w.html.wrap();var f=w.$el.find(".fr-marker");w.node.isLastSibling(f)&&f.parent().hasClass("fr-deletable")&&f.insertAfter(f.parent());f.replaceWith(s);var p="";p=Ue(n)?"audio":"video",s.find(p).get(0).readyState>s.find(p).get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?a.call(s.find(p).get(0)):(s.find(p).on("canplaythrough load",a),s.find(p).on("error",a));return s}(m,b,Re,Le(I.get(s)),s),we(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,A])}()}w.popups.hide("filesManager.insert"),x["delete"](s);var y=w.popups.get("filesManager.insert");y.find("input.fr-insert-attr.fr-checkbox-file-".concat(s))[0].checked=!1,y.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),O=O.filter(function(e){return e!=s})}function xe(e,t){var a,n;It.VIDEO_EMBED_REGEX.test(e)?(a="video",n=w.opts.videoSplitHTML):It.IMAGE_EMBED_REGEX.test(e)&&(a="image",n=w.opts.imageSplitHTML),w.events.focus(!0),w.selection.restore();var i=!1;y&&(Xe(),i=!0),w.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(a,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,n),w.popups.hide("filesManager.insert");var r=w.$el.find(".fr-jiv");r.removeClass("fr-jiv"),"video"==a&&(r.toggleClass("fr-rv",w.opts.videoResponsive),function o(e,t,a){!w.opts.htmlUntouched&&w.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"}))}(r,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),r.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(i?"video.replaced":"video.inserted",[r])),"image"==a&&(lt(r,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),r.find("img").removeClass("fr-dii"),r.find("img").addClass("fr-dib"),r.toggleClass("fr-draggable",w.opts.imageMove),w.events.trigger(i?"image.replaced":"image.inserted",[r])),t&&(f=r,w.selection.clear(),w.toolbar.disable(),w.video._editVideo(f))}function ke(e,t){try{if(!1===w.events.trigger("filesManager.uploaded",[e],!0))return w.edit.on(),!1;var a=JSON.parse(e);return a.link?a:(j(m,e,null,t),!1)}catch(n){return j(M,e,null,t),!1}}function Oe(e,t){try{var a=_(e).find("Location").text(),n=_(e).find("Key").text();return!1===w.events.trigger("filesManager.uploadedToS3",[a,n,e],!0)?(w.edit.on(),!1):a}catch(i){return j(M,e,null,t),!1}}function Fe(e,t,a,n){if(-1<U.indexOf(Le(e))||!Le(e))return j(N,null,null,n),!1;if(!1===w.events.trigger("filesManager.beforeUpload",[t]))return!1;if(!(null!==w.opts.filesManagerUploadURL&&w.opts.filesManagerUploadURL!=T||w.opts.filesManagerUploadToS3||w.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:Le(l)})),Be(Le(l))){var i={link:e,sanitize:!1,data:null,$existing_img:c,response:null,type:Le(l)};I.set(s,i)}if(Ne(Le(l))){var r={link:e,text:l.name,response:null,type:Le(l)};I.set(s,r)}if(Pe(Le(l))||Ue(Le(l))){var o={link:e,sanitize:!1,data:null,$existing_img:c,type:Le(l)};I.set(s,o)}}},d.readAsDataURL(l)}(n,e),!1;if(Be(Le(e))&&(e.name||(e.name=(new Date).getTime()+"."+(Le(e)||"image/jpeg").replace(/image\//g,""))),e.size>w.opts.filesManagerMaxSize)return j(B,null,null,n),!1;if(w.opts.filesManagerAllowedTypes.indexOf("*")<0&&w.opts.filesManagerAllowedTypes.indexOf(Le(e))<0)return j(N,null,null,n),!1;var i;if(function A(e){isNaN(e)||(w.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>"),R.set(e,0))}(n),w.drag_support.formdata&&(i=w.drag_support.formdata?new FormData:null),i){var r;if(!1!==w.opts.filesManagerUploadToS3)for(r in i.append("key",w.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),i.append("success_action_status","201"),i.append("X-Requested-With","xhr"),i.append("Content-Type",Le(e)),w.opts.filesManagerUploadToS3.params)w.opts.filesManagerUploadToS3.params.hasOwnProperty(r)&&i.append(r,w.opts.filesManagerUploadToS3.params[r]);for(r in w.opts.filesManagerUploadParams)w.opts.filesManagerUploadParams.hasOwnProperty(r)&&i.append(r,w.opts.filesManagerUploadParams[r]);i.append(w.opts.filesManagerUploadParam,e,e.name);var o,s,l=w.opts.filesManagerUploadURL;w.opts.filesManagerUploadToS3&&(l=w.opts.filesManagerUploadToS3.uploadURL?w.opts.filesManagerUploadToS3.uploadURL:"https://".concat(w.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(w.opts.filesManagerUploadToS3.bucket)),w.opts.filesManagerUploadToAzure&&(l=w.opts.filesManagerUploadToAzure.uploadURL?"".concat(w.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(w.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),o=l,w.opts.filesManagerUploadToAzure.SASToken&&(l+=w.opts.filesManagerUploadToAzure.SASToken),w.opts.filesManagerUploadMethod="PUT");var c=w.core.getXHR(l,w.opts.filesManagerUploadMethod);if(w.opts.filesManagerUploadToAzure){var d=(new Date).toUTCString();if(!w.opts.filesManagerUploadToAzure.SASToken&&w.opts.filesManagerUploadToAzure.accessKey){var f=w.opts.filesManagerUploadToAzure.account,p=w.opts.filesManagerUploadToAzure.container;if(w.opts.filesManagerUploadToAzure.uploadURL){var u=w.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=w.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+Le(e)+"\n\n\n\n\n\n\n"+g+"\n"+h,v=w.cryptoJSPlugin.cryptoJS.HmacSHA256(m,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.filesManagerUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;s=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",Le(e)),c.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.filesManagerUploadParams)w.opts.filesManagerUploadParams.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.filesManagerUploadParams[r]);for(r in w.opts.filesManagerUploadToAzure.params)w.opts.filesManagerUploadToAzure.params.hasOwnProperty(r)&&c.setRequestHeader(r,w.opts.filesManagerUploadToAzure.params[r])}c.onload=function(){Ne(Le(e))?function g(e,t,a,n,i){var r=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(w.opts.filesManagerUploadToS3||w.opts.filesManagerUploadToAzure)if(201===r){var c;if(w.opts.filesManagerUploadToAzure){if(!1===w.events.trigger("filesManager.uploadedToAzure",[this.responseURL,i,o],!0))return w.edit.on(),!1;c=n}else c=Oe(s,t);if(c){var d={link:c,text:e,response:o,type:a};I.set(t,d)}}else j(M,o||s,null,t);else if(200<=r&&r<300){var f=ke(l,t);if(f){var p={link:f.link,text:e,response:o,type:a};I.set(t,p)}}else j(D,o||l,null,t)}catch(u){j(M,o||l,null,t)}}.call(c,e.name,n,Le(e),o,s):function h(e,t,a,n,i){var r=this.status,o=this.response,s=this.responseXML,l=this.responseText;try{if(w.opts.filesManagerUploadToS3||w.opts.filesManagerUploadToAzure)if(201==r){var c;if(w.opts.filesManagerUploadToAzure){if(!1===w.events.trigger("filesManager.uploadedToAzure",[this.responseURL,i,o],!0))return w.edit.on(),!1;c=n}else c=Oe(s,t);if(c){var d={link:c,sanitize:!1,data:[],$existing_img:e,response:o||s,type:a};I.set(t,d)}}else j(M,o||s,e,t);else if(200<=r&&r<300){var f=ke(l,t);if(f){var p={link:f.link,sanitize:!1,data:f,$existing_img:e,response:o||s,type:a};I.set(t,p)}}else j(D,o||l,e,t)}catch(u){j(M,o||l,e,t)}}.call(c,y,n,Le(e),o,s),k.has(n)||Ae(100,n,!0)},c.onerror=function(){j(M,this.response||this.responseText||this.responseXML,null,n)},c.upload.onprogress=function(e){!function a(e,t){e.lengthComputable&&Ae(e.loaded/e.total*100|0,t,!1)}(e,n)},c.onabort=function(e){!function a(e,t){j(P,t,y,e)}(n,e)},c.send(w.opts.filesManagerUploadToAzure?e:i),C.set(n,c)}}function De(l){w.events.$on(l,"click",".fr-upload-progress-layer",function(e){if(w.helpers.isMobile())return e.stopPropagation(),!1},!0),w.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),w.events.$on(l,"dragleave dragend",".fr-upload-progress-layer",function(e){return e.preventDefault(),!1},!0),w.events.$on(l,"dragover dragenter",".fr-files-upload-layer",function(e){return _(this).addClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.events.$on(l,"dragleave dragend",".fr-files-upload-layer",function(e){return _(this).removeClass("fr-drop"),(w.browser.msie||w.browser.edge)&&e.preventDefault(),!1},!0),w.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());x.set(t,this.children.target.checked);for(var a=l.find('.fr-command[data-cmd="insertAll"]'),n=l.find('.fr-command[data-cmd="deleteAll"]'),i=l.find('input.fr-file-insert-check[type="checkbox"]'),r=i.length,o=!0,s=0;s<r;s++)1==i[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")}}),w.events.$on(l,"click",".fr-file-insert-button",function(e){this.classList.contains("fr-disabled")||Ie(parseInt(this.id.split("-").pop()))}),w.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()))}),w.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")||_e(t)}),w.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(!He(Le(I.get(e)))){var t=I.get(e).link,a=I.get(e).link;if(L.get(e)&&L.get(e).name?a=L.get(e).name:I.get(e).text&&(a=I.get(e).text),0===t.indexOf("blob:")&&w.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),a);else{var n=document.createElement("a");n.href=t,n.download=a,n.click()}return!1}var i=w.popups.get("filesManager.insert");if(0<i.find(".fr-file-view-image-"+e).length)i.find(".fr-file-view-image-"+e)[0].remove();else{for(var r=i.find(".fr-file-view"),o=0;o<r.length;o++)r.get(o).remove();var s=i.find(".fr-file-view-"+e);if(Be(Le(I.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="'+I.get(e).link+"\" class ='fr-file-view-image'/>\n                </div>\n              </div>";s[0].innerHTML=l+s[0].innerHTML}else if(Pe(Le(I.get(e)))){var c;if(I.get(e).hasOwnProperty("video")){var d=I.get(e).video.substring(I.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",'" 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="'+I.get(e).link+"\"  class ='fr-file-view-image' autoplay></video>\n          </div>\n        </div>";s[0].innerHTML=c+s[0].innerHTML}else if(Ue(Le(I.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(I.get(e).link,'" type="').concat(Le(I.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(Le(I.get(e)))){var u=I.get(e).link,g=I.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:")&&w.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),g);else{var m=document.createElement("a");m.href=u,m.download=g,m.click()}}}}(t)}),w.events.$on(l,"click",".fr-file-delete-button",function(e){X(parseInt(this.id.split("-").pop()))}),w.events.$on(l,"click",".fr-file-cancel-upload-button",function(e){!function a(e){var t=w.popups.get("filesManager.insert");t.find(".fr-file-item-right-"+e).get(0).innerHTML=Ee(e),C.get(e).abort(),ye(e,100,!0),t.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))}),w.events.$on(l,"click",".fr-upload-delete-button",function(e){!function t(e){0!=C.get(e).readyState&&(C.get(e).abort(),ye(e,100,!0),C["delete"](e)),X(e)}(parseInt(this.id.split("-").pop()))}),w.events.$on(l,"click",".fr-file-view-close",function(e){l.find(".fr-file-view-modal").get(0).outerHTML=""}),w.events.$on(l,"click",".fr-plugins-enable",function(e){!function t(){h.forEach(function(e){w.opts.pluginsEnabled.indexOf(e)<0&&w.opts.pluginsEnabled.push(e)})}(),function a(e){for(var t in e)if(!w[t]){if(It.PLUGINS[t]&&w.opts.pluginsEnabled.indexOf(t)<0)continue;w[t]=new e[t](w),w[t]._init&&w[t]._init()}}(It.PLUGINS),w.popups.get("filesManager.insert").get(0).outerHTML="",We(),E(!0)}),w.events.$on(l,"click",".fr-plugins-cancel",function(e){w.popups.hide("filesManager.insert")}),w.events.$on(l,"drop",".fr-upload-progress",function(e){e.preventDefault(),e.stopPropagation()}),w.events.$on(l,"drop",".fr-files-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),_(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=l.data("instance")||w;a.events.disableBlur();for(var n=[],i=0;i<t.files.length;i++){var r=g;L.set(r,t.files[i]),me(r),x.set(r,!1),n.push(r),g++}for(var o=0;o<n.length;o++)a.filesManager.upload(L.get(n[o]),t.files,y,n[o]);a.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(l,"touchstart",'.fr-files-upload-layer input[type="file"]',function(){_(this).trigger("click")},!0),w.events.$on(l,"change",'.fr-files-upload-layer input[type="file"]',function(){if(this.files){var e=l.data("instance")||w;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;L.set(n,this.files[a]),me(n),x.set(n,!1),++g,t.push(n)}for(var i=0;i<t.length;i++)e.filesManager.upload(L.get(t[i]),this.files,y,t[i])}}_(this).val("")},!0)}function Me(t){document.getElementById("fr-file-autoplay-button-"+t).checked?O.push(t):O=O.filter(function(e){return e!=t})}function Be(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 Pe(e){return e&&"video"===e.split("/")[0]}function Ue(e){return e&&"audio"===e.split("/")[0]}function He(e){var t="audio/ogg",a="video/ogg";if(e==t||e==a||"image/webp"==e||"video/webm"==e){if(w.browser.msie||w.browser.edge||w.browser.safari)return!1;if(w.helpers.isMobile()){if(e==t||e==a)return!1;if(!w.helpers.isAndroid()&&!w.browser.chrome)return!1}}return!0}function We(e){if(e)return w.popups.onRefresh("filesManager.insert",b),w.popups.onHide("filesManager.insert",H),!0;var t,a,n="";w.opts.imageUpload||-1===w.opts.filesInsertButtons.indexOf("filesUpload")||w.opts.imageInsertButtons.splice(w.opts.filesInsertButtons.indexOf("filesUpload"),1);var i=w.button.buildList(w.opts.filesInsertButtons),r=w.button.buildList(w.opts.filesInsertButtons2);""!==i&&(n='<div class="fr-buttons fr-tabs">'.concat(i,'<span class="fr-align-right">').concat(r,"</span></div>"));var o=w.opts.filesInsertButtons.indexOf("filesUpload"),s=w.opts.filesInsertButtons.indexOf("filesByURL"),l=w.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(w.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="decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(w.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(w.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(w.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="insertEmbed" tabIndex="2" role="button">').concat(w.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(w.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-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="filesInsertByURL" tabIndex="2" role="button">').concat(w.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(w.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<=w.opts.imageInsertButtons.length&&(a=w.popups.create("filesManager.insert",p)),w.$wp&&w.events.$on(w.$wp,"scroll",function(){y&&w.popups.isVisible("filesManager.insert")&&replace()}),De(a),w.popups.setPopupDimensions(a),a}function Ke(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 $e(){y&&w.popups.get("image.alt").find("input").val(y.attr("alt")||"").trigger("change")}function ze(){var e=w.popups.get("image.alt");e||(e=Ge()),Z(),w.popups.refresh("image.alt"),w.popups.setContainer("image.alt",w.$sc);var t=dt();ft()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();w.popups.show("image.alt",a,n,t.outerHeight(),!0)}function Ge(e){if(e)return w.popups.onRefresh("image.alt",$e),!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")&&ze()}),a}function Ye(){var e=w.popups.get("image.size");if(y)if(ft()){var t=y.parent();t.get(0).style.width||(t=y.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(y.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(y.get(0).style.height).trigger("change")}function Ve(){var e=w.popups.get("image.size");e||(e=je()),Z(),w.popups.refresh("image.size"),w.popups.setContainer("image.size",w.$sc);var t=dt();ft()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();w.popups.show("image.size",a,n,t.outerHeight(),!0)}function je(e){if(e)return w.popups.onRefresh("image.size",Ye),!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")&&Ve()}),a}function qe(e,t,a,n){return e.pageX=t,z.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 Xe(e){(e=e||dt())&&!1!==w.events.trigger("image.beforeRemove",[e])&&(w.popups.hideAll(),it(!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(It.MARKERS),_(e.get(0).parentNode).remove()):(w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0))||e.after(It.MARKERS),e.remove()),w.html.fillEmptyBlocks(),w.selection.restore()),w.undo.saveStep())}function Qe(e){var t=e.which;if(y&&(t==It.KEYCODE.BACKSPACE||t==It.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),Xe(),!1;if(y&&t==It.KEYCODE.ESC){var a=y;return it(!0),w.selection.setAfter(a.get(0)),w.selection.restore(),e.preventDefault(),!1}if(!y||t!=It.KEYCODE.ARROW_LEFT&&t!=It.KEYCODE.ARROW_RIGHT)return y&&t===It.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),it(!0),!1):y&&t!=It.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=y.get(0);return it(!0),t==It.KEYCODE.ARROW_LEFT?w.selection.setBefore(n):w.selection.setAfter(n),w.selection.restore(),e.preventDefault(),!1}function Je(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"),i=0;i<n.length;i++)Je(n[i])}function Ze(e){if(!1===w.events.trigger("image.beforePasteUpload",[e]))return!1;y=_(e),W(),replace(),J(),y.on("load",function(){var t=[];W(),_(w.popups.get("filesManager.insert").get(0)).find("div.fr-active.fr-error").length<1&&J(),_(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&_(this).off("load")});for(var t=_(e).attr("src").split(","),a=atob(t[1]),n=[],i=0;i<a.length;i++)n.push(a.charCodeAt(i));Fe([new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],y)}function et(){w.opts.imagePaste?w.$el.find("img[data-fr-image-pasted]").each(function(e,n){if(w.opts.imagePasteProcess){var t=w.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=w.opts.imageResizeWithPercent?"%":"px"),_(n).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),lt(_(n),w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign)}if(0===n.src.indexOf("data:"))Ze(n);else if(0===n.src.indexOf("blob:")||0===n.src.indexOf("http")&&w.opts.imageUploadRemoteUrls&&w.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=w.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){Ze(n)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",n.src=t.toDataURL("image/".concat(e))},a.src=(0===n.src.indexOf("blob:")?"":"".concat(w.opts.imageCORSProxy,"/"))+n.src}else 0!==n.src.indexOf("http")||0===n.src.indexOf("https://mail.google.com/mail")?(w.selection.save(),_(n).remove(),w.selection.restore()):_(n).removeAttr("data-fr-image-pasted")}):w.$el.find("img[data-fr-image-pasted]").remove()}function tt(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&&lt(n,w.opts.imageDefaultDisplay,w.opts.imageDefaultAlign),w.events.trigger("paste.after")}function at(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function n(e){var t=new FileReader;t.onload=tt,t.readAsDataURL(e)}(t),!1}}function nt(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function it(e){y&&(function t(){return rt}()||!0===e)&&(w.toolbar.enable(),l&&l.removeClass("fr-active"),w.popups.hide("image.edit"),y=null,st(),c=null,d&&d.hide())}var rt=!1;function ot(){rt=!0}function st(){rt=!1}function lt(e,t,a){!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]))):"inline"==t?(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"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(w.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"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 ct(){return y}function dt(){return ft()?y.parents(".fr-img-caption").first():y}function ft(){return!!y&&0<y.parents(".fr-img-caption").length}return{_init:function pt(){var n;(function e(){w.helpers.isMobile()&&w.events.$on(_(w.o_win),"orientationchange",function(){setTimeout(function(){E(!0)},100)}),w.events.$on(w.$el,w._mousedown,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==_(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){w.toolbar.hide(),e.stopPropagation()}),w.events.$on(w.$el,w._mouseup,"IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==_(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?Ce(_(t)):a&&"IMG"==a.tagName&&Ce(_(a))}},!0),w.events.on("window.mousedown",ot),w.events.on("window.touchmove",st),w.events.on("mouseup window.mouseup",function(){if(y)return it(),!1;st()}),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&it()}),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(){it(!(t=!1))}),w.events.on("modals.hide",function(){y&&w.selection.clear()}),w.events.on("image.resizeEnd",function(){w.win.getSelection&&Ce(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===It.ENTER_BR?e.after("<br>"):_(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.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","IMG"==w.el.tagName?null:'img:not([contenteditable="false"])',function(){de=!1}),w.events.$on(w.$el,"touchmove",function(){de=!0})),w.$wp?(w.events.on("window.keydown keydown",Qe,!0),w.events.on("keyup",function(e){if(y&&e.which==It.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=_(e).parents(".fr-img-caption").get(0)),w.node.hasClass(e,"fr-img-caption")&&(_(e).after(It.INVISIBLE_SPACE+It.MARKERS),w.selection.restore()))})):w.events.$on(w.$win,"keydown",Qe),w.events.on("toolbar.esc",function(){if(y){if(w.$wp)w.events.disableBlur(),w.events.focus();else{var e=y;it(!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=dt();ft()?(t.before(It.START_MARKER),t.after(It.END_MARKER),w.selection.restore(),w.paste.saveCopiedText(t.get(0).outerHTML,t.text())):w.paste.saveCopiedText(y.get(0).outerHTML,y.attr("alt")),"copy"==e.type?setTimeout(function(){Ce(y)}):(it(!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==It.KEYCODE.C&&w.keys.ctrlKey(e)?w.events.trigger("window.copy"):t==It.KEYCODE.X&&w.keys.ctrlKey(e)&&w.events.trigger("window.cut")}),w.events.$on(_(w.o_win),"keydown",function(e){var t=e.which;if(y&&t==It.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),w.events.$on(w.$win,"keydown",function(e){var t=e.which;y&&y.hasClass("fr-uploading")&&t==It.KEYCODE.ESC&&y.trigger("abortUpload")}),w.events.on("destroy",function(){y&&y.hasClass("fr-uploading")&&y.trigger("abortUpload")}),w.events.on("paste.before",at),w.events.on("paste.beforeCleanup",nt),w.events.on("paste.after",et),w.events.on("html.processGet",Je),w.opts.imageOutputSize&&w.events.on("html.beforeGet",function(){n=w.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=n[e].style.width||_(n[e]).width(),a=n[e].style.height||_(n[e]).height();t&&n[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&n[e].setAttribute("height","".concat(a).replace(/px/,""))}}),w.opts.iframe&&w.events.on("image.loaded",w.size.syncIframe),w.events.$on(_(w.o_win),"orientationchange.image",function(){setTimeout(function(){y&&Ce(y)},100)}),function i(e){if(e)return w.$wp&&w.events.$on(w.$wp,"scroll.image-edit",function(){y&&w.popups.isVisible("image.edit")&&w.events.disableBlur()}),!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}(!0),We(!0),je(!0),Ge(!0),w.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return Xe(e),!1}),w.events.on("popups.hide.filesManager.insert",function(e){w.filesManager.minimizePopup(S)})},showInsertPopup:E,showLayer:function ut(e){var t,a,n=w.popups.get("filesManager.insert");if(y||w.opts.toolbarInline){if(y){var i=dt();ft()&&(i=i.find(".fr-img-wrap")),a=i.offset().top+i.outerHeight(),t=i.offset().left}}else{var r=w.$tb.find('.fr-command[data-cmd="insertFiles"]');t=r.offset().left,a=r.offset().top+(w.opts.toolbarBottom?10:r.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"),n.find(".fr-upload-progress-layer").addClass("fr-active"),w.popups.show("filesManager.insert",t,a,y?y.outerHeight():0),w.accessibility.focusPopup(n)},refreshUploadButton:function gt(e){var t=w.popups.get("filesManager.insert");t&&t.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function ht(e){var t=w.popups.get("filesManager.insert");t&&t.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Fe,insertByURL:function mt(){for(var e,t=w.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),a=t.val().trim().split(/[ ,]+/),n=[],i=0,r=0;r<a.length;r++)e=a[r],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[i]=a[r],i++);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&&Te(s,l);else{Z(),J(),ee(w.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)),w.helpers.isURL(e))for(var a=0;a<It.VIDEO_PROVIDERS.length;a++){var n=It.VIDEO_PROVIDERS[a];if(n.test_regex.test(e)&&new RegExp(w.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 i={link:n,name:n,type:"video/url",size:2,video:t};L.set(c+a,i),me(c+a),Z(),J(),ee(w.language.translate("Loading file(s)")),I.set(c+a,i),++g==c+d&&Te(s,l)}else{var r=new XMLHttpRequest;r.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=Ke(n),e.link=n,Be(this.response.type)?(e.sanitize=!0,e.existing_image=y):Ne(this.response.type)&&(e.text=Ke(n)),s.push(e),l.push(c+a),L.set(c+a,e),me(c+a),(-1<U.indexOf(Le(e))||!Le(e))&&j(N,null,null,c+a)}else{var t=new Blob([this.response],{type:this.response.type||" "});t.name=Ke(n),t.link=n,L.set(c+a,t),me(c+a),j(F,this.response,y,c+a)}Z(),J(),ee(w.language.translate("Loading file(s)")),++g==c+d&&Te(s,l)},r.onerror=function(){var e={link:n,name:Ke(n),size:0,type:""};j(9,this.response,y,c+a);var t=g;L.set(t,e),me(t),Z(),J(),ee(w.language.translate("Loading file(s)")),++g==c+d&&Te(s,l)},r.open("GET","".concat(w.opts.imageCORSProxy,"/").concat(n),!0),r.responseType="blob",r.send()}}}),t.val(""),t.blur()}}else te(w.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function vt(){i=[];var e=w.popups.get("filesManager.insert");u=-1,f=null,e.find(".fr-insert-checkbox").toArray().forEach(function n(e,t,a){e.children.target.checked&&(i.push(parseInt(e.id.split("-").pop())),Be(I.get(parseInt(e.id.split("-").pop())).type)&&-1==u&&(u=t))}),Se(i),q()},deleteAllFiles:function e(){w.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach(function i(e,t,a){if(e.children.target.checked){var n=parseInt(e.id.split("-").pop());C.has(n)&&C["delete"](n),X(n)}}),q()},get:ct,getEl:dt,insert:Ie,showProgressBar:J,remove:Xe,hideProgressBar:Z,applyStyle:function bt(e,t,a){if(void 0===t&&(t=w.opts.imageStyles),void 0===a&&(a=w.opts.imageMultipleStyles),!y)return!1;var n=dt();if(!a){var i=Object.keys(t);i.splice(i.indexOf(e),1),n.removeClass(i.join(" "))}"object"==xt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),Ce(y)},showAltPopup:ze,showSizePopup:Ve,setAlt:function Et(e){if(y){var t=w.popups.get("image.alt");y.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),Ce(y)}},setSize:function At(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",""),ft()&&(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(),Ce(y)}},toggleCaption:function yt(){var e;if(y&&!ft()){(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 i=n.find("li").length,r=y.parents("li"),o=document.createElement("li");i-1===r.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=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><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),y.after('<span class="fr-inner"'.concat(w.browser.mozilla?"":' contenteditable="true"',">").concat(It.START_MARKER).concat(w.language.translate("Image Caption")).concat(It.END_MARKER,"</span>")),y.removeAttr("class").removeAttr("style").removeAttr("width"),y.parents(".fr-img-caption").css("width",s),it(!0),w.selection.restore()}else e=dt(),y.insertAfter(e),y.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Ce(y)},refreshEmbedButton:function Tt(e){var t=w.popups.get("filesManager.insert");t&&t.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function Ct(e){void 0===e&&(e=w.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!It.VIDEO_EMBED_REGEX.test(e)&&!It.IMAGE_EMBED_REGEX.test(e)?(te(w.language.translate("Something went wrong. Please try again.")),It.VIDEO_EMBED_REGEX.test(e)&&w.events.trigger("video.codeError",[e])):xe(e)},hasCaption:ft,exitEdit:it,edit:Ce,cancelFileInsert:function Rt(){this.file_manager_dialog_open=!1,C.forEach(function(e,t){4!=e.readyState&&(e.abort(),X(t))});var e=w.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"),r=0,C=new Map,R=new Map,Q(),w.popups.hide("filesManager.insert")},minimizePopup:function wt(e){this.file_manager_dialog_open=!1,w.popups.hide("filesManager.insert"),Q()},editImage:_e,saveImage:function St(e){var t=I.get(o);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),I.set(o,t)},_showErrorMessage:te,_showFileErrorMessage:ae,getFileThumbnail:be,deleteFile:X,checkAutoplay:Me,checkInsertAllState:q,_disableInsertCheckbox:V,_getFileType:Le,isChildWindowOpen:function _t(){return p},setChildWindowState:function Lt(e){e!==undefined&&(p=e)},resetAllFilesCheckbox:Q}},It.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),It.RegisterShortcut(It.KEYCODE.P,"insertFiles",null,"P"),It.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"}),It.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),It.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),It.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)}}),It.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),It.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)}}),It.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),It.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)}}),It.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),It.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),It.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),It.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),It.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),It.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),It.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),It.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)}}),It.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),It.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),It.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),It.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")}}),It.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}}),It.PLUGINS.cryptoJSPlugin=function(e){var t,d,a,n,i,r,o,f,s,l,c,p,u,g,h,v,m,b,E,A,y,T,C,R,w,S,_,L,I,x,k,O,F,D,M,B,N,P,U,H,W,K,$,z,G,Y,V,j,q,X,Q,J,Z,ee,te,ae,ne,ie,re,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}}(),i={},r=i.lib={},o=r.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=r.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,i=e.sigBytes;if(this.clamp(),n%4)for(var r=0;r<i;r++){var o=a[r>>>2]>>>24-r%4*8&255;t[n+r>>>2]|=o<<24-(n+r)%4*8}else for(r=0;r<i;r+=4)t[n+r>>>2]=a[r>>>2];return this.sigBytes+=i,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=i.enc={},l=s.Hex={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],i=0;i<a;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).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=[],i=0;i<a;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(r))}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=r.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,i=a.sigBytes,r=this.blockSize,o=i/(4*r),s=(o=e?d.ceil(o):d.max((0|o)-this._minBufferSize,0))*r,l=d.min(4*s,i);if(s){for(var c=0;c<s;c+=r)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=(r.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)}}}),i.algo={});return i}(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 i=[],r=0;r<a;r+=3)for(var o=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s<a;s++)i.push(n.charAt(o>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<a.length;i++)n[a.charCodeAt(i)]=i}var r=a.charAt(64);if(r){var o=e.indexOf(r);-1!==o&&(t=o)}return function c(e,t,a){for(var n=[],i=0,r=0;r<t;r++)if(r%4){var o=a[e.charCodeAt(r-1)]<<r%4*2,s=a[e.charCodeAt(r)]>>>6-r%4*2,l=o|s;n[i>>>2]|=l<<24-i%4*8,i++}return d.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(d){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,i=e.algo,S=[];!function(){for(var e=0;e<64;e++)S[e]=4294967296*d.abs(d.sin(e+1))|0}();var r=i.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,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var r=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],A=e[t+14],y=e[t+15],T=r[0],C=r[1],R=r[2],w=r[3];C=x(C=x(C=x(C=x(C=I(C=I(C=I(C=I(C=L(C=L(C=L(C=L(C=_(C=_(C=_(C=_(C,R=_(R,w=_(w,T=_(T,C,R,w,o,7,S[0]),C,R,s,12,S[1]),T,C,l,17,S[2]),w,T,c,22,S[3]),R=_(R,w=_(w,T=_(T,C,R,w,d,7,S[4]),C,R,f,12,S[5]),T,C,p,17,S[6]),w,T,u,22,S[7]),R=_(R,w=_(w,T=_(T,C,R,w,g,7,S[8]),C,R,h,12,S[9]),T,C,m,17,S[10]),w,T,v,22,S[11]),R=_(R,w=_(w,T=_(T,C,R,w,b,7,S[12]),C,R,E,12,S[13]),T,C,A,17,S[14]),w,T,y,22,S[15]),R=L(R,w=L(w,T=L(T,C,R,w,s,5,S[16]),C,R,p,9,S[17]),T,C,v,14,S[18]),w,T,o,20,S[19]),R=L(R,w=L(w,T=L(T,C,R,w,f,5,S[20]),C,R,m,9,S[21]),T,C,y,14,S[22]),w,T,d,20,S[23]),R=L(R,w=L(w,T=L(T,C,R,w,h,5,S[24]),C,R,A,9,S[25]),T,C,c,14,S[26]),w,T,g,20,S[27]),R=L(R,w=L(w,T=L(T,C,R,w,E,5,S[28]),C,R,l,9,S[29]),T,C,u,14,S[30]),w,T,b,20,S[31]),R=I(R,w=I(w,T=I(T,C,R,w,f,4,S[32]),C,R,g,11,S[33]),T,C,v,16,S[34]),w,T,A,23,S[35]),R=I(R,w=I(w,T=I(T,C,R,w,s,4,S[36]),C,R,d,11,S[37]),T,C,u,16,S[38]),w,T,m,23,S[39]),R=I(R,w=I(w,T=I(T,C,R,w,E,4,S[40]),C,R,o,11,S[41]),T,C,c,16,S[42]),w,T,p,23,S[43]),R=I(R,w=I(w,T=I(T,C,R,w,h,4,S[44]),C,R,b,11,S[45]),T,C,y,16,S[46]),w,T,l,23,S[47]),R=x(R,w=x(w,T=x(T,C,R,w,o,6,S[48]),C,R,u,10,S[49]),T,C,A,15,S[50]),w,T,f,21,S[51]),R=x(R,w=x(w,T=x(T,C,R,w,b,6,S[52]),C,R,c,10,S[53]),T,C,m,15,S[54]),w,T,s,21,S[55]),R=x(R,w=x(w,T=x(T,C,R,w,g,6,S[56]),C,R,y,10,S[57]),T,C,p,15,S[58]),w,T,E,21,S[59]),R=x(R,w=x(w,T=x(T,C,R,w,d,6,S[60]),C,R,v,10,S[61]),T,C,l,15,S[62]),w,T,h,21,S[63]),r[0]=r[0]+T|0,r[1]=r[1]+C|0,r[2]=r[2]+R|0,r[3]=r[3]+w|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 i=d.floor(a/4294967296),r=a;t[15+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>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 _(e,t,a,n,i,r,o){var s=e+(t&a|~t&n)+i+o;return(s<<r|s>>>32-r)+t}function L(e,t,a,n,i,r,o){var s=e+(t&n|a&~n)+i+o;return(s<<r|s>>>32-r)+t}function I(e,t,a,n,i,r,o){var s=e+(t^a^n)+i+o;return(s<<r|s>>>32-r)+t}function x(e,t,a,n,i,r,o){var s=e+(a^(t|~n))+i+o;return(s<<r|s>>>32-r)+t}e.MD5=n._createHelper(r),e.HmacMD5=n._createHmacHelper(r)}(Math),n=(a=ve).lib,i=n.WordArray,r=n.Hasher,o=a.algo,f=[],s=o.SHA1=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],i=a[1],r=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+(i&r|~i&o):l<40?1859775393+(i^r^o):l<60?(i&r|i&o|r&o)-1894007588:(i^r^o)-899497514,s=o,o=r,r=i<<30|i>>>2,i=n,n=d}a[0]=a[0]+n|0,a[1]=a[1]+i|0,a[2]=a[2]+r|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=r.clone.call(this);return e._hash=this._hash.clone(),e}}),a.SHA1=r._createHelper(s),a.HmacSHA1=r._createHmacHelper(s),function(i){var e=ve,t=e.lib,a=t.WordArray,n=t.Hasher,r=e.algo,o=[],E=[];!function(){function e(e){for(var t=i.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(i.pow(a,.5))),E[n]=t(i.pow(a,1/3)),n++),a++}();var A=[],s=r.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],i=a[1],r=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)A[f]=0|e[t+f];else{var p=A[f-15],u=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=A[f-2],h=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;A[f]=u+A[f-7]+h+A[f-16]}var m=n&i^n&r^i&r,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]+A[f];d=c,c=l,l=s,s=o+b|0,o=r,r=i,i=n,n=b+(v+m)|0}a[0]=a[0]+n|0,a[1]=a[1]+i|0,a[2]=a[2]+r|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)]=i.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,i=e.lib.WordArray,t=e.enc;t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],i=0;i<a;i+=2){var r=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(r))}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 i.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=[],i=0;i<a;i+=2){var r=o(t[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(r))}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 i.create(a,2*t)}}}(),function(){if("function"==typeof ArrayBuffer){var e=ve.lib.WordArray,i=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;i.call(this,a,t)}else i.apply(this,arguments)}).prototype=e}}(),function(e){var t=ve,a=t.lib,n=a.WordArray,i=a.Hasher,r=t.algo,C=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]),R=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]),w=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]),_=n.create([0,1518500249,1859775393,2400959708,2840853838]),L=n.create([1352829926,1548603684,1836072691,2053994217,0]),o=r.RIPEMD160=i.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,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var r,o,s,l,c,d,f,p,u,g,h,m=this._hash.words,v=_.words,b=L.words,E=C.words,A=R.words,y=w.words,T=S.words;d=r=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=r+e[t+E[a]]|0,h+=a<16?I(o,s,l)+v[0]:a<32?x(o,s,l)+v[1]:a<48?k(o,s,l)+v[2]:a<64?O(o,s,l)+v[3]:F(o,s,l)+v[4],h=(h=D(h|=0,y[a]))+c|0,r=c,c=l,l=D(s,10),s=o,o=h,h=d+e[t+A[a]]|0,h+=a<16?F(f,p,u)+b[0]:a<32?O(f,p,u)+b[1]:a<48?k(f,p,u)+b[2]:a<64?x(f,p,u)+b[3]:I(f,p,u)+b[4],h=(h=D(h|=0,T[a]))+g|0,d=g,g=u,u=D(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]+r+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 i=this._hash,r=i.words,o=0;o<5;o++){var s=r[o];r[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function e(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function I(e,t,a){return e^t^a}function x(e,t,a){return e&t|~e&a}function k(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 D(e,t){return e<<t|e>>>32-t}t.RIPEMD160=i._createHelper(o),t.HmacRIPEMD160=i._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 i=this._oKey=t.clone(),r=this._iKey=t.clone(),o=i.words,s=r.words,l=0;l<a;l++)o[l]^=1549556828,s[l]^=909522486;i.sigBytes=r.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,A=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),i=v.create(),r=v.create([1]),o=i.words,s=r.words,l=a.keySize,c=a.iterations;o.length<l;){var d=n.update(t).finalize(r);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]}i.concat(d),s[0]++}return i.sigBytes=4*l,i}}),u.PBKDF2=function(e,t,a){return A.create(a).compute(e,t)},T=(y=ve).lib,C=T.Base,R=T.WordArray,w=y.algo,S=w.MD5,_=w.EvpKDF=C.extend({cfg:C.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,i=n.hasher.create(),r=R.create(),o=r.words,s=n.keySize,l=n.iterations;o.length<s;){a&&i.update(a),a=i.update(e).finalize(t),i.reset();for(var c=1;c<l;c++)a=i.finalize(a),i.reset();r.concat(a)}return r.sigBytes=4*s,r}}),y.EvpKDF=function(e,t,a){return _.create(a).compute(e,t)},I=(L=ve).lib.WordArray,x=L.algo,k=x.SHA256,O=x.SHA224=k.extend({_doReset:function(){this._hash=new I.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=k._doFinalize.call(this);return e.sigBytes-=4,e}}),L.SHA224=k._createHelper(O),L.HmacSHA224=k._createHmacHelper(O),D=(F=ve).lib,M=D.Base,B=D.WordArray,(N=F.x64={}).Word=M.extend({init:function(e,t){this.high=e,this.low=t}}),N.WordArray=M.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 i=e[n];a.push(i.high),a.push(i.low)}return B.create(a,this.sigBytes)},clone:function e(){for(var e=M.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,I=[],x=[],k=[];!function(){for(var e=1,t=0,a=0;a<24;a++){I[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 i=1,r=0;r<24;r++){for(var o=0,s=0,l=0;l<7;l++){if(1&i){var c=(1<<l)-1;c<32?s^=1<<c:o^=1<<c-32}128&i?i=i<<1^113:i<<=1}k[r]=d.create(o,s)}}();var O=[];!function(){for(var e=0;e<25;e++)O[e]=d.create()}();var i=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,i=0;i<n;i++){var r=e[t+2*i],o=e[t+2*i+1];r=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(R=a[i]).high^=o,R.low^=r}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^=(R=a[l+5*f]).high,d^=R.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++){(R=a[l+5*f]).high^=c,R.low^=d}}for(var v=1;v<25;v++){var b=(R=a[v]).high,E=R.low,A=I[v];d=A<32?(c=b<<A|E>>>32-A,E<<A|b>>>32-A):(c=E<<A-32|b>>>64-A,b<<A-32|E>>>64-A);var y=O[x[v]];y.high=c,y.low=d}var T=O[0],C=a[0];T.high=C.high,T.low=C.low;for(l=0;l<5;l++)for(f=0;f<5;f++){var R=a[v=l+5*f],w=O[v],S=O[(l+1)%5+5*f],_=O[(l+2)%5+5*f];R.high=w.high^~S.high&_.high,R.low=w.low^~S.low&_.low}R=a[0];var L=k[s];R.high^=L.high,R.low^=L.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 i=this._state,r=this.cfg.outputLength/8,o=r/8,s=[],l=0;l<o;l++){var c=i[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,r)},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(i),e.HmacSHA3=n._createHmacHelper(i)}(Math),function(){var e=ve,t=e.lib.Hasher,a=e.x64,n=a.Word,i=a.WordArray,r=e.algo;function o(){return n.create.apply(n,arguments)}var Ce=[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)],Re=[];!function(){for(var e=0;e<80;e++)Re[e]=o()}();var s=r.SHA512=t.extend({_doReset:function(){this._hash=new i.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],i=a[1],r=a[2],o=a[3],s=a[4],l=a[5],c=a[6],d=a[7],f=n.high,p=n.low,u=i.high,g=i.low,h=r.high,m=r.low,v=o.high,b=o.low,E=s.high,A=s.low,y=l.high,T=l.low,C=c.high,R=c.low,w=d.high,S=d.low,_=f,L=p,I=u,x=g,k=h,O=m,F=v,D=b,M=E,B=A,N=y,P=T,U=C,H=R,W=w,K=S,$=0;$<80;$++){var z,G,Y=Re[$];if($<16)G=Y.high=0|e[t+2*$],z=Y.low=0|e[t+2*$+1];else{var V=Re[$-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),J=Re[$-2],Z=J.high,ee=J.low,te=(Z>>>19|ee<<13)^(Z<<3|ee>>>29)^Z>>>6,ae=(ee>>>19|Z<<13)^(ee<<3|Z>>>29)^(ee>>>6|Z<<26),ne=Re[$-7],ie=ne.high,re=ne.low,oe=Re[$-16],se=oe.high,le=oe.low;G=(G=(G=X+ie+((z=Q+re)>>>0<Q>>>0?1:0))+te+((z+=ae)>>>0<ae>>>0?1:0))+se+((z+=le)>>>0<le>>>0?1:0),Y.high=G,Y.low=z}var ce,de=M&N^~M&U,fe=B&P^~B&H,pe=_&I^_&k^I&k,ue=L&x^L&O^x&O,ge=(_>>>28|L<<4)^(_<<30|L>>>2)^(_<<25|L>>>7),he=(L>>>28|_<<4)^(L<<30|_>>>2)^(L<<25|_>>>7),me=(M>>>14|B<<18)^(M>>>18|B<<14)^(M<<23|B>>>9),ve=(B>>>14|M<<18)^(B>>>18|M<<14)^(B<<23|M>>>9),be=Ce[$],Ee=be.high,Ae=be.low,ye=W+me+((ce=K+ve)>>>0<K>>>0?1:0),Te=he+ue;W=U,K=H,U=N,H=P,N=M,P=B,M=F+(ye=(ye=(ye=ye+de+((ce=ce+fe)>>>0<fe>>>0?1:0))+Ee+((ce=ce+Ae)>>>0<Ae>>>0?1:0))+G+((ce=ce+z)>>>0<z>>>0?1:0))+((B=D+ce|0)>>>0<D>>>0?1:0)|0,F=k,D=O,k=I,O=x,I=_,x=L,_=ye+(ge+pe+(Te>>>0<he>>>0?1:0))+((L=ce+Te|0)>>>0<ce>>>0?1:0)|0}p=n.low=p+L,n.high=f+_+(p>>>0<L>>>0?1:0),g=i.low=g+x,i.high=u+I+(g>>>0<x>>>0?1:0),m=r.low=m+O,r.high=h+k+(m>>>0<O>>>0?1:0),b=o.low=b+D,o.high=v+F+(b>>>0<D>>>0?1:0),A=s.low=A+B,s.high=E+M+(A>>>0<B>>>0?1:0),T=l.low=T+P,l.high=y+N+(T>>>0<P>>>0?1:0),R=c.low=R+H,c.high=C+U+(R>>>0<H>>>0?1:0),S=d.low=S+K,d.high=w+W+(S>>>0<K>>>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,W=U.WordArray,K=P.algo,$=K.SHA512,z=K.SHA384=$.extend({_doReset:function(){this._hash=new W.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=$._doFinalize.call(this);return e.sigBytes-=16,e}}),P.SHA384=$._createHelper(z),P.HmacSHA384=$._createHmacHelper(z),ve.lib.Cipher||(Y=(G=ve).lib,V=Y.Base,j=Y.WordArray,q=Y.BufferedBlockAlgorithm,(X=G.enc).Utf8,Q=X.Base64,J=G.algo.EvpKDF,Z=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 i(e){return"string"==typeof e?le:oe}return function(n){return{encrypt:function(e,t,a){return i(t).encrypt(n,e,t,a)},decrypt:function(e,t,a){return i(t).decrypt(n,e,t,a)}}}}()}),Y.StreamCipher=Z.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 r(e,t,a){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var r=0;r<a;r++)e[t+r]^=n[r]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;r.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,i=e.slice(t,t+n);a.decryptBlock(e,t),r.call(this,e,t,n),this._prevBlock=i}}),e}(),ne=(G.pad={}).Pkcs7={pad:function(e,t){for(var a=4*t,n=a-e.sigBytes%a,i=n<<24|n<<16|n<<8|n,r=[],o=0;o<n;o+=4)r.push(i);var s=j.create(r,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},Y.BlockCipher=Z.extend({cfg:Z.cfg.extend({mode:ae,padding:ne}),reset:function(){var e;Z.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}),ie=Y.CipherParams=V.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),re=(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),ie.create({ciphertext:a,salt:t})}},oe=Y.SerializableCipher=V.extend({cfg:V.extend({format:re}),encrypt:function(e,t,a,n){n=this.cfg.extend(n);var i=e.createEncryptor(a,n),r=i.finalize(t),o=i.cfg;return ie.create({ciphertext:r,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 i=J.create({keySize:t+a}).compute(e,n),r=j.create(i.words.slice(t),4*a);return i.sigBytes=4*t,ie.create({key:i,iv:r,salt:n})}},le=Y.PasswordBasedCipher=oe.extend({cfg:oe.cfg.extend({kdf:se}),encrypt:function(e,t,a,n){var i=(n=this.cfg.extend(n)).kdf.execute(a,e.keySize,e.ivSize);n.iv=i.iv;var r=oe.encrypt.call(this,e,t,i.key,n);return r.mixIn(i),r},decrypt:function(e,t,a,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(a,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,oe.decrypt.call(this,e,t,i.key,n)}})),ve.mode.CFB=function(){var e=ve.lib.BlockCipherMode.extend();function r(e,t,a,n){var i,r=this._iv;r?(i=r.slice(0),this._iv=undefined):i=this._prevBlock,n.encryptBlock(i,0);for(var o=0;o<a;o++)e[t+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,t){var a=this._cipher,n=a.blockSize;r.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,i=e.slice(t,t+n);r.call(this,e,t,n,a),this._prevBlock=i}}),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,i=n-a%n,r=a+i-1;e.clamp(),e.words[r>>>2]|=i<<24-r%4*8,e.sigBytes+=i},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,i=this._iv,r=this._keystream;i&&(r=this._keystream=i.slice(0),this._iv=undefined),a.encryptBlock(r,0);for(var o=0;o<n;o++)e[t+o]^=r[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 i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,c[a]=i;var r=e[d[i]=a],o=e[r],s=e[o],l=257*e[i]^16843008*i;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*r^16843008*a;h[i]=l<<24|l>>>8,m[i]=l<<16|l>>>16,v[i]=l<<8|l>>>24,b[i]=l,a?(a=r^e[e[e[s^r]]],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),i=this._keySchedule=[],r=0;r<n;r++)r<a?i[r]=t[r]:(l=i[r-1],r%a?6<a&&r%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[r/a|0]<<24),i[r]=i[r-a]^l);for(var o=this._invKeySchedule=[],s=0;s<n;s++){r=n-s;if(s%4)var l=i[r];else l=i[r-4];o[s]=s<4||r<=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,i,r,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]^i[d>>>16&255]^r[f>>>8&255]^o[255&p]^a[u++],m=n[d>>>24]^i[f>>>16&255]^r[p>>>8&255]^o[255&c]^a[u++],v=n[f>>>24]^i[p>>>16&255]^r[c>>>8&255]^o[255&d]^a[u++],b=n[p>>>24]^i[c>>>16&255]^r[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,i=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],r=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 i=this._subKeys=[],r=0;r<16;r++){var o=i[r]=[],s=f[r];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]=i[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 i=a[n],r=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=p[l][((o^i[l])&u[l])>>>0];this._lBlock=o,this._rBlock=r^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(r);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=r.createEncryptor(i.create(t)),this._des2=r.createEncryptor(i.create(a)),this._des3=r.createEncryptor(i.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=[],i=0;i<256;i++)n[i]=i;i=0;for(var r=0;i<256;i++){var o=i%a,s=t[o>>>2]>>>24-o%4*8&255;r=(r+n[i]+s)%256;var l=n[i];n[i]=n[r],n[r]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,a=this._j,n=0,i=0;i<4;i++){a=(a+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[a],e[a]=r,n|=e[(e[t]+e[a])%256]<<24-8*i}return this._i=t,this._j=a,n}e.RC4=t._createHelper(n);var r=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--)i.call(this)}});e.RC4Drop=t._createHelper(r)}(),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,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=undefined),function l(e){return 0===(e[0]=c(e[0]))&&(e[1]=c(e[1])),e}(r);var o=r.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,i=[],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],i=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++)i[a]^=n[a+4&7];if(t){var r=t.words,o=r[0],s=r[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;i[0]^=l,i[1]^=d,i[2]^=c,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=c,i[7]^=f;for(a=0;a<4;a++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),i[0]=a[0]^a[5]>>>16^a[3]<<16,i[1]=a[2]^a[7]>>>16^a[5]<<16,i[2]=a[4]^a[1]>>>16^a[7]<<16,i[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[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],i=65535&n,r=n>>>16,o=((i*i>>>17)+i*r>>>15)+r*r,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,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=undefined);var o=r.slice(0);a.encryptBlock(o,0),r[n-1]=r[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,i=[],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]],i=this._b=0;i<4;i++)p.call(this);for(i=0;i<8;i++)n[i]^=a[i+4&7];if(t){var r=t.words,o=r[0],s=r[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(i=0;i<4;i++)p.call(this)}},_doProcessBlock:function(e,t){var a=this._X;p.call(this),i[0]=a[0]^a[5]>>>16^a[3]<<16,i[1]=a[2]^a[7]>>>16^a[5]<<16,i[2]=a[4]^a[1]>>>16^a[7]<<16,i[3]=a[6]^a[3]>>>16^a[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[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],i=65535&n,r=n>>>16,o=((i*i>>>17)+i*r>>>15)+r*r,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(It.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"}),It.PLUGINS.fontFamily=function(i){var r=i.$;function o(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return r(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(r(i.selection.element()).css("font-family")),t=[];for(var a in i.opts.fontFamily)if(i.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){i.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(i.opts.fontFamilySelection){var t=r(i.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(i.opts.fontFamily[a()]||t[0]||i.language.translate(i.opts.fontFamilyDefaultSelection))}}}},It.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"}),It.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"}),Object.assign(It.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),It.PLUGINS.fontSize=function(n){var i=n.$;return{apply:function t(e){n.format.applyStyle("font-size",e)},refreshOnShow:function r(e,t){var a=i(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(i(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)}}}},It.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"}),It.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"}),Object.assign(It.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(It.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),It.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 i(){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 r(){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,i=a.offset().top+a.outerHeight();o.popups.show("forms.edit",n,i,a.outerHeight())}}function r(){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",r),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",i),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 i=Object.keys(t);i.splice(i.indexOf(e),1),l(n).removeClass(i.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,i=t.offset().top+t.outerHeight();o.popups.show("forms.update",n,i,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))}}},It.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),It.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),It.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 i=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1");a(this).toggleClass("fr-active",i.hasClass(e))})}}}),It.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),It.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),It.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),It.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),It.PLUGINS.fullscreen=function(i){var t,a,n,r,o=i.$,s=function s(){return i.$box.hasClass("fr-fullscreen")};function l(){if(i.helpers.isIOS()&&i.core.hasFocus())return i.$el.blur(),setTimeout(d,250),!1;t=i.helpers.scrollTop(),i.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),i.helpers.isMobile()&&(i.$tb.data("parent",i.$tb.parent()),i.$box.prepend(i.$tb),i.$tb.data("sticky-dummy")&&i.$tb.after(i.$tb.data("sticky-dummy"))),a=i.opts.height,n=i.opts.heightMax,r=i.opts.z_index,i.opts.height=i.o_win.innerHeight-(i.opts.toolbarInline?0:i.$tb.outerHeight()+(i.$second_tb?i.$second_tb.outerHeight():0)),i.opts.zIndex=2147483641,i.opts.heightMax=null,i.size.refresh(),i.opts.toolbarInline&&i.toolbar.showInline();for(var e=i.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();i.opts.toolbarContainer&&i.$box.prepend(i.$tb),i.events.trigger("charCounter.update"),i.events.trigger("codeView.update"),i.$win.trigger("scroll")}function c(){if(i.helpers.isIOS()&&i.core.hasFocus())return i.$el.blur(),setTimeout(d,250),!1;i.$box.toggleClass("fr-fullscreen"),o("body").first().toggleClass("fr-fullscreen"),i.$tb.data("parent")&&i.$tb.data("parent").prepend(i.$tb),i.$tb.data("sticky-dummy")&&i.$tb.after(i.$tb.data("sticky-dummy")),i.opts.height=a,i.opts.heightMax=n,i.opts.zIndex=r,i.size.refresh(),o(i.o_win).scrollTop(t),i.opts.toolbarInline&&i.toolbar.showInline(),i.events.trigger("charCounter.update"),i.opts.toolbarSticky&&i.opts.toolbarStickyOffset&&(i.opts.toolbarBottom?i.$tb.css("bottom",i.opts.toolbarStickyOffset).data("bottom",i.opts.toolbarStickyOffset):i.$tb.css("top",i.opts.toolbarStickyOffset).data("top",i.opts.toolbarStickyOffset));for(var e=i.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();i.opts.toolbarContainer&&o(i.opts.toolbarContainer).append(i.$tb),o(i.o_win).trigger("scroll"),i.events.trigger("codeView.update")}function d(){s()?c():l(),f(i.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=i.$tb.find('.fr-command[data-cmd="moreText"]'),t=i.$tb.find('.fr-command[data-cmd="moreParagraph"]'),a=i.$tb.find('.fr-command[data-cmd="moreRich"]'),n=i.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&i.refresh.moreText(e),t.length&&i.refresh.moreParagraph(t),a.length&&i.refresh.moreRich(a),n.length&&i.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?i.icon.create("fullscreenCompress"):i.icon.create("fullscreen"))}return{_init:function e(){if(!i.$wp)return!1;i.events.$on(o(i.o_win),"resize",function(){s()&&(c(),l())}),i.events.on("toolbar.hide",function(){if(s()&&i.helpers.isMobile())return!1}),i.events.on("position.refresh",function(){if(i.helpers.isIOS())return!s()}),i.events.on("destroy",function(){s()&&c()},!0)},toggle:d,refresh:f,isActive:s}},It.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"}),It.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),It.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"}),Object.assign(It.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"}]}]}),It.PLUGINS.help=function(s){var n,i=s.$,r="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 i=0;i<a.commands.length;i++){var r=a.commands[i];n+="<tr>",n+="<td>".concat(s.language.translate(r.desc),"</td>"),n+="<td>".concat(r.val.replace("OSkey",s.helpers.isMac()?"&#8984;":"Ctrl+"),"</td>"),n+="</tr>"}e+=n+="</tbody></table>"}return e+="</div>"}(),a=s.modals.create(r,e,t);n=a.$modal,s.events.$on(i(s.o_win),"resize",function(){s.modals.resize(r)})}s.modals.show(r),s.modals.resize(r)},hide:function t(){s.modals.hide(r)}}},It.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),It.RegisterShortcut(It.KEYCODE.SLASH,"help",null,"/"),It.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1}),Object.assign(It.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(It.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}),It.PLUGINS.image=function(y){var T,l,c,d,s,a,C=y.$,R="https://i.froala.com/upload",t=!1,n=1,p=2,u=3,g=4,w=5,S=6,i={};function f(){var e=y.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),T&&e.val(T.attr("src")),e.trigger("change")}function r(){var e=y.popups.get("image.edit");if(e||(e=k()),e){var t=Ae();ye()&&(t=t.find(".fr-img-wrap")),y.popups.setContainer("image.edit",y.$sc),y.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();T.hasClass("fr-uploading")?O():y.popups.show("image.edit",a,n,t.outerHeight(),!0)}}function h(){F()}function o(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":he(e);ge(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function m(){for(var e,t="IMG"==y.el.tagName?[y.el]:y.el.querySelectorAll("img"),a=0;a<t.length;a++){var n=C(t[a]);!y.opts.htmlUntouched&&y.opts.useClasses?((y.opts.imageDefaultAlign||y.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(he(e)[0])),e.addClass("fr-di".concat(me(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",""))),y.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"))):y.opts.htmlUntouched||y.opts.useClasses||(y.opts.imageDefaultAlign||y.opts.imageDefaultDisplay)&&o(n),y.opts.iframe&&n.on("load",y.size.syncIframe)}}function v(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(y.el.querySelectorAll("img")),n=[];for(t=0;t<a.length;t++)if(n.push(a[t].getAttribute("src")),C(a[t]).toggleClass("fr-draggable",y.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&&y.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var i=a[t].parentNode.parentNode;y.browser.mozilla||i.setAttribute("contenteditable",!1),i.setAttribute("draggable",!1),i.classList.add("fr-draggable");var r=a[t].nextSibling;r&&!y.browser.mozilla&&r.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)n.indexOf(s[t].getAttribute("src"))<0&&y.events.trigger("image.removed",[C(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&&y.events.trigger("image.loaded",[C(a[t])])}s=a}function _(){if(l||function o(){var e;y.shared.$image_resizer?(l=y.shared.$image_resizer,d=y.shared.$img_overlay,y.events.on("destroy",function(){C("body").first().append(l.removeClass("fr-active"))},!0)):(y.shared.$image_resizer=C(document.createElement("div")).attr("class","fr-image-resizer"),l=y.shared.$image_resizer,y.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),y.opts.imageResize&&(l.append(b("nw")+b("ne")+b("sw")+b("se")),y.shared.$img_overlay=C(document.createElement("div")).attr("class","fr-image-overlay"),d=y.shared.$img_overlay,e=l.get(0).ownerDocument,C(e).find("body").first().append(d)));y.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,y.opts.imageResize&&(d.remove(),d=null)},!0),y.helpers.isMobile()||y.events.$on(C(y.o_win),"resize",function(){T&&!T.hasClass("fr-uploading")?de(!0):T&&(_(),ve(),O(!1))});if(y.opts.imageResize){e=l.get(0).ownerDocument,y.events.$on(l,y._mousedown,".fr-handler",A),y.events.$on(C(e),y._mousemove,L),y.events.$on(C(e.defaultView||e.parentWindow),y._mouseup,I),y.events.$on(d,"mouseleave",I);var n=1,i=null,r=0;y.events.on("keydown",function(e){if(T){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==i||200<e.timeStamp-r)&&(n=1),(a==It.KEYCODE.EQUALS||y.browser.mozilla&&a==It.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=ee.call(this,e,1,1,n):(a==It.KEYCODE.HYPHEN||y.browser.mozilla&&a==It.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=ee.call(this,e,2,-1,n):y.keys.ctrlKey(e)||a!=It.KEYCODE.ENTER||(T.before("<br>"),B(T)),i=a,r=e.timeStamp}},!0),y.events.on("keyup",function(){n=1})}}(),!T)return!1;var e=y.$wp||y.$sc;e.append(l),l.data("instance",y);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=y.helpers.getPX(e.css("border-left-width")),t-=y.helpers.getPX(e.css("border-top-width")),y.$el.is("img")&&y.$sc.is("body")&&(a=t=0);var n=Ae();ye()&&(n=n.find(".fr-img-wrap"));var i=0,r=0;y.opts.iframe&&(i=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-top")),r=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(y.opts.iframe?n.offset().top+i:n.offset().top+t)-1).css("left",(y.opts.iframe?n.offset().left+r:n.offset().left+a)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function b(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function E(e){ye()?T.parents(".fr-img-caption").css("width",e):T.css("width",e)}function A(e){if(!y.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),y.$el.find("img.fr-error").left)return!1;y.undo.canDo()||y.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=y.$oel.get(0).ownerDocument,n=a.defaultView||a.parentWindow,i=!1;try{i=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(s){}i&&n.frameElement&&(t+=y.helpers.getPX(C(n.frameElement).offset().left)+n.frameElement.clientLeft)}(c=C(this)).data("start-x",t),c.data("start-width",T.width()),c.data("start-height",T.height());var r=T.width();if(y.opts.imageResizeWithPercent){var o=T.parentsUntil(y.$el,y.html.blockTagsQuery()).get(0)||y.el;r=(r/C(o).outerWidth()*100).toFixed(2)+"%"}E(r),d.show(),y.popups.hideAll(),ue()}function L(e){if(!y.core.sameInstance(l))return!0;var t;if(c&&T){if(e.preventDefault(),y.$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"),i=c.data("start-width");if((c.hasClass("fr-hnw")||c.hasClass("fr-hsw"))&&(n=0-n),y.opts.imageResizeWithPercent){var r=T.parentsUntil(y.$el,y.html.blockTagsQuery()).get(0)||y.el;i=((i+n)/C(r).outerWidth()*100).toFixed(2),y.opts.imageRoundPercent&&(i=Math.round(i)),E("".concat(i,"%")),(t=ye()?(y.helpers.getPX(T.parents(".fr-img-caption").css("width"))/C(r).outerWidth()*100).toFixed(2):(y.helpers.getPX(T.css("width"))/C(r).outerWidth()*100).toFixed(2))===i||y.opts.imageRoundPercent||E("".concat(t,"%")),T.css("height","").removeAttr("height")}else i+n>=y.opts.imageMinWidth&&(E(i+n),t=ye()?y.helpers.getPX(T.parents(".fr-img-caption").css("width")):y.helpers.getPX(T.css("width"))),t!==i+n&&E(t),((T.attr("style")||"").match(/(^height:)|(; *height:)/)||T.attr("height"))&&(T.css("height",c.data("start-height")*T.width()/c.data("start-width")),T.removeAttr("height"));_(),y.events.trigger("image.resize",[Ee()])}}function I(e){if(!y.core.sameInstance(l))return!0;if(c&&T){if(e&&e.stopPropagation(),y.$el.find("img.fr-error").left)return!1;c=null,d.hide(),_(),r(),y.undo.saveStep(),y.events.trigger("image.resizeEnd",[Ee()])}else l.removeClass("fr-active")}function x(e,t,a){y.edit.on(),T&&T.addClass("fr-error"),i[e]?M(y.language.translate(i[e])):M(y.language.translate("Something went wrong. Please try again.")),!T&&a&&te(a),y.events.trigger("image.error",[{code:e,message:i[e]},t,a])}function k(e){if(e)return y.$wp&&y.events.$on(y.$wp,"scroll.image-edit",function(){T&&y.popups.isVisible("image.edit")&&(y.events.disableBlur(),r())}),!0;var t="";if(0<y.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n        '.concat(y.button.buildList(y.opts.imageEditButtons),"\n        </div>")};return y.popups.create("image.edit",a)}return!1}function O(e){var t=y.popups.get("image.insert");if(t||(t=V()),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(),T){var a=Ae();y.popups.setContainer("image.insert",y.$sc);var n=a.offset().left,i=a.offset().top+a.height();y.popups.show("image.insert",n,i,a.outerHeight())}void 0===e&&D(y.language.translate("Uploading"),0)}function F(e){var t=y.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||y.$el.find("img.fr-error").length)){if(y.events.focus(),y.$el.find("img.fr-error").length&&(y.$el.find("img.fr-error").remove(),y.undo.saveStep(),y.undo.run(),y.undo.dropRedo()),!y.$wp&&T){var a=T;de(!0),y.selection.setAfter(a.get(0)),y.selection.restore()}y.popups.hide("image.insert")}}function D(e,t){var a=y.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 M(e){O();var t=y.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),y.events.disableBlur(),a.focus()}function B(e){ce.call(e.get(0))}function N(){var e=C(this);y.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),B(e),y.events.trigger("image.loaded",[e])}function P(o,e,s,l,c){l&&"string"==typeof l&&(l=y.$(l)),y.edit.off(),D(y.language.translate("Loading image")),e&&(o=y.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){y.undo.canDo()||l.hasClass("fr-uploading")||y.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),y.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var n=e.get(0).attributes,i=0;i<n.length;i++){var r=n[i];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),s[t]);e.on("load",N),e.attr("src",o),y.edit.on(),v(!1),y.undo.saveStep(),y.events.disableBlur(),y.$el.blur(),y.events.trigger(a?"image.replaced":"image.inserted",[e,c])}else e=K(o,s,N),v(!1),y.undo.saveStep(),y.events.disableBlur(),y.$el.blur(),y.events.trigger("image.inserted",[e,c])},t.onerror=function(){x(n)},O(y.language.translate("Loading image")),t.src=o}function U(e,t,a){D(y.language.translate("Loading image"));var n=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(y.opts.imageUploadToS3||y.opts.imageUploadToAzure)if(201==n){var s;if(y.opts.imageUploadToAzure){if(!1===y.events.trigger("image.uploadedToAzure",[this.responseURL,a,i],!0))return y.edit.on(),!1;s=t}else s=function c(e){try{var t=C(e).find("Location").text(),a=C(e).find("Key").text();return!1===y.events.trigger("image.uploadedToS3",[t,a,e],!0)?(y.edit.on(),!1):t}catch(n){return x(g,e),!1}}(r);s&&P(s,!1,[],e,i||r)}else x(g,i||r,e);else if(200<=n&&n<300){var l=function d(e){try{if(!1===y.events.trigger("image.uploaded",[e],!0))return y.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(x(p,e),!1)}catch(a){return x(g,e),!1}}(o);l&&P(l.link,!1,l,e,i||o)}else x(u,i||o,e)}catch(f){x(g,i||o,e)}}function H(){x(g,this.response||this.responseText||this.responseXML)}function W(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;D(y.language.translate("Uploading"),t)}}function K(e,t,a){var n,i=C(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],'"'),i.attr("data-".concat(n),t[n]));var r=y.opts.imageDefaultWidth;r&&"auto"!=r&&(r=y.opts.imageResizeWithPercent?"100%":"".concat(r,"px")),i.attr("style",r?"width: ".concat(r,";"):""),ge(i,y.opts.imageDefaultDisplay,y.opts.imageDefaultAlign),i.on("load",a),i.on("error",a),y.edit.on(),y.events.focus(!0),y.selection.restore(),y.undo.saveStep(),y.opts.imageSplitHTML?y.markers.split():y.markers.insert(),y.html.wrap();var o=y.$el.find(".fr-marker");return o.length?(o.parent().is("hr")&&o.parent().after(o),y.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(i)):y.$el.append(i),y.selection.clear(),i}function $(){y.edit.on(),F(!0)}function z(e,t){if(void 0!==e&&0<e.length){if(!1===y.events.trigger("image.beforeUpload",[e,t]))return!1;var a,n=e[0];if(!(null!==y.opts.imageUploadURL&&y.opts.imageUploadURL!=R||y.opts.imageUploadToS3||y.opts.imageUploadToAzure))return function E(i,r){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:i.type})),y.image.insert(e,!1,null,r)}},O(),o.readAsDataURL(i)}(n,t||T),!1;if(n.name||(n.name=(new Date).getTime()+"."+(n.type||"image/jpeg").replace(/image\//g,"")),n.size>y.opts.imageMaxSize)return x(w),!1;if(y.opts.imageAllowedTypes.indexOf(n.type.replace(/image\//g,""))<0)return x(S),!1;if(y.drag_support.formdata&&(a=y.drag_support.formdata?new FormData:null),a){var i;if(!1!==y.opts.imageUploadToS3)for(i in a.append("key",y.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),y.opts.imageUploadToS3.params)y.opts.imageUploadToS3.params.hasOwnProperty(i)&&a.append(i,y.opts.imageUploadToS3.params[i]);for(i in y.opts.imageUploadParams)y.opts.imageUploadParams.hasOwnProperty(i)&&a.append(i,y.opts.imageUploadParams[i]);a.append(y.opts.imageUploadParam,n,n.name);var r,o,s=y.opts.imageUploadURL,l=y.opts.imageUploadMethod;y.opts.imageUploadToS3&&(s=y.opts.imageUploadToS3.uploadURL?y.opts.imageUploadToS3.uploadURL:"https://".concat(y.opts.imageUploadToS3.region,".amazonaws.com/").concat(y.opts.imageUploadToS3.bucket)),y.opts.imageUploadToAzure&&(r=s=y.opts.imageUploadToAzure.uploadURL?"".concat(y.opts.imageUploadToAzure.uploadURL,"/").concat(n.name):encodeURI("https://".concat(y.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(y.opts.imageUploadToAzure.container,"/").concat(n.name)),y.opts.imageUploadToAzure.SASToken&&(s+=y.opts.imageUploadToAzure.SASToken),l="PUT");var c=y.core.getXHR(s,l);if(y.opts.imageUploadToAzure){var d=(new Date).toUTCString();if(!y.opts.imageUploadToAzure.SASToken&&y.opts.imageUploadToAzure.accessKey){var f=y.opts.imageUploadToAzure.account,p=y.opts.imageUploadToAzure.container;if(y.opts.imageUploadToAzure.uploadURL){var u=y.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=y.cryptoJSPlugin.cryptoJS.HmacSHA256(m,y.cryptoJSPlugin.cryptoJS.enc.Base64.parse(y.opts.imageUploadToAzure.accessKey)).toString(y.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;o=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",n.type),c.setRequestHeader("x-ms-blob-type","BlockBlob"),y.opts.imageUploadParams)y.opts.imageUploadParams.hasOwnProperty(i)&&c.setRequestHeader(i,y.opts.imageUploadParams[i]);for(i in y.opts.imageUploadToAzure.params)y.opts.imageUploadToAzure.params.hasOwnProperty(i)&&c.setRequestHeader(i,y.opts.imageUploadToAzure.params[i])}!function A(t,a,n,i,r,o){function s(){var e=C(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),y.placeholder.refresh(),B(e),_(),O(),y.edit.off(),t.onload=function(){U.call(t,e,r,o)},t.onerror=H,t.upload.onprogress=W,t.onabort=$,C(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),i?(i.attr("src",i.data("fr-old-src")),i.removeClass("fr-uploading")):e.remove(),de(!0))}),t.send(y.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"}))}i?(i.on("load",s),i.on("error",function(){s(),C(this).off("error")}),y.edit.on(),y.undo.saveStep(),i.data("fr-old-src",i.attr("src")),i.attr("src",e)):K(e,null,s)},l.readAsDataURL(n)}(c,a,n,t||T,r,o)}}}function G(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<=y.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!y.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;y.markers.remove(),y.markers.insertAtPoint(e.originalEvent),y.$el.find(".fr-marker").replaceWith(It.MARKERS),0===y.$el.find(".fr-marker").length&&y.selection.setAtEnd(y.el),y.popups.hideAll();var n=y.popups.get("image.insert");n||(n=V()),y.popups.setContainer("image.insert",y.$sc);var i=e.originalEvent.pageX,r=e.originalEvent.pageY;if(y.opts.iframe){var o=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-top")),s=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-left"));r+=y.$iframe.offset().top+o,i+=y.$iframe.offset().left+s}return y.popups.show("image.insert",i,r),O(),0<=y.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(de(!0),z(t.files)):x(S),e.preventDefault(),e.stopPropagation(),!1}}}function V(e){if(e)return y.popups.onRefresh("image.insert",f),y.popups.onHide("image.insert",h),!0;var t,a,n="";y.opts.imageUpload||-1===y.opts.imageInsertButtons.indexOf("imageUpload")||y.opts.imageInsertButtons.splice(y.opts.imageInsertButtons.indexOf("imageUpload"),1);var i=y.button.buildList(y.opts.imageInsertButtons);""!==i&&(n='<div class="fr-buttons fr-tabs">'.concat(i,"</div>"));var r=y.opts.imageInsertButtons.indexOf("imageUpload"),o=y.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=r&&(t=" fr-active",0<=o&&o<r&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(y.id,'"><strong>').concat(y.language.translate("Drop image"),"</strong><br>(").concat(y.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(y.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(y.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=r&&r<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(y.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(y.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(y.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<=y.opts.imageInsertButtons.length&&(a=y.popups.create("image.insert",c)),y.$wp&&y.events.$on(y.$wp,"scroll",function(){T&&y.popups.isVisible("image.insert")&&ve()}),function d(n){y.events.$on(n,"dragover dragenter",".fr-image-upload-layer",function(e){return C(this).addClass("fr-drop"),(y.browser.msie||y.browser.edge)&&e.preventDefault(),!1},!0),y.events.$on(n,"dragleave dragend",".fr-image-upload-layer",function(e){return C(this).removeClass("fr-drop"),(y.browser.msie||y.browser.edge)&&e.preventDefault(),!1},!0),y.events.$on(n,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),C(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||y;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),y.helpers.isIOS()&&y.events.$on(n,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){C(this).trigger("click")},!0),y.events.$on(n,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||y;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,T)}C(this).val("")},!0)}(a),a}function j(){T&&y.popups.get("image.alt").find("input").val(T.attr("alt")||"").trigger("change")}function q(){var e=y.popups.get("image.alt");e||(e=X()),F(),y.popups.refresh("image.alt"),y.popups.setContainer("image.alt",y.$sc);var t=Ae();ye()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();y.popups.show("image.alt",a,n,t.outerHeight(),!0)}function X(e){if(e)return y.popups.onRefresh("image.alt",j),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(y.button.buildList(y.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(y.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(y.id,'" type="text" placeholder="').concat(y.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(y.language.translate("Update"),"</button></div></div>")},a=y.popups.create("image.alt",t);return y.$wp&&y.events.$on(y.$wp,"scroll.image-alt",function(){T&&y.popups.isVisible("image.alt")&&q()}),a}function Q(){var e=y.popups.get("image.size");if(T)if(ye()){var t=T.parent();t.get(0).style.width||(t=T.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(T.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(T.get(0).style.height).trigger("change")}function J(){var e=y.popups.get("image.size");e||(e=Z()),F(),y.popups.refresh("image.size"),y.popups.setContainer("image.size",y.$sc);var t=Ae();ye()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();y.popups.show("image.size",a,n,t.outerHeight(),!0)}function Z(e){if(e)return y.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(y.button.buildList(y.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(y.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(y.id,'" type="text" name="width" placeholder="').concat(y.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(y.id,'" type="text" name="height" placeholder="').concat(y.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(y.language.translate("Update"),"</button></div></div>")},a=y.popups.create("image.size",t);return y.$wp&&y.events.$on(y.$wp,"scroll.image-size",function(){T&&y.popups.isVisible("image.size")&&J()}),a}function ee(e,t,a,n){return e.pageX=t,A.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,n)),L.call(this,e),I.call(this,e),++n}function te(e){(e=e||Ae())&&!1!==y.events.trigger("image.beforeRemove",[e])&&(y.popups.hideAll(),be(),de(!0),y.undo.canDo()||y.undo.saveStep(),e.get(0)==y.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(y.selection.setBefore(e.get(0).parentNode)||y.selection.setAfter(e.get(0).parentNode)||e.parent().after(It.MARKERS),C(e.get(0).parentNode).remove()):(y.selection.setBefore(e.get(0))||y.selection.setAfter(e.get(0))||e.after(It.MARKERS),e.remove()),y.html.fillEmptyBlocks(),y.selection.restore()),y.undo.saveStep())}function ae(e){var t=e.which;if(T&&(t==It.KEYCODE.BACKSPACE||t==It.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(T&&t==It.KEYCODE.ESC){var a=T;return de(!0),y.selection.setAfter(a.get(0)),y.selection.restore(),e.preventDefault(),!1}if(!T||t!=It.KEYCODE.ARROW_LEFT&&t!=It.KEYCODE.ARROW_RIGHT)return T&&t===It.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),de(!0),!1):T&&t!=It.KEYCODE.F10&&!y.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=T.get(0);return de(!0),t==It.KEYCODE.ARROW_LEFT?y.selection.setBefore(n):y.selection.setAfter(n),y.selection.restore(),e.preventDefault(),!1}function ne(e){if(e&&"IMG"==e.tagName){if(y.node.hasClass(e,"fr-uploading")||y.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):y.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&y.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"),i=0;i<n.length;i++)ne(n[i])}function ie(e){if(!1===y.events.trigger("image.beforePasteUpload",[e]))return!1;T=C(e),_(),r(),ve(),O(),T.on("load",function(){var t=[];_(),C(y.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&O(),C(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&C(this).off("load")});for(var t=C(e).attr("src").split(","),a=atob(t[1]),n=[],i=0;i<a.length;i++)n.push(a.charCodeAt(i));z([new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],T)}function re(){y.opts.imagePaste?y.$el.find("img[data-fr-image-pasted]").each(function(e,n){if(y.opts.imagePasteProcess){var t=y.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=y.opts.imageResizeWithPercent?"%":"px"),C(n).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ge(C(n),y.opts.imageDefaultDisplay,y.opts.imageDefaultAlign)}if(0===n.src.indexOf("data:"))ie(n);else if(0===n.src.indexOf("blob:")||0===n.src.indexOf("http")&&y.opts.imageUploadRemoteUrls&&y.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=y.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){ie(n)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",n.src=t.toDataURL("image/".concat(e))},a.src=(0===n.src.indexOf("blob:")?"":"".concat(y.opts.imageCORSProxy,"/"))+n.src}else 0!==n.src.indexOf("http")||0===n.src.indexOf("https://mail.google.com/mail")?(y.selection.save(),C(n).remove(),y.selection.restore()):C(n).removeAttr("data-fr-image-pasted")}):y.$el.find("img[data-fr-image-pasted]").remove()}function oe(e){var t=e.target.result,a=y.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=y.opts.imageResizeWithPercent?"%":"px"),y.undo.saveStep(),y.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var n=y.$el.find('img[data-fr-image-pasted="true"]');n&&ge(n,y.opts.imageDefaultDisplay,y.opts.imageDefaultAlign),y.events.trigger("paste.after")}function se(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function n(e){var t=new FileReader;t.onload=oe,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function ce(e){if("false"==C(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&&y.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<It.INSTANCES.length;t++)It.INSTANCES[t]!=y&&It.INSTANCES[t].events.trigger("image.hideResizer");y.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),y.helpers.isMobile()&&(y.events.disableBlur(),y.$el.blur(),y.events.enableBlur()),y.opts.iframe&&y.size.syncIframe(),T=C(this),be(),_(),r(),y.browser.msie?(y.popups.areVisible()&&y.events.disableBlur(),y.win.getSelection&&(y.win.getSelection().removeAllRanges(),y.win.getSelection().addRange(y.doc.createRange()))):y.selection.clear(),y.helpers.isIOS()&&(y.events.disableBlur(),y.$el.blur()),y.button.bulkRefresh(),y.events.trigger("video.hideResizer")}function de(e){T&&(function t(){return fe}()||!0===e)&&(y.toolbar.enable(),l.removeClass("fr-active"),y.popups.hide("image.edit"),T=null,ue(),c=null,d&&d.hide())}i[n]="Image cannot be loaded from the passed link.",i[p]="No link in upload response.",i[u]="Error during file upload.",i[g]="Parsing response failed.",i[w]="File is too large.",i[S]="Image file type is invalid.",i[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var fe=!(i[8]="Image file is corrupted.");function pe(){fe=!0}function ue(){fe=!1}function ge(e,t,a){!y.opts.htmlUntouched&&y.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]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:y.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*y.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(y.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(y.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(y.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function he(e){if(void 0===e&&(e=Ae()),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 me(e){void 0===e&&(e=Ae());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 ve(){var e=y.popups.get("image.insert");e||(e=V()),y.popups.isVisible("image.insert")||(F(),y.popups.refresh("image.insert"),y.popups.setContainer("image.insert",y.$sc));var t=Ae();ye()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();y.popups.show("image.insert",a,n,t.outerHeight(!0),!0)}function be(){if(T){y.events.disableBlur(),y.selection.clear();var e=y.doc.createRange();e.selectNode(T.get(0)),y.browser.msie&&e.collapse(!0),y.selection.get().addRange(e),y.events.enableBlur()}}function Ee(){return T}function Ae(){return ye()?T.parents(".fr-img-caption").first():T}function ye(){return!!T&&0<T.parents(".fr-img-caption").length}return{_init:function Te(){var n;(function e(){y.events.$on(y.$el,y._mousedown,"IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==C(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;y.helpers.isMobile()||y.selection.clear(),t=!0,y.popups.areVisible()&&y.events.disableBlur(),y.browser.msie&&(y.events.disableBlur(),y.$el.attr("contenteditable",!1)),y.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),y.events.$on(y.$el,y._mousedown,".fr-img-caption .fr-inner",function(e){y.core.hasFocus()||y.events.focus(),e.stopPropagation()}),y.events.$on(y.$el,"paste",".fr-img-caption .fr-inner",function(e){y.toolbar.hide(),e.stopPropagation()}),y.events.$on(y.$el,y._mouseup,"IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==C(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),y.browser.msie&&(y.$el.attr("contenteditable",!0),y.events.enableBlur()))}),y.events.on("keyup",function(e){if(e.shiftKey&&""===y.selection.text().replace(/\n/g,"")&&y.keys.isArrow(e.which)){var t=y.selection.element(),a=y.selection.endElement();t&&"IMG"==t.tagName?B(C(t)):a&&"IMG"==a.tagName&&B(C(a))}},!0),y.events.on("drop",Y),y.events.on("element.beforeDrop",G),y.events.on("window.mousedown",pe),y.events.on("window.touchmove",ue),y.events.on("mouseup window.mouseup",function(){if(T)return de(),!1;ue()}),y.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&de()}),y.events.on("image.resizeEnd",function(){y.opts.iframe&&y.size.syncIframe()}),y.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){de(!(t=!1))}),y.events.on("modals.hide",function(){T&&(be(),y.selection.clear())}),y.events.on("image.resizeEnd",function(){y.win.getSelection&&B(T)}),y.opts.imageAddNewLine&&y.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!y.node.isElement(t);)t=y.node.isLastSibling(t)?t.parentNode:null;y.node.isElement(t)&&(y.opts.enter===It.ENTER_BR?e.after("<br>"):C(y.node.blockParent(e.get(0))).after("<".concat(y.html.defaultTag(),"><br></").concat(y.html.defaultTag(),">")))})})(),"IMG"==y.el.tagName&&y.$el.addClass("fr-view"),y.events.$on(y.$el,y.helpers.isMobile()&&!y.helpers.isWindowsPhone()?"touchend":"click","IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',ce),y.helpers.isMobile()&&(y.events.$on(y.$el,"touchstart","IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),y.events.$on(y.$el,"touchmove",function(){a=!0})),y.$wp?(y.events.on("window.keydown keydown",ae,!0),y.events.on("keyup",function(e){if(T&&e.which==It.KEYCODE.ENTER)return!1},!0),y.events.$on(y.$el,"keydown",function(){var e=y.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&y.node.isLastSibling(e))&&(e=e.parentNode),y.node.hasClass(e,"fr-inner")||(y.node.hasClass(e,"fr-img-caption")||(e=C(e).parents(".fr-img-caption").get(0)),y.node.hasClass(e,"fr-img-caption")&&(C(e).after(It.INVISIBLE_SPACE+It.MARKERS),y.selection.restore()))})):y.events.$on(y.$win,"keydown",ae),y.events.on("toolbar.esc",function(){if(T){if(y.$wp)y.events.disableBlur(),y.events.focus();else{var e=T;de(!0),y.selection.setAfter(e.get(0)),y.selection.restore()}return!1}},!0),y.events.on("toolbar.focusEditor",function(){if(T)return!1},!0),y.events.on("window.cut window.copy",function(e){if(T&&y.popups.isVisible("image.edit")&&!y.popups.get("image.edit").find(":focus").length){var t=Ae();ye()?(t.before(It.START_MARKER),t.after(It.END_MARKER),y.selection.restore(),y.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),y.paste.saveCopiedText(T.get(0).outerHTML,T.attr("alt"))),"copy"==e.type?setTimeout(function(){B(T)}):(de(!0),y.undo.saveStep(),setTimeout(function(){y.undo.saveStep()},0))}},!0),y.browser.msie&&y.events.on("keydown",function(e){if(!y.selection.isCollapsed()||!T)return!0;var t=e.which;t==It.KEYCODE.C&&y.keys.ctrlKey(e)?y.events.trigger("window.copy"):t==It.KEYCODE.X&&y.keys.ctrlKey(e)&&y.events.trigger("window.cut")}),y.events.$on(C(y.o_win),"keydown",function(e){var t=e.which;if(T&&t==It.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),y.events.$on(y.$win,"keydown",function(e){var t=e.which;T&&T.hasClass("fr-uploading")&&t==It.KEYCODE.ESC&&T.trigger("abortUpload")}),y.events.on("destroy",function(){T&&T.hasClass("fr-uploading")&&T.trigger("abortUpload")}),y.events.on("paste.before",se),y.events.on("paste.beforeCleanup",le),y.events.on("paste.after",re),y.events.on("html.set",m),y.events.on("html.inserted",m),m(),y.events.on("destroy",function(){s=[]}),y.events.on("html.processGet",ne),y.opts.imageOutputSize&&y.events.on("html.beforeGet",function(){n=y.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=n[e].style.width||C(n[e]).width(),a=n[e].style.height||C(n[e]).height();t&&n[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&n[e].setAttribute("height","".concat(a).replace(/px/,""))}}),y.opts.iframe&&y.events.on("image.loaded",y.size.syncIframe),y.$wp&&(v(),y.events.on("contentChanged",v)),y.events.$on(C(y.o_win),"orientationchange.image",function(){setTimeout(function(){T&&B(T)},100)}),k(!0),V(!0),Z(!0),X(!0),y.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ce(){var e=y.$tb.find('.fr-command[data-cmd="insertImage"]'),t=y.popups.get("image.insert");if(t||(t=V()),F(),!t.hasClass("fr-active"))if(y.popups.refresh("image.insert"),y.popups.setContainer("image.insert",y.$tb),e.isVisible()){var a=y.button.getPosition(e),n=a.left,i=a.top;y.popups.show("image.insert",n,i,e.outerHeight())}else y.position.forSelection(t),y.popups.show("image.insert")},showLayer:function Re(e){var t,a,n=y.popups.get("image.insert");if(T||y.opts.toolbarInline){if(T){var i=Ae();ye()&&(i=i.find(".fr-img-wrap")),a=i.offset().top+i.outerHeight(),t=i.offset().left}}else{var r=y.$tb.find('.fr-command[data-cmd="insertImage"]');t=r.offset().left,a=r.offset().top+(y.opts.toolbarBottom?10:r.outerHeight()-10)}!T&&y.opts.toolbarInline&&(a=n.offset().top-y.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"),y.popups.show("image.insert",t,a,T?T.outerHeight():0),y.accessibility.focusPopup(n)},refreshUploadButton:function we(e){var t=y.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Se(e){var t=y.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:z,insertByURL:function _e(){var e=y.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),D(y.language.translate("Loading image"));var t=e.val().trim();if(y.opts.imageUploadRemoteUrls&&y.opts.imageCORSProxy&&y.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?z([new Blob([this.response],{type:this.response.type||"image/png"})],T):x(n)},a.onerror=function(){P(t,!0,[],T)},a.open("GET","".concat(y.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else P(t,!0,[],T);e.val(""),e.blur()}},align:function Le(e){var t=Ae();t.removeClass("fr-fir fr-fil"),!y.opts.htmlUntouched&&y.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ge(t,me(),e),be(),_(),r(),y.selection.clear()},refreshAlign:function Ie(e){T&&e.find("> *").first().replaceWith(y.icon.create("image-align-".concat(he())))},refreshAlignOnShow:function xe(e,t){T&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ke(e){var t=Ae();t.removeClass("fr-dii fr-dib"),!y.opts.htmlUntouched&&y.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ge(t,e,he()),be(),_(),r(),y.selection.clear()},refreshDisplayOnShow:function Oe(e,t){T&&t.find('.fr-command[data-param1="'.concat(me(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){T?(y.events.disableBlur(),C(".fr-popup input:focus").blur(),B(T)):(y.events.disableBlur(),y.selection.restore(),y.events.enableBlur(),y.popups.hide("image.insert"),y.toolbar.showInline())},get:Ee,getEl:Ae,insert:P,showProgressBar:O,remove:te,hideProgressBar:F,applyStyle:function Fe(e,t,a){if(void 0===t&&(t=y.opts.imageStyles),void 0===a&&(a=y.opts.imageMultipleStyles),!T)return!1;var n=Ae();if(!a){var i=Object.keys(t);i.splice(i.indexOf(e),1),n.removeClass(i.join(" "))}"object"==xt(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),B(T)},showAltPopup:q,showSizePopup:J,setAlt:function De(e){if(T){var t=y.popups.get("image.alt");T.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),B(T)}},setSize:function Me(e,t){if(T){var a=y.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;T.removeAttr("width").removeAttr("height"),e.match(n)?T.css("width",e):T.css("width",""),t.match(n)?T.css("height",t):T.css("height",""),ye()&&(T.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?T.parents(".fr-img-caption").css("width",e):T.parents(".fr-img-caption").css("width",""),t.match(n)?T.parents(".fr-img-caption").css("height",t):T.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),B(T)}},toggleCaption:function Be(){var e;if(T&&!ye()){(e=T).parent().is("a")&&(e=T.parent());var t,a,n=T.parents("ul")&&0<T.parents("ul").length?T.parents("ul"):T.parents("ol")&&0<T.parents("ol").length?T.parents("ol"):[];if(0<n.length){var i=n.find("li").length,r=T.parents("li"),o=document.createElement("li");i-1===r.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=y.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":T.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(y.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+T.attr("class")+'" style="'+(y.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>'),T.after('<span class="fr-inner"'.concat(y.browser.mozilla?"":' contenteditable="true"',">").concat(It.START_MARKER).concat(y.language.translate("Image Caption")).concat(It.END_MARKER,"</span>")),T.removeAttr("class").removeAttr("style").removeAttr("width"),T.parents(".fr-img-caption").css("width",s),de(!0),y.selection.restore()}else e=Ae(),T.insertAfter(e),T.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),B(T)},hasCaption:ye,exitEdit:de,edit:B}},It.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),It.RegisterShortcut(It.KEYCODE.P,"insertImage",null,"P"),It.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"}),It.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),It.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)}}),It.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),It.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)}}),It.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"))}}),It.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),It.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)}}),It.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),It.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),It.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),It.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=It.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)}}),It.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),It.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),It.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),It.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),It.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.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"))}}),It.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),It.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),It.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"==xt(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)})}}),It.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),It.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),It.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),It.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),It.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),It.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),It.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),It.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(It.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),It.PLUGINS.imageManager=function(s){var l,c,r,o,d,f,p,u,g,h,m,v=s.$,b="image_manager",e=10,E=11,A=12,y=13,T=14,C=15,a=21,n=22,i={};function R(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function w(){d.empty();for(var e=0;e<m;e++)d.append('<div class="fr-list-column"></div>')}function S(){if(g<p.length&&(d.outerHeight()<=r.outerHeight()+s.opts.imageManagerScrollOffset||r.scrollTop()+s.opts.imageManagerScrollOffset>d.outerHeight()-r.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(i){var r=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),r.onload=function(){o.height(Math.floor(o.width()/r.width*r.height));var a=v(document.createElement("img"));if(i.thumb)a.attr("src",i.thumb);else{if(D(T,i),!i.url)return D(C,i),!1;a.attr("src",i.url)}if(i.url&&a.attr("data-url",i.url),i.tag)if(c.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),c.find(".fr-modal-tags").show(),0<=i.tag.indexOf(",")){for(var e=i.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(i.tag.trim(),'"]')).length&&f.append('<a role="button" title="'.concat(i.tag.trim(),'">').concat(i.tag.trim(),"</a>")),a.attr("data-tag",i.tag.trim());for(var n in i.name&&a.attr("alt",i.name),i)i.hasOwnProperty(n)&&"thumb"!==n&&"url"!==n&&"tag"!==n&&a.attr("data-".concat(n),i[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++,I(L(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])},r.onerror=function(){g++,o.remove(),I(L(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),D(e,i),g%s.opts.imageManagerPageSize==0&&S()},r.src=i.thumb||i.url,_().append(o)}function _(){var n,i;return d.find(".fr-list-column").each(function(e,t){var a=v(t);0===e?(i=a.outerHeight(),n=a):a.outerHeight()<i&&(i=a.outerHeight(),n=a)}),n}function L(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 I(e){for(var t=e.length-1;0<=t;t--)_().append(e[t])}function x(e){if(e===undefined&&(e=!0),!l.isVisible())return!0;var t=R();if(t!==m){m=t;var a=L();w(),I(a)}s.modals.resize(b),e&&S()}function k(e){for(var t,a=e[0].attributes,n=a.length,i={};n--;)a[n]&&0===(t=a[n].name).indexOf("data-")&&"url"!==(t=t.slice(5))&&"tag"!==t&&(i[t]=a[n].value);return i}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 i=a.position.getBoundingRect(),r=i.left+i.width/2+v(s.doc).scrollLeft(),o=i.top+i.height+v(s.doc).scrollTop();a.popups.setContainer("image.insert",s.$sc),a.popups.show("image.insert",r,o)}a.image.insert(t.data("url"),!1,k(t),n)}function F(e){var r=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",[r])&&(r.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:r.attr("src")},k(r)),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=L(parseInt(r.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);r.parent().remove(),I(n),function i(){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()}),B()}(),x(!0)},fail:function(e){D(a,e.response||e.responseText)}})):D(n))}function D(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:i[e]},t])}function M(){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),r.css("marginTop",e+t),f.find("a").css("opacity",1)):(c.css("height",e),r.css("marginTop",e),f.find("a").css("opacity",0))}function B(){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(),I(L()),S()}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"),B()}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 i[e]="Image cannot be loaded from the passed link.",i[E]="Error during load images request.",i[A]="Missing imageManagerLoadURL option.",i[y]="Parsing load response failed.",i[T]="Missing image thumb.",i[C]="Missing image URL.",i[a]="Error during delete image request.",i[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(It.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,r=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=R(),w(),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()}),r.on("scroll",S),s.events.bindClick(l,"button#fr-modal-more-".concat(s.sid),M),s.events.bindClick(f,"a",N)}(),function i(){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){D(y,t)}}(e,a.response),o.hide()},fail:function(e){D(E,e.response||e.responseText)}}):D(A)}()},hide:function W(){s.modals.hide(b)}}},!It.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");It.DEFAULTS.imageInsertButtons.push("imageManager"),It.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),It.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),It.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),It.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"}),Object.assign(It.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),It.PLUGINS.inlineClass=function(a){var n=a.$;return{apply:function t(e){a.format.toggle("span",{"class":e})},refreshOnShow:function i(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)})}}},It.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"}),It.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"}),Object.assign(It.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),It.PLUGINS.inlineStyle=function(i){return{apply:function r(e){for(var t=e.split(";"),a=0;a<t.length;a++){var n=t[a].split(":");t[a].length&&2==n.length&&i.format.applyStyle(n[0].trim(),n[1].trim())}}}},It.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"}),It.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"}),Object.assign(It.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),It.PLUGINS.lineBreaker=function(g){var h,t,i,m=g.$;function l(e,t){var a,n,i,r,o,s,l,c;if(null==e)o=(r=t.parent()).offset().top,a=(l=t.offset().top)-Math.min((l-o)/2,g.opts.lineBreakerOffset),i=r.outerWidth(),n=r.offset().left;else if(null==t)(s=(r=e.parent()).offset().top+r.outerHeight())<(c=e.offset().top+e.outerHeight())&&(s=(r=m(r).parent()).offset().top+r.outerHeight()),a=c+Math.min(Math.abs(s-c)/2,g.opts.lineBreakerOffset),i=r.outerWidth(),n=r.offset().left;else{r=e.parent();var d=e.offset().top+e.height(),f=t.offset().top;if(f<d)return!1;a=(d+f)/2,i=r.outerWidth(),n=r.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",i),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 r(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,i=null;n<=g.opts.lineBreakerOffset&&!i;)(i=r(e,t-n))||(i=r(e,t+n)),n+=a;return i}function d(e,t,a){for(var n=null,i=100;!n&&e>g.$box.offset().left&&e<g.$box.offset().left+g.$box.outerWidth()&&0<i;)(n=r(e,t))||(n=o(e,t,5)),"left"==a?e-=g.opts.lineBreakerHorizontalOffset:e+=g.opts.lineBreakerHorizontalOffset,i-=g.opts.lineBreakerHorizontalOffset;return n}function a(e){var t=i=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,i=e.offset().top,r=e.offset().top+e.outerHeight();if(Math.abs(r-t)<=g.opts.lineBreakerOffset||Math.abs(t-i)<=g.opts.lineBreakerOffset)if(Math.abs(r-t)<Math.abs(t-i)){for(var o=(n=e.get(0)).nextSibling;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()||(i&&clearTimeout(i),i=setTimeout(a,30,e))))}function s(){i&&clearTimeout(i),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"),i=g.html.defaultTag();null==a?i&&"TD"!=n.parent().get(0).tagName&&0===n.parents(i).length?n.before("<".concat(i,">").concat(It.MARKERS,"<br></").concat(i,">")):n.before("".concat(It.MARKERS,"<br>")):i&&"TD"!=a.parent().get(0).tagName&&0===a.parents(i).length?a.after("<".concat(i,">").concat(It.MARKERS,"<br></").concat(i,">")):a.after("".concat(It.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(i)},!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(It.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),It.PLUGINS.lineHeight=function(n){var s=n.$;return{_init:function e(){},apply:function i(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),""===s(t[a]).attr("style")&&s(t[a]).removeAttr("style");n.html.unwrap(),n.selection.restore()},refreshOnShow:function r(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")),i=n.substr(0,n.indexOf(";")),r=i&&i.split(":")[1];r&&r.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)})}}}},It.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"}),It.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"}),Object.assign(It.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(It.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}),It.PLUGINS.link=function(u){var g=u.$;function h(){var e=u.image?u.image.get():null;if(e||!u.$wp)return"A"==u.el.tagName?u.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=u.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(u.el)||!u.el.contains(t)||u.el==t)&&(t=null)}catch(i){t=null}if(t&&"A"===t.tagName)return t;var a=u.selection.element(),n=u.selection.endElement();"A"==a.tagName||u.node.isElement(a)||(a=g(a).parentsUntil(u.$el,"a").first().get(0)),"A"==n.tagName||u.node.isElement(n)||(n=g(n).parentsUntil(u.$el,"a").first().get(0));try{n&&(n.contains&&n.contains(u.el)||!u.el.contains(n)||u.el==n)&&(n=null)}catch(i){n=null}try{a&&(a.contains&&a.contains(u.el)||!u.el.contains(a)||u.el==a)&&(a=null)}catch(i){a=null}return n&&n==a&&"A"==n.tagName?(u.browser.msie||u.helpers.isMobile())&&(u.selection.info(a).atEnd||u.selection.info(a).atStart)?null:a:null}function m(){var e,t,a,n,i=u.image?u.image.get():null,r=[];if(i)"A"==i.get(0).parentNode.tagName&&r.push(i.get(0).parentNode);else if(u.win.getSelection){var o=u.win.getSelection();if(o.getRangeAt&&o.rangeCount){n=u.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())r.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)&&r.push(a[l])}}}else if(u.doc.selection&&"Control"!=u.doc.selection.type)if("a"==(t=(e=u.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())r.push(t);else{a=t.getElementsByTagName("a"),n=u.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&&r.push(a[c])}return r}function v(i){if(u.core.hasFocus()){if(r(),i&&"keyup"===i.type&&(i.altKey||i.which==It.KEYCODE.ALT))return!0;setTimeout(function(){if(!i||i&&(1==i.which||"mouseup"!=i.type)){var e=h(),t=u.image?u.image.get():null;if(e&&!t){if(u.image){var a=u.node.contents(e);if(1==a.length&&"IMG"==a[0].tagName){var n=u.selection.ranges(0);return 0===n.startOffset&&0===n.endOffset?g(e).before(It.MARKERS):g(e).after(It.MARKERS),u.selection.restore(),!1}}i&&i.stopPropagation(),o(e)}}},u.helpers.isIOS()?100:0)}}function o(e){var t=u.popups.get("link.edit");t||(t=function r(){var e="";1<=u.opts.linkEditButtons.length&&("A"==u.el.tagName&&0<=u.opts.linkEditButtons.indexOf("linkRemove")&&u.opts.linkEditButtons.splice(u.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(u.button.buildList(u.opts.linkEditButtons),"</div>"));var t={buttons:e},a=u.popups.create("link.edit",t);u.$wp&&u.events.$on(u.$wp,"scroll.link-edit",function(){h()&&u.popups.isVisible("link.edit")&&o(h())});return a}());var a=g(e);u.popups.isVisible("link.edit")||u.popups.refresh("link.edit"),u.popups.setContainer("link.edit",u.$sc);var n=a.offset().left+a.outerWidth()/2,i=a.offset().top+a.outerHeight();u.popups.show("link.edit",n,i,a.outerHeight(),!0)}function r(){u.popups.hide("link.edit")}function l(){var e=u.popups.get("link.insert"),t=h();if(t){var a,n,i=g(t),r=e.find('input.fr-link-attr[type="text"]'),o=e.find('input.fr-link-attr[type="checkbox"]');for(a=0;a<r.length;a++)(n=g(r[a])).val(i.attr(n.attr("name")||""));for(o.attr("checked",!1),a=0;a<o.length;a++)n=g(o[a]),i.attr(n.attr("name"))==n.data("checked")&&n.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(i.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(u.selection.text());e.find("input.fr-link-attr").trigger("change"),(u.image?u.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 u.popups.onRefresh("link.insert",l),!0;var t="";1<=u.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(u.button.buildList(u.opts.linkInsertButtons),"</div>"));var a="",n=0;for(var i in a='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(u.id,'">'),a+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(u.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("URL"),'" tabIndex="').concat(++n,'"></div>'),u.opts.linkText&&(a+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(u.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("Text"),'" tabIndex="').concat(++n,'"></div>')),u.opts.linkAttributes)if(u.opts.linkAttributes.hasOwnProperty(i)){var r=u.opts.linkAttributes[i];a+='<div class="fr-input-line"><input name="'.concat(i,'" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate(r),'" tabIndex="').concat(++n,'"></div>')}u.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(u.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(u.id,'">').concat(u.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(u.language.translate("Insert"),"</button></div></div>")},s=u.popups.create("link.insert",o);return u.$wp&&u.events.$on(u.$wp,"scroll.link-insert",function(){(u.image?u.image.get():null)&&u.popups.isVisible("link.insert")&&f(),u.popups.isVisible("link.insert")&&d()}),s}function c(e,t,a){if(void 0===a&&(a={}),!1===u.events.trigger("link.beforeInsert",[e,t,a]))return!1;var n=u.image?u.image.get():null;n||"A"==u.el.tagName?"A"==u.el.tagName&&u.$el.focus():(u.selection.restore(),u.popups.hide("link.insert"));var i=e;u.opts.linkConvertEmailAddress&&u.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===u.opts.linkAutoPrefix||new RegExp("^("+It.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=u.opts.linkAutoPrefix+u.helpers.sanitizeURL(e)),e=u.helpers.sanitizeURL(e),u.opts.linkAlwaysBlank&&(a.target="_blank"),u.opts.linkAlwaysNoFollow&&(a.rel="nofollow"),u.helpers.isEmail(i)&&(a.target=null,a.rel=null),"_blank"==a.target?(u.opts.linkNoOpener&&(a.rel?a.rel+=" noopener":a.rel="noopener"),u.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===u.opts.linkAutoPrefix)return u.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),u.events.trigger("link.bad",[i]),!1;var r,o=h();if(o){if((r=g(o)).attr("href",e),0<t.length&&r.text()!=t&&!n){for(var s=r.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];g(s).text(t)}for(var l in n||r.prepend(It.START_MARKER).append(It.END_MARKER),a)a[l]?r.attr(l,a[l]):r.removeAttr(l);n||u.selection.restore()}else{n?(n.wrap('<a href="'.concat(e,'"></a>')),u.image.hasCaption()&&n.parent().append(n.parents(".fr-img-caption").find(".fr-inner"))):(u.format.remove("a"),u.selection.isCollapsed()?(t=0===t.length?i:t,u.html.insert('<a href="'.concat(e,'">').concat(It.START_MARKER).concat(t.replace(/&/g,"&amp;").replace(/</,"&lt;",">","&gt;")).concat(It.END_MARKER,"</a>")),u.selection.restore()):0<t.length&&t!=u.selection.text().replace(/\n/g,"")?(u.selection.remove(),u.html.insert('<a href="'.concat(e,'">').concat(It.START_MARKER).concat(t.replace(/&/g,"&amp;")).concat(It.END_MARKER,"</a>")),u.selection.restore()):(!function p(){if(!u.selection.isCollapsed()){u.selection.save();for(var e=u.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=g(e.pop());t.removeClass("fr-unprocessed");var a=u.node.deepestParent(t.get(0));if(a){for(var n=t.get(0),i="",r="";n=n.parentNode,u.node.isBlock(n)||(i+=u.node.closeTagString(n),r=u.node.openTagString(n)+r),n!=a;);var o=u.node.openTagString(t.get(0))+t.html()+u.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,i+o+r)).replace(r+i,""),a.outerHTML=s}e=u.$el.find(".fr-marker.fr-unprocessed").toArray()}u.html.cleanEmptyTags(),u.selection.restore()}}(),u.format.apply("a",{href:e})));for(var c=m(),d=0;d<c.length;d++)(r=g(c[d])).attr(a),r.removeAttr("_moz_dirty");1==c.length&&u.$wp&&!n&&(g(c[0]).prepend(It.START_MARKER).append(It.END_MARKER),u.selection.restore())}if(n){var f=u.popups.get("link.insert");f&&f.find("input:focus").blur(),u.image.edit(n)}else v()}function d(){r();var e=h();if(e){var t=u.popups.get("link.insert");t||(t=s()),u.popups.isVisible("link.insert")||(u.popups.refresh("link.insert"),u.selection.save(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur())),u.popups.setContainer("link.insert",u.$sc);var a=(u.image?u.image.get():null)||g(e),n=a.offset().left+a.outerWidth()/2,i=a.offset().top+a.outerHeight();u.popups.show("link.insert",n,i,a.outerHeight(),!0)}}function f(){var e=u.image?u.image.getEl():null;if(e){var t=u.popups.get("link.insert");u.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),l(),u.popups.setContainer("link.insert",u.$sc);var a=e.offset().left+e.outerWidth()/2,n=e.offset().top+e.outerHeight();u.popups.show("link.insert",a,n,e.outerHeight(),!0)}}return{_init:function e(){u.events.on("keyup",function(e){e.which!=It.KEYCODE.ESC&&v(e)}),u.events.on("window.mouseup",v),u.events.$on(u.$el,"click","a",function(e){u.edit.isDisabled()&&e.preventDefault()}),u.helpers.isMobile()&&u.events.$on(u.$doc,"selectionchange",v),s(!0),"A"==u.el.tagName&&u.$el.addClass("fr-view"),u.events.on("toolbar.esc",function(){if(u.popups.isVisible("link.edit"))return u.events.disableBlur(),u.events.focus(),!1},!0)},remove:function a(){var e=h(),t=u.image?u.image.get():null;if(!1===u.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),u.image.edit(t)):e&&(u.selection.save(),g(e).replaceWith(g(e).html()),u.selection.restore(),r())},showInsertPopup:function p(){var e=u.$tb.find('.fr-command[data-cmd="insertLink"]'),t=u.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(u.popups.refresh("link.insert"),u.popups.setContainer("link.insert",u.$tb||u.$sc),e.isVisible()){var a=u.button.getPosition(e),n=a.left,i=a.top;u.popups.show("link.insert",n,i,e.outerHeight())}else u.position.forSelection(t),u.popups.show("link.insert")},usePredefined:function b(e){var t,a,n=u.opts.linkList[e],i=u.popups.get("link.insert"),r=i.find('input.fr-link-attr[type="text"]'),o=i.find('input.fr-link-attr[type="checkbox"]');for(n.rel&&(i.rel=n.rel),a=0;a<r.length;a++)n[(t=g(r[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=g(o[a])).attr("checked",t.data("checked")==n[t.attr("name")]);u.accessibility.focusPopup(i)},insertCallback:function E(){var e,t,a=u.popups.get("link.insert"),n=a.find('input.fr-link-attr[type="text"]'),i=a.find('input.fr-link-attr[type="checkbox"]'),r=(n.filter('[name="href"]').val()||"").trim(),o=n.filter('[name="text"]').val(),s={};for(t=0;t<n.length;t++)e=g(n[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<i.length;t++)(e=g(i[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=u.helpers.scrollTop();c(r,o,s),g(u.o_win).scrollTop(l)},insert:c,update:d,get:h,allSelected:m,back:function t(){u.image&&u.image.get()?u.image.back():(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),h()&&u.$wp?(u.selection.restore(),r(),v()):"A"==u.el.tagName?(u.$el.focus(),v()):(u.popups.hide("link.insert"),u.toolbar.showInline()))},imageLink:f,applyStyle:function A(e,t,a){void 0===a&&(a=u.opts.linkMultipleStyles),void 0===t&&(t=u.opts.linkStyles);var n=h();if(!n)return!1;if(!a){var i=Object.keys(t);i.splice(i.indexOf(e),1),g(n).removeClass(i.join(" "))}g(n).toggleClass(e),v()}}},It.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),It.RegisterShortcut(It.KEYCODE.K,"insertLink",null,"K"),It.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"}),It.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),It.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"}),It.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),It.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"}),It.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),It.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"}),It.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.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"}),It.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),It.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"}),It.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"}),It.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),It.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"}),It.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),It.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 i=a(n);t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.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(It.DEFAULTS,{listAdvancedTypes:!0}),It.PLUGINS.lists=function(f){var p=f.$;function u(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function g(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function r(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var i=e[n].parentNode;"LI"==e[n].tagName&&i.tagName!=t&&a.indexOf(i)<0&&a.push(i)}for(var r=a.length-1;0<=r;r--){var o=p(a[r]);o.replaceWith("<".concat(t.toLowerCase()," ").concat(f.node.attributes(o.get(0)),">").concat(o.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=f.html.defaultTag(),i=null;e.length&&(a="rtl"==f.opts.direction||"rtl"==p(e[0]).css("direction")?"margin-right":"margin-left");for(var r=0;r<e.length;r++)if("TD"!=e[r].tagName&&"TH"!=e[r].tagName&&"LI"!=e[r].tagName){var o=f.helpers.getPX(p(e[r]).css(a))||0;(e[r].style.marginLeft=null)===i&&(i=o);var s=0<i?"<".concat(t,' style="').concat(a,": ").concat(i,'px ">'):"<".concat(t,">"),l="</".concat(t,">");for(o-=i;0<o/f.opts.indentMargin;)s+="</".concat(t,">"),l+=l,o-=f.opts.indentMargin;n&&e[r].tagName.toLowerCase()==n?p(e[r]).replaceWith("".concat(s,"<li").concat(f.node.attributes(e[r]),">").concat(p(e[r]).html(),"</li>").concat(l)):p(e[r]).wrap("".concat(s,"<li></li>").concat(l))}f.clean.lists()}function o(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(p(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}var n=[];for(t=0;t<e.length;t++){var i=p(e[t]),r=e[t].parentNode,o=i.attr("class");if(i.before(g(r.tagName)),"LI"==r.parentNode.tagName)i.before(g("LI")),i.after(u("LI"));else{var s="";o&&(s+=' class="'.concat(o,'"'));var l="rtl"==f.opts.direction||"rtl"==i.css("direction")?"margin-right":"margin-left";f.helpers.getPX(p(r).css(l))&&0<=(p(r).attr("style")||"").indexOf("".concat(l,":"))&&(s+=' style="'.concat(l,":").concat(f.helpers.getPX(p(r).css(l)),'px;"')),f.html.defaultTag()&&0===i.find(f.html.blockTagsQuery()).length&&i.wrapInner(f.html.defaultTag()+s),f.node.isEmpty(i.get(0),!0)||0!==i.find(f.html.blockTagsQuery()).length||i.append("<br>"),i.append(u("LI")),i.prepend(g("LI"))}i.after(u(r.tagName)),"LI"==r.parentNode.tagName&&(r=r.parentNode.parentNode),n.indexOf(r)<0&&n.push(r)}for(t=0;t<n.length;t++){var c=p(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(f.node.openTagString(c.get(0))+d+f.node.closeTagString(c.get(0)))}f.$el.find("li:empty").remove(),f.$el.find("ul:empty, ol:empty").remove(),f.clean.lists(),f.html.wrap()}function s(e){f.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=p(e[t]).find("> ul, > ol").last().get(0);if(n){var i=p(document.createElement("li"));p(n).prepend(i);for(var r=f.node.contents(e[t])[0];r&&!f.node.isList(r);){var o=r.nextSibling;i.append(r),r=o}p(a).append(p(n)),p(e[t]).remove()}else{var s=p(a).find("> ul, > ol").last().get(0);if(s)p(s).append(p(e[t]));else{var l=p("<".concat(e[t].parentNode.tagName,">"));p(a).append(l),l.append(p(e[t]))}}}}f.clean.lists(),f.selection.restore()}function l(e){f.selection.save(),o(e),f.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=f.selection.blocks(),n=[],i=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("LI"==i.tagName||"LI"!=i.parentNode.tagName)return}else if(!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return;for(var r=0;r<a.length;r++)"LI"==a[r].tagName?(t=!0,n.push(a[r])):"LI"==a[r].parentNode.tagName&&(t=!0,n.push(a[r].parentNode));t&&("indent"==e?s(n):l(n))}}return{_init:function t(){f.events.on("commands.after",e),f.events.on("keydown",function(e){if(e.which==It.KEYCODE.TAB){for(var t=f.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&&(f.selection.info(a[0]).atStart||f.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?l(a):s(a),!1}},!0)},format:function c(e,t){var a,n;for(f.html.syncInputs(),f.selection.save(),f.html.wrap(!0,!0,!0,!0),f.selection.restore(),n=f.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(f.selection.save(),function i(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||o(n):r(n,e),f.html.unwrap(),f.selection.restore(),t=t||"default"){for(n=f.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&&(p(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(p(n[a].parentNode).attr("style")||"").length&&p(n[a].parentNode).removeAttr("style"))}},refresh:function i(e,t){var a=p(f.selection.element());if(a.get(0)!=f.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&&f.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},It.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),It.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"}),It.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"}),It.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"}),It.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),It.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"}),Object.assign(It.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),It.PLUGINS.paragraphFormat=function(p){var u=p.$;function g(e,t){var a=p.html.defaultTag();if(t&&t.toLowerCase()!=a)if(0<e.find("ul, ol").length){var n=u("<"+t+">");e.prepend(n);for(var i=p.node.contents(e.get(0))[0];i&&["UL","OL"].indexOf(i.tagName)<0;){var r=i.nextSibling;n.append(i),i=r}}else e.html("<"+t+">"+e.html()+"</"+t+">")}return{apply:function h(e){"N"==e&&(e=p.html.defaultTag()),p.selection.save(),p.html.wrap(!0,!0,!p.opts.paragraphFormat.BLOCKQUOTE,!0,!0),p.selection.restore();var t,a,n,i,r,o,s,l,c=p.selection.blocks();p.selection.save(),p.$el.find("pre").attr("skip",!0);for(var d=0;d<c.length;d++)if(c[d].tagName!=e&&!p.node.isList(c[d])){var f=u(c[d]);"LI"==c[d].tagName?g(f,e):"LI"==c[d].parentNode.tagName&&c[d]?(o=f,s=e,l=p.html.defaultTag(),s&&s.toLowerCase()!=l||(s='div class="fr-temp-div"'),o.replaceWith(u("<"+s+">").html(o.html()))):0<=["TD","TH"].indexOf(c[d].parentNode.tagName)?(n=f,i=e,r=p.html.defaultTag(),i||(i='div class="fr-temp-div"'+(p.node.isEmpty(n.get(0),!0)?' data-empty="true"':"")),i.toLowerCase()==r?(p.node.isEmpty(n.get(0),!0)||n.append("<br/>"),n.replaceWith(n.html())):n.replaceWith(u("<"+i+">").html(n.html()))):(t=f,(a=e)||(a='div class="fr-temp-div"'+(p.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),"H1"!=a&&"H2"!=a&&"H3"!=a&&"H4"!=a&&"H5"!=a||!p.node.attributes(t.get(0)).includes("font-size:")?t.replaceWith(u("<"+a+" "+p.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(u("<"+a+" "+p.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")))}p.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){u(this).prev().append("<br>"+u(this).html()),u(this).remove()}),p.$el.find("pre").removeAttr("skip"),p.html.unwrap(),p.selection.restore()},refreshOnShow:function o(e,t){var a=p.selection.blocks();if(a.length){var n=a[0],i="N",r=p.html.defaultTag();n.tagName.toLowerCase()!=r&&n!=p.el&&(i=n.tagName),t.find('.fr-command[data-param1="'+i+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function r(e){if(p.opts.paragraphFormatSelection){var t=p.selection.blocks();if(t.length){var a=t[0],n="N",i=p.html.defaultTag();a.tagName.toLowerCase()!=i&&a!=p.el&&(n=a.tagName),0<=["LI","TD","TH"].indexOf(n)&&(n="N"),e.find(">span").text(p.language.translate(p.opts.paragraphFormat[n]))}else e.find(">span").text(p.language.translate(p.opts.paragraphFormat.N))}}}},It.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;" 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"}),It.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"}),Object.assign(It.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),It.PLUGINS.paragraphStyle=function(s){var l=s.$;return{_init:function e(){},apply:function c(e,t,a){void 0===t&&(t=s.opts.paragraphStyles),void 0===a&&(a=s.opts.paragraphMultipleStyles);var n="";a||((n=Object.keys(t)).splice(n.indexOf(e),1),n=n.join(" ")),s.selection.save(),s.html.wrap(!0,!0,!0,!0),s.selection.restore();var i=s.selection.blocks();s.selection.save();for(var r=l(i[0]).hasClass(e),o=0;o<i.length;o++)l(i[o]).removeClass(n).toggleClass(e,!r),l(i[o]).hasClass("fr-temp-div")&&l(i[o]).removeClass("fr-temp-div"),""===l(i[o]).attr("class")&&l(i[o]).removeAttr("class");s.html.unwrap(),s.selection.restore()},refreshOnShow:function i(e,t){var a=s.selection.blocks();if(a.length){var n=l(a[0]);t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=n.hasClass(e);l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},It.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"}),It.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"}),Object.assign(It.DEFAULTS,{html2pdf:window.html2pdf}),It.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 i=a.contentWindow;i.document.open(),i.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),i.document.write(e.outerHTML)});var r=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(r,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",i.document.write(t.outerHTML)}),i.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">'),i.document.write(t),i.document.write("</div></body></html>"),i.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))}}},It.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),It.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),It.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),It.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}}),Object.assign(It.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),It.QUICK_INSERT_BUTTONS={},It.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),It.RegisterQuickInsertButton=function(e,t){It.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},It.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()}}),It.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)}}),It.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)}}),It.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),It.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),It.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),It.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),It.PLUGINS.quickInsert=function(o){var s,l,c=o.$;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<s.outerWidth()?e.offset().left+s.outerWidth():0-s.outerWidth(),o.opts.enter!=It.ENTER_BR)?n=(s.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(It.INVISIBLE_SPACE).insertAfter(e),n=(s.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(o.opts.iframe){var i=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top"));t+=o.$iframe.offset().top+i}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")&&d(),s.removeClass("fr-hidden")),s.css("top",t-n)):s.hasClass("fr-visible")&&(s.addClass("fr-hidden"),f()),s.css("left",a)}function i(e){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&&(f(),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",r),o.events.on("commands.after",function(){o.popups.areVisible()||n()}),o.events.bindClick(o.$box,".fr-quick-insert > a",d),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;It.QUICK_INSERT_BUTTONS[t].callback.apply(o,[e.currentTarget]),It.QUICK_INSERT_BUTTONS[t].undo&&o.undo.saveStep(),o.events.trigger("quickInsert.commands.after",[t]),o.quickInsert.hide()}),o.events.$on(o.$wp,"scroll",p),o.events.$on(o.$tb,"transitionend",".fr-more-toolbar",p)}(),s.hasClass("fr-on")&&f(),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==It.ENTER_BR||o.node.isBlock(e)||(e=o.node.blockParent(e)),o.opts.enter==It.ENTER_BR&&!o.node.isBlock(e)){var t=o.node.deepestParent(e);t&&(e=t)}var a=function a(){return o.opts.enter!=It.ENTER_BR&&o.node.isEmpty(e)&&0<=o.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},n=function n(){return o.opts.enter==It.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")?f():o.selection.isCollapsed()&&i(c(e)):r()}}function r(){s&&(s.hasClass("fr-on")&&f(),s.removeClass("fr-visible fr-on"),s.css("left",-9999).css("top",-9999))}function d(e){if(e&&e.preventDefault(),s.hasClass("fr-on")&&!s.hasClass("fr-hidden"))f();else{if(!o.shared.$qi_helper){for(var t=o.opts.quickInsertButtons,a='<div class="fr-qi-helper">',n=0,i=0;i<t.length;i++){var r=It.QUICK_INSERT_BUTTONS[t[i]];r&&(!r.requiredPlugin||It.PLUGINS[r.requiredPlugin]&&0<=o.opts.pluginsEnabled.indexOf(r.requiredPlugin))&&(a+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(o.language.translate(r.title),'" tabIndex="-1" data-cmd="').concat(t[i],'" style="transition-delay: ').concat(.025*n++,'s;">').concat(o.icon.create(r.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),setTimeout(function(){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 f(){var a=o.$box.find(".fr-qi-helper");a.length&&function(){for(var t=a.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){a.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){a.css("left",-9999),s&&!s.hasClass("fr-hidden")&&s.removeClass("fr-on")},25*e)}()}function p(){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",r),o.events.on("mouseup",n),o.helpers.isMobile()&&o.events.$on(c(o.o_doc),"selectionchange",n),o.events.on("blur",r),o.events.on("keyup",n),o.events.on("keydown",function(){setTimeout(function(){n()},0)})},hide:r}},It.PLUGINS.quote=function(i){var r=i.$;function o(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]=o(t[e]);i.selection.save();var a=r(document.createElement("blockquote"));for(a.insertBefore(t[0]),e=0;e<t.length;e++)a.append(t[e]);i.html.unwrap(),i.selection.restore()}():"decrease"==e&&function a(){var e,t=i.selection.blocks();for(e=0;e<t.length;e++)"BLOCKQUOTE"!=t[e].tagName&&(t[e]=r(t[e]).parentsUntil(i.$el,"BLOCKQUOTE").get(0));for(i.selection.save(),e=0;e<t.length;e++)t[e]&&r(t[e]).replaceWith(t[e].innerHTML);i.html.unwrap(),i.selection.restore()}()}}},It.RegisterShortcut(It.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),It.RegisterShortcut(It.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),It.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"}),It.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"}),Object.assign(It.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),It.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 i(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 i in s.opts.saveParams)if(s.opts.saveParams.hasOwnProperty(i)){var r=s.opts.saveParams[i];a[i]="function"==typeof r?r.call(this):r}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 r(){clearTimeout(n),n=setTimeout(function(){var e=s.html.get();(c!=e||t)&&(t=!1,i(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(r,s.opts.saveInterval)}),s.events.on("keydown destroy",function(){clearTimeout(n)}))},save:i,reset:function e(){r(),t=!1},force:function u(){t=!0}}},It.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),It.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"}),Object.assign(It.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(It.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),It.PLUGINS.specialCharacters=function(h){var m=h.$,a=h.opts.specialCharactersSets[0],i=h.opts.specialCharactersSets,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}(i,a),'\n        </div>\n        <div class="fr-icon-container fr-sc-container">\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,'" \n      title="').concat(t.title,'">').concat(t.splCharValue,"</span>")}),a}(a),"\n        </div>")}return{setSpecialCharacterCategory:function n(t){a=i.filter(function(e){return e.title===t})[0],function e(){h.popups.get("specialCharacters").html(o+s())}()},showSpecialCharsPopup:function l(){var e=h.popups.get("specialCharacters");if(e||(e=function r(){h.opts.toolbarInline&&0<h.opts.specialCharButtons.length&&(o='<div class="fr-buttons fr-tabs">'.concat(h.button.buildList(h.opts.specialCharButtons),"</div>"));var e={buttons:o,custom_layer:s()},t=h.popups.create("specialCharacters",e);return function a(g){h.events.on("popup.tab",function(e){var t=m(e.currentTarget);if(!h.popups.isVisible("specialCharacters")||!t.is("span, a"))return!0;var a,n,i,r=e.which;if(It.KEYCODE.TAB==r){if(t.is("span.fr-icon")&&e.shiftKey||t.is("a")&&!e.shiftKey){var o=g.find(".fr-buttons");a=!h.accessibility.focusToolbar(o,!!e.shiftKey)}if(!1!==a){var s=g.find("span.fr-icon:focus").first().concat(g.findVisible(" span.fr-icon").first().concat(g.find("a")));t.is("span.fr-icon")&&(s=s.not("span.fr-icon:not(:focus)")),n=s.index(t),n=e.shiftKey?((n-1)%s.length+s.length)%s.length:(n+1)%s.length,i=s.get(n),h.events.disableBlur(),i.focus(),a=!1}}else if(It.KEYCODE.ARROW_UP==r||It.KEYCODE.ARROW_DOWN==r||It.KEYCODE.ARROW_LEFT==r||It.KEYCODE.ARROW_RIGHT==r){if(t.is("span.fr-icon")){var l=t.parent().find("span.fr-icon");n=l.index(t);var c=Math.floor(l.length/11),d=n%11,f=Math.floor(n/11),p=11*f+d,u=11*c;It.KEYCODE.ARROW_UP==r?p=((p-11)%u+u)%u:It.KEYCODE.ARROW_DOWN==r?p=(p+11)%u:It.KEYCODE.ARROW_LEFT==r?p=((p-1)%u+u)%u:It.KEYCODE.ARROW_RIGHT==r&&(p=(p+1)%u),i=m(l.get(p)),h.events.disableBlur(),i.focus(),a=!1}}else It.KEYCODE.ENTER==r&&(t.is("a")?t[0].click():h.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(t),t}()),!e.hasClass("fr-active")){h.popups.refresh("specialCharacters"),h.popups.setContainer("specialCharacters",h.$tb);var t=h.$tb.find('.fr-command[data-cmd="specialCharacters"]'),a=h.button.getPosition(t),n=a.left,i=a.top;h.popups.show("specialCharacters",n,i,outerHeight)}},back:function e(){h.popups.hide("specialCharacters"),h.toolbar.showInline()}}},It.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),It.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()}}),It.RegisterCommand("insertSpecialCharacter",{callback:function(e,t){this.undo.saveStep(),this.html.insert(t),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),It.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(e,t){this.specialCharacters.setSpecialCharacterCategory(t)}}),It.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}}),Object.assign(It.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(It.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","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,tableInsertHelperOffset:15}),It.PLUGINS.table=function(T){var C,c,i,r,n,o,R,w=T.$;function u(){var e=S();if(e){var t=T.popups.get("table.edit");if(t||(t=p()),t){T.popups.setContainer("table.edit",T.$sc);var a=k(e),n=a.left+(a.right-a.left)/2,i=a.bottom;T.popups.show("table.edit",n,i,a.bottom-a.top,!0),T.edit.isDisabled()&&(1<J().length&&T.toolbar.disable(),T.$el.removeClass("fr-no-selection"),T.edit.on(),T.button.bulkRefresh(),T.selection.setAtEnd(T.$el.find(".fr-selected-cell").last().get(0)),T.selection.restore())}}}function s(){var e=S();if(e){var t=T.popups.get("table.colors");t||(t=function o(){var e="";0<T.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(T.button.buildList(T.opts.tableColorsButtons),"</div>"));var t="";T.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(T.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(T.id,'" type="text" placeholder="').concat(T.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(T.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function i(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<T.opts.tableColors.length;t++)0!==t&&t%T.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=T.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(T.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(T.opts.tableColors[t],'"><span class="fr-sr-only">').concat(T.language.translate("Color")," ").concat(T.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(T.language.translate("Clear Formatting"),'">').concat(T.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(T.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},n=T.popups.create("table.colors",a);return T.events.$on(T.$wp,"scroll.table-colors",function(){T.popups.isVisible("table.colors")&&s()}),function r(g){T.events.on("popup.tab",function(e){var t=w(e.currentTarget);if(!T.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,n=!0;if(It.KEYCODE.TAB==a){var i=g.find(".fr-buttons");n=!T.accessibility.focusToolbar(i,!!e.shiftKey)}else if(It.KEYCODE.ARROW_UP==a||It.KEYCODE.ARROW_DOWN==a||It.KEYCODE.ARROW_LEFT==a||It.KEYCODE.ARROW_RIGHT==a){var r=t.parent().find("span.fr-command"),o=r.index(t),s=T.opts.colorsStep,l=Math.floor(r.length/s),c=o%s,d=Math.floor(o/s),f=d*s+c,p=l*s;It.KEYCODE.ARROW_UP==a?f=((f-s)%p+p)%p:It.KEYCODE.ARROW_DOWN==a?f=(f+s)%p:It.KEYCODE.ARROW_LEFT==a?f=((f-1)%p+p)%p:It.KEYCODE.ARROW_RIGHT==a&&(f=(f+1)%p);var u=w(r.get(f));T.events.disableBlur(),u.focus(),n=!1}else It.KEYCODE.ENTER==a&&(T.button.exec(t),n=!1);return!1===n&&(e.preventDefault(),e.stopPropagation()),n},!0)}(n),n}()),T.popups.setContainer("table.colors",T.$sc);var a=k(e),n=(a.left+a.right)/2,i=a.bottom;!function r(){var e=T.popups.get("table.colors"),t=T.$el.find(".fr-selected-cell").first(),a=T.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")}(),T.popups.show("table.colors",n,i,a.bottom-a.top,!0)}}function l(){0===J().length&&T.toolbar.enable()}function d(e){if(e)return T.popups.onHide("table.insert",function(){T.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<T.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(T.button.buildList(T.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function r(){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<=T.opts.tableInsertMaxSize;t++){for(var a=1;a<=T.opts.tableInsertMaxSize;a++){var n="inline-block";2<t&&!T.helpers.isMobile()&&(n="none");var i="fr-table-cell ";1==t&&1==a&&(i+=" hover"),e+='<span class="fr-command '.concat(i,'" 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=T.popups.create("table.insert",a);return T.events.$on(n,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){f(w(e.currentTarget))},!0),function i(e){T.events.$on(e,"focus","[tabIndex]",function(e){var t=w(e.currentTarget);f(t)}),T.events.on("popup.tab",function(e){var t=w(e.currentTarget);if(!T.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,n=e.which;if(It.KEYCODE.ARROW_UP==n||It.KEYCODE.ARROW_DOWN==n||It.KEYCODE.ARROW_LEFT==n||It.KEYCODE.ARROW_RIGHT==n){if(t.is("span.fr-table-cell")){var i=t.parent().find("span.fr-table-cell"),r=i.index(t),o=T.opts.tableInsertMaxSize,s=r%o,l=Math.floor(r/o);It.KEYCODE.ARROW_UP==n?l=Math.max(0,l-1):It.KEYCODE.ARROW_DOWN==n?l=Math.min(T.opts.tableInsertMaxSize-1,l+1):It.KEYCODE.ARROW_LEFT==n?s=Math.max(0,s-1):It.KEYCODE.ARROW_RIGHT==n&&(s=Math.min(T.opts.tableInsertMaxSize-1,s+1));var c=l*o+s,d=w(i.get(c));f(d),T.events.disableBlur(),d.focus(),a=!1}}else It.KEYCODE.ENTER==n&&(T.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 i=1;i<=T.opts.tableInsertMaxSize;i++)for(var r=0;r<=T.opts.tableInsertMaxSize;r++){var o=n.find('> span[data-row="'.concat(i,'"][data-col="').concat(r,'"]'));i<=t&&r<=a?o.addClass("hover"):i<=t+1||i<=2&&!T.helpers.isMobile()?o.css("display","inline-block"):2<i&&!T.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return T.popups.onHide("table.edit",l),!0;if(0<T.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(T.button.buildList(T.opts.tableEditButtons),"</div>")},a=T.popups.create("table.edit",t);return T.events.$on(T.$wp,"scroll.table-edit",function(){T.popups.isVisible("table.edit")&&u()}),a}return!1}function g(){if(0<J().length){var e=Z();T.selection.setBefore(e.get(0))||T.selection.setAfter(e.get(0)),T.selection.restore(),T.popups.hide("table.edit"),e.remove(),T.toolbar.enable()}}function h(e){var t=Z();if(0<t.length){if(0<T.$el.find("th.fr-selected-cell").length&&"above"==e)return;var a,n,i,r=S(),o=x(r);if(null==o)return;n="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<r[n].length;a++){if("below"==e&&n<r.length-1&&r[n][a]==r[n+1][a]||"above"==e&&0<n&&r[n][a]==r[n-1][a]){if(0===a||0<a&&r[n][a]!=r[n][a-1]){var l=w(r[n][a]);l.attr("rowspan",parseInt(l.attr("rowspan"),10)+1)}}else s+='<td style="'+w(r[n][a]).attr("style")+'" ><br></td>'}s+="</tr>",i=0<T.$el.find("th.fr-selected-cell").length&&"below"==e?w(t.find("tbody").not(t.find("> table tbody"))):w(t.find("tr").not(t.find("> table tr")).get(n)),"below"==e?"TBODY"==i.attr("tagName")?i.prepend(s):i[0].parentNode&&i[0].insertAdjacentHTML("afterend",s):"above"==e&&(i.before(s),T.popups.isVisible("table.edit")&&u())}}function m(e,t,a){var n,i,r,o,s,l=0,c=S(a);if(e<(t=Math.min(t,c[0].length-1)))for(i=e;i<=t;i++)if(!(e<i&&c[0][i]==c[0][i-1])&&1<(o=Math.min(parseInt(c[0][i].getAttribute("colspan"),10)||1,t-e+1))&&c[0][i]==c[0][i+1])for(l=o-1,n=1;n<c.length;n++)if(c[n][i]!=c[n-1][i]){for(r=i;r<i+o;r++)if(1<(s=parseInt(c[n][r].getAttribute("colspan"),10)||1)&&c[n][r]==c[n][r+1])r+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&b(c,l,"colspan",0,c.length-1,e,t)}function v(e,t,a){var n,i,r,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])&&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,i=1;i<c[0].length;i++)if(c[n][i]!=c[n][i-1]){for(r=n;r<n+o;r++)if(1<(s=parseInt(c[r][i].getAttribute("rowspan"),10)||1)&&c[r][i]==c[r+1][i])r+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&b(c,l,"rowspan",e,t,0,c[0].length-1)}function b(e,t,a,n,i,r,o){var s,l,c;for(s=n;s<=i;s++)for(l=r;l<=o;l++)n<s&&e[s][l]==e[s-1][l]||r<l&&e[s][l]==e[s][l-1]||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 E(e,t,a,n,i){v(e,t,i),m(a,n,i)}function t(e){var t=T.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",T.helpers.HEXtoRGB(e)):t.css("background-color",""),u()}function S(e){var c=[];return null==(e=e||null)&&0<J().length&&(e=Z()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(s,e){var t=w(e),l=0;t.find("> th, > td").each(function(e,t){for(var a=w(t),n=parseInt(a.attr("colspan"),10)||1,i=parseInt(a.attr("rowspan"),10)||1,r=s;r<s+i;r++)for(var o=l;o<l+n;o++)c[r]||(c[r]=[]),c[r][o]?l++:c[r][o]=t;l+=n})}),c}function _(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,i=t+1;n<a.length;){if(a[n][t]!=a[e][t]){n--;break}n++}for(n==a.length&&n--;i<a[e].length;){if(a[e][i]!=a[e][t]){i--;break}i++}return i==a[e].length&&i--,{row:n,col:i}}function A(){T.el.querySelector(".fr-cell-fixed")&&T.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),T.el.querySelector(".fr-cell-handler")&&T.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function y(){var e=T.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=w(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),A()}function I(){T.events.disableBlur(),T.selection.clear(),T.$el.addClass("fr-no-selection"),T.$el.blur(),T.events.enableBlur()}function x(e){var t=T.$el.find(".fr-selected-cell");if(0<t.length){var a,n=e.length,i=0,r=e[0].length,o=0;for(a=0;a<t.length;a++){var s=_(t[a],e),l=L(s.row,s.col,e);n=Math.min(s.row,n),i=Math.max(l.row,i),r=Math.min(s.col,r),o=Math.max(l.col,o)}return{min_i:n,max_i:i,min_j:r,max_j:o}}return null}function k(e){var t=x(e);if(null!=t){var a=w(e[t.min_i][t.min_j]),n=w(e[t.min_i][t.max_j]),i=w(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:i.length&&i.offset().top+i.outerHeight()}}}function O(e,t){if(w(e).is(t))y(),w(e).addClass("fr-selected-cell");else{I(),T.edit.off();var a=S(),n=_(e,a),i=_(t,a),r=function u(e,t,a,n,i){var r,o,s,l,c=e,d=t,f=a,p=n;for(r=c;r<=d;r++)(1<(parseInt(w(i[r][f]).attr("rowspan"),10)||1)||1<(parseInt(w(i[r][f]).attr("colspan"),10)||1))&&(l=L((s=_(i[r][f],i)).row,s.col,i),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(w(i[r][p]).attr("rowspan"),10)||1)||1<(parseInt(w(i[r][p]).attr("colspan"),10)||1))&&(l=L((s=_(i[r][p],i)).row,s.col,i),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(w(i[c][o]).attr("rowspan"),10)||1)||1<(parseInt(w(i[c][o]).attr("colspan"),10)||1))&&(l=L((s=_(i[c][o],i)).row,s.col,i),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(w(i[d][o]).attr("rowspan"),10)||1)||1<(parseInt(w(i[d][o]).attr("colspan"),10)||1))&&(l=L((s=_(i[d][o],i)).row,s.col,i),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,i)}(Math.min(n.row,i.row),Math.max(n.row,i.row),Math.min(n.col,i.col),Math.max(n.col,i.col),a);y(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=r.min_i;o<=r.max_i;o++)for(var s=r.min_j;s<=r.max_j;s++)w(a[o][s]).addClass("fr-selected-cell")}}function F(e){var t=null,a=w(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===T.$el.html.toString().search(t)?null:t}function D(){y(),T.popups.hide("table.edit")}function e(e){var t=F(e);if("false"==w(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<J().length&&!t&&D(),!T.edit.isDisabled()||T.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&T.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&T.helpers.isMac()&&e.ctrlKey)&&t&&D();else if(r=!0,t){0<J().length&&!e.shiftKey&&D(),e.stopPropagation(),T.events.trigger("image.hideResizer"),T.events.trigger("video.hideResizer"),i=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<T.$el.find("".concat(a,".fr-selected-cell")).length?w(T.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(w(t).closest("table"))?O(n,t):I():((T.keys.ctrlKey(e)||e.shiftKey)&&(1<J().length||0===w(t).find(T.selection.element()).length&&!w(t).is(T.selection.element()))&&I(),n=t,0<T.opts.tableEditButtons.length&&O(n,n))}}function a(e){if(!T.edit.isDisabled()&&T.popups.areVisible())return!0;if(i||T.$tb.is(e.target)||T.$tb.is(w(e.target).closest(".fr-toolbar"))||(0<J().length&&T.toolbar.enable(),y()),!(1!=e.which||1==e.which&&T.helpers.isMac()&&e.ctrlKey)){if(r=!1,i)i=!1,F(e)||1!=J().length?0<J().length&&(T.selection.isCollapsed()?u():(y(),T.edit.on())):y();if(R){R=!1,C.removeClass("fr-moving"),T.$el.removeClass("fr-no-selection"),T.edit.on();var t=parseFloat(C.css("left"))+T.opts.tableResizerOffset+T.$wp.offset().left;T.opts.iframe&&(t-=T.$iframe.offset().left),C.data("release-position",t),C.removeData("max-left"),C.removeData("max-right"),function A(){var e=C.data("origin"),t=C.data("release-position");if(e!==t){var a=C.data("first"),n=C.data("second"),i=C.data("table"),r=i.outerWidth();if(T.undo.canDo()||T.undo.saveStep(),null!=a&&null!=n){var o,s,l,c=S(i),d=[],f=[],p=[],u=[];for(o=0;o<c.length;o++)s=w(c[o][a]),l=w(c[o][n]),d[o]=s.outerWidth(),p[o]=l.outerWidth(),f[o]=d[o]/r*100,u[o]=p[o]/r*100;for(o=0;o<c.length;o++)if(s=w(c[o][a]),l=w(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=i.parent(),v=r/m.width()*100,b=(parseInt(i.css("margin-left"),10)||0)/m.width()*100,E=(parseInt(i.css("margin-right"),10)||0)/m.width()*100;"rtl"==T.opts.direction&&0===n||"rtl"!=T.opts.direction&&0!==n?(h=(r+t-e)/r*v,i.css("margin-right","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(b).toFixed(4),"%)"))):("rtl"==T.opts.direction&&0!==n||"rtl"!=T.opts.direction&&0===n)&&(h=(r-t+e)/r*v,i.css("margin-left","calc(100% - ".concat(Math.round(h).toFixed(4),"% - ").concat(Math.round(E).toFixed(4),"%)"))),i.css("width","".concat(Math.round(h).toFixed(4),"%"))}T.selection.restore(),T.undo.saveStep(),T.events.trigger("table.resized",[i.get(0)])}C.removeData("origin"),C.removeData("release-position"),C.removeData("first"),C.removeData("second"),C.removeData("table")}(),U()}}}function M(e){if(T.events.$on(w("input"),"click",ee),!0===i&&0<T.opts.tableEditButtons.length){if(w(e.currentTarget).closest("table").is(Z())){if("TD"==e.currentTarget.tagName&&0===T.$el.find("th.fr-selected-cell").length)return void O(n,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===T.$el.find("td.fr-selected-cell").length)return void O(n,e.currentTarget)}I()}}function B(e,t,a,n){for(var i,r=t;r!=T.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==n?i=r.previousElementSibling:"down"==n&&(i=r.nextElementSibling),!i);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=T.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var n=S(w(a));"up"==t?N(_(e,n),a,n):"down"==t&&P(_(e,n),a,n)}}(r,n):i&&("up"==n&&T.selection.setAtEnd(i),"down"==n&&T.selection.setAtStart(i))}function N(e,t,a){0<e.row?T.selection.setAtEnd(a[e.row-1][e.col]):B(0,t,0,"up")}function P(e,t,a){var n=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-n?T.selection.setAtStart(a[e.row+n][e.col]):B(0,t,0,"down")}function U(){C&&(C.find("div").css("opacity",0),C.css("top",0),C.css("left",0),C.css("height",0),C.find("div").css("height",0),C.hide())}function H(){c&&c.removeClass("fr-visible").css("left","-9999px")}function W(e,t){var a=w(t),n=a.closest("table"),i=n.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<a.closest("td").length?t=a.closest("td"):0<a.closest("th").length&&(t=a.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)C&&a.get(0)!=C.get(0)&&a.parent().get(0)!=C.get(0)&&T.core.sameInstance(C)&&U();else{if(a=w(t),0===T.$el.find(a).length)return!1;var r=a.offset().left-1,o=r+a.outerWidth();if(Math.abs(e.pageX-r)<=T.opts.tableResizerOffset||Math.abs(o-e.pageX)<=T.opts.tableResizerOffset){var s,l,c,d,f,p=S(n),u=_(t,p),g=L(u.row,u.col,p),h=n.offset().top,m=n.outerHeight()-1;"rtl"!=T.opts.direction?e.pageX-r<=T.opts.tableResizerOffset?(c=r,0<u.col?(d=r-Y(u.col-1,p)+T.opts.tableResizingLimit,f=r+Y(u.col,p)-T.opts.tableResizingLimit,s=u.col-1,l=u.col):(s=null,l=0,d=n.offset().left-1-parseInt(n.css("margin-left"),10),f=n.offset().left-1+n.width()-p[0].length*T.opts.tableResizingLimit)):o-e.pageX<=T.opts.tableResizerOffset&&(c=o,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=o-Y(g.col,p)+T.opts.tableResizingLimit,f=o+Y(g.col+1,p)-T.opts.tableResizingLimit,s=g.col,l=g.col+1):(s=g.col,l=null,d=n.offset().left-1+p[0].length*T.opts.tableResizingLimit,f=i.offset().left-1+i.width()+parseFloat(i.css("padding-left")))):o-e.pageX<=T.opts.tableResizerOffset?(c=o,0<u.col?(d=o-Y(u.col,p)+T.opts.tableResizingLimit,f=o+Y(u.col-1,p)-T.opts.tableResizingLimit,s=u.col,l=u.col-1):(s=null,l=0,d=n.offset().left+p[0].length*T.opts.tableResizingLimit,f=i.offset().left-1+i.width()+parseFloat(i.css("padding-left")))):e.pageX-r<=T.opts.tableResizerOffset&&(c=r,g.col<p[g.row].length&&p[g.row][g.col+1]?(d=r-Y(g.col+1,p)+T.opts.tableResizingLimit,f=r+Y(g.col,p)-T.opts.tableResizingLimit,s=g.col+1,l=g.col):(s=g.col,l=null,d=i.offset().left+parseFloat(i.css("padding-left")),f=n.offset().left-1+n.width()-p[0].length*T.opts.tableResizingLimit)),C||function y(){T.shared.$table_resizer||(T.shared.$table_resizer=w(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),C=T.shared.$table_resizer,T.events.$on(C,"mousedown",function(e){return!T.core.sameInstance(C)||(0<J().length&&D(),1==e.which?(T.selection.save(),R=!0,C.addClass("fr-moving"),I(),T.edit.off(),C.find("div").css("opacity",1),!1):void 0)}),T.events.$on(C,"mousemove",function(e){if(!T.core.sameInstance(C))return!0;R&&(T.opts.iframe&&(e.pageX-=T.$iframe.offset().left),j(e))}),T.events.on("shared.destroy",function(){C.html("").removeData().remove(),C=null},!0),T.events.on("destroy",function(){T.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),w("body").first().append(C.hide())},!0)}(),C.data("table",n),C.data("first",s),C.data("second",l),C.data("instance",T),T.$wp.append(C);var v=c-T.win.pageXOffset-T.opts.tableResizerOffset-T.$wp.offset().left,b=h-T.$wp.offset().top+T.$wp.scrollTop();if(T.opts.iframe){var E=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top")),A=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-left"));v+=T.$iframe.offset().left+A,b+=T.$iframe.offset().top+E,d+=T.$iframe.offset().left,f+=T.$iframe.offset().left}C.data("max-left",d),C.data("max-right",f),C.data("origin",c-T.win.pageXOffset),C.css("top",b),C.css("left",v),C.css("height",m),C.find("div").css("height",m),C.css("padding-left",T.opts.tableResizerOffset),C.css("padding-right",T.opts.tableResizerOffset),C.show()}else T.core.sameInstance(C)&&U()}}function K(e,t){if(T.$box.find(".fr-line-breaker").isVisible())return!1;c||X(),T.$box.append(c),c.data("instance",T);var a,n=w(t).find("tr").first(),i=e.pageX,r=0,o=0;if(T.opts.iframe){var s=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top")),l=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-left"));r+=T.$iframe.offset().left-T.helpers.scrollLeft()+l,o+=T.$iframe.offset().top-T.helpers.scrollTop()+s}n.find("th, td").each(function(){var e=w(this);return e.offset().left<=i&&i<e.offset().left+e.outerWidth()/2?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-T.$box.offset().top-a-5),c.css("left",r+e.offset().left-T.$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<=i&&i<e.offset().left+e.outerWidth()?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-T.$box.offset().top-a-5),c.css("left",r+e.offset().left-T.$box.offset().left+e.outerWidth()-a/2),c.data("selected-cell",e),c.data("position","after"),c.addClass("fr-visible"),!1):void 0})}function $(e,t){if(T.$box.find(".fr-line-breaker").isVisible())return!1;c||X(),T.$box.append(c),c.data("instance",T);var a,n=w(t),i=e.pageY,r=0,o=0;if(T.opts.iframe){var s=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top")),l=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-left"));r+=T.$iframe.offset().left-T.helpers.scrollLeft()+l,o+=T.$iframe.offset().top-T.helpers.scrollTop()+s}n.find("tr").each(function(){var e=w(this);return e.offset().top<=i&&i<e.offset().top+e.outerHeight()/2?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-T.$box.offset().top-a/2),c.css("left",r+e.offset().left-T.$box.offset().left-a-5),c.data("selected-cell",e.find("td").first()),c.data("position","above"),c.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=i&&i<e.offset().top+e.outerHeight()?(a=parseInt(c.find("a").css("width"),10),c.css("top",o+e.offset().top-T.$box.offset().top+e.outerHeight()-a/2),c.css("left",r+e.offset().left-T.$box.offset().left-a-5),c.data("selected-cell",e.find("td").first()),c.data("position","below"),c.addClass("fr-visible"),!1):void 0})}function z(e){o=null;var t=T.doc.elementFromPoint(e.pageX-T.win.pageXOffset,e.pageY-T.win.pageYOffset);T.opts.tableResizer&&(!T.popups.areVisible()||T.popups.areVisible()&&T.popups.isVisible("table.edit"))&&W(e,t),!T.opts.tableInsertHelper||T.popups.areVisible()||T.$tb.hasClass("fr-inline")&&T.$tb.isVisible()||function r(e,t){if(0===J().length){var a,n,i;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||T.node.isElement(t)))for(a=1;a<=T.opts.tableInsertHelperOffset;a++){if(n=T.doc.elementFromPoint(e.pageX-T.win.pageXOffset,e.pageY-T.win.pageYOffset+a),w(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(w(n).parents(".fr-wrapper").length||T.opts.iframe)&&"false"!=w(n).closest("table").attr("contenteditable"))return K(e,w(n).closest("table")),!0;if(i=T.doc.elementFromPoint(e.pageX-T.win.pageXOffset+a,e.pageY-T.win.pageYOffset),w(i).hasClass("fr-tooltip"))return!0;if(i&&("TH"==i.tagName||"TD"==i.tagName||"TABLE"==i.tagName)&&(w(i).parents(".fr-wrapper").length||T.opts.iframe)&&"false"!=w(i).closest("table").attr("contenteditable"))return $(e,w(i).closest("table")),!0}T.core.sameInstance(c)&&H()}}(e,t)}function G(){if(R){var e=C.data("table").offset().top-T.win.pageYOffset;if(T.opts.iframe){var t=T.helpers.getPX(T.$wp.find(".fr-iframe").css("padding-top"));e+=T.$iframe.offset().top-T.helpers.scrollTop()+t}C.css("top",e)}}function Y(e,t){var a,n=w(t[0][e]).outerWidth();for(a=1;a<t.length;a++)n=Math.min(n,w(t[a][e]).outerWidth());return n}function V(e,t,a){var n,i=0;for(n=e;n<=t;n++)i+=Y(n,a);return i}function j(e){if(1<J().length&&r&&I(),!1===r&&!1===i&&!1===R)o&&clearTimeout(o),T.edit.isDisabled()&&!T.popups.isVisible("table.edit")||(o=setTimeout(z,30,e));else if(R){var t=e.pageX-T.win.pageXOffset;T.opts.iframe&&(t+=T.$iframe.offset().left);var a=C.data("max-left"),n=C.data("max-right");a<=t&&t<=n?C.css("left",t-T.opts.tableResizerOffset-T.$wp.offset().left):t<a&&parseFloat(C.css("left"),10)>a-T.opts.tableResizerOffset?C.css("left",a-T.opts.tableResizerOffset-T.$wp.offset().left):n<t&&parseFloat(C.css("left"),10)<n-T.opts.tableResizerOffset&&C.css("left",n-T.opts.tableResizerOffset-T.$wp.offset().left)}else r&&H()}function q(e){T.node.isEmpty(e.get(0))?e.prepend(It.MARKERS):e.prepend(It.START_MARKER).append(It.END_MARKER)}function X(){T.shared.$ti_helper||(T.shared.$ti_helper=w(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(T.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>')),T.events.bindClick(T.shared.$ti_helper,"a",function(){var e=c.data("selected-cell"),t=c.data("position"),a=c.data("instance")||T;"before"==t?(T.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),T.undo.saveStep()):"after"==t?(T.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),T.undo.saveStep()):"above"==t?(T.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),T.undo.saveStep()):"below"==t&&(T.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),T.undo.saveStep()),H()}),T.events.on("shared.destroy",function(){T.shared.$ti_helper.html("").removeData().remove(),T.shared.$ti_helper=null},!0),T.events.$on(T.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),T.events.$on(w(T.o_win),"scroll",function(){H()},!0),T.events.$on(T.$wp,"scroll",function(){H()},!0)),c=T.shared.$ti_helper,T.events.on("destroy",function(){c=null}),T.tooltip.bind(T.$box,".fr-insert-helper > a.fr-floating-btn")}function Q(){n=null,clearTimeout(o)}function J(){return T.el.querySelectorAll(".fr-selected-cell")}function Z(){var e=J();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=T.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?w(t):w([])}return w([])}function ee(e){i=!1}return{_init:function te(){if(!T.$wp)return!1;if(!T.helpers.isMobile()){R=i=r=!1,T.events.$on(T.$el,"mousedown",e),T.popups.onShow("image.edit",function(){y(),i=r=!1}),T.popups.onShow("link.edit",function(){y(),i=r=!1}),T.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&y()}),T.events.$on(T.$el,"mouseover","th, td",M),T.events.$on(T.$win,"mouseup",a),T.opts.iframe&&T.events.$on(w(T.o_win),"mouseup",a),T.events.$on(T.$win,"mousemove",j),T.events.$on(w(T.o_win),"scroll",G),T.events.on("contentChanged",function(){0<J().length&&(u(),T.$el.find("img").on("load.selected-cells",function(){w(this).off("load.selected-cells"),0<J().length&&u()}))}),T.events.$on(w(T.o_win),"resize",function(){y()}),T.events.on("toolbar.esc",function(){if(0<J().length)return T.events.disableBlur(),T.events.focus(),!1},!0),T.events.$on(w(T.o_win),"keydown",function(){r&&i&&(i=r=!1,T.$el.removeClass("fr-no-selection"),T.edit.on(),T.selection.setAtEnd(T.$el.find(".fr-selected-cell").last().get(0)),T.selection.restore(),y())}),T.events.$on(T.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=J();if(null!=t&&0<t.length){var a,n=S(),i=e.which,r=_(1==t.length?a=t[0]:(a=T.el.querySelector(".fr-cell-fixed"),T.el.querySelector(".fr-cell-handler")),n);if(It.KEYCODE.ARROW_RIGHT==i){if(r.col<n[0].length-1)return O(a,n[r.row][r.col+1]),!1}else if(It.KEYCODE.ARROW_DOWN==i){if(r.row<n.length-1)return O(a,n[r.row+1][r.col]),!1}else if(It.KEYCODE.ARROW_LEFT==i){if(0<r.col)return O(a,n[r.row][r.col-1]),!1}else if(It.KEYCODE.ARROW_UP==i&&0<r.row)return O(a,n[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){u()},0):function s(e){var t=e.which,a=T.selection.blocks();if(a.length&&("TD"==(a=a[0]).tagName||"TH"==a.tagName)){for(var n=a;n&&"TABLE"!=n.tagName&&n.parentNode!=T.el;)n=n.parentNode;if(n&&"TABLE"==n.tagName&&(It.KEYCODE.ARROW_LEFT==t||It.KEYCODE.ARROW_UP==t||It.KEYCODE.ARROW_RIGHT==t||It.KEYCODE.ARROW_DOWN==t)&&(0<J().length&&D(),T.browser.webkit&&(It.KEYCODE.ARROW_UP==t||It.KEYCODE.ARROW_DOWN==t))){var i=T.selection.ranges(0).startContainer;if(i.nodeType==Node.TEXT_NODE&&(It.KEYCODE.ARROW_UP==t&&(i.previousSibling&&"BR"!==i.previousSibling.tagName||i.previousSibling&&"BR"===i.previousSibling.tagName&&i.previousSibling.previousSibling)||It.KEYCODE.ARROW_DOWN==t&&(i.nextSibling&&"BR"!==i.nextSibling.tagName||i.nextSibling&&"BR"===i.nextSibling.tagName&&i.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=S(w(n)),o=_(a,r);return It.KEYCODE.ARROW_UP==t?N(o,n,r):It.KEYCODE.ARROW_DOWN==t&&P(o,n,r),T.selection.restore(),!1}}}(e)}),T.events.on("keydown",function(e){if(!1===function n(e){if(e.which==It.KEYCODE.TAB){var t;if(0<J().length)t=T.$el.find(".fr-selected-cell").last();else{var a=T.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=w(a):a!=T.el&&(0<w(a).parentsUntil(T.$el,"td").length?t=w(a).parents("td").first():0<w(a).parentsUntil(T.$el,"th").length&&(t=w(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===T.selection.get().focusOffset&&0<w(T.selection.element()).parentsUntil(T.$el,"ol, ul").length&&(0<w(T.selection.element()).closest("li").prev().length||w(T.selection.element()).is("li")&&0<w(T.selection.element()).prev().length))||(D(),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"),h("below"),y(),q(t.closest("tr").next().find("td").first())),T.selection.restore(),!1)}}(e))return!1;var t=J();if(0<t.length){if(0<t.length&&T.keys.ctrlKey(e)&&e.which==It.KEYCODE.A)return y(),T.popups.isVisible("table.edit")&&T.popups.hide("table.edit"),t=[],!0;if(e.which==It.KEYCODE.ESC&&T.popups.isVisible("table.edit"))return y(),T.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==It.KEYCODE.BACKSPACE||e.which==It.KEYCODE.DELETE)){T.undo.saveStep();for(var a=0;a<t.length;a++)w(t[a]).html("<br>"),a==t.length-1&&w(t[a]).prepend(It.MARKERS);return T.selection.restore(),T.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=It.KEYCODE.F10&&!T.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function i(e){if(e.altKey&&e.which==It.KEYCODE.SPACE){var t,a=T.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<w(a).closest("td").length?t=w(a).closest("td").get(0):0<w(a).closest("th").length&&(t=w(a).closest("th").get(0)),t)return e.preventDefault(),O(t,t),u(),!1}}(e))return!1},!0);var t=[];T.events.on("html.beforeGet",function(){t=J();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),T.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)}T.events.on("destroy",Q)},insert:function ae(e,t){var a,n,i="<table "+(T.opts.tableDefaultWidth?'style="width: '+T.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(a=0;a<e;a++){for(i+="<tr>",n=0;n<t;n++)i+="<td"+(T.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===a&&0===n&&(i+=It.MARKERS),i+="<br></td>";i+="</tr>"}i+="</tbody></table>",T.html.insert(i),T.selection.restore();var o=T.$el.find(".fr-inserted-table");o.removeClass("fr-inserted-table"),T.events.trigger("table.inserted",[o.get(0)])},remove:g,insertRow:h,deleteRow:function ne(){var e=Z();if(0<e.length){var t,a,n,i=S(),r=x(i);if(null==r)return;if(0===r.min_i&&r.max_i==i.length-1)g();else{for(t=r.max_i;t>=r.min_i;t--){for(n=w(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<i[t].length;a++)if(0===a||i[t][a]!=i[t][a-1]){var o=w(i[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<i.length-1&&i[t][a]==i[t+1][a]&&(0===t||i[t][a]!=i[t-1][a])){for(var l=i[t][a],c=a;0<c&&i[t][c]==i[t][c-1];)c--;0===c?w(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(l):w(i[t+1][c-1])[0].parentNode&&w(i[t+1][c-1])[0].insertAdjacentElement("afterend",l)}}var d=n.parent();n.remove(),0===d.find("tr").length&&d.remove(),i=S(e)}E(0,i.length-1,0,i[0].length-1,e),0<r.min_i?T.selection.setAtEnd(i[r.min_i-1][0]):T.selection.setAtEnd(i[0][0]),T.selection.restore(),T.popups.hide("table.edit")}}},insertColumn:function ie(l){var e=Z();if(0<e.length){var c,d=S(),t=x(d);c="before"==l?t.min_j:t.max_j;var a,f=100/d[0].length,p=100/(d[0].length+1);e.find("th, td").each(function(){(a=w(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=w(this),n=0,i=0;n-1<c;){if(!(t=a.find("> th, > td").get(i))){t=null;break}t==d[e][n]?(n+=parseInt(w(t).attr("colspan"),10)||1,i++):(n+=parseInt(w(d[e][n]).attr("colspan"),10)||1,"after"==l&&(t=0===i?-1:a.find("> th, > td").get(i-1)))}var r,o=w(t);if("after"==l&&c<n-1||"before"==l&&0<c&&d[e][c]==d[e][c-1]){if(0===e||0<e&&d[e][c]!=d[e-1][c]){var s=parseInt(o.attr("colspan"),10)+1;o.attr("colspan",s),o.css("width",(o.data("old-width")*p/f+p).toFixed(4)+"%"),o.removeData("old-width")}}else r=0<a.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==t?a.prepend(r):null==t?a.append(r):"before"==l?o.before(r):"after"==l&&o[0].parentNode&&o[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(a=w(this)).data("old-width")&&(a.css("width",(a.data("old-width")*p/f).toFixed(4)+"%"),a.removeData("old-width"))}),T.popups.isVisible("table.edit")&&u()}},deleteColumn:function re(){var e=Z();if(0<e.length){var t,a,n,i=S(),r=x(i);if(null==r)return;if(0===r.min_j&&r.max_j==i[0].length-1)g();else{var o=0;for(t=0;t<i.length;t++)for(a=0;a<i[0].length;a++)(n=w(i[t][a])).hasClass("fr-selected-cell")||(n.data("old-width",n.outerWidth()/e.outerWidth()*100),(a<r.min_j||a>r.max_j)&&(o+=n.outerWidth()/e.outerWidth()*100));for(o/=i.length,a=r.max_j;a>=r.min_j;a--)for(t=0;t<i.length;t++)if(0===t||i[t][a]!=i[t-1][a])if(n=w(i[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")-Y(a,i))/o).toFixed(4)+"%"),n.removeData("old-width")}else{var l=w(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()}E(0,i.length-1,0,i[0].length-1,e),0<r.min_j?T.selection.setAtEnd(i[r.min_i][r.min_j-1]):T.selection.setAtEnd(i[r.min_i][0]),T.selection.restore(),T.popups.hide("table.edit"),e.find("th, td").each(function(){(n=w(this)).data("old-width")&&(n.css("width",(100*n.data("old-width")/o).toFixed(4)+"%"),n.removeData("old-width"))})}}},mergeCells:function oe(){if(1<J().length&&(0===T.$el.find("th.fr-selected-cell").length||0===T.$el.find("td.fr-selected-cell").length)){A();var e,t,a=x(S());if(null==a)return;var n=T.$el.find(".fr-selected-cell"),i=w(n[0]),r=i.parent().find(".fr-selected-cell"),o=i.closest("table"),s=i.html(),l=0;for(e=0;e<r.length;e++)l+=w(r[e]).outerWidth();for(i.css("width",Math.min(100,l/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&i.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&i.attr("rowspan",a.max_i-a.min_i+1),e=1;e<n.length;e++)"<br>"!=(t=w(n[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();i.html(s),T.selection.setAtEnd(i.get(0)),T.selection.restore(),T.toolbar.enable(),v(a.min_i,a.max_i,o);var c=o.find("tr:empty");for(e=c.length-1;0<=e;e--)w(c[e]).remove();m(a.min_j,a.max_j,o),u()}},splitCellVertically:function se(){if(1==J().length){var e=T.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),n=e.outerWidth(),i=e.clone().html("<br>"),r=S(),o=_(e.get(0),r);if(1<t){var s=Math.ceil(t/2);n=V(o.col,o.col+s-1,r)/a*100;var l=V(o.col+s,o.col+t-1,r)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?i.attr("colspan",t-s):i.removeAttr("colspan"),e.css("width",n.toFixed(4)+"%"),i.css("width",l.toFixed(4)+"%")}else{var c;for(c=0;c<r.length;c++)if(0===c||r[c][o.col]!=r[c-1][o.col]){var d=w(r[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),"%")),i.css("width","".concat(n.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",i[0]),y(),T.popups.hide("table.edit")}},splitCellHorizontally:function le(){if(1==J().length){var e=T.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),n=parseInt(e.attr("rowspan"),10),i=S(),r=_(e.get(0),i),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=r.row+s,c=0===r.col?r.col:r.col-1;0<=c&&(i[l][c]==i[l][c-1]||0<l&&i[l][c]==i[l-1][c]);)c--;-1==c?w(a.find("tr").not(a.find("> table tr")).get(l)).prepend(o):w(i[l][c])[0].parentNode&&w(i[l][c])[0].insertAdjacentElement("afterend",o[0])}else{var d,f=w(document.createElement("tr")).append(o);for(d=0;d<i[0].length;d++)if(0===d||i[r.row][d]!=i[r.row][d-1]){var p=w(i[r.row][d]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",f[0])}y(),T.popups.hide("table.edit")}},addHeader:function ce(){var e=Z();if(0<e.length&&0===e.find("th").length){var t,a="<thead><tr>",n=0;for(e.find("tr").first().find("> td").each(function(){var e=w(this);n+=parseInt(e.attr("colspan"),10)||1}),t=0;t<n;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),u()}},removeHeader:function de(){var e=Z(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)g();else if(t.remove(),0<J().length)u();else{T.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(T.selection.setAtEnd(a),T.selection.restore())}},setBackground:t,showInsertPopup:function fe(){var e=T.$tb.find('.fr-command[data-cmd="insertTable"]'),t=T.popups.get("table.insert");if(t||(t=d()),!t.hasClass("fr-active")){T.popups.refresh("table.insert"),T.popups.setContainer("table.insert",T.$tb);var a=T.button.getPosition(e),n=a.left,i=a.top;T.popups.show("table.insert",n,i,e.outerHeight())}},showEditPopup:u,showColorsPopup:s,back:function pe(){0<J().length?u():(T.popups.hide("table.insert"),T.toolbar.showInline())},verticalAlign:function ue(e){T.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function ge(e){T.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function he(e,t,a,n){if(0<t.length){if(!a){var i=Object.keys(n);i.splice(i.indexOf(e),1),t.removeClass(i.join(" "))}t.toggleClass(e)}},selectedTable:Z,selectedCells:J,customColor:function me(){var e=T.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:O}},It.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),It.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"}),It.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),It.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),It.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("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),It.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),It.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=It.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()}}),It.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),It.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=It.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()}}),It.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),It.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=It.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))}}),It.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),It.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),It.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),It.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)})}}),It.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),It.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),It.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),It.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.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"))}}),It.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),It.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=It.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)}}),It.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),It.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),It.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),It.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=It.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)}}),It.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),It.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)})}}),It.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),It.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"}),It.URLRegEx="(^| |\\u00A0)(".concat(It.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),It.PLUGINS.url=function(r){var o=r.$,s=null;function t(e,t,a){for(var n="";a.length&&"."==a[a.length-1];)n+=".",a=a.substring(0,a.length-1);var i=a;if(r.opts.linkConvertEmailAddress)r.helpers.isEmail(i)&&!/^mailto:.*/i.test(i)&&(i="mailto:".concat(i));else if(r.helpers.isEmail(i))return t+a;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(i)||(i="//".concat(i)),(t||"")+"<a".concat(r.opts.linkAlwaysBlank?' target="_blank"':"").concat(s?' rel="'.concat(s,'"'):"",' data-fr-linked="true" href="').concat(i,'">').concat(a.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(n)}var l=function l(){return new RegExp(It.URLRegEx,"gi")};function c(e){return r.opts.linkAlwaysNoFollow&&(s="nofollow"),r.opts.linkAlwaysBlank&&(r.opts.linkNoOpener&&(s?s+=" noopener":s="noopener"),r.opts.linkNoReferrer&&(s?s+=" noreferrer":s="noreferrer")),e.replace(l(),t)}function d(e){var t=e.split(" ");return t[t.length-1]}function a(){var e=r.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function i(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==r.el)&&i(e.parentNode))}(t))return!1;if(l().test(d(t.textContent))){o(t).before(c(t.textContent));var a=o(t.parentNode).find("a[data-fr-linked]");a.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),r.events.trigger("url.linked",[a.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var n=t.previousSibling.innerText+t.textContent;l().test(d(n))&&(o(t.previousSibling).replaceWith(c(n)),t.parentNode.removeChild(t))}}return{_init:function e(){r.events.on("keypress",function(e){!r.selection.isCollapsed()||"."!=e.key&&")"!=e.key&&"("!=e.key||a()},!0),r.events.on("keydown",function(e){var t=e.which;!r.selection.isCollapsed()||t!=It.KEYCODE.ENTER&&t!=It.KEYCODE.SPACE||a()},!0),r.events.on("paste.beforeCleanup",function(e){if(r.helpers.isURL(e)){var t=null;return r.opts.linkAlwaysBlank&&(r.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),r.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(r.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}})}}},Object.assign(It.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(It.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}),It.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"}],It.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,It.PLUGINS.video=function(A){var s,d,f,y,n,a,T=A.$,C="https://i.froala.com/upload",p=2,u=3,g=4,R=5,w=6,i={};function h(){var e=A.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 r(){var e=A.popups.get("video.edit");if(e||(e=function o(){var e="";if(0<A.opts.videoEditButtons.length){A.opts.videoResponsive&&(-1<A.opts.videoEditButtons.indexOf("videoSize")&&A.opts.videoEditButtons.splice(A.opts.videoEditButtons.indexOf("videoSize"),1),-1<A.opts.videoEditButtons.indexOf("videoDisplay")&&A.opts.videoEditButtons.splice(A.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<A.opts.videoEditButtons.indexOf("videoAlign")&&A.opts.videoEditButtons.splice(A.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n      '.concat(A.button.buildList(A.opts.videoEditButtons)," \n      </div>")},a=A.popups.create("video.edit",t);return A.events.$on(A.$wp,"scroll.video-edit",function(){y&&A.popups.isVisible("video.edit")&&(A.events.disableBlur(),E(y))}),a}return!1}()),e){A.popups.setContainer("video.edit",A.$sc),A.popups.refresh("video.edit");var t=y.find("iframe, embed, ".concat(y.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight(),i=t.get(0).src?t.get(0).src:null,r=!(!(i=(i=i.split("."))[i.length-1]).includes("pdf")&&!i.includes("txt"));t.hasClass("fr-file")||r||y.find("audio").get(0)?(document.getElementById("autoplay-".concat(A.id))&&(document.getElementById("autoplay-".concat(A.id)).style.display="none"),document.getElementById("videoReplace-".concat(A.id))&&(document.getElementById("videoReplace-".concat(A.id)).style.display="none")):(document.getElementById("autoplay-".concat(A.id)).style.display="",document.getElementById("videoReplace-".concat(A.id)).style.display=""),A.popups.show("video.edit",a,n,t.outerHeight(),!0)}}function o(e){if(e)return A.popups.onRefresh("video.insert",h),A.popups.onHide("video.insert",X),!0;var t="";A.opts.videoUpload||-1===A.opts.videoInsertButtons.indexOf("videoUpload")||A.opts.videoInsertButtons.splice(A.opts.videoInsertButtons.indexOf("videoUpload"),1);var a=A.button.buildList(A.opts.videoInsertButtons);""!==a&&(t='<div class="fr-buttons">'+a+"</div>");var n,i="",r=A.opts.videoInsertButtons.indexOf("videoUpload"),o=A.opts.videoInsertButtons.indexOf("videoByURL"),s=A.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=o){n=" fr-active",(r<o&&0<=r||s<o&&0<=s)&&(n="");i='<div class="fr-video-by-url-layer fr-layer'.concat(n,'" id="fr-video-by-url-layer-').concat(A.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.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(A.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>")}var l="";0<=s&&(n=" fr-active",(r<s&&0<=r||o<s&&0<=o)&&(n=""),l='<div class="fr-video-embed-layer fr-layer'.concat(n,'" id="fr-video-embed-layer-').concat(A.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(A.id,'" type="text" placeholder="').concat(A.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(A.language.translate("Insert"),"</button></div></div>"));var c="";0<=r&&(n=" fr-active",(s<r&&0<=s||o<r&&0<=o)&&(n=""),c='<div class="fr-video-upload-layer fr-layer'.concat(n,'" id="fr-video-upload-layer-').concat(A.id,'"><strong>').concat(A.language.translate("Drop video"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(A.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(A.id,'" role="button"></div></div>'));var d={buttons:t,by_url_layer:i,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=A.popups.create("video.insert",d);return function p(n){A.events.$on(n,"dragover dragenter",".fr-video-upload-layer",function(){return T(this).addClass("fr-drop"),!1},!0),A.events.$on(n,"dragleave dragend",".fr-video-upload-layer",function(){return T(this).removeClass("fr-drop"),!1},!0),A.events.$on(n,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),T(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=n.data("instance")||A;a.events.disableBlur(),a.video.upload(t.files),a.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(n,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){T(this).trigger("click")},!0);A.events.$on(n,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=n.data("instance")||A;e.events.disableBlur(),n.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}T(this).val("")},!0)}(f),f}function l(e){A.events.focus(!0),A.selection.restore();var t=!1;y&&(q(),t=!0),A.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,A.opts.videoSplitHTML),A.popups.hide("video.insert");var a=A.$el.find(".fr-jiv");a.removeClass("fr-jiv"),a.toggleClass("fr-rv",A.opts.videoResponsive),Q(a,A.opts.videoDefaultDisplay,A.opts.videoDefaultAlign),a.toggleClass("fr-draggable",A.opts.videoMove),A.events.trigger(t?"video.replaced":"video.inserted",[a])}function m(){var e=T(this);A.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),E(e.parent()),A.events.trigger("video.loaded",[e.parent()])}function S(s,e,c,d,f){A.edit.off(),v("Loading video"),e&&(s=A.helpers.sanitizeURL(s));var p=function p(){var e,t;if(d){A.undo.canDo()||d.find("video").hasClass("fr-uploading")||A.undo.saveStep();var a=d.find("video").data("fr-old-src"),n=d.data("fr-replaced");d.data("fr-replaced",!1),A.$wp?((e=d.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),a&&d.find("video").attr("src",a),d.replaceWith(e)):e=d;for(var i=e.find("video").get(0).attributes,r=0;r<i.length;r++){var o=i[r];0===o.nodeName.indexOf("data-")&&e.find("video").removeAttr(o.nodeName)}if(void 0!==c)for(t in c)c.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),c[t]);e.find("video").on("canplay",m),e.find("video").attr("src",s),A.edit.on(),N(),A.undo.saveStep(),A.$el.blur(),A.events.trigger(n?"video.replaced":"video.inserted",[e,f])}else e=function l(e,t,a){var n,i="";if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(i+=" data-".concat(n,'="').concat(t[n],'"'));var r=A.opts.videoDefaultWidth;r&&"auto"!=r&&(r="".concat(r,"px"));var o=T(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+A.opts.videoDefaultDisplay[0]+("center"!=A.opts.videoDefaultAlign?" fr-fv"+A.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+i+(r?' style="width: '+r+';" ':"")+" controls>"+A.language.translate("Your browser does not support HTML5 video.")+"</video>");o.toggleClass("fr-draggable",A.opts.videoMove),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.videoSplitHTML?A.markers.split():A.markers.insert();A.html.wrap();var s=A.$el.find(".fr-marker");A.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(o),A.selection.clear(),o.find("video").get(0).readyState>o.find("video").get(0).HAVE_FUTURE_DATA||A.helpers.isIOS()?a.call(o.find("video").get(0)):o.find("video").on("canplaythrough load",a);return o}(s,c,m),N(),A.undo.saveStep(),A.events.trigger("video.inserted",[e,f])};_("Loading video"),p()}function _(e){var t=A.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(),y){var a=y.find("iframe, embed, ".concat(y.find("iframe, embed, audio").get(0)?"audio":"video"));A.popups.setContainer("video.insert",A.$sc);var n=a.offset().left,i=a.offset().top+a.height();A.popups.show("video.insert",n,i,a.outerHeight())}void 0===e&&v(A.language.translate("Uploading"),0)}function c(e){var t=A.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||A.$el.find("video.fr-error").length)){if(A.events.focus(),A.$el.find("video.fr-error").length&&(A.$el.find("video.fr-error").parent().remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&y){var a=y;U(!0),A.selection.setAfter(a.find("video").get(0)),A.selection.restore()}A.popups.hide("video.insert")}}function v(e,t){var a=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 b(e){_();var t=A.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}function E(e){t.call(e.get(0))}function L(e,t,a){v("Loading video");var n=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(A.opts.videoUploadToS3||A.opts.videoUploadToAzure)if(201==n){var s;if(A.opts.videoUploadToAzure){if(!1===A.events.trigger("video.uploadedToAzure",[this.responseURL,a,i],!0))return A.edit.on(),!1;s=t}else s=function c(e){try{var t=T(e).find("Location").text(),a=T(e).find("Key").text();return!1===A.events.trigger("video.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(n){return z(g,e),!1}}(r);s&&S(s,!1,[],e,i||r)}else z(g,i||r);else if(200<=n&&n<300){var l=function d(e){try{if(!1===A.events.trigger("video.uploaded",[e],!0))return A.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(z(p,e),!1)}catch(a){return z(g,e),!1}}(o);l&&S(l.link,!1,l,e,i||o)}else z(u,i||o)}catch(f){z(g,i||o)}}function I(){z(g,this.response||this.responseText||this.responseXML)}function x(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;v(A.language.translate("Uploading"),t)}}function k(){A.edit.on(),c(!0)}function O(e){if(!A.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=A.$oel.get(0).ownerDocument,i=n.defaultView||n.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}r&&i.frameElement&&(t+=A.helpers.getPX(T(i.frameElement).offset().left)+i.frameElement.clientLeft,a=e.clientY+A.helpers.getPX(T(i.frameElement).offset().top)+i.frameElement.clientTop)}A.undo.canDo()||A.undo.saveStep(),(d=T(this)).data("start-x",t),d.data("start-y",a),s.show(),A.popups.hideAll(),W()}function F(e){if(!A.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"),i=d.data("start-y");d.data("start-x",t),d.data("start-y",a);var r=t-n,o=a-i,s=y.find("iframe, embed, ".concat(y.find("iframe, embed, audio").get(0)?"audio":"video")),l=s.width(),c=s.height();(d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(r=0-r),(d.hasClass("fr-hnw")||d.hasClass("fr-hne"))&&(o=0-o),s.css("width",l+r),s.css("height",c+o),s.removeAttr("width"),s.removeAttr("height"),P()}}function D(e){if(!A.core.sameInstance(f))return!0;d&&y&&(e&&e.stopPropagation(),d=null,s.hide(),P(),r(),A.undo.saveStep())}function M(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function B(e,t,a,n){return e.pageX=t,e.pageY=t,O.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 N(){var e,t=Array.prototype.slice.call(A.el.querySelectorAll("video, .fr-video > *")),a=[];for(e=0;e<t.length;e++)a.push(t[e].getAttribute("src")),T(t[e]).toggleClass("fr-draggable",A.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&&A.events.trigger("video.removed",[T(n[e])]);n=t}function P(){f||function o(){var e;if(A.shared.$video_resizer?(f=A.shared.$video_resizer,s=A.shared.$vid_overlay,A.events.on("destroy",function(){T("body").first().append(f.removeClass("fr-active"))},!0)):(A.shared.$video_resizer=T(document.createElement("div")).attr("class","fr-video-resizer"),f=A.shared.$video_resizer,A.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),A.opts.videoResize&&(f.append(M("nw")+M("ne")+M("sw")+M("se")),A.shared.$vid_overlay=T(document.createElement("div")).attr("class","fr-video-overlay"),s=A.shared.$vid_overlay,e=f.get(0).ownerDocument,T(e).find("body").first().append(s))),A.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,A.opts.videoResize&&(s.remove(),s=null)},!0),A.helpers.isMobile()||A.events.$on(T(A.o_win),"resize.video",function(){U(!0)}),A.opts.videoResize){e=f.get(0).ownerDocument,A.events.$on(f,A._mousedown,".fr-handler",O),A.events.$on(T(e),A._mousemove,F),A.events.$on(T(e.defaultView||e.parentWindow),A._mouseup,D),A.events.$on(s,"mouseleave",D);var n=1,i=null,r=0;A.events.on("keydown",function(e){if(y){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==i||200<e.timeStamp-r)&&(n=1),(a==It.KEYCODE.EQUALS||A.browser.mozilla&&a==It.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=B.call(this,e,1,1,n):(a==It.KEYCODE.HYPHEN||A.browser.mozilla&&a==It.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(n=B.call(this,e,2,-1,n)),i=a,r=e.timeStamp}}),A.events.on("keyup",function(){n=1})}}(),(A.$wp||A.$sc).append(f),f.data("instance",A);var e=y.find("iframe, embed, ".concat(y.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,a=0;A.opts.iframe&&(a=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),t=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(A.opts.iframe?e.offset().top+a-1:e.offset().top-A.$wp.offset().top-1)+A.$wp.scrollTop()).css("left",(A.opts.iframe?e.offset().left+t-1:e.offset().left-A.$wp.offset().left-1)+A.$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&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(A.edit.isDisabled())return!1;for(var t=0;t<It.INSTANCES.length;t++)It.INSTANCES[t]!=A&&It.INSTANCES[t].events.trigger("video.hideResizer");A.toolbar.disable(),A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur()),A.$el.find(".fr-video.fr-active").removeClass("fr-active"),(y=T(this)).addClass("fr-active"),A.opts.iframe&&A.size.syncIframe(),ee(),P(),r(),A.selection.clear(),A.button.bulkRefresh(),A.events.trigger("image.hideResizer")}function U(e){y&&(function t(){return A.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),A.toolbar.enable(),y.removeClass("fr-active"),y=null,W())}function H(){A.shared.vid_exit_flag=!0}function W(){A.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(!A.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(It.MARKERS),A.popups.hideAll();var n=A.popups.get("video.insert");return n||(n=o()),A.popups.setContainer("video.insert",A.$sc),A.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),_(),0<=A.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))?$(t.files):z(w),e.preventDefault(),e.stopPropagation(),!1}}}function $(e){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("video.beforeUpload",[e]))return!1;var t,a=e[0];if(!(null!==A.opts.videoUploadURL&&A.opts.videoUploadURL!=C||A.opts.videoUploadToS3||A.opts.videoUploadToAzure))return function E(n){y&&y.find("iframe")&&y.find("iframe").length&&q();var i=new FileReader;i.onload=function(){i.result;for(var e=atob(i.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,y)},_(),i.readAsDataURL(n)}(a),!1;if(a.size>A.opts.videoMaxSize)return z(R),!1;if(A.opts.videoAllowedTypes.indexOf(a.type.replace(/video\//g,""))<0)return z(w),!1;if(A.drag_support.formdata&&(t=A.drag_support.formdata?new FormData:null),t){var n;if(!1!==A.opts.videoUploadToS3)for(n in t.append("key",A.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),A.opts.videoUploadToS3.params)A.opts.videoUploadToS3.params.hasOwnProperty(n)&&t.append(n,A.opts.videoUploadToS3.params[n]);for(n in A.opts.videoUploadParams)A.opts.videoUploadParams.hasOwnProperty(n)&&t.append(n,A.opts.videoUploadParams[n]);t.append(A.opts.videoUploadParam,a);var i,r,o=A.opts.videoUploadURL;A.opts.videoUploadToS3&&(o=A.opts.videoUploadToS3.uploadURL?A.opts.videoUploadToS3.uploadURL:"https://".concat(A.opts.videoUploadToS3.region,".amazonaws.com/").concat(A.opts.videoUploadToS3.bucket));var s=A.opts.videoUploadMethod;A.opts.videoUploadToAzure&&(o=A.opts.videoUploadToAzure.uploadURL?"".concat(A.opts.videoUploadToAzure.uploadURL,"/").concat(a.name):encodeURI("https://".concat(A.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.videoUploadToAzure.container,"/").concat(a.name)),i=o,A.opts.videoUploadToAzure.SASToken&&(o+=A.opts.videoUploadToAzure.SASToken),s="PUT");var l=A.core.getXHR(o,s);if(A.opts.videoUploadToAzure){var c=(new Date).toUTCString();if(!A.opts.videoUploadToAzure.SASToken&&A.opts.videoUploadToAzure.accessKey){var d=A.opts.videoUploadToAzure.account,f=A.opts.videoUploadToAzure.container;if(A.opts.videoUploadToAzure.uploadURL){var p=A.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=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.videoUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),v="SharedKey "+d+":"+m;r=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"),A.opts.videoUploadParams)A.opts.videoUploadParams.hasOwnProperty(n)&&l.setRequestHeader(n,A.opts.videoUploadParams[n]);for(n in A.opts.videoUploadToAzure.params)A.opts.videoUploadToAzure.params.hasOwnProperty(n)&&l.setRequestHeader(n,A.opts.videoUploadToAzure.params[n])}l.onload=function(){L.call(l,y,i,r)},l.onerror=I,l.upload.onprogress=x,l.onabort=k,_(),A.events.disableBlur(),A.edit.off(),A.events.enableBlur();var b=A.popups.get("video.insert");b&&T(b.off("abortUpload")).on("abortUpload",function(){4!=l.readyState&&l.abort()}),l.send(A.opts.videoUploadToAzure?a:t)}}}function z(e,t){A.edit.on(),y&&y.find("video").addClass("fr-error"),b(A.language.translate("Something went wrong. Please try again.")),A.events.trigger("video.error",[{code:e,message:i[e]},t])}function G(){if(y){var e=A.popups.get("video.size"),t=y.find("iframe, embed, ".concat(y.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 A.popups.onRefresh("video.size",G),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(A.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(A.id,'" type="text" name="height" placeholder="').concat(A.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(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("video.size",t);return A.events.$on(A.$wp,"scroll",function(){y&&A.popups.isVisible("video.size")&&(A.events.disableBlur(),E(y))}),a}function V(e){if(void 0===e&&(e=y),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 j(e){void 0===e&&(e=y);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function q(){if(y&&!1!==A.events.trigger("video.beforeRemove",[y])){var e=y;A.popups.hideAll(),U(!0),A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0)),e.remove(),A.selection.restore(),A.html.fillEmptyBlocks()}}function X(){c()}function Q(e,t,a){!A.opts.htmlUntouched&&A.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=A.$el.find("video").filter(function(){return 0===T(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(T(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),A.$el.find("embed, iframe").filter(function(){if(A.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<T(this).parents("span.fr-video").length)return!1;for(var e=T(this).attr("src"),t=0;t<It.VIDEO_PROVIDERS.length;t++){var a=It.VIDEO_PROVIDERS[t];if(a.test_regex.test(e)&&new RegExp(A.opts.videoAllowedProviders.join("|")).test(a.provider))return!0}return!1}).map(function(){return 0===T(this).parents("object").length?this:T(this).parents("object").get(0)}).wrap(T(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,a,n,i,r=A.$el.find("span.fr-video, video"),o=0;o<r.length;o++){var s=T(r[o]);!A.opts.htmlUntouched&&A.opts.useClasses?((i=s).hasClass("fr-dvi")||i.hasClass("fr-dvb")||(i.addClass("fr-fv".concat(V(i)[0])),i.addClass("fr-dv".concat(j(i)[0]))),A.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):A.opts.htmlUntouched||A.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":V(t),Q(t,a,n),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}r.toggleClass("fr-draggable",A.opts.videoMove)}}function Z(e){document.getElementById("autoplay-".concat(A.id)).style.cssText="background:".concat(e)}function ee(){if(y){A.selection.clear();var e=A.doc.createRange();e.selectNode(y.get(0)),A.selection.get().addRange(e)}}return i[1]="Video cannot be loaded from the passed link.",i[p]="No link in upload response.",i[u]="Error during file upload.",i[g]="Parsing response failed.",i[R]="File is too large.",i[w]="Video file type is invalid.",i[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",A.shared.vid_exit_flag=!1,{_init:function te(){A.opts.videoResponsive&&(A.opts.videoResize=!1),function e(){A.events.on("drop",K,!0),A.events.on("mousedown window.mousedown",H),A.events.on("window.touchmove",W),A.events.on("mouseup window.mouseup",U),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&U()}),A.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){U(!0)})}(),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","span.fr-video",function(){a=!1}),A.events.$on(A.$el,"touchmove",function(){a=!0})),A.events.on("html.set",J),J(),A.events.$on(A.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(A.browser.msie||A.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),A.events.$on(A.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==T(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),A.events.on("keydown",function(e){var t=e.which;return!y||t!=It.KEYCODE.BACKSPACE&&t!=It.KEYCODE.DELETE?y&&t==It.KEYCODE.ESC?(U(!0),e.preventDefault(),!1):y&&t!=It.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),q(),A.undo.saveStep(),!1)},!0),A.events.on("toolbar.esc",function(){if(y)return A.events.disableBlur(),A.events.focus(),!1},!0),A.events.on("toolbar.focusEditor",function(){if(y)return!1},!0),A.events.on("keydown",function(){A.$el.find("span.fr-video:empty").remove()}),A.$wp&&(N(),A.events.on("contentChanged",N)),o(!0),Y(!0)},showInsertPopup:function ae(){var e=A.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=A.popups.get("video.insert");if(t||(t=o()),c(),!t.hasClass("fr-active"))if(A.popups.refresh("video.insert"),A.popups.setContainer("video.insert",A.$tb),e.isVisible()){var a=A.button.getPosition(e),n=a.left,i=a.top;A.popups.show("video.insert",n,i,e.outerHeight())}else A.position.forSelection(t),A.popups.show("video.insert")},showLayer:function ne(e){var t,a,n=A.popups.get("video.insert");if(!y&&!A.opts.toolbarInline){var i=A.$tb.find('.fr-command[data-cmd="insertVideo"]');t=i.offset().left,a=i.offset().top+(A.opts.toolbarBottom?10:i.outerHeight()-10)}A.opts.toolbarInline&&(a=n.offset().top-A.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"),A.popups.show("video.insert",t,a,0),A.accessibility.focusPopup(n)},refreshByURLButton:function ie(e){var t=A.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 re(e){var t=A.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function oe(e){var t=A.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:$,insertByURL:function se(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(A.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var a=null;if(/^http/.test(e)||(e="https://".concat(e)),A.helpers.isURL(e))for(var n=0;n<It.VIDEO_PROVIDERS.length;n++){var i=It.VIDEO_PROVIDERS[n],r="autoplay=1";if(i.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)i.html=i.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var o=i.html.indexOf("{url}")+5;i.html=[i.html.slice(0,o),r,i.html.slice(o)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(i=It.VIDEO_PROVIDERS[n]).html=i.html.replace(r,"");if(i.test_regex.test(e)&&new RegExp(A.opts.videoAllowedProviders.join("|")).test(i.provider)){a=e.replace(i.url_regex,i.url_text),a=i.html.replace(/\{url\}/,a);break}}a?l(a):(b(A.language.translate("Something went wrong. Please try again.")),A.events.trigger("video.linkError",[e]))},insertEmbed:function le(e){void 0===e&&(e=A.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&It.VIDEO_EMBED_REGEX.test(e)?l(e):(b(A.language.translate("Something went wrong. Please try again.")),A.events.trigger("video.codeError",[e]))},insert:l,align:function ce(e){y.removeClass("fr-fvr fr-fvl"),!A.opts.htmlUntouched&&A.opts.useClasses?"left"==e?y.addClass("fr-fvl"):"right"==e&&y.addClass("fr-fvr"):Q(y,j(),e),ee(),P(),r(),A.selection.clear()},refreshAlign:function de(e){if(!y)return!1;e.find(">*").first().replaceWith(A.icon.create("video-align-".concat(V())))},refreshAlignOnShow:function fe(e,t){y&&t.find('.fr-command[data-param1="'.concat(V(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function pe(e){y.removeClass("fr-dvi fr-dvb"),!A.opts.htmlUntouched&&A.opts.useClasses?"inline"==e?y.addClass("fr-dvi"):"block"==e&&y.addClass("fr-dvb"):Q(y,e,V()),ee(),P(),r(),A.selection.clear()},refreshDisplayOnShow:function ue(e,t){y&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:q,hideProgressBar:c,showSizePopup:function ge(){var e=A.popups.get("video.size");e||(e=Y()),c(),A.popups.refresh("video.size"),A.popups.setContainer("video.size",A.$sc);var t=y.find("iframe, embed, ".concat(y.find("iframe, embed, audio").get(0)?"audio":"video")),a=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.height();A.popups.show("video.size",a,n,t.height(),!0)},replace:function he(){var e=A.popups.get("video.insert");e||(e=o()),A.popups.isVisible("video.insert")||(c(),A.popups.refresh("video.insert"),A.popups.setContainer("video.insert",A.$sc));var t=y.offset().left+y.outerWidth()/2,a=y.offset().top+y.height();A.popups.show("video.insert",t,a,y.outerHeight(),!0)},back:function e(){y?(A.events.disableBlur(),y[0].click()):(A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("video.insert"),A.toolbar.showInline())},setSize:function me(e,t){if(y){var a=A.popups.get("video.size"),n=y.find("iframe, embed, ".concat(y.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(){y.trigger("click")},A.helpers.isAndroid()?50:0)}},get:function ve(){return y},showProgressBar:_,_editVideo:E,setAutoplay:function be(){var e;if(y.find("iframe, embed, audio").get(0))(e=y.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(Z("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(Z("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=y.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))Z("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{Z("#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("")}}}},It.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"}),It.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),It.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),It.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)}}),It.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),It.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)}}),It.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),It.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)}}),It.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),It.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),It.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),It.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)}}),It.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),It.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),It.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),It.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),It.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),It.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=It.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)}}),It.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),It.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),It.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),It.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),It.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),It.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),It.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),It.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),It.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),It.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),It.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),It.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}}),Object.assign(It.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}),It.PLUGINS.wordPaste=function(y){var o,i,c=y.$,s="word_paste",p={};function t(e){var t=y.opts.wordAllowedStyleProps;e||(y.opts.wordAllowedStyleProps=[]),0===i.indexOf("<colgroup>")&&(i="<table>"+i+"</table>"),i=r(i=i.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}),y.paste.getRtfClipboard());var a=y.doc.createElement("DIV");a.innerHTML=i,y.html.cleanBlankSpaces(a),i=a.innerHTML,i=(i=y.paste.cleanEmptyTagsAndDivs(i)).replace(/\u200b/g,""),function n(){y.modals.hide(s)}(),y.paste.clean(i,!0,!0),y.opts.wordAllowedStyleProps=t}function T(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t){if(t(e))for(var a=e.firstChild;a;){var n=a,i=a.previousSibling;a=a.nextSibling,u(n,t),n.previousSibling||n.nextSibling||n.parentNode||!a||i===a.previousSibling||!a.parentNode?n.previousSibling||n.nextSibling||n.parentNode||!a||a.previousSibling||a.nextSibling||a.parentNode||(i?a=i.nextSibling?i.nextSibling.nextSibling:null:e.firstChild&&(a=e.firstChild.nextSibling)):a=i?i.nextSibling:e.firstChild}}function x(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function k(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function O(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}u(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(y.browser.msie||y.browser.safari||y.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 e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function i(e){var a="",n=e.getAttribute("style");n&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=n.match(new RegExp(e+":.*(;|)"));t&&(a+=t[0]+";")});return a}(e)),m(e,n)),!0});var i=t.innerHTML;return i=i.replace(/<!--[\s\S]*?-->/gi,"")}function E(e,t){for(var a=document.createElement(t),n=0;n<e.attributes.length;n++){var i=e.attributes[n].name;a.setAttribute(i,e.getAttribute(i))}return a.innerHTML=e.innerHTML,e.parentNode.replaceChild(a,e),a}function C(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function R(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function w(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 i=null;i=a?(n||"")+t:t+(n||""),e.setAttribute("style",i)}}var g=null;function d(e,t,a){for(var n=e.split(a),i=1;i<n.length;i++){var r=n[i];if(1<(r=r.split("shplid")).length){r=r[1];for(var o="",s=0;s<r.length&&"\\"!==r[s]&&"{"!==r[s]&&" "!==r[s]&&"\r"!==r[s]&&"\n"!==r[s];)o+=r[s],s++;var l=r.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("");g[t+o]={image_hex:p,image_type:c}}}}function h(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://")&&y.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(a=p[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){g={},d(e,"i","\\shppict"),d(e,"s","\\shp{")}(t);var i=g[a.substring(7)];if(i){var r=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 i=a.join("");return btoa(i)}(i.image_hex),o="data:"+i.image_type+";base64,"+r;"IMG"===e.tagName?(e.src=o,e.setAttribute("data-fr-image-pasted",!0)):c(e.parentNode).before('<img data-fr-image-pasted="true" src="'+o+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function m(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 T(e),!1;for(var i=["META","LINK","XML","ST1:","O:","W:","FONT"],r=0;r<i.length;r++)if(-1!==a.indexOf(i[r]))return e.innerHTML&&(e.outerHTML=e.innerHTML),T(e),!1;if("TD"!==a){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var s=(o=R(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]]&&w(e,t[c[f]])}e.removeAttribute("class")}t&&t[n]&&w(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]&&w(e,t[a.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var u=R(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")}C(e)}if("TR"===a&&function A(e,t){y.node.clearAttributes(e);for(var a=e.firstElementChild,n=0,i=!1,r=null;a;){a.firstElementChild&&-1!==a.firstElementChild.tagName.indexOf("W:")&&(a.innerHTML=a.firstElementChild.innerHTML),(r=a.getAttribute("width"))||i||(i=!0),n+=parseInt(r,10),(!a.firstChild||a.firstChild&&a.firstChild.data===It.UNICODE_NBSP)&&(a.firstChild&&T(a.firstChild),a.innerHTML="<br>");for(var o=a.firstElementChild,s=1===a.children.length;o;)"P"!==o.tagName||x(o)||s&&C(o),o=o.nextElementSibling;if(t){var l=a.getAttribute("class");if(l){var c=(l=R(l)).match(/xl[0-9]+/gi);if(c){var d="."+c[0];t[d]&&w(a,t[d])}}t.td&&w(a,t.td)}var f=a.getAttribute("style");f&&(f=R(f))&&";"!==f.slice(-1)&&(f+=";");var p=a.getAttribute("valign");if(!p&&f){var u=f.match(/vertical-align:.+?[; "]{1,1}/gi);u&&(p=u[u.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var g=null;if(f){var h=f.match(/text-align:.+?[; "]{1,1}/gi);h&&(g=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===g&&(g=null)}var m=null;if(f){var v=f.match(/background:.+?[; "]{1,1}/gi);v&&(m=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=a.getAttribute("colspan"),E=a.getAttribute("rowspan");b&&a.setAttribute("colspan",b),E&&a.setAttribute("rowspan",E),p&&(a.style["vertical-align"]=p),g&&(a.style["text-align"]=g),m&&(a.style["background-color"]=m),r&&a.setAttribute("width",r),a=a.nextElementSibling}for(a=e.firstElementChild;a;)r=a.getAttribute("width"),i?a.removeAttribute("width"):a.setAttribute("width",100*parseInt(r,10)/n+"%"),a=a.nextElementSibling}(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>"),"TABLE"===a&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=R(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function r(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function d(e){for(var t=e.split("v:shape"),a=1;a<t.length;a++){var n=t[a],i=n.split(' id="')[1];if(i&&1<i.length){i=i.split('"')[0];var r=n.split(' o:spid="')[1];r&&1<r.length&&(r=r.split('"')[0],p[i]=r)}}}(e);var a=(new DOMParser).parseFromString(e,"text/html"),n=a.head,i=a.body,s=function f(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 i=0;i<n.length;i++){var r=n[i],o=r.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=r.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);u(i,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===It.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(T(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),u(i,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||h(e,t),!0});for(var r=i.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),o=r.length-1;0<=o;o--)r[o].previousElementSibling&&"LI"===r[o].previousElementSibling.tagName&&r[o].previousElementSibling.appendChild(r[o]);u(i,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(x(e)){var t=e.parentNode,a=e.previousSibling,n=function I(e,t,a,n){var i,r,o=/[0-9a-zA-Z]./gi,s=!1,l=navigator.userAgent.toLowerCase();-1!=l.indexOf("safari")&&(l=-1<l.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var c,d,f,p,u=e.querySelector('span[style="mso-list:Ignore"]');null==u&&"safari"==l&&(u=e.querySelector('span[lang="PT-BR"]'));var g;u&&(s=s||o.test(u.textContent)),null!==u&&(g=u.textContent.trim().split(".")[0]),f=1==s?("1"==(g=u.textContent.trim().split(".")[0])?p="decimal;":"i"==g?p="lower-roman;":"I"==g?p="upper-roman;":"o"==g?p="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?p="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(p="upper-alpha;")),p="list-style-type: "+p,"ol"):(null!=u&&(g=u.textContent.trim().split(".")[0]),"\xa7"==g?p="square;":"\xb7"==g&&(p="disc;"),p="list-style-type: "+p,"ul");var h,m="";u==undefined||u.textContent==undefined||isNaN(parseInt(u.textContent.trim().split(".")[1],10))||(m=' class="decimal_type" ');var v,b=k(e),E=e.style.marginLeft;if(E.includes("in")?(v="in",E=parseFloat(E)-.5):E.includes("pt")&&(v="px",E=parseFloat(E)-10),1==b)if(h=p?"<"+f+' style = "'+p+"; margin-left:"+E+v+';">':"<"+f+' style="margin-left:'+E+v+';">',"list-style-type: upper-alpha;"==p){var A=g.charCodeAt(0)-64;h=p?"<"+f+m+' start="'+A+'" style = "'+p+" margin-left:"+E+v+';">':"<"+f+">"}else if("list-style-type: lower-alpha;"==p){var y=g.charCodeAt(0)-96;h=p?"<"+f+m+' start="'+y+'" style = "'+p+"margin-left:"+E+v+';">':"<"+f+">"}else h=p?"<"+f+m+' style = "'+p+";margin-left:"+E+v+';">':"<"+f+' style="margin-left:'+E+v+';">';else if("list-style-type: upper-alpha;"==p){var T=g.charCodeAt(0)-64;h=p?"<"+f+m+' style = "'+p+' start="'+T+'">':"<"+f+">"}else if("list-style-type: lower-alpha;"==p){var C=g.charCodeAt(0)-96;h=p?"<"+f+m+' style = "'+p+' start="'+C+'">':"<"+f+">"}else h=p?"<"+f+m+' style = "'+p+'">':"<"+f+">";for(var R=!1;e;){if(!x(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var w=k(e);if((a=a||w)<w)h+=(d=I(e,t,w,e.style.marginLeft)).el.outerHTML,e=d.currentNode;else{if(w<a)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(o.lastIndex=0),r&&r.firstElementChild&&r.firstElementChild.firstElementChild&&r.firstElementChild.firstElementChild.firstChild&&(o.lastIndex=0,i=o.test(r.firstElementChild.firstElementChild.firstChild.data||r.firstElementChild.firstElementChild.firstChild.firstChild&&r.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var S=!1;(!n&&!e.style.marginLeft||n&&e.style.marginLeft&&n===e.style.marginLeft)&&(S=!0),n=e.style.marginLeft,S||i===undefined?(c=O(e,t),e.nextSibling.innerText==undefined||e.nextSibling.innerText==undefined||h.includes('class="decimal_type"')||isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(h=h.substring(3,0)+' class="decimal_type"'+h.substring(3,h.length)),h+="<li>"+c+"</li>"):(1==w&&(h+="</"+f+">",R=!0,r=null),h+=(d=I(e,t,w,e.style.marginLeft)).el.outerHTML,e=d.currentNode);var _=e&&e.nextElementSibling;if(_&&(r=_.previousElementSibling),e&&!x(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=_}}R||(h+="</"+f+">");var L=document.createElement("div");return L.innerHTML=h,{el:L,currentNode:e}}(e,s).el,i=null;return(i=a?a.nextSibling:t.firstChild)?t.insertBefore(n,i):t.appendChild(n),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=E(e,"span")),m(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var r=e.nextSibling;r;)(r=e.nextSibling)&&T(r),r.data&&-1<r.data.indexOf("[endif]")&&(r=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 T(e),!1}),u(i,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&&(T(e),!(e=a).innerHTML);)a=e.parentNode;return!1}!function d(e){var t=e.getAttribute("style");if(t){(t=R(t))&&";"!==t.slice(-1)&&(t+=";");var a=t.match(/(^|\S+?):.+?;{1,1}/gi);if(a){for(var n={},i=0;i<a.length;i++){var r=a[i].split(":");2===r.length&&("text-align"===r[0]&&"SPAN"===e.tagName||(n[r[0]]=r[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(c){l=null}l&&(l=Math.round(1.33*l),n[s]=l+"px;")}o+=s+":"+n[s]}o&&e.setAttribute("style",o)}}}(e)}return!0}),u(i,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var l=i.outerHTML,c=y.opts.htmlAllowedStyleProps;return y.opts.htmlAllowedStyleProps=y.opts.wordAllowedStyleProps,l=y.clean.html(l,y.opts.wordDeniedTags,y.opts.wordDeniedAttrs,!1),y.opts.htmlAllowedStyleProps=c,l}return{_init:function e(){y.events.on("paste.wordPaste",function(e){return i=e,y.opts.wordPasteModal?function r(){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> '+y.language.translate("Word Paste Detected")+"</h4>",t=function i(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+y.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">'+y.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+y.language.translate("Keep")+"</button></div>",e+="</div>"}(),a=y.modals.create(s,e,t),n=a.$body;o=a.$modal,a.$modal.addClass("fr-middle"),y.events.bindClick(n,"button.fr-remove-word",function(){var e=o.data("instance")||y;e.wordPaste.clean()}),y.events.bindClick(n,"button.fr-keep-word",function(){var e=o.data("instance")||y;e.wordPaste.clean(!0)}),y.events.$on(c(y.o_win),"resize",function(){y.modals.resize(s)})}y.modals.show(s),y.modals.resize(s)}():t(y.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:r}}});